Clean up power supply noise Teensy 4

Status
Not open for further replies.

frankzappa

Well-known member
Hello!

I’m wondering what I can do to clean up the power supply noise/ripple. I’m using some piezo sensors with a virtual ground circuit. I buffer the sensors and virtual ground with op amps and I’m getting pretty clean signals after digital filtering but I’m wondering what I can do to clean stuff up electrically to get the best possible signals as I didn’t use any capacitors anywhere in the circuit.

I’m thinking to put a 0,1uF and 10uF on the op amps power input to ground.

Also maybe a 220uF between 3.3v and ground on the teensy.

The virtual ground is a voltage divider with two resistors to create a halfway point between 0-3.3v. I also put this through an op amp before going to the sensors.

Should I put a capacitor there as well?

Is there any point to put a ferrite bead on the power supply to make sure any digital switching stuff on the teensy doesn’t find it’s way to the analog circuit?

Also since the PCB will be submit to vibrations, I’m thinking I should avoid ceramic capacitors because of piezoelectric effects. What other choises besides ceramic capacitors do I have.

Any advice?
 
Add bandpass analog filtering before ADCs.
For a virtual ground, use an op amp or "rail splitter" that allows lots of output capacitance
Low impedance sources
Keep loops small
Use balanced/differential signals all the way into the ADC
 
Add bandpass analog filtering before ADCs.
For a virtual ground, use an op amp or "rail splitter" that allows lots of output capacitance
Low impedance sources
Keep loops small
Use balanced/differential signals all the way into the ADC

Any advice for a specific op amp for the rail splitter? I’m not splitting exactly at half the voltage, I want the negative part to have a bit more resolution. I can allow the positive part to clip a little.

What do you mean by balanced/differential signals to the adc? I need to read up on that. I’m using a ground plane and trying to keep power traces away from signal traces.

By low impedance sources, do you mean to buffer the signals from the piezos with op amps? I’m already doing that.

The thing I really want to get rid of is the small lower frequency variations which I think are happening at the virtual ground. It seems if I use higher resistors for the rail splitter I get more low frequency ripple. However this is on a breadboard. It’s an much less on the pcb prototype.
 
Last edited:
> any advice for a specific op amp for the rail splitter?
Just check the op amp specs for what you want, especially how much output capacitance it can tolerate.

I've attached a LTSpice circuit that demonstrates noise. Note that a properly done differential signal can reject massive amounts of common mode noise and ground shift. And a low pass filter helps with high frequency noise.

View attachment differentialADC.zip
 
This is like ten levels above my electronics knowledge which is basic at best. I downloaded spice and I figured out how to run a simulation and probe the different parts of the schematic but I don't really know how to use this information. I'm using all available 10 inputs for 10 sensors. If you mean to connect the ADC in pairs and use them as differential ADC's then this is not really possible because I'm using all 10 analog inputs.

I will have to dig deeper into this spice simulation thing, I've only heard about it but never thought about simulating my circuit.
 
BTW, I have a ground plane on my circuit. I noticed I have the ground plane of the circuit running under the teensy. Is that a bad idea? The teensy is raised off the board because it's soldered with the included header on to my PCB. I didn't think about that when drawing the PCB.
 
Agreed, the need for many analog inputs precludes the ADC differential mode. But when you don't need more than 1 or 2 inputs, differential mode should be the standard method if noise is a concern.
 
I can't see the circuit being discussed... Different opamps have different decoupling requirements, so
which opamp?
 
I learned a long time ago that electrons are notional little things that will go where they want to rather than where I think they should go. Details matter and schematics rarely show enough of it. Ground planes provide a low impedance path but it isn't always the path you need.

Every opamp should have a capacitor on its power pins. They are happier that way.

The voltage regulator has a low output impedance. (Varies between device types and rolls off with increasing frequency.) So star distribution schemes (power and ground) tend to have the lowest noise because the regulator shorts out the noise that it sees.

For best results, every ADC input should have a presample filter that removes all content below the Nyquist frequency. Brick wall filters don't exist so I like to use filters with a corner frequency 1/10th the sample rate. Filter order depends on how paranoid I feel at the time. Second order minimum. Bessel response if you value phase response.
 
Here is a screenshot of the schematic for my prototype board which does not have any bypass capacitors and the virtual ground is not buffered. I used two 150ohm resistors which I realise is very low but it gave me a much cleaner virtual ground. Maybe this won't matter if I buffer it. Also I added a 10uF capacitor on the virtual ground but it doesn't seem to do anything.

https://www.dropbox.com/s/6ukuf108fyqnu2q/sch.jpg?dl=0

