I've created a paper speaker through this tutorial, except instead of conductive thread I used copper tape for the coil. When I hook it up to a device that is known to give off lots of sound, the speaker works pretty well.

My problem is that when I hook up the speaker to my Arduino Uno and run the example tone Sketch provided in the arduino program, the sound comes out veeeery dim. I can barely hear it. I think this is because the arduino wasn't giving enough power to the speaker for it to be loud enough because when I used a 2.5v and 9v battery to power it, it was very loud. I also tested the power going to the speaker and, if I read it correctly on the multimeter, it's barely giving off any power at all.

I know I can use a relay attached to a large battery pack (like 9v) to give more power and get a louder sound. But I'm not sure how I would send the audio signals from the digital pin on the arduino to the speaker through the relay. Would it be appropriate to even use a relay in this case? Or would I have to use something else?

EDIT: Here's a pic of what I think it would look like in the end. I'm a total n00b with this, I apologize if I didn't draw it with the right connections or anything. I've never had any type of EE training.


...Let me know if any of that doesn't make sense. Thanks!

  • \$\begingroup\$ It does make some sense. At the same time, if you post your intended schematic would, it make things clearer, even if it's just a sketch. There are no problems with sending audio signal through a mechanical relay. Provided that it can handle the current and voltage that your speaker signal has. By the way, do you have the audio amplifier in your circuit? Digital output pin is not designed to drive a magnetic speaker. I suspect, this is why you have insufficient sound. \$\endgroup\$ – Nick Alexeev Dec 1 '12 at 21:57
  • \$\begingroup\$ Thanks! I just posted a pic. I think I attached it to a digital pin because that's how it was described to be done in the Arduino tutorial. But as to whether or not it can drive a magnetic speaker, I don't really know. \$\endgroup\$ – Jessica Stanley Dec 1 '12 at 22:10
  • \$\begingroup\$ Nice hand-drawn spiral. Let me back up a little and ask: why do you want to have a relay? You can't make an audio amplifier out of a relay. You can only connect/disconnect with a relay, and do that fairly slowly. Relays typically have settling time on the order of 10ms. \$\endgroup\$ – Nick Alexeev Dec 1 '12 at 22:20
  • \$\begingroup\$ On a different note, a relay has a coil and reeds (the actual switch). When drawing relays, you should draw coil and reeds separately and show details of how each is connected. Otherwise, there are an ambiguities: is the battery connected to the reeds or to the coil? same question for digital signal? \$\endgroup\$ – Nick Alexeev Dec 1 '12 at 22:27
  • \$\begingroup\$ More questions for you. Your picture shows you're using pin 8 on the UNO but when I just looked at it's feature list pin 8 is not shown as being a pwm pin. The tone example may do the pwm in software but just double check that pin is the right one. You could probably make it work with a relay but why not just use a fet. Something like the FDV301N might be a good place to start. That'll let you drive more current through it. \$\endgroup\$ – Some Hardware Guy Dec 1 '12 at 23:42

Your fundamental problem is likely that the impedance (primarily resistance) of this homemade "speaker" is far too low for the limited current drive capability of the Arduino pin. Your substitution of copper tape for the typically somewhat resistive conductive thread likely makes this even worse (at least in terms of presenting an overload to the driver).

As others have mentioned, using a relay as an audio amplifier isn't really workable. Actually a relay is fairly close to being an electromechanical buzzer; drive it with a signal of appropriate frequency and you will likely get more sound output from the relay itself than from this speaker of yours. Under the right conditions you might even get intelligible voice when using a relay as a speaker, but it will not be pleasant.

It may be possible to get sound out of your homemade speaker in one of two fairly simple ways:

  • you could try to use an audio output transformer to change the comparatively high voltage (nearly 5v) but low current arduino output, into a lower voltage, high current output to drive your low impedance speaker. I forget if radio shack still carries these, but you can salvage one out of an old battery powered radio. The higher turns count, typically 3-terminal side would go to the arduino (ignore the center terminal) while the lower turns count side would go to the speaker.

  • Since your Arduino output is digital all-or-nothing, you don't actually need a linear audio amplifier. Instead, you can make a switching circuit with an npn transistor switching the negative supply to the coil, and a resistor between the transistor's base and the arduino output pin. Not surprisingly, this is the exact same circuit you would typically build to drive a relay with an arduino output, as that is also a coil. Given your likely very low coil resistance, you will likely want to add a series resistor to limit the current to what the supply and a cheap plastic case transistor can handle. Such a circuit will likely have sufficient bandwidth to attempt pulse width modulation if you wish to try to generate quasi-analog output from your arduino software. Since you are digital all the way to the speaker, you will need the PWM frequency to be above the audible range if you do not want to hear the switching.

