Tuesday, January 29, 2013

Arduino Lights and Siren Prototype

The first step of building the Arduino Lights and Sirens is breadboarding a prototype. With all the components known, that is a fairly straightforward exercise, as shown below. Four LEDs connect via 220 Ohm current-limiting resistors to pins 2,3,6,7, leaving pin 4 and 5 for future expansion. Pins 8, 10, 11 and 12 are for the four momentary switches. Each switch is typically pulled to ground via a 10k Ohm resistor when it isn't pushed, and goes straight to +5V when pushed.

The speaker goes to pin 9. The schematic looks like this.


Note that the speaker cannot be on pin 8, since that is not a PWM port, and the tone() function will fail on that pin.

The beauty of the Arduino platform reveals itself here; you don't have to worry at all about power supplies, capacitors to get rid of AC, crystals to provide a reference clock, etc. All of that stuff will come when we move from breadboard to production board. For now, it is all provided by the Arduino board itself.

When the breadboard prototype is actually built. it doesn't look as clean as in the picture above, but everything does work very well.


Pictured above are only two of the four momentary buttons; the other two switches are just out of sight, as is the Arduino itself. The speaker at in the center has been rescued from an old speaker phone.

This is really all the hardware we will need for this project. Next, we'll discuss the software.

No comments:

Post a Comment