NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » Sliding door obstruction detection

November 21, 2016
by Ralphxyz
Ralphxyz's Avatar

I also posted this on Rick's forum.

I need to detect if anything is in the way of a powered sliding door.

the door opening and closing will be controlled by a micro.

The door will 8' tall.

So far I have pictured at least 5 photodiodes on both sides.

But how would I wire that?

I would really like other methods than photodiodes.

Possible I could do it with limit switches, that might be easier.

I could wire all of the switches on a side in series NC (Normally Closed)

and do a Interrupt on the pin change. That sounds easy.

So what do you think? Got any ideas?

Thanks for the help.

Ralph

November 23, 2016
by scootergarrett
scootergarrett's Avatar

Could you measure the power to the door motor? When the power spikes you know you are starting to crush something or someone.

November 23, 2016
by Ralphxyz
Ralphxyz's Avatar

Thanks scootergarrett, that is a option I had thought of.

That would probable be the simplest method as I have some ACS712 modules similar to this one from Sparkfun.

I wonder how much pressure would be needed to raise the amperage, I am using a 12 volt Brushless

motor so the torque will much more than what is needed to open/close the door so the amperage

might not go up until the torque is used up then increasing the amps.

At least that is the first reason why I "think" it might not be a good idea.

I might setup a test bed to test my motor controller etc. so I could see if I can stop

the door travel mechanism.

Of course it would be cool to use some visible laser beams, but I do not know if there are any

visible lasers that would not hurt ones eyes. Of course the price of doing it with laser beams

might be prohibitive.

This is fun to think this through.

I probable will not do the door until next spring so I have some time to think this through.

Thanks again, for the reply.

Ralph

November 23, 2016
by esoderberg
esoderberg's Avatar

Using a microswitch seems like the simplest option. You could put a long, thin beam/rod spanning from the top of the door to the bottom just in front of the door; attach beam with a pivot point at the top of the door and to a microswitch at the bottom, that way any interference, from top to bottom, will cause the beam to rotate about the top pivot point and activate the switch at the bottom. It would work like a pressure plate.

November 24, 2016
by Ralphxyz
Ralphxyz's Avatar

esoderberg, thanks that is a better idea than what I had.

I was thinking of multiple limit switches but with your method all I need is one.

The only challenge is that the wire will have to travel with the door.

That should be doable.

Nice to see you and Scootergarret and darryl still checking in on Nerdkits.

Are there other micro/electronics forums you frequent?

I occasionally post projects on Rick's forum.

December 02, 2016
by BobaMosfet
BobaMosfet's Avatar

Ralph,

You can create a pressure sensor to put along the edge of the door simply by putting 2 wires, one on either side, with a piece of conductive foam between them. Then coat the whole thing with tool-dip. You can make the leads come out anywhere you like, and the foam can be in (for example) 24" long x 1/2" wide x 1/4" thick pieces end to end (long-ways).

The foam is just a conductive dialectric between the two wires. Once you get it done, measure the resistance between the 2 wires and see what it is without pressure. Then press on the strip (anywhere) and see what the reading is. Should be higher resistance when not pressed, lower resistance when pressed.