While it is true the bipolar drive might be more beneficial for this type of crude speaker than for traditional ones, the complexity of building that (while avoiding the shoot through issue) is probably not something you want to tackle in a first attempt. Mounting the speaker substrate tensioned in something like a small embroidery hoop (or gluing it to a carrier ring) to increase its restoring force could be a worthwhile experiment.

| improve this answer | |


You need an amplifier, specifically, an audio amplifier. You face two big challenges:

  1. You are using an Arduino's "digital" output to generate your "audio"

  2. You are using a dynamic speaker (voicecoil-style) element design

There are many ways to do this. If fact many textbooks have been written about audio amplification and amplifier design. I will give you one (of many possible) solutions to your problem and explain the theory of operation and design decision calculus.

Design Calculus

The type of speaker element you are building is dynamic (meaning that it relies on electromagnetic, rather than electrostatic, forces to generate motion in the diaphragm). The effect it has on you here is that you need to generate a bipolar drive signal to maximize your audio output.

The fabric/paper design of your speaker does not provide a lot of restoring force so to make it vibrate optimally, you need to pull it towards your permanent magnet -- but then actively push it away (not just stop pulling it). To do that you will need to reverse the direction of the current flowing in the electromagnet (the coil attached to the textile diaphragm).

This poses a problem for the Arduino because, like most digital stuff, it runs from a unipolar power source -- it can only drive its digital pins "high" to the power rail, or "low" to the reference ("ground"). Current can only flow in one direction ("high" to "low", I'm simplifying the physics here, don't shoot).

Further, the Arduino's output pins cannot supply a lot of power and using them directly near their maximum SOR is a bad idea for long-term reliability, especially with a dynamic element that provides back-EMF (the speaker coil stores energy that it can return to the "output", temporarily making the output accept it back -- outputs, like bullies, don't like that).


To solve these problems, I recommend this:

proposed schematic


This circuit is simplified to improve clarity. There are some build details and features omitted. At the request of the community, I'll elaborate:

  • The schematic I first proposed contained two BJT's without biasing and positioning. It was intended to illustrate the push-pull nature of the class C implementation required by your scenario. However, it could not (and was not intended to) be built exactly as drawn. It turned out not to be a good idea as it landed somewhere between a reference design and a block diagram without being clearly in either camp. This, obviously, led to confusion.

  • So the schematic has been updated to something that can be built as drawn. However, when choosing specific transistors, batteries, etc... the values of R1 and R2 may need to be adjusted. Want help, just ping me the parts you chose.

  • You should also take notice of the fact that this circuit is always driving the speaker element. If you stop the oscillation of your "audio" output, the speaker will be stuck extruded and drawing power. You could isolate the speaker element with a series capacitor or an explicit enable/disable function could be added to handle this case, but I won't bother unless it is specifically requested.

  • Given the wide range of approaches to this circuit, I chose to focus on the concepts rather than the specifics. If you just want a reference design you can build for fun, let me know and I'll provide it.

Use two batteries to create a bipolar power source. Now, from the speaker's perspective one battery produces a positive voltage and the other a negative one. Really it's all a matter of perspective (where you define "zero").

  • From the Arduino's vantage point V2 = 3V (let's say its a 3V battery); V1=V2; the top of V1 looks like 6V

  • From the speaker's vantage point the top of V1 looks like 3V; the top of V2 looks like 0V; the bottom of V2 looks like -3V

The rest of the circuitry between the speaker and the Arduino is a two-stage amplifier.

Stage 1

This amplifier is a common-source configuration (a class A amplifier if you must know ;-) ). It serves to amplify the voltage of the Arduino's output from it's unipolar-range to the bi-polar range of the speaker (the two batteries in series). If you want more detail just ask and I'll elaborate further.

Stage 2

