High Pitch noise from Leonardo board

Hi,

I am making a strain gauge data logger with bluetooth connectivity for a project with an Arduino Leonardo. So far everything is working great when I am using the board connected to USB for power. I started testing the setup with battery power today and I am getting a High Frequency noise emanating from the Leonardo Board. I have disconnected all of the aux. electronics and it is still making the noise. The battery I am using is a 7.4V 2 cell LiPo connected to the Vin on the board. When the on board "L" LED is on or blinking the tone of the noise changes with the blinking. I was thinking it was just the voltage regulator but I want to be sure before I break something. Any advice would be great.

Normally it's ceramic capacitors that make noise.

(rest of post deleted to save people's sanity)

NEVER short out capacitors like that - you may destroy the board. (LiPo batteries
will put out 50A or more compunction, enough to vaporize all the power traces).

The Leonardo doesn't have a switched-mode regulator according to the schematic,
so its a mystery. Decoupling caps should have a constant voltage across them so won't
make enough noise to be audible in my experience.

I would suspect the inductor L1 on the USB supply part of the circuit - except you are on
battery power...

You can investigate the precise origin using a pen or similar - place against suspect
component and other end to your ear (carefully!).

You could check any AC component on the supply rails with a multimeter on ac-volts
range - it should be very low (< 0.1Vrms)

MarkT:
NEVER short out capacitors like that - you may destroy the board. (LiPo batteries
will put out 50A or more compunction, enough to vaporize all the power traces).

Brain fart. Yes, that would be bad :blush:

What I meant was put a resistance across them (eg. 1k) - see if the frequency of the noise changes.

Or try the pen trick. I didn't know that one.

Thanks Mark, the pen tricked helped and I was able to find the component making the noise. It would appear to be the competent shown bellow in the picture. I can't seem to get the Eagle files for the board to work so I am not sure which competent it is. This seems to be effecting the operation of the rest of the board. When operating VIA usb the programs work fine, however when powered by the battery I am getting nothing.

Looks like C12 to me.

Look on the schematic just above and to the right of where it says "+5V AUTO SELECTOR"

The black thing marked "M7" is diode D1 (above where it says "+5V AUTO") and the one after that is C10.

I have this issue with several Leonardo and micro boards.
You should check the 5V power supply when powering via Vin (oscilloscope, look for 4kHz sawtooth signal).
On all of my boards, there is a sawtooth of about 800mV ptp @ 4kHz on the 5V supply !!
The frequency changes slightly when changing input voltage from 7V to 12V.

C12 is the indeed the capacitor making the acoustic noise, it is "singing" with the frequency of this sawtooth.
According to the schematics of the Leonardo and micro, the voltage regulator used on these boards should be the NCP1117, but on the boards I have, there is no number printed on this component, so I suspect an alternative was used, with these annoying results...

For a project I have for generating audio signals, this noise was unacceptable, so I cut out the regulator and powered everything with an external LM7805.

pascalm:
For a project I have for generating audio signals, this noise was unacceptable, so I cut out the regulator and powered everything with an external LM7805.

Crude solution.
As fungus has pointed out, it's C12, a 10uF ceramic cap.
It is there to stop the 5volt regulator from oscillating, but apparently it's not very good at it.
I would just piggyback a second smd cap on top of C12.
If you're not good at smd soldering, try a 47uF electrolytic cap in the 5volt and ground headers.
If it works, you could solder that to the bottom of the board
Leo..

It could be the wrong ESR rating for the actual regulator used. My Leonardo has a 1117 5V
regulator and I haven't noticed problems (but then I wasn't looking for them or using battery
power).

Low dropout regulators usually have tight requirements on their output capacitors,
a minimum and a maximum ESR value for instance, to ensure stability across the full
voltage and current range.

If these are knock-off boards the wrong regulator or capacitor may have been
substituted.

Ceramic caps use the same materials as piezo transducers so will sing like this. You don't
use them in audio pre-amps because they act as microphones.

As long as you have the low-ESR cap, it's almost always okay to put additional filtering in parallel, even if the caps aren't low-ESR.

But uh, you can buy ceramic caps, in 1210 package, up to 100uf now....

No, low drop-out regulators often require ESR in a certain range - too high or too low and
oscillation. Low-drop out regulators have highly non-linear circuitry so that its hard to
satisfy Nyquist's criterion for stability across the area of operation. Go read some
datasheets... For instance, the TPS769xx family (ultra low dropout) has this warning in the datasheet:

The minimum recommended capacitance is 4.7 μF. The ESR (equivalent series resistance) of the capacitor should be between 0.2 Ω and 10 Ω. to ensure stability. Capacitor values larger than 4.7 μF are acceptable, and allow the use of smaller ESR values. Capacitances less than 4.7 μF are not recommended because they require careful selection of ESR to ensure stability.

So the practical solution, as already mentioned in post#7, poke a lossy 47uF electrolytic cap into the +5volt/ground header.
We are not re-designing the Leonardo, we are just trying to fix it.
Leo..