Pages: 1 2 3 [4]   Go Down
Author Topic: Garage door, getting the position  (Read 3233 times)
0 Members and 1 Guest are viewing this topic.
Vejen, Denmark
Offline Offline
Edison Member
*
Karma: 7
Posts: 1178
RAWR! ^,..,^
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

captain-slow.dk | non contagious!

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 64
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16523
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Vejen, Denmark
Offline Offline
Edison Member
*
Karma: 7
Posts: 1178
RAWR! ^,..,^
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-wink
« Last Edit: June 22, 2010, 11:44:26 am by bld » Logged

captain-slow.dk | non contagious!

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16523
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Greece
Offline Offline
Full Member
***
Karma: 1
Posts: 143
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  smiley-wink
Logged

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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.)
« Last Edit: June 30, 2010, 05:24:27 am by tkbyd » Logged

Brooklyn, NY
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Vejen, Denmark
Offline Offline
Edison Member
*
Karma: 7
Posts: 1178
RAWR! ^,..,^
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley
Logged

captain-slow.dk | non contagious!

Pages: 1 2 3 [4]   Go Up
Jump to: