Go Down

Topic: Garage door, getting the position (Read 4 times) previous topic - next topic

bld

1+3 ) 5-8 cm (the port got a dead spot about half way open, where the springs perfectly holds it, without applying any force to the motor)
2 ) As little as possible, and hard to say how much, because before I actually get the parts here, they might easily cost the double, or more, of what they cost outside of the country.

But it seems to be harder than I hoped for, to get it to know where the door was. So maybe I should go back to just making it calibrate on power up, or add a button to start the calibration so it won't just start to move as soon as the Arduino is powered up.
captain-slow.dk | non contagious!

Jeff K

I don't think anyone has mentioned a battery backup.  If using the rotary encoder method and power goes out... how long can it go out for?  Maybe just rig up some rechargeable D or C cells that power fails over to in the event you have a loss of mains power.  Unless you loose power for several days, this should keep everything working and calibrated.

This keeps the simplest method of the rotary encoder while solving your calibration after power loss problem.
Jeff K - JKDevices.com - home of the MegaMini

BenF

#17
Jun 13, 2010, 05:09 pm Last Edit: Jun 13, 2010, 05:10 pm by borref Reason: 1
Quote
So maybe I should go back to just making it calibrate on power up,

You could delay calibration until there is a need (a command is received) to actually move the door - then you would know someone is there to check. Also if you have end-switches (you should) and is positioned at one - there will be no need for additional calibration if you loose/recycle power and the door is at an end-stop.

You could also save the position (rotary encoder) to EEPROM after every move. Write a flag (a "start" position marker) to EEPROM when you start a reposition sequence and change it to the actual position when repositioning is complete. If the position read at startup is the "start" position - you need recalibration, otherwise not.


bld

#18
Jun 13, 2010, 05:16 pm Last Edit: Jun 13, 2010, 05:20 pm by bld Reason: 1
Hmm, ofcurse! That would be a pretty simple solution to the problem. Could add a rechargeable PP3 battery, I am also putting a 9V voltage regulator on to feed the Arduino, so it should also be able to maintain the battery (I think?).

Think I will go for the battery backup solusion. Sounds like the most simple. And if I then combine it with a manual calibration button too, then it should be pretty safe.

The reason I don't want it to do anything on its own, is because it doesn't have anything to tell it that something is in between. I am working such a switch for it using a light sensor and a little laser module, but the build in controller still doesn't have any good input for that, only thing it does is to stop moving the port when the light is blocked, and it will then just start moving the same way when the light is back again.

So I am also going to connect the arduino to that, so I can send it two fast pulses (off- 50ms on (stop) - 50 ms off - 50 ms on (reverse) - off) and then make it move the opposite direction instead of just continuing down. But it will still be connected directly to the original controller too, because it only senses the light sensor when it is moving down.

And it is not even that big a problem with power loss here. I have lived here for 3 years now, and only had a single one that lasted about a second. I just want it to be save, because when things go wrong for me, it is like watching final destination with a lot of small events happening, and ending by something worse happening (just without all the blood and people dieing)
captain-slow.dk | non contagious!

pluggy

#19
Jun 13, 2010, 05:29 pm Last Edit: Jun 13, 2010, 05:35 pm by stephen_t Reason: 1
Personally I'd have half a dozen reed switches along the track (with a magnet on the slider).  The reed switches short circuit a voltage divider (like the switches on some LCD shields) fed to an analogue pin and the arduino knows which reed switch was passed last, hence it knows where it is, the code for the motor controller should already know which way it's going. You could use digital input pins if you prefer and can spare them.  Much simpler and probably more reliable than the mechanical work to hook up some kind of encoder (and no calibration to worry about).  Although it only knows about discrete positions........
http://pluggy.is-a-geek.com/index.html

bld

#20
Jun 13, 2010, 05:38 pm Last Edit: Jun 13, 2010, 05:39 pm by bld Reason: 1
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.
captain-slow.dk | non contagious!

pluggy

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 ;)
http://pluggy.is-a-geek.com/index.html

Jeff K

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.
Jeff K - JKDevices.com - home of the MegaMini

bld

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 ;)
captain-slow.dk | non contagious!

zoomkat

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.  
Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

bld

#25
Jun 13, 2010, 08:08 pm Last Edit: Jun 13, 2010, 08:27 pm by bld Reason: 1
Quote
I remember these from a garage door from many years ago

That was many years ago too ;) 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.
captain-slow.dk | non contagious!

zoomkat

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.   ;)
Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

bld

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).
captain-slow.dk | non contagious!

bld

#28
Jun 13, 2010, 10:05 pm Last Edit: Jun 13, 2010, 10:30 pm by bld Reason: 1
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
captain-slow.dk | non contagious!

AWOL

Quote
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.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Go Up