Voltage drop... Add a capacitor?


We're using an Arduino Mega board that has a number of components, but one section in particular seems to be giving us a problem and I suspect that is due to voltage drop when our piezo speaker is activated. Below is a schematic of what's involved. The piezo is a larger piezo and works fine when the batteries are fresh, but the intent of it is for it to be activated later in the lifespan when the batteries have been used for a few hours and the voltage is a little lower - not critically low, but lower. When the piezo is activated it will sound for a few seconds, but then the Arduino shuts off and then powers itself back on - without the piezo on. My guess is a brief drop in voltage. I was thinking that adding a capacitor to this in parallel would solve the problem, but I'm not sure how large of a capacitor to add. The batteries are in series and output 8.4v when fresh and shut off (end of life) at 6.6v. They are 3.7v batteries so the average operating voltage is 7.4v for the pair. During our use, the typical lifespan should see the batteries drop to around 7.2v so we don't usually get all the way to the end of life voltage.

Any thoughts?


What are the Ah and C rating of the batteries?

-- Mark

What if you put a resistor in series with the piezo speaker? It could be shorting the power supply when the transistor is turned on.

Have you thought of measuring the arduino Vcc with an analog input , converting the values to voltage, and printing the values to the serial port and capturing them with a Terminal Capture program so you can plot them in Excel to see if the Vcc drops to the BrounOut voltage threshold that triggers the reset ? There used to be one called Connex Clear Terminal but it is no longer available so you would need to find another serial terminal capture app.

BATTERY SPECS: Capacity (Ah): 3.4 Ah (3400mAh) Max. Discharge rate: 2C (6.8A)

Thought about adding a resistor too, but not sure what size I would add. Ideally, I want the speaker to be as loud as possible (it's a locator beacon).


We do actually have voltage being monitored and recorded. They save in 1 second increments and there's no huge voltage drop detected.

7.54v (speaker activated) 7.51v (speaker on... still running) (4 readings at this voltage) ....Then power cycle Reading still shows 7.51v after the Arduino resumes.

You have no chance of recording a voltage collapse with a 1Hz sampling rate.

That collapse would probably happen immediately though if it was overloading the batteries. Taking a few seconds to die sounds like a thermal issue. Are you sure the buzzer is connected to VIN and not 5V? How much current does it take?

7.2V is on the low end of the Mega specs. If it was me I would power the Mega via a Boost/buck converter providing 9 or so Volts. This would keep the Mega powered up. The batteries have plenty of capacity to keep it all running. Pololu do some small pretty decent convertors. I use them in my planes to power 9V High intensity LEDs from a 2 Cell LiFe pack

-- Mark

Yes, definitely know it's connected to VIN, not 5V. In anything we've measured, the max current reading we've seen on the Arduino was 350mA. Usually averages around 250mA.

Your sampling rate should be at least 1kHz, preferably 5kHz.

exceleronsports: BATTERY SPECS: Capacity (Ah): 3.4 Ah (3400mAh) Max. Discharge rate: 2C (6.8A)

Thought about adding a resistor too, but not sure what size I would add. Ideally, I want the speaker to be as loud as possible (it's a locator beacon).

That's best done by finding the resonant frequency.

Piezo's should be driven without DC bias I believe.

You appear to lack decoupling on the rail to that piezo driver - that might be all you need, try 100uF 10V or larger.

According to the HYD-4218 data sheet, the resonant frequency is 2900±500.

Not sure what to do with that.... lol.

I also note it says the max current rating is 9mA. If I have upwards of 8.4v feeding this, does that mean I should have a 1kΩ resistor in series with this piezo? (R = V/I) Will that affect output volume?

Then add a 100uF decoupling capacitor as well? I've got some 100uF 25V capacitors so I'm assuming that should work?

HYD-4218 appears to be an active piezo module, meaning it already has the oscillation circuitry in it. Don’t worry about what MarkT said about DC bias or resonant frequency.

I think you’re doing something to overload the 5V regulator, causing it to shut off from high temperature. Do you have the transistor properly set up with the base resistor? is there anything else you’re turning on after you turn on the buzzer?

Hi, I agree with Jiggly-Ninga, the piezo device is a self contained device.

You do not need to add a resistor in series with the piezo device. The Max 9 ma specification is telling you, at the rated voltage it will not draw more than 9 ma. One would expect lower current at lower voltage.

If the piezo is only drawing an estimated 6 or 7 ma from your battery it is possible at marginal voltages for the Mega noise on the voltage line from the piezo is causing the Mega to “reboot”. Not sure if this is the case but a 0.1 µf or 1µf (actual value not critical) across the Mega supply might help. An additional similar capacitor right at the leads of the Piezo might be a good idea (if noise is coming from the piezo).

BTW you can probably bump the 1k resistor in the base to the transistor to 5k or maybe 10k and still have enough drive for your piezo. That will save you an amount equal to ~ 1/2 the Piezo current. and if you replace the 2n2222 with a 2n7000 (fet) you can save even more current.

Regarding making a ADC measurement of the voltage collapse. You need only a few samples.

1 - 5 just before you turn on the piezo and the same immediatly after the piezo is turned on. The number of samples is to allow some averaging for noise in the readings.

Good luck


@Jiggy-Ninja... transistor setup should be good. This unit is a radio locator beacon. The radio transmitter could possibly transmit after the piezo is enabled. There's also an SD card shield that writes all the data in 1 second increments to an SD card. Those are the only things that could toggle on/off after the piezo is on. Even with all that on, though, the max we've observed is 350mA current total.

@JohnRob... thanks for the info. I have some 0.1uF capacitors I can use for testing. Also, thanks for the info on the resistor and 2n7000. Unrelated note... in another area of our circuit we use a 2n3906 for a pretty similar purpose. Is there a fet equivalent you know of that would also save on current for this?

You are using a piezo rated for 9-15 volts at 7.x volts and worried about level of sound. why pick that piezo? there are 5 volt piezos that are so loud you have to box them inside an enclosure.


At one point we were using 3 batteries for a total of 11v, but found the extra battery was unnecessary for the Arduino so we scrapped it, but still had the piezo. The data sheet on the piezo says the operating voltage is 3v to 15v so figured it was fine to keep using that.

SD-cards are very power hungry, that's possibly the culprit - you should have 'fessed up to the list of attached devices from the start, rather than obsessing on the piezo buzzer rated at 7mA. Also what transmitter - that could be power hungry too, and very bursty in its current demand.

Piezo speakers are not a simple load. If I remember correctly a piezo element is effectively an inductance in series with a capacitance with a resistor in parallel (that's not how they are made, it's just an electrical representation) so is effectively a series resonant circuit. At resonance the device load will be entirely resistive and will present best load characteristics. Below resonance, the load will be mostly capacitive which will present a very low impedance to your driver and will draw lots of current whilst above resonance the load will be mostly inductive and will draw less current. This is a generalisation as the sounder will exhibit other minor resonances up and down the frequency spectrum. So run your device at the published resonant frequency.

Does that help?????