A0 - A9 are connectors/inputs for the piezos.

RP0-RP9 are potentiometers that adjust the amplitude of the piezo signals that go into the op amps.

Nevermind the potentiometers, they are not wired properly on this picture. The other end will go to the virtual ground and the wiper will go to the output so I can adjust the amplitude without affecting the low cutoff frequency of the piezos.

The OP amps I used are TLC2264 https://www.ti.com/lit/ds/symlink/t...=https%3A%2F%2Fwww.ti.com%2Fproduct%2FTLC2264 but I discovered they are not rated for 3.3v so will use something else (they seem to work fine though).

I noticed the TLC2264 don't go rail to rail on the positive signals, only negative. so will try something else. TI suggests the OPA4990 https://www.ti.com/lit/ds/symlink/o...=https%3A%2F%2Fwww.ti.com%2Fproduct%2FOPA4990

I will try some MCP6004 in the meantime because I have them in my local store.
 
I learned a long time ago that electrons are notional little things that will go where they want to rather than where I think they should go. Details matter and schematics rarely show enough of it. Ground planes provide a low impedance path but it isn't always the path you need.

Every opamp should have a capacitor on its power pins. They are happier that way.

The voltage regulator has a low output impedance. (Varies between device types and rolls off with increasing frequency.) So star distribution schemes (power and ground) tend to have the lowest noise because the regulator shorts out the noise that it sees.

For best results, every ADC input should have a presample filter that removes all content below the Nyquist frequency. Brick wall filters don't exist so I like to use filters with a corner frequency 1/10th the sample rate. Filter order depends on how paranoid I feel at the time. Second order minimum. Bessel response if you value phase response.

Any guidelines for the capacitor values on the op amps? I was thinking a 0.1uF and a 10uF?

I'm using digital filtering which seems to work well and gives me great signal to noise ratio. I ditched all analog filters in the circuit it was not needed.

What I need to get rid of is what I think is a 60Hz ripple. Don't know where it's coming from. Adding bigger resistors on the virtual ground seems to amplify it a lot.

Star pattern for the return ground seems tricky to pull off. I will see if it's possible.
 
Here is a LTSpice circuit to show what happens to 60Hz supply noise if you change from .1u to 500u on the virtual ground capacitor:
 

Attachments

  • VGND-noise.zip
    582 bytes · Views: 50
I can't see the attachment/link. Although I can imagine what happens. It should disappear. I guess bulk capacitors is what I need.
 
You will have to try it. Spoiler: it might make you lean towards using a series voltage reference (eg, LT6656) for your virtual ground.
 
You will have to try it. Spoiler: it might make you lean towards using a voltage reference for your virtual ground.

Can you send the attached file again? I can't click on it.

I've been looking at those voltage reference IC's, I'm looking for a suitable one. I saw that one was rated as below the precision of a 12 bit adc so that's promising but it was for 5v circuits. I need to find one that is powered by 3.3V.
 
Ok, I've realised that the problem is probably the teensy4s internal reference voltage. If I use small resistors for the voltage divider, say 150ohm or so, the ripple disappears but there is still some kind of ripple left which is less periodic. Using a voltage reference for the virtual ground will probably help but will not get rid of it.

There is a voltage reference from Texas instruments which outputs both 3.3v and 1.65v. I will try it to power the op amps from the 3.3v and virtual ground from the 1.65v.
 
This is really disappointing. I’ve spent like a year working on this project. Learning how to program from scratch and now I have to find another microcontroller.

What other options are there that have the same speed?
 
The only other solution I see is to make a logarithmic amplifier since I already have to convert the piezo signal to logarithmic in software.

This adds a lot of complexity to the circuit but should solve this problem as long as a stable voltage reference is used for the virtual ground and the rest of the circuit.
 
There is some information in this document illustrating different circuits, amongst other things, dealing with piezo sensors.
 
A charge amplifier is the usual thing to use with a piezo sensor.

The difference as far as I can tell is that the capacitance of the cable can mess with the low cutoff frequency with a voltage mode circuit. My cables are 20cm so not going to have an effect. I can control the low cutoff with the value of the potentiometer.

Is there any other advantage to a charge mode amplifier? As far as I understand I would have to have the op amp powered with a voltage that is like 30v or something because the piezos produce high voltages. With the voltage mode circuit I use I can control the voltage going into the amp with the potentiometer.

Also the problem is not the piezo response or circuit noise. I’m fairly certain it’s the teensy4’s reference voltage problem. I can see digital oscillations of some kind. Especially if I transmit a lot of data over USB.
 
Status
Not open for further replies.
Back
Top