Caboose flasher


#1

The first prototype of a caboose flasher is now done. David wanted his Atlas cabeese to have red flashing EOT’s on both ends, and be able to swap direction of travel by calling it up on a throttle.

NCE LightIts are very inexpensive, but they don’t have a realistic flashing incandescent bulb effect. So I etched some small PC boards to hold a $1 ATTINY85 processor, a few resistors, and the smallest 5.5V supercapacitor I could find.

F0 controls the LightIt’s warm-white LED. F1 changes direction and F2 shuts off the flasher.

Now all I need to do is build a big pile of them. Time an afternoon wearing an Optivisor!


#2

These should keep David busy for a while…


#3

Just throw some stuff together like it’s no big deal… lol. How big are they?


#4

Jay -

The boards I made are about 0.7" square. The LightIt is a bit smaller. The huge item is the keep alive capacitor. I couldn’t find suitable smaller ones, so the unit takes about 30 seconds to charge-up and start working, then runs for about 30 seconds after being lifted from the track.

In HO the parts could be mounted on the floor of a caboose, and set-up in-line instead of an L shape. In O they should pretty much disappear if attached with double-stick tape to the roof. There’s a warm-white LED on the LightIt that could optionally be used over the conductor’s desk during night ops.


#5

it;s amazing the things you come up with and just create.


#6

Nicely done Bob. How are you using the AT Tiny? I’m curious on how to do the flashing with the code.


#7

Flashing your LED is one of the first things one usually learns when programming with the Arduino libraries. And it doesn’t require wearing a trench coat! :open_mouth: Sorry.

There are two separate ideas that facilitate the simulation:

  1. The Arduino libraries provide a millisecond timer that gives a 32 bit time count since boot-up.
  2. The libraries also provide PWM (Pulse Width Modulation) control on some output pins. On the ATTINY two pins at a time can drive PWM outputs.

So by reading the millisecond timer in loop() one can decide how to ramp up the LED brightness then ramp it back down.


#8

That sounds pretty cool Bob. Simple but effective.

I’d assume that you are using the decoder to just turn on the output of the function?


#9

Craig -

Correct. The LightIt serves as a DCC decoder to drive two function outputs. These were intended to drive single LEDs and have built-in 330 ohm current limiting resistors. The ATTINY85 just reads two of the outputs for on/off and selection of which LED.

There are other function-only decoders on the market but none as cheap as the LightIt. However, programming the LightIt is weird and can’t be done on a programming track.

I wish I could have found something smaller than the 0.47 F low-ESR 5.5V capacitor. The initial charge at power-on causes the LightIt’s on-board 5V regulator to get rather warm.