0
\$\begingroup\$

I'm attempting to use an oscilloscope to measure the power draw of a Raspberry Pi 2. I've got a circuit set up that looks something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

I'm measuring on either side of R (I know that to determine the actual power consumption of the RP2, I'll need to measure either side of it as well. Then I can determine the current I through R, multiply that by the RP2 voltage, and voila!).

I'm getting some very noisy readings off on my o-scope however and after zooming in on the signal I'm seeing this (apologies for the faint coloring):

o-scope inverted

There's a pretty obvious dampened oscillation going on here, and as I've always been a far better coder than a circuit build, I have absolutely no clue what this is. Especially since I'm seeing this after unplugging the USB power supply from the wall.

Could someone help me identify what this noise is from, and what I can do to minimize it (and try and get a cleaner reading)?

\$\endgroup\$
7
  • \$\begingroup\$ It is unclear by what you mean with "nothing is plugged in". I interpret that as just measuring the PSU, thus this is some PSU noise. Also I suggest you use sinex/x mode and use a different trace colour to see anything at all \$\endgroup\$
    – PlasmaHH
    Commented Nov 19, 2016 at 18:54
  • \$\begingroup\$ @PlasmaHH: I'm limited color-wise by what the oscilloscope can dump. As for "nothing is plugged in" -- the power supply itself is literally not plugged into the wall. \$\endgroup\$
    – tonysdg
    Commented Nov 19, 2016 at 18:56
  • \$\begingroup\$ There are image editing programs, at least inverting seems useful \$\endgroup\$
    – PlasmaHH
    Commented Nov 19, 2016 at 19:19
  • \$\begingroup\$ @PlasmaHH: True enough. Done! \$\endgroup\$
    – tonysdg
    Commented Nov 19, 2016 at 19:21
  • \$\begingroup\$ you are trying to solve/investigate something that probably is not a problem. The 100mv p-p "noise" is most likely fine for the operation of your device. You might be chasing ghosts - That 100Khz noise could be the PWM frequency of your oscilloscope being coupled into the signal (yes, this can happen). \$\endgroup\$
    – KyranF
    Commented Nov 19, 2016 at 20:31

3 Answers 3

1
\$\begingroup\$

You put a 500 mOhm resistor in series with your MCU. In this way a change in consumed current will show up as voltage drop.

Your oscillogram indicates that you have short changes in consumed current with amplitude of about 100 mA (+-50mV on 500mOhm resistor), which is not much. The spikes are coming on 10us schedule, which could be related to CPU activity while serving some interface like HDMI link. The spikes can also come from the internal DC-DC converter built into Broadcomm processor.The spikes are also pretty short, likely way under 1us, which results in the ringing over the board power rail.

Why the spikes disappear after the HDMI interface is out? Likely because the processor went to sleep, and the switcher stops, maybe entering some linear trickle mode.

\$\endgroup\$
7
  • \$\begingroup\$ GPU is more probable for an HDMI link, as it requires to read the frame buffer memory at regular intervals. \$\endgroup\$
    – Turbo J
    Commented Nov 19, 2016 at 21:59
  • \$\begingroup\$ @TurboJ, wouldn't my "serving HDMI link" also imply the "reading the frame buffer memory"? :-) I still tend to think that the spikes are coming from the main on-chip power switcher. Simple check on VDD_OUT of BCM2835 chip (on L5) will reveal the source of spikes. \$\endgroup\$ Commented Nov 19, 2016 at 22:07
  • \$\begingroup\$ Again, not to be rude here, but I was observing those spikes across R after unplugging the power supply from the wall. Hence, I'm still not sure this answers my question :-( \$\endgroup\$
    – tonysdg
    Commented Nov 19, 2016 at 22:13
  • \$\begingroup\$ @tonysdg, Not to be condescending here, but you forgot to mention for how long you can observe these spikes. As you might know, energy does not come out of thin air. The Pi2 has a substantial (220uF) cap on-board, so when the power starvation begin to occur after you disconnected the external source, switcher still trying to control internal power, and sucks spikes of current in the process. \$\endgroup\$ Commented Nov 19, 2016 at 22:28
  • \$\begingroup\$ @AliChen: No condescension taken -- I'm happy to answer any questions to refine my question. I was observing these long after I disconnected the external power source -- on the order of 10-20 seconds or more. That's a large cap, so I can imagine the RC time constant being substantial... but > 10s? That implies a 50k resistance. Is that to be expected? \$\endgroup\$
    – tonysdg
    Commented Nov 19, 2016 at 22:31
3
\$\begingroup\$

Your raspberry is a complex device with varying power consumption – that isn't surprising at all, it's a fully-fledged computer with loads of different operational states, its own cascade of power supplies that derive the voltages needed from the 5V input, and the option to connect external hardware.

In any case, you will always see fluctuations in current going into your pi, and thus, fluctuation in voltage drop across your shunt resistor. A computer is not a constant resistance!

\$\endgroup\$
1
  • \$\begingroup\$ I'm well aware of the various power states of modern CPUs/SoCs, but what's confusing me is that I was seeing this noise after disconnecting the USB power supply from the wall. I'll edit my question and clean that up. \$\endgroup\$
    – tonysdg
    Commented Nov 19, 2016 at 19:09
-2
\$\begingroup\$

I just figured this out (I think). I had a friend take a look at the board, and he noticed that I had an HDMI port plugged in. As soon as we unplugged it -- presto, the noise disappeared. I'll just have to use the device headless from here on out.

\$\endgroup\$
4
  • \$\begingroup\$ I'm confused as to why I'm getting downvoted on my own answer... could the individual who did so explain? \$\endgroup\$
    – tonysdg
    Commented Nov 19, 2016 at 19:08
  • 4
    \$\begingroup\$ likely because the quality is that of a comment, rather than a properly explaining answer \$\endgroup\$
    – PlasmaHH
    Commented Nov 19, 2016 at 19:20
  • \$\begingroup\$ @tonysdg, my guess is that you were downvoted for simply stating what you did to fix it, but not explaining why it worked. Why does it work without the HDMI cable? What could be done to keep it working with HDMI? Without that, your answer explains little about theory. \$\endgroup\$
    – Bort
    Commented Nov 19, 2016 at 20:48
  • \$\begingroup\$ @Bort: That make sense. I won't delete it, since it did solve my problem, but I'll take the downvotes then! \$\endgroup\$
    – tonysdg
    Commented Nov 19, 2016 at 22:32

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.