PDA

View Full Version : circuit and code for garage door opener with boe?



mwilson
04-29-2006, 04:15 AM
I want to use an old photoelectric garage door opener as a sensor for my stamp (that will eventually trigger video in jitter, but for now i'll be happy if it'll blink an led). i'm not sure how to wire it into the board of education without short circuiting. i'm also a little lost on the code - after assigning the inputs and outputs.

any advice?

Chris Savage
04-29-2006, 06:33 AM
Do you know the output of the device or anything about its electrical characteristics? You will need to know this to connect it to the BASIC Stamp, or anything else for that matter.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

mwilson
04-29-2006, 10:48 PM
It runs on a 9V battery. It has three wires all in one strand - one goes to the battery which has a fourth wire (ground).

Chris Savage
04-30-2006, 01:07 PM
So you don't know if it opens/closes a set of contacts or outputs a voltage?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

mwilson
05-01-2006, 01:19 AM
OK, spent the day with it yesterday and its looks like this:

When the beam is unbroken - there's a .2V coming off the signal wire. when its broken, it reads 6.7 V.

So ... I was thinking - the two grounds in Vss. The signal wire in board with a resistor (?what strength?) to put it down to 5V at least. Then tap that into an input like P7. ?

Then code - it would be HIGH 7 to turn the LED on, LOW 7 to turn it off.

Does that sound close?

allanlane5
05-01-2006, 01:29 AM
The input impedance of the 'input' transistor inside the I/O pin is about 10 Megohm. Now, that input pin also has a couple of protection diodes on it. One keeps any negative voltage from going below 0.6 volt below zero. The other keeps any positive voltage from going over 5 volts.

However, those protection diodes need something on the input to reduce the current they see when they try to protect the pin. For RS-232, (a -12 to +12 volt signal), a 22 Kohm resistor works well. Note the current being reduced is the 'clipped' current -- between 0 and 5 volts the resistor does very little. It's above and below that where the resistor has it's current-limiting effect.

So, putting a 22 Kohm resistor in series should provide sufficient protection for your 6.7 volt signal. Note you also don't want to 'load down' your 6.7 volt signal either -- and 22 Kohm should be sufficient for that, also.

Chris Savage
05-01-2006, 09:57 AM
If you ran the signal into an optoisolator you could electrically isolate the circuit to be safe. The output would be like a transistor.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

mwilson
05-07-2006, 06:37 AM
Thanks, I put a 22K resistor in and that seems to work. I've got the whole thing running so that the led goes out when the garage door opener signal is broken. So far so good.

Now --- I need to get the output that is currently lighting the led into my computer to a jitter program. Can I use the USB in that I have for programming as an out? How would I program that? OR - do I use midi? How do I wire in a midi connection?

Thanks!