This projects recreates the emergency vehicle lights seen on emergency vehicles. It uses an Arduino Uno, eight high-brightness LEDs (four red, four blue), and BC547 transistors
What gives this project that WOW FACTOR are their LEDs. Their not your normal LEDs but rather are 2500mcd LEDs.
mcd is the abbreviated form of millicandela. There are different specifications of LEDs such as lumens, lux and efficacy. However, millicandela is the one that’s concerned with the actual intensity of the light. This specification determines the actual brightness of the LEDs.
These ones are 8mcd whilst these are 33000mcd.
The video below will reveal the brightness.
DISCLAIMER: It’s bright!
The Circuit
The 1k resistors are used to protect the base of the transistor.
Base current (Ib) = 5V/1k = 5mA.
Red LEDs they have a forward drop of 2V. Add the transistor drop we get 2.7V. Thus, the current-limiting resistor should be:
(5 – 2.7V) / 20mA = 115Ohms
Repeat for the blue LEDs
(5 – 3.7) / 20mA = 65Ohms
Transistors are used since the Uno has a 80mA combined limit.
Although each Arduino pin can supply 40mA the total load out of the Arduino for all its outputs together is not allowed to exceed 80mA. That means only four LEDs could be on at once.
The Code
The code is organized so each pattern is contained in a separate function. They are called in the main loop. See below
Macros are used to initialize the pins
void loop() {
// Cycles through various functions
threeFlashes();
slowFlash();
threeFlashes();
scanSame();
threeFlashes();
fastFlash();
threeFlashes();
scanOpposite();
threeFlashes();
inOutSame();
threeFlashes();
bounce();
threeFlashes();
inOutOpposite();



