Professional Documents
Culture Documents
Digital Car Horn: Instructables
Digital Car Horn: Instructables
by TomHammond
This Instructable will help you build a digital horn for This project requires 3D printing for the control pad and
your car! It will play up to 83 sound e ects/clip using a ampli er enclosure. If you don't have a 3D printer, then
small control pad of 11 buttons. Three of the buttons are you can manually build these with other means; it's not
dedicated to "favorite" sounds, while the remaining rocket science. :)
eight buttons represent sound "categories" that store 10
sounds each. Each press of these latter buttons will play Thanks for Mark Rober's video build of his car horn that
a random sound from that category. inspired my project:
This 15W speaker is decently loud enough for use as a The buttons will mount to this. Any kind of perf board
car horn and small enough to t into an engine will do, provided that it has the standard 2.54mm (0.1")
compartment. I installed two horns for best overall hole spacing. Perf. board with or without individual
loudness. These speakers are weather resistant, too. Note copper pads are ne, though make sure that the holes
these are PA-style horns with no bass. Simple sound are not electrically connected via metal traces! If you buy
e ects will sound good, but rich music will not. a board larger than the above size, you can score & snap
it to the size you need.
TPA3116 D2 120W+120W Dual-Channel Stereo Digital
Audio Power Ampli er 12V-24V Right-angle 3.5mm audio cable (1-foot)
This is a stereo ampli er, meaning that it can drive one This will connect the audio output from the Audio FX
or two horns. I connected two horns to mine for board to the ampli er. Only one end needs to be right
adequate (in my option) loudness. Be sure to look at the angled to t into the control pad enclosure. The other
photo in this step of the Instructable to be sure you buy end can be male or female.
the same style as the one in the photo.
Left-angle micro USB extension cable (1-foot)
Adafruit Colorful Round Tactile Button Switch
Assortment - 15 pack This will provide power to the Audio FX board. The micro
USB end is left angled to t into the control pad
It is likely that you will hear a hum in the horn when not
in-use. This is coming from your car's electrical system.
This isolator goes between the Audio FX 3.5mm output
and the ampli er to remove the hum.
Solid wire
Mount buttons Attach the colored caps onto each button, then test- t
Once printed, push the legs of the 11 button switches the buttons by inserting the perf board into the control
into the perf. board so that they align with the holes in pad. The buttons should travel freely without sticking.
the control pad. Once you are satis ed with the t, ip the board over,
push on each switch to seat it rmly on the board, then
Note that the buttons switches are not symmetrical, bend each switch's legs 45 degrees to keep the switch
even though they look it. There are tiny letters stamped from moving while soldering in the next step.
into the bottom of each one. Make sure that the lettering
faces the same direction for each switch that you press Paint button caps (optional)
into the perf board. This is important so that the button The button caps come in a kit of ve colors. If you want
caps align into the control pad's holes properly. to paint the caps so that each is a di erent color, Testor's
model paint (enamel) works well. Do not paint thickly,
The eight button switches on the right of the control pad paint the caps with a few thin layers as possible to avoid
face the same direction in the perf. board. Of the three friction with the control pad's holes.
left-side switches arranged in a triangle shape on the left
side of the pad, the top switch needs rotated 90 degrees
The control pad will have 12 wires connecting it to the can connect wires to when daisy chaining the buttons
Audio FX board. 11 wires for the buttons and the 12th together for the common ground wire.
wire for ground.
Solder the thin wire onto the legs between buttons. It is
Instead of running individual ground wires from each tiny, delicate work. I nd it helpful to bend each end of
button to the Audio FX board, daisy chain a ground wire the wire into a hook shape with needle-nose pliers, then
between each button. On the nal button, a single wire pinch the hook onto the buttons' legs before soldering.
can then connect to the board.
Once you have connected all of the buttons with a
To determine which pins to connect the ground wires to, common ground wire, test continuity between the rst
use a voltmeter, setting it to continuity mode. Each and last buttons in the chain. You should have continuity
button has four legs. Three legs will complete a circuit with no buttons pressed.
when the button is not pressed. These are the legs you
attach the board to the control pad using three screws control pad!
(or bolts) that pass through the holes on the board but
are large enough to grip into the receiving holes on the
3D printed control panel. You're done building the
Note: A great place to nd sound e ects is https://www.zedge.net/ nd/sound%20e ects. You don't to create an
account, the les are free, and download as MP3 (you need to convert these to OGG).
Sound les should be relatively short when used as a car horn. My sounds e ects are between 7 and 18 seconds. You can
use the free Audacity program here to shorten sound les that are too long (time wise). You can nd lots of Audacity
tutorials on YouTube here to learn how to do this.
1. Click Files > Open Files in the top menu, then nd/choose the MP3 le that you wish to convert
2. Click Formats from the top menu, then choose [To OGG] button in the top bar
3. Click Edit Pro les on the right side of the screen
4. At the bottom of the window, choose "160 kbps" for the Audio bitrate and "Mono" for the Channels
1. Tip: If, after converting all of your sounds les to OGG, the total size of all of the les is
greater than 16 megabytes, reconvert the MP3 les to 128 kbps to reduce the total size to
less than 16 megabytes.
5. Click [Apply pro le] button at the bottom-right corner of the screen
6. Click the [Convert Files] button in the top bar
7. The converted le will be placed in your computer's Music folder
T00.OGG
T01.OGG
T02.OGG
Note that the control pad has 11 buttons, but the Audio FX board assigns the rst button "00" and the 11th button "10".
Each of the remaining eight buttons on the control pad (the two rows of four) can have up to 10 sound les each. When
one of these buttons is pressed, the Audio FX board will play a random le of the 10 associated with that button.
T03RAND0.OGG
T03RAND1.OGG
T03RAND2.OGG
T03RAND3.OGG
T03RAND4.OGG
T03RAND5.OGG
T03RAND6.OGG
T03RAND7.OGG
T03RAND8.OGG
T03RAND9.OGG
For the second of the eight buttons, name the 10 sound les:
T04RAND0.OGG
T04RAND1.OGG
T04RAND2.OGG
T04RAND3.OGG
T04RAND4.OGG
T04RAND5.OGG
T04RAND6.OGG
T04RAND7.OGG
T04RAND8.OGG
T04RAND9.OGG
...and so on. You don't need to have 10 sound les for each button, but you get the idea how to name them.
To nish, here is how to name the sound les on the eighth button:
T10RAND0.OGG
T10RAND1.OGG
T10RAND2.OGG
T10RAND3.OGG
T10RAND4.OGG
T10RAND5.OGG
T10RAND6.OGG
T10RAND7.OGG
T10RAND8.OGG
T10RAND9.OGG
For a detailed description on naming the sound les for the Audio FX board to use, click here.
At this point, your Audio FX board should be connected to the control pad buttons via the two 7-pin JST connectors.
These wires tell the board which button that you pressed as well as provide a common ground to all of them. You also
have the left-angle micro USB cable and right-angle 3.5mm cable attached to the board.
To test the board, connect a pair of PC speakers to the 3.5mm cable. Provide power to the board with a phone charger
that has a micro USB plug. Do not power the board with a USB port from the computer as this puts the board into " ash
drive mode" where the buttons will be unresponsive.
When you apply board to the board, the speakers may make a soft "pop". This is a good sign. When you press a button, a
red light will appear on the board as the sound is played on the speakers. Note that you need to wait for the red light to
go out (wait for the current sound to nish playing) before you can play a di erent sound.
Troubleshooting
If the red light is not coming on when you press a button, then the button wiring on the control pad may
be incorrect. Make sure that each button has a leg that connects to the ground pin on the board. Check
that another pin on that button completes a circuit to the 0-10 pin on the board only when the button is
pressed.
Another idea is to remove the two JST connectors from the board then connect two female-to-male
cables to the board manually. One cable goes to pin 0-10 and the other goes to ground. When you touch
the two wires together, a sound should play.
Also check that the lenames are named properly as explained in the previous step.
Note: Some car's lighter/power socket is not in convenient location; you may see unsightly cables for your car horn
project when you nish building it. One option is to build an extension cable for the socket splitter cable so that you can
hide the splitter and its cables under the car seat.
Important Note: Most cars do not provide power to the cigarette lighter / accessory socket when the engine is not
running. This is good so that the ampli er does not slowly drain the car's battery when the car isn't running! Use a
voltmeter on the power socket to ensure that your car works this way! If your car provides power to the power socket if
the car is o , you'll need not use the socket method below and wire a relay to the battery instead.
3. You're done!
The ampli er receives the audio signal from the Audio FX board, ampli es it, then sends it to 1-2 car horns. While the
Audio FX board requires roughly 5V to operate, the ampli er requires 12V. This is the native voltage of a car battery (in
gas cars, at least).
Build enclosure
To begin download and 3D print an enclosure for the ampli er here. Print the lid facing down and the enclosure with
supports enabled. As with the control pad, print with ABS plastic to ensure the heat of a hot car. The lid is supposed to be
snug- t, but if your printer is perfectly calibrated, the lid may not stay on the enclosure. If that happens, print the lid at
1% or more larger scale or simply tape the lid on.
As with the control pad, nd screws that are small enough to pass through the holes on the ampli er, but large enough
to grip the enclosure's mounted when gently tightened.
Attach cables
On one side of the ampli er are two green terminals. These are for the horn(s). It doesn't matter which horn attaches to
which block, but what does matter is the polarity. If you purchased the horns recommended in this Instructable, there are
two connectors in it's black cable. The conductor marked in white is the positive signal, the all-black conductor is
negative. The circuit board is marked positive & negative near the terminal blocks, so attach the horn's cable
appropriately.
The power input on the ampli er is another green terminal on the same side of the board as the white connector. With
the cable that you created in the previous steps (a male car lighter plug on one end and bare cables on the other),
connect this to the green power terminal. The conductor that goes to the lighter plug's top is positive and the other
conductor that goes to the plug's metal side ears is negative.
It is likely that the 12V power provided by your car is "dirty"; it could introduce a hum into the sound going to the horn.
To easily x, this, connect the straight, male end of the 3.5mm cable coming from the control pad to the ground loop
isolator.
The isolator should have come with a short 3.5mm cable with straight plugs on both ends. Cut-o one of the plugs. Strip
the exposed end to show the wire colors. There are three conductors in this cable. If you look at the 3.5mm plug, there
are three metal sections. The conductor that connectors to the tip of the plug is the positive audio signal, the middle
metal section of the plug is the negative signal, and the metal band at the base of the plug (closest to the cable) is the
ground.
The ampli er should have come with a gray cable with white connectors on each end. Cut one of the connectors o , then
strip the exposed end to reveal three conductors: white, red, and black. Solder the three conductors on your 3.5mm cable
to this gray cable like this:
Connect the white plug on the gray cable to the white socket on the ampli er.
For the optimal volume level, use a small at blade screw driver to turn turn both white knobs clockwise until they stop.
Then turn them counter-clockwise 1/2 turn on both knobs.
Testing
Your car's cigarette lighter / accessory socket should not provide power while your engine is not running. So when the
engine key is not inserted, the control pad and horn is not usable.
To test the horn, either start the car or turn the key to the "accessory position". You may hear a slight pop from the horn,
indicating that the control pad and ampli er are getting power. Press a button on the control pad; you should hear a
sound e ect on the horn! If not, consider these troubleshooting tips:
Troubleshooting
No sound
Make sure the control pad is getting power. Disconnect the micro USB cable from the control pad's
female connector. Plug the male end into your phone; it should show a "charging status" if the cable is
providing power. If not, make sure the connections between this cable, the 12V to 5V adapter, the splitter
cable, and the car lighter socket are all secure.
Digital Car Horn: Page 19
Make sure that the ampli er is getting power. I think the ampli er has a power light. If there is no light,
make sure the connections between the ampli er's cable, the splitter cable, and the car lighter socket are
all secure.
Check the lenames of the OGG les on the Audio FX board. They may be named incorrectly. At the very
least, name 11 les T00.OGG, T01.OGG to T10.OGG. To check the les while the control pad is in the car,
disconnect the female micro USB connector on the back of the control pad, then use a separate micro
USB cable to connect the control pad to a laptop.
Make sure the white volume knobs on the ampli er are turned clockwise enough to reach volume.
The button hats may be rubbing against the control pad's front holes. You may need to shave the holes a
bit larger or reposition the circuit board where the buttons are attached.
The button wiring may be incorrect. Each button needs to have a ground wire to the Audio FX board (all
of the buttons can share the same ground wire). Perhaps some button's legs are not wired to the signal
pins on the Audio FX board properly and are shorting straight to ground instead. To determine which
pins to connect the ground wires to, use a voltmeter, setting it to continuity mode. Each button has four
legs. Three legs will complete a circuit even if the button is not pressed. These are the legs you can
connect wires to when daisy chaining the buttons together for the common ground wire.
Distorted sound
The two white volume knobs on the ampli er are turned to maximum. Use a small at-blade screwdriver
to turn them clockwise to maximum, then turn them both a half-turn counter clockwise to reach an
optimal volume for the horns.