Shop OBEX P1 Docs P2 Docs Learn Events
Help with BS2 and a relay — Parallax Forums

Help with BS2 and a relay

GeorgeVGeorgeV Posts: 1
edited 2008-05-21 19:59 in BASIC Stamp
Hello,

I am designing an experiment where multiple probe pairs are used and one of the requirements is that at any given time only one pair is connected to the medium under observation. I am trying to devise a circuit that uses relays to connect a pair of probes, make a measurement and disconnect the pair, then on to the next pair and so forth... I though that it would be pretty easy to use a relay and BS2 for making and breaking connections (in the spirit of http://www.dnatechindia.com/index.php/Tutorials/8051-Tutorial/Relay-Interfacing.html), however I have prototyped the circuit, got a few relays (Relay Reed DIP SPST 5V Digikey part # 306-1019-ND) and tried to turn on and off a simple 'load' (LED + resistor) but I can't seem to get the relay working, e.g. the LED stays off when I supply 5V to the base of the transistor. As far as I understand the coil energizing voltage is 5V for this relay, so it should be OK.

Does anybody have a circuit, with exact part #'s from Digikey that works? Or have any clues why I can't get it to work, or how to go about finding what is going on...?

Thanks,
George

Comments

  • David H.David H. Posts: 78
    edited 2008-05-21 19:03
    GerogeV,
    You need to connect pin2 of the relay to a I/O pin of the stamp. Connect pin6 and pin7 of the relay to VSS. Connect pin1 of the relay to your resistor. Connect the other side of the resistor to Cathode of your LED. Connect the Anode of the LED to +5v (VDD). When you put a HIGH output from your stamp to pin2 of the relay, your LED should light. If I mixed up the Anode and Cathode, I'm sorry. I am a little rusty. If it doesn't work, try flipping the LED connections.
    Good luck.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    David


    There are 10 types of people in this world,...
    Those that understand binary numbers, and those that don't!!!
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2008-05-21 19:09
    GeorgeV,


    I question Amol Shah's logic in his understanding of using a pull-up resistor from the article that you provided.


    Please look at these articles. They should help point you in the right direction...
    http://www.parallax.com/Portals/0/Downloads/docs/books/edu/Wamv2_2.pdf
    http://www.parallax.com/dl/docs/cols/nv/vol1/col/nv6.pdf
    http://forums.parallax.com/forums/attach.aspx?a=2347

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-05-21 19:59
    I agree with Beau…he’s confusing the issue over limitations of the I/O pin and transistor. What should have been done is a suitable transistor with a useful gain should have been selected. In the case of this circuit at power-up the relay would likely click on briefly before the microcontroller had time to initialize its I/O pins. That is almost always an undesirable side-effect.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.