# constant lighting for headlight?



## Cap'nBill (Dec 27, 2008)

Just looking at the post by Gary on cab lights got me wondering..... My biggest gripe is headlighting, run at a scale speed, and the headlight is barely visable. Stop...no light. Now, this has probably been discussed ad nauseum...maybe there's a thread but I couldn't find it. Does this require battery operation to cure, or is there some other fix? Bill


----------



## Greg Elmassian (Jan 3, 2008)

I assume DC... 

What is your minimum voltage on the rails required for full brightness? 

Can you use LEDs? 

(get a CL2 current regulator, connect to an led and that should do it, buy the CL2 from Mouser... 2 components and no calculations, 20 milliamps to the LED) 

Greg


----------



## Cap'nBill (Dec 27, 2008)

Thanks for the tip! I really enjoy running the trains more at night, so hopefully that will provide the fix.


----------



## Greg Elmassian (Jan 3, 2008)

I've been working with them, very simple to use, and basically it is a current regulator (LEDs need regulated current, not regulated voltage like incandescent bulbs)...

only 2 connections (3rd wire is a dummy).

here's a link to the datasheet: *http://www.datasheetdir....>*

be sure to scroll down, it looks like ads at first... looks like minimum would be 5 +3 volts on the rails, like 8 volts, but I'll bet the LED will come on at 7.


Regards, Greg *
*


----------



## Dean Whipple (Jan 2, 2008)

Here is a simple circuit that was used for years in small scale engines before DCC, it uses the voltage drop across a diode it comes on before the locomotive starts and it can even be on with the engine stopped.....


----------



## dbodnar (Jan 2, 2008)

Posted By Cap'nBill on 25 Nov 2010 12:55 PM 
Just looking at the post by Gary on cab lights got me wondering..... My biggest gripe is headlighting, run at a scale speed, and the headlight is barely visable. Stop...no light. Now, this has probably been discussed ad nauseum...maybe there's a thread but I couldn't find it. Does this require battery operation to cure, or is there some other fix? Bill

Hi, Bill - there are two articles on my web page that discuss how you can do this. Both are simple - the first uses a 7805, the 2nd a newer IC that is even easier to implement.

http://davebodnar.com/railway/LED_light_project/

and 


http://www.trainelectronics.com/LED_Articles_2007/LED_104/index.htm 

enjoy

dave


----------



## Greg Elmassian (Jan 3, 2008)

Just to avoid confusion, the 2nd example in Dave's site is the device I recommended. 

Read his site, don't worry about the data sheet I posted unless you need more technical detail. 

I bought my CL2's from Mouser.com 

Regards, Greg


----------



## East Broad Top (Dec 29, 2007)

What's the advantage of using the CL2 as opposed to a resistor? Is it just a matter of not having to do the math (or random experimentation) to find a resistor value that works and won't blow the LED, or is there some greater benefit? 

Later, 

K


----------



## dbodnar (Jan 2, 2008)

Posted By East Broad Top on 26 Nov 2010 10:09 AM 
What's the advantage of using the CL2 as opposed to a resistor? Is it just a matter of not having to do the math (or random experimentation) to find a resistor value that works and won't blow the LED, or is there some greater benefit? 

Later, 

K 
The primary advantage is its ability to give constant current over a great range of voltages - if you use only a resistor and run track power the amount of current that the resistor will allow to pass will vary with voltage and the brightness of the LED(s) will vary, too - the CL2 delivers 20 ma from a few volts clear to 90. Nice trick, eh?

dave


----------



## East Broad Top (Dec 29, 2007)

Makes sense. Thanks! 

Later, 

K


----------



## Cougar Rock Rail (Jan 2, 2008)

Wow, what a great device that CL2 appears to be--thanks guys, going to try that out.


----------



## tmejia (Jan 2, 2008)