You can get a sheet of foam here (or simply use any anti-static foam you've received in shipments-- not the peanut kind):

http://www.all-spec.com/Catalog/Static-Control/ESD-Safe-Cushioning-Materials/ESD-Safe-Foams/725-2436

BM

December 02, 2016
by Ralphxyz
Ralphxyz's Avatar

BM, what a great idea!!

Is Plasti Dip what you mean by Tool Dip?

Or something similar.

Then what? Would I measure the resistance with ADC (Analog Digital Converter)?

I wonder how much squish it would take to make contact.

This really has me thinking, I wonder if Liquid Tape would work?

What exactly is the purpose of the Tool Dip? It would be non conductive so is it just to tie everything up?

Thanks for the reply, I have gotten some really great feedback here and on Ricks Forum.

Ralph

December 02, 2016
by sask55
sask55's Avatar

BM

That is a really neat idea. I happened to have a very small piece of foam from some shipment. I had no idea that this type of foam was conductive. I did a bit of a test with a VOM. It does actually work quite well as you said, only in the opposite direction then expected.

The resistance across my piece of form actually goes up about 15% when a considerable percentage of the total foam area is compressed to nearly flat. With the door strip idea, I think the change in resistance may be quite small when there is a long strip of foam and only a small area may be compressed. The ADC would likely have to measure relatively small voltage changes produced by the change in resistance when passing a voltage across the foam from one wire to the other.

I also experimented with changing the temperature of the pieces of foam. The resistance appears to be quite sensitive to subtle changes in temperature as well as being compressed. I noticed that after the pressure is removed the small piece of foam takes a considerable length of time to return to the original reading, perhaps 10 to 20 seconds to stabilize at a reading near the original level, depending on how distorting the pressure was.

I imagine these factors could be considered in the monitoring functions on the micro. For one thing, a change in the foam temperature is likely to happen over a relatively long period of time when compared to a compression do to the door contacting something in its path. I suppose the micro could measure and reset the expected level of resistance of the strip just before starting to move the door towards closing. Then any quick change in resistance of the strip could be interpreted as a compression of the foam do to the door encountering an obstruction, whereas long term changes do to temperature would be ignored.

The idea may not be as simple, positive or reliable and a bit more will be involved to set it up on the micro when compared to the other idea of using one or more push buttons behind a ridged strip on the leading edge, but it certainly sounds like a interesting concept and may work great.

Darryl

December 03, 2016
by Ralphxyz
Ralphxyz's Avatar

Hi Darryl, I wonder just how much pressure is required to get a noticeable change in resistance?

The door would be exposed to freezing temps and roasting temps (southern exposure).

I am still "thinking" about some sort of optical sensing.

I got a laser and some beam splitters off ebay and some photodetectors.

I got the laser because is said it was safe to view, though it comes with a warning to not stare into it.

The only problem is the laser is not on full time but blinks.

I would have to do some rather involved timing if I used it. I have other lasers but I do not know if they would be safe, they came off ebay without documentation of course.

I probable would set these up rather close to the floor so that I stay away from any eyes.

The All-Spec site has cheaper foam than the one BM quoted. I wonder what the difference is.

The Surface Resistance: <10^5Ω~ is the same for both. I could save $6.00 dollars.

Ralph

December 03, 2016
by sask55
sask55's Avatar

I don't really have any experience with the form apart from the short experiment that I did after I read the post by BM. I was thinking about it last night. I would think that the foams resistance would be changed drastically by even the smallest bit of moisture, perhaps even humidity levels and dew, that could possibly get into the foam if the seal is not 100% water tight. I would be concerned that the smallest crack or tear in the plastic coating may render the entire strip useless if the foam becomes contaminated with water or even dust. It is a very interesting idea. I am a little sceptical it would turn out to be a good long term solution, but as I said I really don't know.

My opinion (for what it is worth?) is that an optical system is likely to be the best, simply because the door can be stopped before any contact is made or not started at all if the system detects a object in the slide path. Any other system that is depending on the system contacting the object before any action can be taken will react slower and the momentum of the door itself may become a factor.

It certainly would not be a bad idea to have more then one system in place, each backing the other up. The redundancy may be very helpful if something unexpected goes wrong. With a motor capable of anything like 1/2 HP. your door closing system could conceivably be capable of very high crushing forces and or rapid movement of the door depending on the system you build.

I had another thought about a possible system that may work on the leading edge of the door. I was thinking about the old style rubber hose vehicle detection systems that where used at service stations to ring a bell as the wheel of a vehicle rolled over the hose. It may be possible to glue a very pliable hose down the leading edge of the door. If that hose was filled completely with a liquid that will not freeze and will not compress. Something like a very light oil or windshield washer antifreeze may work. I think any pressure on the hose would result in the hose flattening a bit and increasing the pressure in the hose. Now if the hose had a low pressure switch or digital pressure sensor attached it may be possible recognize the increase in pressure. The one or more push buttons behind a strip down the door is likely still the simplest and most economical.

If it where me, I think I would be looking into the optical system as you have indicated and also experimenting with a digital current sensing chip one of the motor leads. Neither of those systems would involve anything on the door to try and connect. The amperage overdraw system would work with any type of restriction on the door movement in both directions.

Darryl

December 04, 2016
by BobaMosfet
BobaMosfet's Avatar

Ralph, Darryl,

It's a relatively inexpensive thing to test/experiment with and would work along the length. You can actually purchase such sensors, but they are more expensive, and usually come in 2ft lengths or so.

Tool-dip-- yes, just a thin, rubber coating to simply protect it and hold it together into a 'strip' form, with one long wire on one side of the foam and one on the other side. Like a sandwhich. The rubber/plastic coating helps protect it, as well as perhaps making it less susceptible to outright moisture exposure. Wire leads outside would still of course be coated (wire inside, against the foam would be stripped of its protective casing, of course).

And to be honest, I can't remember if the resistance goes up or down when squished, but I know it changes due to changing conductive density factors of the foam. Your mileage will very with the type of foam and the amount of wiring you use.


Likewise, Darryl's pressure idea (like gas stations used to have) is not a bad idea either-- you don't need liquid, just air. Any pressure on the outside of a sealed bladder will increase the pressure inside. A pressure transducer at one end could register a change in pressure-- this would probably be a really good, and accurate method.


Ralph- Yes, use the ADC to read it. Simply determine the max range of change, divide that across 5000 steps for the ADC, and then you have your resolution.

BM

December 05, 2016
by sask55
sask55's Avatar

The only reason I was thinking of using a liquid in the hose is try a increase the sensitivity of the system. I know air works very well if there is a higher pressure deformation of the hose, or if the hose is flattened over a bit of length. I was thinking the incompressibility of a liquid may increase the the chances of detecting a pressure rise if only a short length of the hose was effected by the door restriction. I think with air it may be possible to completely flatten the hose in just one short area and not have much of an effect on the total volume of air trapped in the hose. For example, if it happened that the hose volume was only changed by 1% then the pressure would only rise by 1% in the hose (PV= NRT for ideal gas, air is not an ideal gas but close enough for this). By using a liquid, the hose would have to expand somewhere else in order to deform the hose at all. I think even the smallest pressure point on the hose should immediately produce a corresponding increase in the liquid pressure in the hose.

It seams like you may have some workable solutions. A bit of testing may help determine which way to go.

Darryl

December 05, 2016
by BobaMosfet
BobaMosfet's Avatar

Darryl,

True-- hydraulic. Water cannot be compressed to any measurable degree-- one of it's most fantastic and interesting properties. Using water (which is safe if a leak) would indeed give a direct press on the transducer wherever the tube happened to be pinched/pressed.

BM

December 05, 2016
by Ralphxyz
Ralphxyz's Avatar

But it would have to be very sensitive, it might bump into an arm which is flexible and movable.

Most tubing would be to restrictive, now if I had a 8' x 3/8" balloon I could see that working.

I ordered some conductive foam, to make some strips out of, we'll see what happens.

Ralph

December 05, 2016
by sask55
sask55's Avatar

I know said sensitivity but I am not sure that is the best word to describe the advantage the liquid gives. I don't think the liquid filled hose would necessarily give you more false readings. I am quite certain it would give more reliable reads on shorter lengths of the hose.

Imagine, if the door was closing on something but only made contact at a relatively small part of the door's leading edge. Perhaps a hand or a finger is between the door and the door frame just as the door is about to completely close. The motor closing the door could likely completely flatten a very short portion of the hose with a small amount of force. Now suppose the hose flattened to the point so that there was no more air in that short bit of hose. The volume change in the hose do to flattening would be just a small potion of the total volume the air in the hose. The air in the hose will compress just a bit and the pressure change may be very small. It may be difficult to pick up a vary small rise in the air pressure. The problem would be that the hose would be completely flat in that small length where the obstruction is. There would be no more air in that length of hose. As the motor pushes harder it would have no effect on the pressure in the hose, the system would fail to stop the motor and the only thing limiting the crushing force would be the strength of the door closing mechanism and/or the motor torque and /or the current available from your power supply. That could be a very bad situation.

By using a liquid it would not be possible to flatten the hose at any point without the pressure in the hose rising as the motor produced more push. I think it would be a safer option.

Darryl

December 06, 2016
by Ralphxyz
Ralphxyz's Avatar

I like using a liquid.

But the hose would have to be very pliable.

A garden hose would only be effective while an arm or finger was being crushed.

with a pliable hose I can picture a float and a limit switch or even a optical switch.

A optical switch might be more sensitive.

Ralph

December 07, 2016
by sask55
sask55's Avatar

Hi Ralph

I believe that you should take a serious look at monitoring the door moving resistance with a current sensing transducer one of the motor leads. There are many devices that would work very well to measure the DC current the motor is using and make that value available to the Miro.

We know that your motor is said to be a ½ hp but that is a power level well beyond anything you will require for this project. To do a rough estimate of just how much mechanical power you will require to open and close a sliding door I have made a couple of ball park guesses.

Mechanical power is expressed as a force through a distance over a certain time period. To estimate the power your motor will be required to produce we have to estimate the force required to move the door, the distance the door will slide and the length of time you wish to move the door that distance. You could use your own numbers here, but the principle will remain. The only thing the really counts will be what is measured after the door is in place and the motor is moving the door. Horse power and watts are a unit of rate of energy used. There are a number of ways energy use rate can be expressed considering the type of energy that is being compared. .

1Hp = 745.7 watts  ( the typical unit used for electrical energy)

1hp = 550 lb ft /sec

That is Pounds of force times feet of movement done in each second. 1 hp could push with 1lb. of force a distance of 550ft each second, or push with 550 lbs. of force a distance of 1 ft. each second. Any combination of the force in lbs. times the distance in feet that multiply together to arrive at 550 done each second is 1 hp.

1hp = T * RPM /5252 or torque (in ft. lbs.) time the RPM’s of the shaft divided by 5252

If a motor was producing 1 ft. lb of torque while turning a shaft at 5252 RPM it would be producing 1 hp. Or if the motor was producing 5252 ft. lbs. of torque while turning a shaft at 1 RPM that motor is producing 1hp. Any combination of torque and shaft speed that multiply to get 5252 is 1 hp.

For simplicity of the math, I will estimate that it will take 5.5 lbs. of force to move the door along at a constant speed of 1 ft. each second. So; for this example, the door may take about 3 seconds to completely open or completely close. If you were to move the door along the track using a spring scale it would take 5 ½ lbs. of force to move it along at a constant 1 ft. /second rate (with no door moving mechanism attached). The roiling resistance may be due to wheel bearing friction and weather stripping dragging on the door frame. In this example the door movement is requiring 5.5 X1 =5.5 lb.ft./sec = .01hp that is just 1% of 1 hp. Or 7.4 watts of electrical power.

We can see that this project will require nowhere near ½ hp form the motor. To use anywhere near 1/2 hp of power the door would be either moving while producing a very high crushing force or sliding at a ridiculously fast speed.

The door movement mechanism and the motor will have some level of inefficiency. It would be anyone’s guess what the level of that inefficiency might be. let’s use 50% as a guess, in that cases the power supply would have to supply twice as much energy as is being used to actually move the door the other half of the energy is wasted in the motor and mechanisms. So, the 12 volt power supply may have to supply about 15 watts of power to the motor to get 7.4 watts worth of door movement energy that is required for this example.

Watts = Volts X amps

So, the current level requires to move the door at that (1ft/sec.) speed while pushing with that (5.5lb) of force is

15/12 =1.25 amps. Required to move the door for this example.

You indicated that the motor draws about 1 amp while turning under a no load condition. I estimate it will draw about 2 Amps or maybe 2.5 Amps while moving the door under the conditions in the example above.

I think it may be quite easy and very effective to make use of a current sensing chip to monitor the motor draw when the door is in use. By measuring the current level under normal free sliding conditions, you would have a bassline level. It may be as simple as testing the motor current while restricting the door movement and deciding what level of current draw is too much. Then micro can be programmed to monitor the current level as the door moves, if the max level of current is measured the door is stopped or reversed.

In order to design a system that will work well you must design a door moving mechanism that moves the door at a reasonable speed considering the maximum RPMS that the motor capable of producing. For that reason, it is very important that you know what the output speed of the motor is under no load conditions. It will never turn faster than that value and may drop under considerable load. Since the motor is rated to have a power capability much higher then you will ever want to use, I believe it may be a simple matter to slow the motor down using PWM on the micro. I don’t think there is any way too speed it up. PWM could likely be used to slow the door at the last portion of the movement just as it completely closes or completely opens. This would allow for a nice gentle movement of the door and may be a safety feature.

I know for me a door that took 10 seconds to fully open or close would feel like an eternity at times.

I don’t know if any of this is of interest. I do have a couple of other ideas about how the micro could be informed about the door position.

Darryl

December 07, 2016
by Ralphxyz
Ralphxyz's Avatar

Thanks Darryl, keep'em coming since you have the time.

I have other projects/ideas where I need a spring scale, I have to put that on my list of things to get.

The only way to speed up the motor would be with gearing.

I have lots of the ACS712 modules so current sensing will be easy.

I need to setup my rpm sensor on the motor, I am just visually looking at it and "thinking" it "should" move about a foot a second, but that really is just a guess.

If i use the 1/2-13 tpi (Threads Per Inch) threaded rod.

I am starting to do some math on 13 tpi, that may not work.

I might need to setup/get some gearing for it.

Or I have some small wheel driven motors that came from a small scooter, they might work better, or be easier to set up, as you said it should not take much HP to move the door.

This is so interesting, I hope others are finding it interesting.

Ralph

December 07, 2016
by sask55
sask55's Avatar

Ralph

I think I may have located a bit more information about the motor you mentioned you have in an earlier post. I have found an add that indicates a very slow motor speed. 9T21 CHAMBERLAIN WHISPER QUIET OPENER 12VDC DRIVE MOTOR, 50RPM +/-, #002D0794:

I cant say for certain but I think your motor may already have a worm gear box attached to it. I see most of the garage door motors pictured on line do have that. It would be almost essential, considering the mechanical chain or belt drive mechanisms that are typically used on garage door openers.

If your motor does in fact still have the worm gear speed reduction included and the output shaft is turning at about 50RPM as is listed in the add I found, then I it would be possible to estimate the door movement speed. If the output is that slow it should be easy to count the revolution in one minute with a bit of tape or a mark on the shaft.

A 13 tpi means your rod has 13 thread per inch, In order to move a nut on that rod 1 inch the motor will have to turn 13 revolutions. To move the nut 1 foot will require 12 X 13 = 156 revolutions. Using that rod on a motor drive turning that slowly (50RPM) it will take longer than 3 minutes to move the door 1 ft. If the door was three feet wide it would take almost 10 minutes for the door to move completely arose the opening. clearly the threaded rod approach is not going to work well with such a slow speed motor driving it.

Fortunately! there are much better ways to make use of a motor like that. A slow turning output will translate into a motor drive that is capable of outputting high levels of torque when it is required. I think you will be able to make a much better door drive mechanism with this slow turning motor then would be possible with a high speed drive on a threaded rod.

If your motor drive output is indeed turning at about 50 RPM and you wished to have the door move at about 1 foot /second for a maximum speed we can calculate how far the door should be moved for each motor turn.

50 turns / minute is 50/60= .83 turn each second.

Each turn of the motor output you will want the door to move 1 ft. The question remains, if there was a spool or gear fixed to the motor drive how big would it have to be to move the chain or cable at a rate of 1 ft /second? The effective circumference of the drive wheel must be 12in./.83 = 14.4 inches. The radius of the drive wheel must be (C=2πr) 2.3 inches. or a diameter of 4.6 inches.

If you where able to locate an old bicycle with small sprocket (about 4 inches across) that you could remove and use as a drive wheel you would effectively have a home made pinion gear. The bicycle chain could be laid flat and straight on a hard flat surface like the top or side of the door, to used as a sort of rack that will be engaged by your pinion sprocket. The chain would have to be fixed solidly at the front end of the door extend past the back of the door far enough to allow the motor drive to engage the chain just behind the door frame of the open door. The motor drive with the bicycle gear on its output drive is mounted with the teeth down into the chain between the rollers. As the motor turns one revolution about 14 1/2 inches of chain is pulled under the sprocket. since the motor will turn at .83 rev/second the chain is moving at about 1 ft /second.

Many bicycles will have several gear sizes to pick from. By selecting a different size of gear from the sprockets you have available you can calculate and estimate the door movement speed to match what you think would be appropriate.

The same thing can be achieved with a spool having one wrap of cable around it. The cable drive mechanism would likely be quieter and run smoother.

December 08, 2016
by BobaMosfet
BobaMosfet's Avatar

Ralph- surgical tubing. Relatively cheap, very flexible, and would yield to slight pressures.

BM

December 08, 2016
by Ralphxyz
Ralphxyz's Avatar

Thanks Bm!!

Post a Reply

Please log in to post a reply.

Did you know that first-order systems have a exponentially decaying response to step inputs? Learn more...