Garage door, getting the position

Hmm, that is a good idea too. And I already got a magnet on the slider.

I changed the switches that were on it to some that was more reliable (the original ones were failing more and more often).

Might even be possible to put the reed relays in the little opening you can see there too, to keep them protected. And then put another magnet on, standing upright to trigger them. Would also be able toget something like 25mm steps, but would require a whole load of small relays and resistors. But could of curse also bump it up to one relay for each 5 cm or something.

If the motor moves at a reasonably steady pace you could probably get a reasonable approximation of the position between switches with a bit of millis() counting :wink:

Another option I just thought of similar to the above stated method... RFID tags along the slider and then an RFID reader somewhere on the track ( or 2 readers if necessary to cover the whole track)

Might be a little pricier, but just trying to brainstorm.

I think the reed tubes are the way to go, the rfid would be many times more expensive. And already with the reed it is going to be nothing but free :wink:

Well, you never answered the question as to the total travel length of the door. Critical info when specifying accuracy at 5cm. I'll assume ~8' which should be ~240cm. At a 5cm accuracy (+-2.5cm) would require ~96 position detection points if not using an encoding method or a pot. Also, the video shows little of the mechanical working so the door opener itself. You mention "...where the springs perfectly holds it," which is interesting for the martini thought process. If the door has holding springs that stretch and contract as the door moves (I remember these from a garage door from many years ago) then there may be a simple solution. Observe the door springs as as the door moves up and down. With the door up, the spring should be collapsed such that there is no or little gap between the coils. With the door fully down measure the gap between the coils. If this gap is fairly small, then a pot setup could be used to measure the change in gap between the spring coils. One might be able to just hot glue a sliding pot to the two adjacent coils such that the pot base is connected to one coil and the slider is attached to the other coil. As the door closes and the door spring stretches, the the pot slider is moved indicating the new position. The door spring coil gap provides indication of the current door position over a small distance that may be more easily measured by simple gizmos.

I remember these from a garage door from many years ago

That was many years ago too :wink: New doors are totally sealed. I can't even access the wire without taking it apart. And the springs are hidden inside the long bars under the roof, and can only be accesses if i take the entire system down and opens it. Only thing that can be reached there when it is up, is a screw to tighten it.

Still haven't discarded the idea of a rotary encoder yet either. I remember someone using some black and white colors on a wheel, and I might be able to use the same for one of the wheels where the metal wire goes over.

A little more martini thinking indicates you probably could duplicate the spring system that is internal to your door. Externally duplicate in minature the internal mechanical workings. :wink:

hahaha, yeah! I have been thinking about adding something to the outside, or a wire going up and down or something. But the problem is that all moving parts are either encased or on the inside (the side where the door itself is).

Was just out to measure, total distance the door moves is 195cm, so almost two meters.

Tested a 200 ohm multi turn pot meter, but didn't have enough revolutions in it. Also tried to let the door pull a weight up and down, but it got a dead point at the end, because it just tilts around there and closes the door in the top.

And then looked a bit at these wheels for the metal wire. Maybe I could add two optical sensors to that, and then paint one or two black stripes on it.

One of these should be able to do that trick

http://www.me.ucsb.edu/~me170c/Sensors/Reflectance_QRB1114.pdf
http://www.electrozone.dk/sensors/infrared/large-optical-detector-phototransistor.html

Maybe I could add two optical sensors

Looking at the amount of spider-generated debris in that photo, be very careful with optical devices - they could be obscured when you don't want them to be.

I don't think that is a big problem. What you see there is what is gathered over a 5 year period, and I haven't cleaned it a single time. The owner before me was 96 years old, and I am pretty sure he didn't either.

The thing with all the webs on are also only the end that is going down on the ground, there are only a tiny one in the area where the wheel are, and not even close to it.

I think it is the best shot I got, no matter where I look, there are something in the way for my plans. Also tried to look at where I was planning on adding the rotary encoder, and I can't do that either, because it got a protective cap there, and if I remove it there can get dirt down into it, plus it will loose half of its support keeping it in place. So I am starting to run out of options :frowning: All that damn safety, impossible to work with...

With 196cm travel and 5cm accuracy desired, you would need ~78 sensors. Sounds expensive and complicated. I suggest you duplicate the door spring/pully system internal to the door, externally, so a single pot can be used. Using a long skinny screen door spring (or even some thin bungi cord), some wood and nails, a length of string, and a couple of other incidentals, one could construct a gizmo that would stretch the small spring with a slider pot attached similar to the big door spring. I like to keep gizmo experiments less than $10.

