Quozl's Random LED Flasher
A simple constant duty cycle flasher is now so common as a warning device, that it has begun to lack credibility. Flashing lights are being ignored. But this one is different ... it flashes randomly, and so it is noticed. It can be set for varying apparent frequencies, and can be connected using a diode-OR to increase the duty cycle.
How does it work? Mostly it just sleeps. In between, it updates a 24-bit psuedo random number generator and increments a beat counter. The low eight bits of the current random number are ANDed with the beat counter and then written to the output ports. The result is that each port bit is driven with a random sequence of pulses with an average frequency related to which port bit it is.
The data sheet for the 12C509 explains the power connections, and the rest of the pins are outputs that are driven at different average but random rates. The PIC is configured by the source code to use the internal oscillator.
It has been years since I made the device, so I opened the box in October 2002 and took a photograph. From that, one of my readers has made a schematic.
The prototype was made on veroboard, with very few components. These might not be the components you need. I used a 5V regulated power supply with a 10cm cable to the circuit. I used two capacitors across the power supply at the veroboard to filter the power supply; one 10uF tantalum, and one 0.1uF ceramic.
Two of the output pins are connected via diodes to the gate of a power MOSFET that has a logic level gate voltage. The MOSFET was a 2SK2175. A resistor was added to ground, so that the MOSFET gate would be pulled low if none of the output pins were high. The MOSFET switches the ground line to the output plug (lower right). I'm not convinced the MOSFET is fully activated at 5V though.
The output plug is connected to a high brightness LED with a dropping resistor suitable for running at 5V.
(The breadboard prototype using a PIC 16F84 directly drove LEDs through 1k resistors, but this veroboard prototype can drive with a higher current because of the MOSFET)
Parts list as observed;
|1||PIC 12C509 microcontroller|
|1||veroboard, 10 columns x 12 rows|
|1||8-pin IC socket|
|4||header pins for power and output connectors|
|2||header sockets and cabling|
|1||10uF 16V tantalum capacitor|
|1||0.1uF ceramic capacitor|
|1||2SK2175 logic level gate MOSFET|
|1||high brightness LED (not shown)|
|1||dropping resistor for LED (not shown)|