0
\$\begingroup\$

I am working on a circuit that will use the ADC on an Arduino (Adafruit Feather M4 Express) to measure a small signal, so I want a minimum of noise. Testing the Arduino on a breadboard with a DC test analog signal, and configuring it in oversampling mode to get 15 bit resolution, I see drift over a range of 6 counts in 32767 (0.18%) in a one second monitoring period, which is acceptable for the application.

When I also wire up a Newhaven 2x16 char OLED module, the ADC drift increases 10x, to 60-70 counts - not OK.

The Arduino pulls about 15 mA. The OLED module adds 25 mA load on the 5 V bus. When I probe the 5V bus I see a 100 mVpp noise signal at 228 kHz with the OLED plugged in, silence otherwise.

A 4R7 in series with the OLED power wire (it's connected via a set of 12" 28 AWG wires to the pin header; in the final application it will be panel mounted so this is a realistic test) does knock the spikes down a bunch, though it's also dimmer due to the 100 mV drop. A 100 uF electrolytic helps even more - but this would occupy board space that's in short supply near where I'll connect the OLED wiring harness to the board so I'd prefer to avoid it if I can. (An LRC filter makes it whisper quiet but uses up even more space and voltage headroom I don't have.)

The weird part however is that the OLED module drags down the voltage beyond what I can account for. If not plugged in, I measure 4.95 V on the breadboard rail. With the Vcc wire for the module plugged into the rail it drops to 4.75 V! The PSU is a Siglent linear supply. It is not in current limit, it's sourcing only 50mA and the cutoff is configured to 10x higher. With the OLED power passing thru the resistor the 5v bus is somewhere in between these voltage extremes, but wanders around unstable.