The problem is just to find space to actually do that. If you look at the picture, you can see the metal wire going in the box where the spring is in the end. That box is going a bit down, and the wheels are then running inside there. So there are no room for anything on the outside.

Tried with some string before, and it almost got squeezed into the rails where the wheels are. Would then have to drill a hole in top of the box so it can go out there, the next problem is then to connect it to the door, because there are no room there because of the outer guiding rail..

I could then just connect it to the other end, but I am going too look at it at least twice daily, plus it is very open there, so it would be very easy to see, and I would like to make it close to invisible. Think I will go to bed and see if I get some ideas during the night.

Keep the string clear of and external to any mechanical areas of the door. You could connect the end of the string to the top of the door, and the mini pully/spring/pot setup on the back wall of the car port. As the door closes the string would be pulled along the ceiling. As the door opens the string would be retracted by the spring/pully setup. Note the operation of multi sheave block/tackle setups in the below link. Long pulls of the rope result in a small amount of travel in the block. For the door, the string end would be connected to the door top, and the spring to be streched would be connected to the block. As the actual load is only sufficient force to retract the string, it probably can be lightly built. That being said, I think in the end you will really only find door closed/not closed of any real value.

That being said, I think in the end you will really only find door closed/not closed of any real value.

Yeah, but that value isn't even for me, it is for the arduino. I am planning on adding a lot of things to it. I want it both to measure rain, and if it starts to rain, it should then close the door enough so it wont rain into the garage, but still allow air to pass under. Also measure humidity, so if it gets too high, then open the port a bit, if it doesn't help, then open it some more, but still without allowing it to rain in.

Going to look in some shops tomorrow for stuff that can be used, and how much it costs.

The more pulses an encoder puts out the more precise your measurement. Most encoders put out A B and Z. A and B tell you what direction and where. Z tells you when you're at a known fixed location.

It could take your motor 10 revolutions to go from open to close. So you multiply 10*1024 to get the pulses you'd need to count. For human readout divide that by the length in mm or cm to get a conversion factor. The Z output is a convenience you could use limit switches but if the encoder is working and you're counting all the pulses you will only need those if the arduino or encoder fail so they should be wired as cut offs.

If one wanted to count chain links, a limit switch like below could be used. If counting is used, then calibration routines would be needed upon startup after power loss and such.

For proof of concept at only $2, I think the switch would be something easy to try. One can tweek the switch to minimize the "beat up" factor. Low tech solutions often have associated increases in low tech issues (noise, debounce, etc). An optical gizmo that looks thru the chain links generating on/off as the chain moves might be a cleaner solution. The door mechanism apparently is well sealed to limit access which limits options.

I was pondering this the other night after reading some of the thread.

How about a largish potentiometer on its side with a weighted pendulum attached to the shaft.
If this was mounted in a box and attached to the door,in the right orientation, as the door moved the pendulum would turn the shaft of the pot and the resistence would change.
it would be safe from dust and dirt and you could map the resistence to the door position.

Gordon

How about a largish potentiometer on its side with a weighted pendulum attached to the shaft.
If this was mounted in a box and attached to the door,in the right orientation, as the door moved the pendulum would turn the shaft of the pot and the resistence would change.
it would be safe from dust and dirt and you could map the resistence to the door position.

Something like this could work, but you would need one box per door section if you wanted to be able to stop the door at any position (rather than just up and down) - plus the math to integrate all of the potentiometers might get hairy. You might be able to get away with three such boxes - one on the top section, one on a middle section, and one on the bottom section.

As far as potentiometers are concerned, you would want to use weights on the shaft to effect a pendulum response, but you wouldn't need a long lever pendulum, provided that the shaft of the potentiometer turned freely enough. This might mean some shopping and sampling of potentiometers, though, unless you can physically handle them. A largish knob with a blob of formed lead at one spot (maybe a fishing weight) could be used as the "pendulum".

Or - you could use an optical solution consisting of an LDR or similar light detector plus a clear disc with a radial gradient mounted on a shaft to detect its position (hmm, maybe a weighted alluminum disc with a slit that starts narrow and increases in width to change the amount of light seen?).

Its an interesting idea...

:slight_smile: