Make Some Noise

What's a course timer without a loud horn to signal start and stop?! Well, there aren't too many horns louder than a car horn -- let's wire one up to a relay so we can trigger it when the start and stop buttons are pressed.

You can pick up a car horn at any auto parts store or online. They take 12V DC and around 3A to beep. Loudly.

To trigger the horn from our Arduino, we'll use a relay. You could wire one up on a proto board from parts (a relay, diode, and some resistors usually) but to make it simple we'll use the Relay FeatherWing. This works well with the Arduino M0 Pro we're using, since it is a 3V board, just like the Feathers.

The way this works is any time you set pin 10 to HIGH on the Arduino, a small 3V control volatage signal will trigger the relay to close its circuit. This allows the 12V power source running to the terminal blocks to flow through to the horn. So, as simply as you'd normally blink an LED, you can trigger the much more powerful 12V circuit and blast the horn.

The connetions to control the relay are:

Arduino GND to Power Relay GND

Arduino 3V to Power Relay 3V

Arduino pin 10 to Power Relay pin 10

To specify which pin is used to control the relay, flip the board over and solder the pad for pin 10.

Then, solder the Power Relay to a half-size Perma Proto board. As we did before with the level shifter board, we'll use a JST SM cable to connect the relay board to the Arduino. For this, use the 4-conductor JST SM cable. Even though we'll only use three of the conductors, this 4-pin cable cannot accidentally be connected to the NeoPixels and vice versa.

Solder into 3V & GND rails on the PermaProto board, and pin 10 on the relay.

To supply power to the horn through the relay, cut off the DC plug end from the 12V power supply, strip the wires, and solder the ground wire to the ground rail of the board.

Then, screw the positive wire into the far right terminal (when looking at the input holes) on the terminal block of the Power Relay shield.

Don't want cup up your power supply wires? No problem, just use a 2.1mm female DC jack as you did for the NeoPixel power. Just be sure not to mix them up when plugging in later!

The horn creates a lot of audible noise as well as digital signal noise! This is one reason to build the circuit on a separate board from the logic shifter and Arduino. We'll also use capacitors to smooth out some of that noise.

Connect one horn wire to ground on the proto board and the other to the center terminal of the relay terminal block. This circuit will be closed when the relay is triggered, thus beeping loudly.

To help contain that noise even more, connect a 1000uF capacitor from the 12V power line to ground near the relay.

This is the horn wiring without a capacitor across the terminals, which causes lots of electrical noise. Add a capacitor, otherwise you may see pixels behave strangely, or even cause the system to freeze up.

A capacitor is soldered to the horn-side wiring across the terminal connectors, with the negative leg to the ground wire, positive leg to the 12V wire, then wrapped in electrical tape and heat shrink tubing.

Also, some car horns have polarity marked on their terminals, others do not. If yours doesn't, you'll need to try it both ways and see which one works best. You can then mark the terminal polarity so you know in the future.

If the horn's electrical noise is not contained you may see NeoPixels change colors or light up when the horn beeps!
If you do use the same type of connector for two different power supplies, it is VERY easy to make a simple mistake and melt things. Label your plugs and jacks clearly to help avoid disaster!
This guide was first published on Mar 15, 2017. It was last updated on Mar 15, 2017. This page (Make Some Noise) was last updated on May 27, 2019.