This is a class C power amplifier that serves to amplify the current driving the speaker. Current is proportional to force. More current --> more force pulling on the diaphragm --> more acceleration of the diaphragm --> more air pressure generated --> "louder" sound.

A note about your "audio" signal

A digital output from the Arduino only has two states. Human audio is an analog phenomenon that has an infinite number of states. The signal you would naturally generate if you just toggle the output pin at your desired frequency is a square-wave that necessarily contains many additional frequencies (harmonics). This will result in your speaker sounding raspy (or sometimes described as "screechy"). If you want a more pleasant sound, you will need to implement class D modulation in your firmware.

  • You can learn more about power amplifier classification here.

  • You can learn more about digital audio modulation here.

A note about "shoot-through"

The square (two-state) drive of the Arduino in this application is significant. Many have correctly noted that a stacked driver configuration necessarily poses a risk that both devices could (will) turn on during the transition of the input signal. This is a well known behavior. Since the upper device connects to the high voltage in the system and the lower device connects to the low voltage in the system, if they are both on at the same time, the power supply may be shorted ("may" because "shorted", aside from absolute 0, has a relative meaning respecting the size and capabilities of the supply, circuit, and components).

However, the Arduino output transitions very quickly through the intermediate range between its two driving output levels. To better quantify the analysis, let's look at the edge:

Let's choose the NFET's to be Si4836Dy's and let's double those numbers to produce a theoretical worst-case PFET to go with it. This system could handle >22A from a >2.7V Arduino output (Arduino's are typically higher, so this is a nice worst-case). The larger current handling implies a large transistor, which will switch more slowly (which is worse for our predicament).

Absolute worst case for the transistors is 75nC of total gate charge, let's derate to 100nC. The total gate charge for the second stage is then 300nC (given our worst-case doubling for the PFET). Swinging the out of the second stage low is much slower than pulling it high, due to the lack of an active component (R2) in the high-side of the stage 1 amplifier.

Taking this case, tau = RQ/V, where R is R2; Q is 300nC, the total gate charge; and V is 5 (chosen to be even worse than before). Computing, tau = 25uS. Again, let's double it make the scenario even more unfavorable: 2tau = 50uS.

Let's say we are working with a 12V total (+/-6V). To make things bad, lets use a bunch of AA (EE91) in series. A good (bad) estimate of the ESR for this configuration is 20Ohms of internal resistance

Now we determine what (if any) shoot-through risk we face. Again, let's be ridiculously hard on ourselves. We'll assume a full-short (0 ohms) even though it isn't physically possible (the transitioning transistor channels have substantially more resistance than 0). That means that the batteries must absorb V^2/R Watts for 50uS -- or 360uJ on each cycle. Now let's pick a high frequency audio signal at 10kHz. That's 3.6J each second, but there are eight batteries --> 450mJ/battery each second.

A typical EE91 "AA" battery is designed to safely dissipate 5076J over an hour (the 1-C condition)... or 1.41 in a second. That equates to about a 3X safety margin after we took every opportunity to make the scenario unrealistically unfavorable.

For a hobbyist project, this approach proffers a number of advantages over other Class C schemes: It uses fewer components, produces strong bi-polar output, requires less tuning, is substantially more tolerant to component variation, and is simpler to build.

In conclusion...

I know this is a dense topic and may be confusing at first encounter. If you still have questions, please follow-up and I'll try to elaborate.

| improve this answer | |
  • 2
    \$\begingroup\$ Yikes, I see why you call yourself Fried Parts. If the supply is more than the B-E drops of Q2 and Q3, they will both turn on and effectively short the supply. \$\endgroup\$ – Olin Lathrop Dec 2 '12 at 0:19
  • 1
    \$\begingroup\$ You switched to FETs from bipolars, but you still have the same problem. Both FETs will likely be on over a good part of the gate voltage range. If you draw something so that it looks detailed, then it should include the details. If you just wanted to show a low impedance driver and not get into details, you could have used two BJTs in emitter follower mode. At least that won't blow up if someone builds it as shown. \$\endgroup\$ – Olin Lathrop Dec 2 '12 at 13:11
  • \$\begingroup\$ @Olin -- Yeah, agree with you that it was a bad drawing approach. With square drive from the Arduino, it transitions through the intermediate range so quickly as to not cause much of a problem. \$\endgroup\$ – DrFriedParts Dec 2 '12 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.