# Who ever thought that lighting an engine would be so hard!



## gunrunnerjohn (Nov 10, 2010)

I have a basic MTH locomotive that I decided it would be nice to add some real lights, so I set about doing it. I decided on the ditch lights and rear lights being bi-color red/white, seemed like a cool idea at the time. I installed all the lights in the shell and proceeded to design the lighting board. 

The first problem reared it's ugly head! The forward and reverse lamp voltages are either AC or pulsed negative DC, depending on command or conventional mode! My bi-color LED's need a negative ground! It took a while and a search through my junkbox to find some darlington opto isolators. This allows me to switch the lights using the negative going voltage, but have a positive supply to the lights. Of course, it also adds the opto isolators, diodes, and resistors!

As the smoke settles, it appears I have more electronics in the lights than it takes to remote control the train!  :laugh: Whenever you plan a project, double your time estimate, then add 20%, you'll be closer to the actual time it's going to take!


----------



## Massey (Apr 16, 2011)

Looks like it would work just fine. What program did you draw the schematics in? I like how you used the opto to force the circuilt into forward or reverse with out using a rectifier.

Massey


----------



## gunrunnerjohn (Nov 10, 2010)

It's drawn in TinyCad, a free schematic capture program. I needed the opto because I had a positive ground power source, and I needed a negative ground. I looked at voltage inversion circuits, but they need some large capacitors. I then thought about this scheme. The TIL113 is a darlington opto, it really has a high gain. I was worried about getting enough current transfer, not a problem! Even at a very low LED current, the output transistor is saturated. 

Once I build the board, I'll post a picture of the work, there's a lot of wire just to light some lights. Of course, there are 11 lights, so I guess that makes sense.


----------



## Massey (Apr 16, 2011)

I look forward to your updates

Massey


----------



## gunrunnerjohn (Nov 10, 2010)

Hopefully, the next update will be the finished product. However, I have to cut myself a larger piece of board for mounting the components, I didn't count on the fact that I'd need the opto's and associated components. I was thinking just some resistors and a couple of diodes, silly me.


----------



## Big Ed (Jun 16, 2009)

You did not mention if they worked after doing all of that.


----------



## gunrunnerjohn (Nov 10, 2010)

I'm building the board now, so in a day or two I'll know.  I did breadboard the opto circuit to make sure it would do what I wanted, so I have no reason to believe it won't work.


----------



## Big Ed (Jun 16, 2009)

gunrunnerjohn said:


> I'm building the board now, so in a day or two I'll know.  I did breadboard the opto circuit to make sure it would do what I wanted, so I have no reason to believe it won't work.


You were posting #5 when I was posting # 6.

As much as I know about that, it seems like it would be easier to run the lights off a battery?

Just add a switch?

But then again......it keeps you busy, huh?:thumbsup:


----------



## gunrunnerjohn (Nov 10, 2010)

Let's see, running the lights off a battery... Easier? Yep! However, not nearly as realistic, since they'd all simply be on all the time, not exactly what I had in mind.


----------



## NIMT (Jan 6, 2011)

Just wondering?


----------



## gunrunnerjohn (Nov 10, 2010)

Correct, if one bulb shorts, things will get bright. OTOH, what's the chance that a bulb will short, more likely they'll open.

As far as the series LED's, by definition they'll get the same current, since they're in series.  The parallel resistor across the flashing LED is to keep it from lighting the circuit when it's in the off state.


----------



## T-Man (May 16, 2008)

Brightness should not be a problem, if they are the same color. Red needs more resistance if it is used with green or yellow. I use 1000 ohms for red and 470 for the other two.


I like the software. 

Thanks!!!!!! A NEW TOY!!!!!!!!


----------



## gunrunnerjohn (Nov 10, 2010)

FWIW, I've tried the flashing LED with the two red ones, and it all worked as intended, so that's why I went that way. That's how I discovered that I needed the resistor to provide a little bias current for the flasher.

As far as the intensity, those are values that I've used in the past and have been something I liked as far as brightness. As I said, I usually just experiment on the resistor values with the actual LED's that I'm using to get what I want in terms of intensity.

T-Man, I thought someone here would like TinyCAD, it's a great program for free, what's not to like.


----------



## gunrunnerjohn (Nov 10, 2010)

Well, it's back to the drawing board! The "great" red/white bi-color LED's apparently have a design flaw, they crap out like flies! I have eight of the 10 gone bad already, and I didn't even get the shell installed on the locomotive!

I started the lighting from scratch, I simplified the directional lights, but added a wrinkle to the cab and flashing mars/marker lights. I have a sequencing circuit so I can pick if the cab lights, the mars light, or both are on, all from one control output (that's all I had).

New diagram of the new wiring. I was able to save most of the cab wiring, but the circuit board went into the trash.


----------



## NIMT (Jan 6, 2011)

Here in lies the difference between engineers(GRJ) and techs (NIMT)!
GRJ's approach to the problem seams logical and all should go well after several re-engineering attempts and he should be commended on his determination to achieve the ultimate in lighting experience.
NIMT's approach would be a little more strait forward! Relay runs lights done! Or even simpler approach!







And it's even an LED solution, Problem solved!!!! Now let go run them trains! 
:laugh::laugh::laugh::laugh:


----------

