Go Down

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

bld

Did some testing with the 200 ohm I had, and it gave a pretty nice scale from 0 to 19 with a 10k pull up resistor (wont go higher than the 19 because  of it only being 200 ohm at max).

A 10k ohm trimmer (wired to gnd), with a 10k ohm pull up resistor would give the 0-1023 scale?
captain-slow.dk | non contagious!

arduiYES

i used to work on garage doors and so far i know, there`s a limit switch adjuster on the box.  it`s adjusted with a screwdriver.  some are physical inside the box....gears/pressure sensors.

also, perhaps you could hack a printer.  inside i`ve seen these little wheels that are read by a sensor.  you could craftily install one of those sensors and the wheel on one side of the door by the springs on top and then monitor the input from the sensor on a normal cycle and figure from there.

arduiYES

oops---looks like you already got it figured out

retrolefty

Quote
A 10k ohm trimmer (wired to gnd), with a 10k ohm pull up resistor would give the 0-1023 scale?


Half that count. A 10k pull-up and a series 0-10k pot would form a voltage divider that you yield a 0-2.5 volt range, so a 0-511 count range, no?

Lefty

bld

#49
Jun 22, 2010, 06:36 pm Last Edit: Jun 22, 2010, 06:44 pm by bld Reason: 1
Quote
i used to work on garage doors and so far i know, there`s a limit switch adjuster on the box.  it`s adjusted with a screwdriver.  some are physical inside the box....gears/pressure sensors.

also, perhaps you could hack a printer.  inside i`ve seen these little wheels that are read by a sensor.  you could craftily install one of those sensors and the wheel on one side of the door by the springs on top and then monitor the input from the sensor on a normal cycle and figure from there.

None of that inside the one I got. It is only a 24V wiper motor, just like you would find on the wipers on your car (just 24V instead of 12V). And that is then monitored by something so it will stop when the load is too high.


Quote
Half that count. A 10k pull-up and a series 0-10k pot would form a voltage divider that you yield a 0-2.5 volt range, so a 0-511 count range, no?

Lefty

ah yes, that sounds logic, but would a 20k trimmer then allow the 10k to pull it all the way up to ~510? or would that then be something around 750?

Update
Hmm, wont ever come up to 1023, as it will always pull a bit down, would need something that would go to completely disconnected... But, that much isn't needed either... 500 steps over 195cm makes it precise within 4mm. That should do it ;)
captain-slow.dk | non contagious!

retrolefty

Quote
But, that much isn't needed either... 500 steps over 195cm makes it precise within 4mm. That should do it


And that is the main point, more then enough counts to work with. You can then map it to whatever scale you want in your code, perhaps mapped to show 0-100%

Lefty

tasosstr

An idea if it is not too late, me in that case i was using the encode and also i was monitor the voltage power if the power looks it is fail then i was write in the EEPROM the direction it has and what the persent of the door if the power fail made when the door it was close then the data it will be zero if not then go on with this values and reset the memory.  ;)

tkbyd

#52
Jun 30, 2010, 12:23 pm Last Edit: Jun 30, 2010, 12:24 pm by tkbyd Reason: 1
Regarding the wiring of your trimmer pot to your Arduino: You CAN have (unless I'm missing something!) NEARLY 0- 1023....

Your solutino of the MECHANICAL problem was BRILLIANT! The electronic wiring should go as follows....

From Arduino's 5v to "top" of pot. (If you know where to find the V-analog ref, use that. Almost the same thing.)
From Arduino's "Gnd", or "zero volts" to "bottom" of pot.
From one of the the Arduino's analog inputs to the pot's "wiper".

If you put an ohm-meter on the pot WITH IT NOT CONNECTED TO ANYTHING ELSE, and the reading doesn't change when you "turn the knob", then you are connected to the "top" and "bottom". It doesn't matter if you reverse them. (The 5v can go to the bottom if the gnd goes to the top)

Don't worry about the "short circuit" between the Arduino's 5v and the analog input which this will result in when "the knob" is "twisted" all the way to one end. The Arduino's analog input... as long has you haven't done a
Code: [Select]
pinMode({that pin}, OUTPUT);... is a "high impedence" input... it won't let much current through. (Same is true for digital I/O pins when they are set as inputs.)

eggplant

jumping on late here, but what about a simple limit switch at either end of the garage door 'swing'. if the arduino starts up from BOR or POR and does not see either 'all the way open' or 'all the way closed', it will monitor or ignore sensor input until it gets the shut/open signal. then it can start taking reliable readings. You would need two digital pins dedicated to 'open' and 'shut'.

love the idea of the tape measure! I will use that in future!

bld

Quote
jumping on late here, but what about a simple limit switch at either end of the garage door 'swing'. if the arduino starts up from BOR or POR and does not see either 'all the way open' or 'all the way closed', it will monitor or ignore sensor input until it gets the shut/open signal. then it can start taking reliable readings. You would need two digital pins dedicated to 'open' and 'shut'.

Already talked about earlier in the thread. But my tape measurer will take care of that. I am going to make it so it calibrates when it hits either of the ends, and from a power up, it will still have a pretty close idea of where the door is.

The project is just on stand-by for a week or two, until I can use my right hand normally again. :)
captain-slow.dk | non contagious!

Go Up