Shop OBEX P1 Docs P2 Docs Learn Events
circuit and code for garage door opener with boe? — Parallax Forums

circuit and code for garage door opener with boe?

mwilsonmwilson Posts: 8
edited 2006-05-06 22:37 in BASIC Stamp
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?

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-04-28 22:33
    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
  • mwilsonmwilson Posts: 8
    edited 2006-04-29 14:48
    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 SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-04-30 05:07
    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
  • mwilsonmwilson Posts: 8
    edited 2006-04-30 17:19
    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?
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-04-30 17:29
    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 SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-05-01 01:57
    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
  • mwilsonmwilson Posts: 8
    edited 2006-05-06 22:37
    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!
Sign In or Register to comment.