Connect with us

Simple Relay

Discussion in 'General Electronics Discussion' started by cwalnut, Oct 17, 2012.

  1. cwalnut

    cwalnut

    3
    0
    Oct 17, 2012
    My electronics knowledge is a bit limited and rusty, but I think this should be an easy question.

    We have a simple setup that consists of a single relay that periodically opens/closes. When the circuit is closed, ~5 volts DC is placed on the line which is detected by a computer system via a serial connection. This is nothing more than a simple counter; every time the circuit closes, the computer adds one to the count. Open/close cycling takes place about every 20 seconds.

    The problem is that "phantom voltage" in the range of about 300 mv is triggering the computer and resulting in false counts. This is confirmed by putting a voltage meter on the line with no voltage applied. I am looking for a part (resistor, diode?) that will only allow voltage to pass when it exceeds a certain level (probably 1 volt in this case). That should effectively filter out the noise that is bleeding into the line. Any idea exactly what I should be looking for?
     
  2. BobK

    BobK

    7,599
    1,641
    Jan 5, 2010
    When the relay is open the input line is floating? If so, a resitor to ground should help.

    Bob
     
  3. cwalnut

    cwalnut

    3
    0
    Oct 17, 2012
    Correct, when the relay is open you can measure ~300 mv max (fluctuates up and down) on the line. The cable run is about 100 feet and passes somewhat close to industrial lighting and other power sources, so my guess is that a small voltage is being induced via EMI.

    How would I go about determining the Ohms rating for the resistor?
     
  4. BobK

    BobK

    7,599
    1,641
    Jan 5, 2010
    Depends somewhat on what is driving the 5V. I would start with 1K near the input to the computer. If the 5V is capabable of driving more current, you could reduce it if necessary, to say 100 Ohm.

    So where is the 5V coming from? is it directly connected to a power source, or is it the output of some circuit?

    Bob
     
  5. cwalnut

    cwalnut

    3
    0
    Oct 17, 2012
    Thanks. We'll experiment a bit and see what happens. I'm thinking a rheostat would be best for making adjustments.
     
  6. BobK

    BobK

    7,599
    1,641
    Jan 5, 2010
    The other option, which might be better, is to use a SPDT relay and connect the NO contact to +5V and the NC contact to ground.

    Bob
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-