This leaves me confused and also doubting the utility of the filter tests. Is the issue just that breadboards suck? 28 AWG jumpers too thin? (I don't have any thicker DuPont header jumpers on hand to test with.) The PSU is connected to the breadboard through appropriately thick gauge cables.

In the application I plan to use a 4 layer board with a 5 V power plane, and a wiring harness with 24 AWG leads for the display. Should I just ignore all this as breadboard jankiness and trust it'll work out on the PCB? Or do I need a filter - or something even more drastic to combat this inexplicable supply undervoltage?

I plan to set a 0R jumper on the board near the pin for the Vcc lead that I can replace with 4R7 if needed, I've got space for that at least. The analog and digital domains on the board are also well separated with a solid inner ground plane.

\$\endgroup\$
7
  • \$\begingroup\$ Is this all on a breadboard? You won't get 15 bits of resolution on it along with digital communication (OLED) going on. You need a PCB with several layers and solid ground planes nd decoupling capacitors all around. \$\endgroup\$
    – winny
    Commented Jan 31 at 8:20
  • \$\begingroup\$ @winny the plan is to indeed build on a PCB. Before I went that far I wanted to make sure I had the basic pieces in order and test the intrinsic stability of the Cortex M4 MCU's on-board ADC. \$\endgroup\$ Commented Jan 31 at 8:39
  • \$\begingroup\$ The main question is: why does connecting the OLED display to the PCB cause a 250mV bus undervoltage, and what to do about the spiky 100mV noise it injects onto Vcc? Should I plan for any specific mitigations on the PCB beyond separation, decoupling caps, and GND planes? Or just go with that? \$\endgroup\$ Commented Jan 31 at 8:42
  • 1
    \$\begingroup\$ Use thicker cables and be aware of the high resistance offered by breadboards. \$\endgroup\$
    – winny
    Commented Jan 31 at 8:54
  • 1
    \$\begingroup\$ "Is the issue just that breadboards suck?" Yeah they truly do - every single thing about them is bad (connection, contact resistance, EMC, mechanics etc etc) and their only purpose in the world is to fill up electronic recycling waste bins. Get a solder iron and some "perf boards" (experiment PCB for soldering). \$\endgroup\$
    – Lundin
    Commented Jan 31 at 9:06

1 Answer 1

1
\$\begingroup\$

Is the issue just that breadboards suck? 28 AWG jumpers too thin?

They usually have rather high contact resistance, so yeah. Besides, resistance will change if you wiggle the wire or connect/disconnect, which means it's non-repeatable: this does not help with the kind of comparisons you're making with low value filter resistors...

However if you expect it to be USB powered, it should be able to work with all the resistance from the cable, connectors, plus the output impedance of the USB port it's plugged into. So it should be designed to work with noisy 5V, and 100mV noise is definitely not out of spec, it should tolerate more, otherwise it will be picky about what 5V source you use with it.

So you have ADC noise issues. Possible causes:

  • Noise in the signal: for example the signal comes from a sensor that's powered from noisy +5V, and the sensor has low PSRR.

  • Noise coupling into the signal: for example due to the wires to the sensor being near wires to the display

  • ADC voltage reference noise: in your case, the ADC reference is +3V3 for the microcontroller, so it will have some ripple depending on mcu dynamic power consumption or other loads on +3V3.

An ADC outputs the digital value of VIN divided by VREF, so it's only as accurate as its VREF.

In your case the 5V to 3V3 LDO on the board has decent PSRR, so I doubt it's transmitting enough noise from 5V to 3V3 to matter. Doesn't hurt to probe 3V3 with the scope. Make sure you take your scope ground on the mcu module, not the breadboard.

If you're using a ratiometric sensor (with output proportional to VCC, or if the output is centered on VCC/2), or dependent on VCC, then the "VCC" in question should be the micro's ADC VREF. For example if your sensor is a voltage divider fed from ADC VREF, its output voltage is DividerRatio * VREF, so the ADC measures DividerRatio * VREF / VREF... taking VREF out of the equation. In this case you can get good accuracy with an high drift/inaccurate VREF.

If your sensor outputs a voltage that is not related to VCC, and you want high accuracy or low drift, maybe you need a more accurate reference chip instead of a LDO. Can't say more without knowing what sensor you're using.

  • Ground noise

If the 100mV drop on +5V is due to contact resistance on your breadboard... there are the same contacts on the ground side of your breadboard, so there should be similar voltage drop.

While +5V does not influence your ADC readings directly, any voltage on GND between the mcu module and the sensor is directly added to the voltage you want to measure.

So if your sensor is independent, I'd recommend trying to connect its ground and VCC to the mcu module directly, not via breadboard. If there's no pins facing up you can always solder them on the Feather M4.

If you want to filter the power supply for the module, you can always use a LC filter with a ferrite bead. Three 0805 components don't use much space.

enter image description here

In the application I plan to use a 4 layer board with a 5 V power plane

Unless you're using many other 5V components, you don't need a 5V power plane. A plane won't magically make your power rail noise free. It will provide very low impedance between everything on it, especially decoupling caps, so it works very well at the frequencies handled by the caps. But at lower frequency the supply impedance of the power rail is the output impedance of whatever power source feeds it, LDO or USB "charger".

Your mcu is 3V3, so maybe you need a 3V3 power pour.

\$\endgroup\$
7
  • \$\begingroup\$ Thanks. For this test I have been using the integral 3V3 (LDO) AREF. I see ~10mVpp noise coupled into the LDO output on the scope. For the PCB I was planning on using an external reference which should also help there. The application is a low-amperage current sensor. It's not directly Vcc-centric, because there's a separate +12V power bus (powered by a boost regulator 5V-to-12V) driving the op-amp that generates the current. But I do worry about the noise coupling onto GND. There are a few other 5V ICs in the mix for OLED I2C support. \$\endgroup\$ Commented Jan 31 at 9:39
  • \$\begingroup\$ Also I should clarify, the 4.75V low-voltage condition from the benchtop power supply for this test was actually measured directly off the alligator clip from the positive lead from the PSU. I do see a few mV voltage gradient along the top rail of the breadboard, but somehow the OLED is sinking within-spec amounts of current (25 mA) but also dramatically dragging down a power supply that should be able to supply it fifty times over. \$\endgroup\$ Commented Jan 31 at 9:46
  • \$\begingroup\$ (Typing that out made me realize the issue with voltage measurement -- I still had the negative lead of the DMM attached to the breadboard. The PSU voltage discrepancy is entirely explained by a tragic level of resistance along the negative breadboard rail. Measuring lead-to-lead on both sides shows the PSU is at 4.999V just as you'd expect. Bah!) \$\endgroup\$ Commented Jan 31 at 10:19
  • \$\begingroup\$ Good catch! So yeah it's always the breadboard ;) Some are better than others but they all suck. BTW, why do you need I2C for the OLED? Micro doesn't have enough pins? Also watch out for the PSRR of your reference chip. RLC filter on the input can help a lot. \$\endgroup\$
    – bobflux
    Commented Jan 31 at 11:04
  • 1
    \$\begingroup\$ Suppose you have 500mV noise on +5V, worst case. Say you want less than 1mV noise on ADC VREF, in this case you need 20log10(500)=54dB PSRR on your voltage reference. Feel free to adjust the value according to what you need. Note you have to check PSRR on the datasheet curves at your noise frequency, not the 120Hz value from the characteristics table. There are lots of ways to do this, you can use a reference chip for accuracy or a LDO, or you can use a 2.5V or 3.0V reference powered from your cleaner 3V3 rail, or two LDOs in series for higher PSRR, capacitance multiplier, many options. \$\endgroup\$
    – bobflux
    Commented Jan 31 at 19:09

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.