Detecting an open, and indicating with LED

Discussion in 'The Projects Forum' started by k0z0oo1, Nov 26, 2013.

  1. k0z0oo1

    Thread Starter New Member

    Jul 6, 2013
    7
    0
    First, I want to thank everyone on this forum, as i have used the information here before, for the wealth of knowledge. A little of my background, I am an industrial/commercial construction electrician. I do have a limited background in electronics repair/simple circuit design. I enjoy the hobby of slot car racing and have a custom made track in my basement.

    I have LEDs embedded in the surface of the track to indicate the specific lane, 3 lanes total. Currently, they are always on when the track is in use. I would like to only have each lane light up when there is not a car in the slot. The cars use 0-10VDC with a small DC motor, usually no more then 2A draw. The power is supplied to the cars with copper braid, on either side of the slot, and braid on the guide shoe of the car.

    Is there a way to design a circuit that can detect when the car is not in the slot, and display it with the LEDs mounted in the track?

    I was thinking it may be possible to detect the resistance of the motor, which will vary, to turn the lights off. But i did not know if the 0-10VDC powering the car would interfere with this detection.

    Thanks in advance to everyone who reads and/or replies. I will try to answer any questions you may have.
     
  2. contravalent

    New Member

    Nov 26, 2013
    1
    0
    you must detect current in the circuit for each car. If the current is zero, there is no car in the slot.
    The easiest way to detect current is to put a small resistor in series with the circuit and measure the voltage drop across that resistor. For example, a .01 ohm resistor will have 20 millivolts across it when 2A are flowing. You could say the car is not there if less than 1 millivolt is across the resistor. You should amplify the voltage across the resistor with an op amp, and compare the voltage to a reference.
     
  3. wayneh

    Expert

    Sep 9, 2010
    12,103
    3,038
    I pretty much agree, although I'd use a dedicated comparator instead of an op-amp. The LM339 gives you 4 comparators on a single IC, and it's widely available.

    I think you'll want to put a resistor-capacitor RC tank to ground on the signal input, so that the voltage value seen by the comparator cannot change is less than say, 0.5 second. This will prevent false triggering as the car moves and causes a lot of "noise" on the line.

    You need to be sure the resistor can handle the current. Power is I^2*R, or 0.04W. So just about any resistor would be fine. If you use a 0.1Ω, it'll need to be rated to 1W to stay cool. Not a problem.

    The comparator output will drive a MOSFET configured as a switch. This can control the current to your LEDs. It'll control the path to ground.
     
  4. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    How are the led's powered now?
    Separate supply?
     
  5. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    Are the cars powered 0-10 plus only, or reversed sometimes?
     
  6. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    If he needs to detect an unpowered car.
    OP is on the right track with an isolated ohmmeter. If it's possible!
     
  7. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    Also need to know approximate static resistance of car.
     
  8. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    Here is first thought. May need work............:)

    Will not work with current reversal or non isolated supply.
    May not need additional diodes on car power supply.
    May want a diode or two in emitter circuit to raise switching threshold.
    Resistor values depend on ????
     
  9. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,287
    1,252
    If it's like the slot cars I remember with the hand held controller, I'm not sure you can do it. The problem is the controller is open in one position and shorted in the other extreme so you don't know if the circuit is open because there is no car or because the controller is off. Or you could sneak a little current around the controller but not be able to tell the difference between that and the controller being on.
     
  10. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    Then the diodes are needed and dynamic braking is a no-go. :(

    Never enough information.
    A complete schematic would save a lot of speculation. :)

    I see the problem in my idea, but it might not be insurmountable. :confused:
     
    Last edited: Nov 27, 2013
  11. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    Try #2..........................
     
  12. k0z0oo1

    Thread Starter New Member

    Jul 6, 2013
    7
    0
    Thank You to everyone that has replied!
    Contravalent, This is similar to what i was thinking, though did not know how to execute it, thanks!

    Wayneh, I would prefer to use a comparator for the multiple outputs, good suggestion.

    Inwo, LEDs will be powered by a separate supply. I understand the concepts of driving LEDs and figuring for the voltage drop over them. They are all clear white, with colored light pipes over them. fV 3.3v, 20ma.
    The cars are powered 0-(+10v) only, they are never (-10V) the right braid is always the positive, and the left braid is always the negative. Static resistance of the motors range from 3Ω - 50Ω

    Ronv, Yes , the cars do use dynamic breaking (in varying degrees, adjusted by a 25Ω pot). I'm not really concerned if the current for the car is confused with the current for the comparator.

    Here is a schematic of how a controller hooks up to the power supply and track. The controller uses dynamic breaking when the trigger is let off fully.
     
  13. k0z0oo1

    Thread Starter New Member

    Jul 6, 2013
    7
    0
    Also, there are 24 LEDs per lane. I think it would be best for me to use a relay to control the lights. The lights are spread around the entire 80' lap length.

    Forgot to mention, the current draw of the motor is also variable.
     
    Last edited: Nov 27, 2013
  14. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    I don't understand how current sensing will work, as a car on the track may draw zero current. When not powered.

    Maybe what you are trying to senses is an "active" car. That is not the way I understood your plan.

    My idea senses the low resistance of the car on the track. Powered or not, it will inhibit led's. Led only come on when voltage on +rail goes over ~ 10 volts. That will happen only open circuit when the base pullup resistor brings +rail to +15vdc.

    The only question is how the braking is done. If it's a problem that led comes on with braking. Or stay off with "shunted" rail. ie. No car on rail, but braking resistor across tracks.

    Do you have a brake circuit diagram?
     
  15. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    As you may see I find this a fascinating challenge. I enjoy minimalistic circuits. That is, finding the simple way. :)
     
  16. k0z0oo1

    Thread Starter New Member

    Jul 6, 2013
    7
    0
    The breaking effect is enabled by shunting the + and - rails. There may be a 25ohm pot inline with the negative to limit breaking effect. The breaking is only briefly at multiple points during a lap, I'm guessing less than .5 sec time per occurrence. I like the idea for an RC-tank to prevent false triggering. That should also work for the breaking circuit.

    Thanks again for your interest and help.
     
  17. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,287
    1,252
    There may be two other conditions?
    No controller plugged in?
    Controller just sitting there with brake enabled. This looks like a car on the track.
    Inwo, very close - maybe an extra diode or two where D1 is to make sure the transistor will turn on?
     
    inwo likes this.
  18. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    Another try.
    Still not sure how braking is switched.
     
  19. inwo

    Well-Known Member

    Nov 7, 2013
    2,433
    315
    Thanks,

    D1 in base better?
     
  20. wayneh

    Expert

    Sep 9, 2010
    12,103
    3,038
    A relay would work but I'd use a MOSFET, in the position of Q1 in inwo's diagram. Very cheap, no moving parts. Eeezy peezy.

    I understand the issue of avoiding false triggering whenever the power to a track is removed.

    A comparator could easily distinguish between the presence and absence of a car. I use them all the time as connection detectors. Depending how the reference voltage is set, you can use them as touch sensors.

    I'm still a little fuzzy on all the permutations: Are we saying there could be ±car and ±braking, for 4 combinations? (Nevermind the presence of track power or not.) Sounds like it could be hard to discriminate between the brake and a car?
     
Loading...