Thanks Greg and Dave (and to Cap'nBill for asking the question). Great info and articles. Ordered some CL2's today









Tommy








Rio Gracie


----------



## Torby (Jan 2, 2008)

I wire mine to a regulator connected straight to the loco battery.


----------



## Greg Elmassian (Jan 3, 2008)

you still needed a dropping resistor to control current though, right Tom? 

Regards, Greg


----------



## Torby (Jan 2, 2008)

Depends on the LED and the regulator. On cars, I often put a 3v lithium coin cell and led. In one installation, I have a little processor that drives the LED at like 60% from its 5v supply. If you overdrive an led, it just produces more heat rather than more light, and you shorten its life from centuries to decades. Unless you do something like connect it directly to 9v where its life will be measured in microseconds.


----------



## Greg Elmassian (Jan 3, 2008)

Tom, that is not true. If you overdrive a LED, it normally burns out. 

And what voltage regulator allows you to run the LED at 20 milliamps? 

That's the point of my questions, and the point that people need to hear. 

Now, doing stuff like knowing the led has an approximate 3.3 volt drop, so running on a 3v lithium does work, but you are misleading people when you advocate not using a current limiting circuit. The fundamental point that a LED is a current "controlled" device is now lost and we are back to the typical problem, people having trouble understanding how an LED is different from a voltage "controlled" incandescent lamp. 

Yes, you and I know that using a PWM signal so the average power to the LED does not exceed the "melt down" limit will work, but how many people here know how to program a microprocessor chip to run at the right duty cycle to allow it to work? 

I know you know the "tricks", but honestly, is it helpful to people here? Or are you encouraging people to not learn the fundamentals? 

I think we should try to keep to things that are always helpful, not confusing, and work for the majority of non-engineer people. 

Greg


----------



## ralphbrades (Jan 3, 2008)

Quote: 

"how many people here know how to program a microprocessor chip to run at the right duty cycle to allow it to work?" 

Unquote: 

In this household -*two*. I am 53 and I would use *FIG-Forth*, or *C*, Matthew is 11 and would *PIC-Basic *. 
It is part of the *I*nformation *T*echnology & *C*ontrol syllabus for the UK National Curriculum for Key Stage 3. 

The best in his "ITC set" is a girl who wrote a program to produce a simulated 4 element halogen hob for her Barbie House... 

regards 

ralph


----------



## Greg Elmassian (Jan 3, 2008)

You're a lot of help Ralph!









I'd guess that only maybe 2-5% of the members fall in this category. 

I stand by my statement... 

Greg


----------



## Cap'nBill (Dec 27, 2008)

A word of caution on this! Got my parts from Mouser and decided to give this a go with my Aristo 'Doodlebug'. I figured this had the easiest access and the most room. I'm guessing one needs a diode in the circuit. Worked fine in 'reverse', made a smoking, stinky mess in forward! I wire the positive inot the 'red' wire leading to the headlight. I had the engine on rollers. Should check polarity, guys, of your wiring in forward and reverse! I did not! When I worked the power up and down, it did what it was supposed to. Then I noticed the wheels were turning in reverse, swithed the direction switch and ...........Poof. Switched that puppy off muy rapido! Worried I'd burn the engine's circuit board out! I was in a hurry that day to get the job done! It appears the circuit board for the headlight buld just reverses polarity. I haven't gotten back into it at this point, but wanted to mention this. Bill


----------



## Greg Elmassian (Jan 3, 2008)

Yep, if you look at the datasheet, there is a diode in the package in the "opposite direction"... which means, proper polarity, it limits current to 20 ma, improper polarity, it is a dead short... so you probably had it hooked up backwards, so the "circuit" you had was both diodes were in the same direction, i.e. led with no current limiting... that's why it was on in the wrong direction.... 

you had the led and the "internal diode" in series, so no current limiting... 

The data sheet shows the polarity and the internal diode... I'll be sure to warn people next time... A friend did tell me that it did not work, but he had it (the CL2) backwards. 

Greg


----------



## Cap'nBill (Dec 27, 2008)

When I first asked about this, my idea was to use in a Shay with directional lighting. I'm guessing the Bachmann circuitry cuts the power off to the front light when in reverse, and vice versa. The doodlebug has, apparently, 'constant, lighting and merely reverses polarity.....no problem, I guess, with a standard bulb. Still, probably best to hook up your meter and test before soldering! Nevertheless, the concept does work....but only in one direction.


----------



## Greg Elmassian (Jan 3, 2008)

I think you are maybe missing the point. 

The CL2 needs to be put in a DC circuit correctly. put in backwards, it no longer limits current, it is basically a dead short. 

By putting it in "right" then it works correctly on DC, meaning not DC that can reverse polarity. It has a "plus" and "minus"... 

If you want to put it in a circuit where the polarity can reverse, then you need a diode in series with it to block "reverse voltage".... 

Use with a bulb or LED is basically immaterial. Of course, an LED is a diode, so someone could argue that the LED could be used as the "blocking diode" mentioned above. But, the reverse voltage handling of a LED is not usually sufficient to act as a "normal" diode. 

Sorry for the confusion. 

To be safe: 50v 1 amp diode >>> CL2 >>> LED or incandescent bulb ... 

Regards, Greg


----------

