4
\$\begingroup\$

I'm using an LM317T to regulate 5 V to 3.38 V for a microcontroller. R1 is 330 ohms and R2 is 560 ohms. There isn't any input capacitor and the output capacitor is 470 µF 25V, because I had that value in a pack of 50. The microcontroller is drawing at least 50 mA, so I'm fairly sure I'm meeting the minimum load specifications. The regulator is being powered from a computer SMPS, but I had a very similar configuration set up last time running off an SMPS without any problems.

Here's a scope trace of an I/O pin to show you what I mean:

Alt text

The ripple is about 60 mVp-p, but as you can see it also happens when the pin is low. I'm worried it might affect the microcontroller itself (for example, make it unstable.)

What I'm more worried about are these large bursts of noise which occur seemingly randomly about 100 times per second:

Alt text

It turns out this noise is coming from my power line network adapters; it's leaking through from the power line into the computer SMPS and to the 5 V output.

\$\endgroup\$
13
  • \$\begingroup\$ Where is your oscilloscope ground connected? It may be that the noise is in the ground reference. \$\endgroup\$ Commented Oct 27, 2010 at 20:19
  • \$\begingroup\$ It's grounded to the same ground as the MCU, regulator and power supply. \$\endgroup\$
    – Thomas O
    Commented Oct 27, 2010 at 20:25
  • \$\begingroup\$ What does the input look like? \$\endgroup\$
    – pingswept
    Commented Oct 27, 2010 at 20:26
  • 1
    \$\begingroup\$ I think I've discovered the source of the noise. My powerline networking adapters. One in my room. Just unplugged it - no bursts of noise! Though I'm not entirely sure how it's getting out - the ethernet cable is a distance away from my scope + probe. \$\endgroup\$
    – Thomas O
    Commented Oct 27, 2010 at 21:11
  • 2
    \$\begingroup\$ If you are powering your board from a computer then the computer is most likely hardwired into your powerline. The computer probably isn't designed to filter noise at that frequency so it is able to get through. Even on a motherboard there are many many capacitors and voltage regulators in order to get very clean power. You should be doing the same on your board if you are pulling power from the same source. \$\endgroup\$
    – Kellenjb
    Commented Oct 27, 2010 at 21:15

6 Answers 6

4
\$\begingroup\$

Make sure that there is a small ceramic decoupling capacitor at the supply pin(s) of the microcontroller. Something 100nF - 1uF should be OK. (The 470uF cannot deal very well with HF noise).

How is the grounding on the microcontroller side? Is there a large ground plane?

Is the circuit return earth-referenced? Is the scope connected to the same earth reference?

If you don't have a spring-clip for the ground, and don't mind abusing a probe, you can solder short pieces of solid wire from the supply rail to the probe tip and ground ring (under the probe tip) which will cut down on CM noise pickup dramatically.

In general, most ripple measurements in the switching power world are done with short probes (or direct coax) with 100nF and 10uF ceramic / tantalum caps shunting the probe and the scope set @ 20MHz bandwidth limit. (CM noise <> PARD)

\$\endgroup\$
2
  • \$\begingroup\$ It's breadboarded, so there's no ground plane. 100n caps on all supply pins. \$\endgroup\$
    – Thomas O
    Commented Oct 27, 2010 at 20:57
  • \$\begingroup\$ I turned BW limit on my scope on (manual says 20 MHz BW limit, down from 100 MHz) and the noise is pretty much the same. \$\endgroup\$
    – Thomas O
    Commented Oct 27, 2010 at 20:58
3
\$\begingroup\$

The ripple could come from a number of sources. It's a little hard to tell from the photo, but it looks like the ripple is at 100 kHz. Is there anything in you circuit that operates at that frequency? If anything is getting switched at that frequency it is most likely the source and you will have to find some way to isolate it from the power supply.

But first, check that the oscilloscope ground isn't picking up the noise. It could be picking up the noise it two ways. Make sure it is connected to a sensible reference point so that there is no common impedance that could be coupling the noise. Secondly, remove the ground wire and use a spring ground clip to ensure that no mutual inductance it coupling into the probe.

If there is no 100kHz frequency in your circuit and you have a bench supply, try running the circuit off that to remove any influence of the switch mode supply. You could also double check the bypassing on your LM317. These will often require input decoupling. (The data sheet suggests input decoupling if it is more that 6 inches from the power source)

\$\endgroup\$
3
  • \$\begingroup\$ Scope is grounded to breadboard ground rail which is connected to ATX power supply, MCU+reg is grounded to the same. Unfortunately I don't have a bench supply to test it with (it's on my wish list, or my list of things to build.) \$\endgroup\$
    – Thomas O
    Commented Oct 27, 2010 at 20:54
  • \$\begingroup\$ I added a 470µF/25V cap across the input line and left in place the output cap and I'm getting the same ripple. I'm going to try a 100n cap on both rails next. \$\endgroup\$
    – Thomas O
    Commented Oct 27, 2010 at 20:55
  • 1
    \$\begingroup\$ 100kHz? sounds like a typical switching frequency from the ATX supply, try smaller decoupling caps and better placement of them (cutting leads or soldering on top of your MCU) \$\endgroup\$
    – J.P.Wack
    Commented Oct 28, 2010 at 1:41
2
\$\begingroup\$

The 317 has a rather big voltage drop (Vin-Vout). At room temperature, it is at least 1.5 V at light loads (20 mA), increasing to as much as 2.5 V for larger loads (roughly two diode drops). What may happen is that the uC draws a larger current every once in a while, the regulator can't maintain 3.3 V with as little as 5 V at its input and goes out of regulation, causing what looks like noise.

Try using a low dropout-regulator (Vin-Vout < 0.7 V) instead of the 317, or try increasing the input voltage.

\$\endgroup\$
1
  • \$\begingroup\$ Tried with the 12V rail and the same ripple occurs. Thanks for the suggestion - I'm working at room temperature with <100mA load. \$\endgroup\$
    – Thomas O
    Commented Oct 27, 2010 at 23:13
1
\$\begingroup\$

I just looked at your oscillograms again, and there is one detail that may hint towards your problem: The ripple seems to be just as bad when the uC's output is low. If it was the 317, I would expect the problem to be worse at a high output voltage, and maybe even almost invisible with an output at the low state. Try tracing back the problem from there, by considering both the VCC and the GND rail.

\$\endgroup\$
1
\$\begingroup\$

Noise when the output is low...to me, that implies ground bounce. But nothing in your statement implies anything that could cause that kind of ground bounce.

Are you drawing enough load from the ATX supply? They have minimum load requirements.

\$\endgroup\$
1
  • \$\begingroup\$ Power supply is running a PC, should be enough load. \$\endgroup\$
    – Thomas O
    Commented Oct 28, 2010 at 23:26
0
\$\begingroup\$

The LM1117 instead of the LM317, with some protection diode and improved ripple rejection should do this job. Oh, and don't use an SMPS direcly with the LM317. You can use the SMPS itself to give many more voltages than it has.

Examples:

  • +5 v to GND = 5 V
  • +12 V to 5 V = 7 V

AND most "GOOD" computer PSUs have a "GOOD, stable" 3.3 V supply for the processor. Afraid of its current? Limit it with a 33 ohm resistor (100 mA maximum) and be happy.

\$\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.