Owl Circuits Logo

OwlCircuits

LED police/emergency vehicle lights circuit

Pre-programmed microcontoller for controlling LED special effects.

This microcontroller is used to simulate a police car, fire truck or other emergency vehicle lighting on a model railroad layout. Can also be used for die-cast model cars. It is used to drive LEDS only.

The microcontroller will strobe quickly all the left side LEDS, then strobe the right side LEDS. Each strobe pattern is the 3 quick flash pattern that is commonly seen on modern LED or strobe based emergency vehicles.

The microcontroller also has outputs for white LEDS for the headlights and red LEDS for the tail lights. The microcontroller can be configured to have the headlights alternately flash similar to the wig-wag lights on some police cars. The wig-wag lights don't strobe but actually have a incandescent slower flash look to them to simulate a real headlight flash. In this mode, the tail lights will also strobe. The wig-wag feature can be disabled so that the headlights and tail lights remain on steady instead.

The circuit can also be easily configured to operate in random mode. In random mode, the headlights and tail lights remain on, then every couple of minuites, the circuit starts up and the emergency strobes run for about 30 seconds. The cycle then repeats. There is also a continuous mode where the controller runs continuously as long as it has power.

You can use any color LEDS that you want. This allows you to use the circuit for police, fire or other emergency type vehicles.

The microcontroller comes pre-programmed so you don't need any special programmer or progamming experience to build this circuit. Basic soldering skills and components are all that is needed. The microcontroller is in a easy to solder 14 pin DIP package.

PINOUT

Pinout for police or emergency vehicle LED circuit

Pin Name Description
VDD +3V to +5V DC supply
MODESEL1 Mode selection pin for configuring operation
MODESEL0 Mode selection pin for configuring operation
RESETb Active low reset
LSTROBE1 Left side strobe light output1
RSTROBE1 Right side strobe light output1
LSTROBE0 Left side strobe light output0
RSTROBE0 Right side strobe light output0
LHEADLIGHT Left side headlight/wigwag output
RHEADLIGHT Right side headlight/wigwag output
LTAILLIGHT Left side tail light output
RTAILLIGHT Right side tail light output
NC No Connection. Leave unconnected
VSS Ground

Application notes:

Power supply

The microcontroller runs off 3V to 5V DC only. Using other voltages will destroy the microcontroller. For use with LEDS only. Make sure to provide the proper series resistors for the LEDS to limit the current to less than 20mA each.

You can run this microcontroller circuit off of 2 AA type batteries in series to get 3V operation. However, the preferred method is to run on 5V operation using a voltage regulator , for example the LM7805. Connect the VDD pin to 3-5V DC and the VSS pin to ground. A 0.1uF bypass capacitor is recommended to be placed across the power supply pins to minimize electrical noise.

Reset

The RESETb pin is active low. This means that when you connect RESETb to 0V or ground , the device will not operate and all the outputs will be off. For normal operation, RESETb should be connected to the same VDD voltage supply through a 10K ohm 1/4 watt resistor.

Mode Selection

This microcontroller has two mode selection pins that allow you to select different modes of operation by simply connecting the MODESEL pins to either power or ground. This allows you to chose different operating modes without having to use a computer or programmer.

Pulling the MODESEL pin to VDD (power) creates a logic 1. Connecting the MODESEL pin to VSS (ground) creates a logic 0.

The following shows the different operating modes depending if you connect the appropriate MODESEL pin to VDD (power) or VSS(ground).

Continuous operation means the circuit will run continuously as long as it has power.

Random operation means that the circuit will start up randomly about every 30 seconds to 2 minutes and operate for about 30 seconds. When the circuit is not operating , the headlights and tail lights remain on at 50% brightness to simulate headlights and tail lights being on. The emergency lights will remain off. When the circuit starts randomly, the emergency lights will turn on, the wigwags /tail strobes will start. The cycle then repeats.

Wig-wag disabled means that when the emergency lights start, the headlights and taillights will not flash. They will remain at 50% brightness. Wig-wag enabled means that when the emergency lights start, the headlights will flash on high beam , and the tail lights will strobe as well.

MODESEL1 MODESEL0 Operating mode
VSS (0) VSS (0) Random operation, Wig-wag disabled
VSS (0) VDD (1) Continuous operation, Wig-wag disabled
VDD (1) VSS (0) Random operation, Wig-wag enabled
VDD (1) VDD (1) Continuous operation, Wig wag enabled

Outputs

The 8 LED outputs will drive the VDD supply to the LEDS. If you connect VDD to +3V DC , the outputs will drive 3V to the LEDS. If you connect VDD to 5V the outputs will drive 5V to the LEDS.

It is important to select a series resistor for each LED such that the maximum current is limited to less than 20mA. The micorcontroller can handle 20mA per output with a maximum total output of 200mA.

Example circuits

Below is an example circuit showing the typical way to hook up the microcontroller and LEDS. If you choose to remote mount the LEDS, use 22-24ga wire.

C1 is a bypass capacitor that helps to filter out electrical noise in the power going to the microcontroller.

By pulling the MODESEL pins up to VDD via a 10K ohm resistor, you will put a default value of VDD on the MODESEL pin. If you close the switch , it will pull the MODESEL pin to ground (VSS), selecting a different operating mode.

NOTE: The MODESEL pins are only read once when the device first gets power. Switching the value on the MODESEL pins during operation will have no effect. You need to power cycle or reset the microcontroller to select the new mode.

D1 to D8 are the LED outputs. Only use LEDS with this circuit. R4 to R11 should be selected to limit the current in the LEDS to less than 20mA. Note that different color LEDS will have different forward voltages , so R4 to R11 will most likely be different values when using different colored LEDS.

All of the left side LEDS will flash at the same time, and all of the right side LEDS will flash at the same time. Use the apropriate color LED for your appication. Police cars generally use red and blue LEDS, fire vehicles red and white LEDS, and tow trucks can use yellow LEDS. The headlight outputs shuold be white LEDS , and the tail lights should be red LEDS.

TIP: If you want the LEDS to flash in a diagonal or cross pattern on your vehicle simply put some of the right side LEDS on the left and some of the left side LEDS on the right side. Since all left side flash , then all right side flash, crossing the pattern will give a diagonal look.

Click for a larger circuit diagram image.

LED police lights example circuit

SW2 SW1 Operating mode
Closed (0) Closed (0) Random operation, Wig-wag disabled
Closed (0) Open (1) Continuous operation, Wig-wag disabled
Open (1) Closed (0) Random operation, Wig-wag enabled
Open (1) Open (1) Continuous operation, Wig wag enabled
© Copyright 2013-2018 OwlCircuits.com
Page last updated: July 11, 2013.

Home | Contact | Privacy Policy