Notifications
Clear all

8 ohm speaker hookup with Arduino

1 Posts
1 Users
0 Likes
741 Views
Aubey
(@aubey)
Member
Joined: 3 years ago
Posts: 6
Topic starter  

I apologize in advance for the rather long winded post...

I am fiddling with a few grandchildren related projects with my Arduinos and two, at present, are currently using a Piezo buzzer, rather than a preferred small speaker. The first is a derivation of the Arduino Starter Kit theremin project. I modified the code to reduce the note selection to a much less obnoxious C3 to B5 range, reversed the mapping so the the higher notes occur as the user moves their hand away from the photoresistor, and created a cutoff by comparing the pitch variable to the mapped maximum in an IF function.  I also plan add a potentiometer to control the duration variable of the tone function. I could also do this with another photoresistor or a range finder sensor, but kids like to touch stuff. My only issue with this setup is the distinctly un-musical sound of the Piezo buzzer.

My other project is the Nanny Finder 3000, a PIR sensor based device with an 5110 LCD radar screen, function LEDs, a magnetron crystal oscillator with a wave adjusting control (totally made up with a rock crystal, some plastic coated wire winding and an LED, but it looks cool), and Nanny detection event alerts. This whimsical device is intended for games of Hide and Seek, the Dark Edition - my youngest grandson's term, that we play around the house with the grandkids. Nanny is awfully good at hiding in the darkest rooms. All the device's functions will have sound effects, and again the Piezo buzzer isn't quite up to the task.

I have a small breadboard speaker, but I have read that if the circuit is not protected with an adequately sized resistor it will potentially damage the pin of the Arduino used to drive it. I have searched for information on this topic on various sites, but the information I found is either contradictory to my understanding that an unprotected speaker circuit will damage the Arduino, and the speaker is wired direct (surprisingly common on the Arduino site projects), or is within a complicated pre-amp or amplifier setup that requires a better understanding of audio and rarely applies to a simple 8 ohm speaker setup. I am new to electronics, but reasonably handy and have an IT background, but I understand that a transistor can be used to amplify sound after the resistor has greatly reduced it. However, I am still learning about how transistors are selected and used in a circuit. I also noticed that many of the amplification projects used diodes and capacitors in their circuits. I have a selection of resistors, transistors, diodes and capacitors that I bought in anticipation of just such a requirement.

Since these projects are either simple in nature (the theremin) or small footprint (the NF3000 fits inside a long narrow clear plastic retail case I recycled), I would prefer not to add any kind of sound board or shield. In fact, I would be most interested in understanding how I can implement speakers with things I have on hand like the components noted above, as this would also improve my understanding of transistors.

Thank you in advance for your time and assistance. I attached a photo of the crystal magnetron oscillator, I plan to pulse the LED 😉

cmo

   
Quote