Česky English

Spinning beacon

A flag doesn't make you more visible at night because car headlights don't shine that high. An active light might be more useful. Preferably a spinning yellow one, which is a standard signal for slow-moving vehicles. But without any actually spinning parts which can break or wear.

Instead of one light bulb and a rotating mirror, I used an array of LEDs which light up in succession, creating an illusion of running light. Driving signals can be generated by a variety of means from a chain of discrete transistors to a programmable microcomputer; I chose single-purpose logic circuits. All of them use TTL voltage levels (0 V = low, 5 V = high).

Connection plan

IO1 is a simple linear stabilizer, a switching regulator is not worth the work for those few milliampers. C1 capacitor smooths out voltage behind the stabilizer (recommended for stability). Because my beacon runs on accumulators, I omitted the other recommended capacitor before the stabilizer; time will tell if it was a good idea or not. If you use a 5 V power source (like a powerbank), omit the stabilizer altogether.

Eight-bit shift register 74164 (IO3) is the core of the whole system. Rising edge on pin 8 (CLOCK) moves all eight outputs (pins 3..6 and 10..13) one position further. Last bit disappears and first one is loaded with logic level from pins 1 and 2 (A and B).

Clock pulses for the shift register are generated by timer 555 (IO2) with several external components. It works like this: first, capacitor C2 starts to charge through resistors R1 and R2. When its voltage (and therefore voltage on pins 2 (TRIG) and 6 (THRES)) exceeds two thirds of supply voltage, output pin 3 (OUT) switches to high and pin 7 (DISCH) connects to ground (1 - GND). The capacitor discharges through R2, current from R1 shorts directly to the ground. When the voltage drops below one third of supply voltage, the circuit flips again, output switches to low, discharging pin disconnects from the ground and the capacitor starts to charge again. Switching frequency is determined by the combination of R1 and R2 resistances and C2 capacity, the exact formula is provided in datasheet. I chose speed of cca 0.7 s per "revolution", which means about 0.09 s clock pulse length. I chose C2 capacity small enough to be available in ceramic and calculated the necessary resistances from that point. R3 resistor pulls up the output voltage to high.

Input value for the shift register's first bit is calculated by logical gate 7424 (IO4). The goal was to light up two consecutive bits (more light and more fluent motion than with only one bit on). After several experiments, I ended up with a NOR gate processing bits 2, 4 and 6 (counted from 1). Any random leftovers after power-up sweep away during first revolution and then the device keeps spinning reliably (feel free to plot a truth table). One slight disadvantage is there was no fewer-legged package available - this one contains three gates while I only needed one. But no problem, it still fits on the board.

The last big "bug" IO5 is an array of eight NPN transistors. Outputs of the shift register can't provide enough current to power LEDs directly, so they just open stronger transistors here. Current is limited by one common resistor R4 (sized for two LEDs running in parallel), the transistors connect the other pole to ground. Theoretically, this setup also allows you to separate LED power supply from 5 V logic supply, use higher voltage and add more lights in series, if needed.


Translucent pill bottle made a nice housing. Circuit board is split into three pieces to fit inside (but this depends on how big box you've got). Everything is held together by an M3 threaded rod, connecting cables came from an ethernet cable. The mast is made of a Ø6 mm carbon tube from a model shop, the threaded rod is glued into it. Supply wires run externally.

How does it work?

Here's a video.

The whole device draws 27 mA of current when powered by a 12 V source. That's suspiciously little, just the LEDs alone should eat 37. Output voltage of the stabilizer, LED threshold voltage at nominal current, and R4 resistance are all OK, the problem is most probably the contact resistance on transistor array terminals. Note for next time: solder this bug directly into the board, without a socket.

Mechanical toughness, visibility on the road and other parametres will be subject to the test of time.