A monolithic bipolar, bicolor LED. The gray circle represents the monolithicity of the component.
The prototype's headlights and markerlights use the same lens; in the model, this has been reproduced in the model by using a single bi-polar bi-color LED. (There is also a second LED for the second set of headlights; these lights turn off and retract into the body when at the rear of the train.) The schematic shows what this looks like: It's equivalent to two LEDs put together back to back (as it were), but packaged together into a single two-lead package. The red LED comes on when current flows from right to left; the yellow LED comes on when current flows from left to right (assuming conventional current, rather than electron current). A very tidy solution for DC running—but a very bad one for DCC conversion.
I circumvented this difficulty by using a motor decoder. The basic strategy is to isolate the circuit board, and wire the motor outputs to the inputs on the circuit board. This way, you can control the lights with only two wires, using the throttle. But, as with DC running, the brightness will depend on the throttle position, and when the throttle is at neutral, the lights will go out. That's no good!
Because I wanted to hide the decoder, and because space was tight in the cab, I chose to use a Z2. Recent TCS decoders have a feature called "button control of the motor", which allows you to control the motor via function buttons instead of the throttle. The idea is quite brilliant. On one hand, you can use a simplified throttle for shunting operations, where fine speed control is not called for. On the other, you can use the motor leads as auxiliary function leads to permit control via the function buttons of high-current devices such as smoke machines, or other bi-polar devices, as I did with the lighting.
There is one caveat with such an install: you must disable any back-EMF control before you put it on the operating track! The motor output is designed assuming that it will be powering an inductive load, like a motor. Most modern decoders, including all of TCSs products, take advantage of a unique feature of inductive loads to improve performance: A motor, when turning under momentum, generates current (called back EMF), it becomes a dynamo. The decoder can cut off power to the motor, measure this current, and adjust the amount of current going to the motor to maintain a constant speed, despite irregularities in the track or gradients or changes in load. A very nice feature, except LEDs are not an inductive load: They don't generate any current when idling! So they risk confusing the feedback feature—I don't know how TCS implemented this feature on their decoders, but I'm not going to risk dead LEDs. So turn it off, and the "dither" feature too (because I'm not sure what "dither" does, and I don't want, as I said, dead LEDs). To turn these features off, set CV61 = 0 (Back EMF off; but notice that this CV also turns on button control of the motor; see below), and CV56 and CV57 = 0 (dither off).