0
\$\begingroup\$

I built a circuit on a perf board, see schematic below. Basically, I have an analog sensor where the output is a Wheatstone bridge. I connect this to an instrumental amplifier (AD623ANZ) with a gain of ca. 20 and I filter the output with a first order active low pass filter (fc=100Hz).

enter image description here

My goal is to sample this signal with the ADC of my Nucleo board (NUCLEO-F070RB). First thing I do is to check the noise level of the filter output with the oscilloscope before connecting it to the nucleo. So far so good, photo attached. enter image description here

As soon as I connect the output to the nucleo, the signal is much worse. I see spikes every 100ms, suspiciously this is due to the adc sampling = 10Hz, and increased noise. Again photo attached.

enter image description here

Some more info: 1. the perf board and the nucleo have the same 5V supply; 2. I use a 20cm wire to connect the filter output to the adc input.

What do I miss? How can I get rid off the increased noise + spikes?

Thank you!!!

Edit:

  1. Ref is now connected to 1.55V.
  2. Power supply noise: enter image description here
\$\endgroup\$
5
  • \$\begingroup\$ Check noise on power supply. I'd like to know what opamp you're using, and more info on cabling, perhaps a picture. Also the instrumentation amplifier won't work if REF is connected to nothing. \$\endgroup\$
    – bobflux
    Dec 22, 2022 at 11:46
  • \$\begingroup\$ For power supply I use a voltage regulator (L78S05CV) with recommended caps. Please see the new pic in the post for noise level. The opamp is MCP6043-I/P. Ufortunately, I cannot send any picture about cabling, I am so sorry. What would you need to know in particular? Ref is now connected to 1.5V. \$\endgroup\$
    – mdir
    Dec 22, 2022 at 12:01
  • \$\begingroup\$ 1.55V, not 1.5V \$\endgroup\$
    – mdir
    Dec 22, 2022 at 12:11
  • \$\begingroup\$ Which op-amp is between sensor and Nucleo? \$\endgroup\$
    – Justme
    Dec 22, 2022 at 12:22
  • \$\begingroup\$ The opamp is MCP6043 \$\endgroup\$
    – mdir
    Dec 22, 2022 at 12:28

4 Answers 4

2
\$\begingroup\$

The opamp you're using is ultra low power and extremely slow (14kHz Gain Bandwidth).

The ADC draws current pulses when sampling.

The opamp has a rail to rail output which requires feedback to hold its output voltage steady, but the ADC's current pulses are too fast for this slow opamp. So the high output impedance of the opamp introduces error into the measurement.

Solution: add a passive RC filter at the output of the opamp.

Use a non-piezoelectric cap like C0G ceramic or film. Capacitor value should be larger than the ADC sampling capacitor multiplied by 2^(ADC bits) to ensure the cap can transfer charge into the ADC sampling capacitor without dropping more than 1LSB in voltage.

The ground pin of the filter cap should be close to the ADC ground.

The resistor should be at least equal to the value specified in the "capacitive load isolation resistor" plot in the datasheet for this capacitor value.

\$\endgroup\$
0
\$\begingroup\$

I'd recommend to check if an active second order filter (e.g. https://www.electronics-tutorials.ws/filter/second-order-filters.html) does better.

Maybe an additional RC-Filter just in front of the Nucleo-Input with a relatively small resistor (few tens of Ohms, maybe up to 200 Ohms) and a little larger capacitor (few microfarads) can decrease your issue. The purpose of this is to decouple the opamp output from the sampling capacitor of the ADC. This may introduce a small error but that could be calibrated.

Imagine the nucleo ADC input is clamping a capacitor (maybe 10...100 pF) directly to the output of your buffer at each sample - and the buffer must charge it up and this can invoke some overshoot (due to capacitive loading of the opamp).

Between the 10Hz spikes in your second graph it looks like there could be some distinctive frequency in what you consider "increased noise". Take a closer look at it if it is really noise or a specific frequency. It could help to know this to get rid of it.

\$\endgroup\$
3
  • \$\begingroup\$ Actually this specific frequency is about 100Hz \$\endgroup\$
    – mdir
    Dec 22, 2022 at 12:18
  • \$\begingroup\$ I added an additional RC filter in between the nucleo and the opamp output. Unfortunately I do not have small resistors in this moment. I used a 10k resistor and 0.33n, resulting in a 48Hz cutoff frequency. Signal has improved a lot but now I see some random spikes ±2-3 mV. \$\endgroup\$
    – mdir
    Dec 22, 2022 at 12:43
  • \$\begingroup\$ Try again if you got hold of lower value resistors. With 10k it increases the impedance far too much! Placing this passive filter near to the nucleo is preferred as Jon pointed out.The 100Hz may well origin from mains as Ralph mentioned. Blocking capacitors are inevitable here. Some ADC offer 50Hz suppression by digital means too... \$\endgroup\$
    – datenheim
    Dec 22, 2022 at 13:55
0
\$\begingroup\$

I use a 20cm wire to connect the filter output to the adc input.

This will be the cause of most of your problem. The input to the ADC is effectively an analogue switch in series with a capacitor (the sampling capacitor). At the sampling rate the switch is closed for a very short period of time, charging the capacitor up to the input voltage level. It is then subsequently converted to a digital value by the rest of the ADC system.

When this capacitor is being charged it will draw a short impulse of current from the input pin. The inductance of the wire you are using will resist this pulse causing the voltage to dip and then resonate. This is what you are seeing on the scope trace.

You can fix this problem in a number of ways. The simplest would be to just shorten the wire. You can also likely improve things by increasing the sampling time parameters for the ADC. Another option is to add a small capacitor across the ADC input pins (a few pF). This will be able to assist charging of the sampling capacitor.

\$\endgroup\$
0
\$\begingroup\$

You seem to have at least to sources for noise 10 Hz and 50 Hz. 50 Hz might be from mains, you can sample the twice, with 10 ms in between the samples and average them to get rid of the mains frequency noise.

Check the 10 Hz noise from the op amp power supply too, add capacitors in OP amp PSU if needed. Nucleo has SAR type ADC, so the current draw shouldn't be that bad. But even the ADC muxing might cause some power draw. With SAR ADC you can add RC filter next to ADC input, with R= ~1 kOhm, C = ~100p to prevent the current step from inducing oscillation.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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