Nibbles and Bits
The Care and Feeding of My Pet Arduino


'My Dog Has Fleas' - A Binary Music Machine
« 1 2 4  4  5 6 7 8 9 10 11 12 »

Section 4 - Project Components
Let's start with few words about the pirated speaker that I pulled from the old telephone handset. This component has given me a bit of grief. I am used to working with the flexible jumper wires that plug nicely into my breadboard. The leads on the speaker are much stiffer and I have had to resolder both of them back on already. The other ends, that I have stripped bare, have broken as well. I replaced the stiff leads with a couple of jumper wires and it works much better.
Mini-Speaker - quantity needed: 1
I'll be using mini push buttons, momentary contact switches. These were a great buy on eBay. You will notice in the photo that they have four legs. The terminals that point their toes at each other are the same connection. You can use either side. When you install the switch across the center gap of your bread board you are, at the same time, linking the two opposite bands of common points together.
Momentary Contact Switches - quantity needed: 4
Whenever you ask Arduino to read a button on one of his pins, you need to make sure the pin is attached to 'something' when the switch is open. Close the switch and he sees a nice clean 5v which he sees as HIGH.
If you leave it open, or 'floating', the voltage will bounce around like a tennis ball. This drives Arduino crazy!

Always include a 'pull down' resistor connected between the pin and ground. This will give you a nice stable voltage and as long as it is less than 1.5v, Arduino will treat it as LOW.

10K Ω resistors - quantity needed: 4
For this project, we are using four 10K Ω pull down resistors. You can see how they are configured in the schematic on the right.

A wide range of values will work in this project. If you don't have 10K Ω resistors, try something else. I have made it work with resistors as low as 470 Ω, but something higher would be much better. The lower the value, the more current drawn. If you plan to power your project with a 9v battery, a lower value is going to shorten its life.

In the next section we will populate the breadboard and soon we will have music popping out of our old telephone speaker.

Next Section »

Typical 'pull down' resistor circuit