Connect with us

Polarity Dependant lighting - Model project

Discussion in 'LEDs and Optoelectronics' started by Stese, Oct 15, 2014.

Scroll to continue with content
  1. Stese

    Stese

    27
    0
    Dec 27, 2013
    Hi All,

    I'm trying to design a circuit to enhance the operation of a model locomotive, so that the headlights activate on the correct direction, and switch to red both ends, if the train is not in motion.

    I'm not able to use a 'DCC' method of this, as I use analogue control.

    Attached is what I think might work...

    because I'm installing this in a small model, I don't think I'll be able to fit it inside the loco body, as I won't be able to find a small enough relay.

    I'd prefer to use appropriate 'discrete' devices, such as transistors, but I've no idea how to use them to do what I want. Could anyone give me some pointers?

    What I'd like to happen :-

    When there is no power to the loco from the track, the red LED should be powered, from the battery. (on my diagram, it's the left LED)
    When there is power to the track, the appropriate LED should be on, powered from the source from the track.

    *Bonus Points* If the circuit can keep the directional LED's lit for a short time, before dropping to red, that would be awesome!

    I *think* my circuit will do that as is... Please tell me if I'm wrong. (I might need to reverse the 'track feeds' to the LEDs, depending on the specific's of the loco,)

    N.B. the 'AC' Source in my diagram is used to represent a DC supply, of alternating polarity, up to a maximum of 12v, 1amp. I've also deliberately removed the part labels, as I'll work out the correct parts to use later.

    Thanks in advance for any advice given.

    Steve
     

    Attached Files:

  2. Harald Kapp

    Harald Kapp Moderator Moderator

    11,702
    2,717
    Nov 17, 2011
    At a first glance your circuit idea basically seems to be functional. It has a few drawbacks, however:
    - As you already mentioned the relay will not fit into the model.
    - Neither will he battey fit if you expect any reasonable lifetime
    - The LED's current is not well controlled. Since you use a DC source of varying voltage for controlling the speed of the train, the LED's brightness will depend on the speed of the train.
    I can imagine several ways to tackle this problem. Hre's one idea:
    Start from this circuit. In its original version it will create an internal DC supply for the locomotive's LEDs and will even buffer the LEDs for ~5 minutes without power to the train or at slow speed.
    A first imrovement to the circuit would replace the !N4001 diodes by Schotky diodes to reduce the voltage drop across the bridge rectifier.
    The next improvement would use a modern low-drop voltage regulator at an output voltage of 5V instead of the venerable 7806 to further increase the operating range. These two measures will make the circuit work down to ~6V.

    Add two transistors for switching between the two lights.

    A rough sketch for this circuit is somewhat like this:
    [​IMG]
    Note that I used thhe LT1084-5 which is totally overkill for this application - it just came handy for the simulation. You should find a smaller IC. Also an additional protection diode in the base of Q1 will not hurt. It's a circuit to start from.
     

    Attached Files:

    Arouse1973 likes this.
  3. Arouse1973

    Arouse1973 Adam

    5,164
    1,087
    Dec 18, 2013
    What colour are the headlights? I assume white LEDs? So do you want a white LED that turns Red or a separate Red led?
    Adam
     
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    11,702
    2,717
    Nov 17, 2011
    Oh, and what's missing from my circuit is the "both LEDs on" option if the power supply is off. This will require a few modifications. I'll ponder these and hope to give feedback by this evening.

    Done thinking:
    [​IMG]
    This modified circuit still has the "wrong" low-drop regulator. The green line is the input voltage: 100ms +8V, 100ms -8V, 0V after that.
    The blue line is the current through LED D5. As you see, it is 2mA for Vin=+8V and for Vin=0V -> LED is on
    The red line is the current through LED D5 (shifted by 10mA to make it better visible!). As you see, it is 2mA for Vin=-8V and for Vin=0V -> LED is on

     

    Attached Files:

    Last edited: Oct 16, 2014
  5. Stese

    Stese

    27
    0
    Dec 27, 2013
    Arouse > I'm planning on using 4 LED's in 2 pairs. The pairs can be connected in parallel or series, whichever works best for the circuit. 1 red pair and 1 white pair.

    Harold > Thanks for looking at this. I knew the relay circuit wasn't suitable, but I couldn't rock up here without at least having thought about the problem!

    I think I may have confused myself in writing the post in the first place, so I'm sorry if I've misled you. As above, the project will need to switch between 2 pairs of LED's, 1 red pair and 1 white pair. If the loco is powered from the track, the appropriate LED pair should light. If it's been stationary for a short while, the red pair should be lit.

    You suggest to "Add two transistors for switching between the two lights." Is that what you have done in the second diagram, with the Si4866DY's?

    I've been wondering why no one has done something like this before with an analogue DC system, rather than a Digitally signalled AC system (DCC)... my guess is that DCC made it easier, and also the 'power loss' from the circuit affecting the performance of the motor.

    I know that any additional load on the source will affect the motor, but is the switching circuit going to draw enough to make a significant difference? obviously, this could be a subjective point, but do you have any idea on the figures? (can you simulate it in LTSpice?)

    Again, many thanks! :)
     
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    11,702
    2,717
    Nov 17, 2011
    Sorry, an oversight on my side. This circuit is for the red LEDs only. For the withe LEDs you will need additinal circuitry for driving the LEDs plus the logic to turn them on opposite to the redLEDs but not if the power supply is off (then you want only the red LEDs). This will be considerably more effort when done in a discrete way.
    A small microcontroller (e.g. 8 pin DIP) my be much better suited to this task.


    Because it's considerably more difficult?

    The few mA for the LEDs will not disturb the motor's operation.

    It could be simulated in LTSPICE if one knew the characteristics of the motor, the impedances of the electric connection leading to the train etc. I don't think it's woth the effort.
     
  7. Stese

    Stese

    27
    0
    Dec 27, 2013
    I think you are correct in that it's not worth the time in development! I'll look into doing it with a PIC instead.

    Thanks for the input! much appreciated!
     
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

-