User avatar
XueHai8
Posts: 74
Joined: Mon Jul 24, 2017 12:19 pm

Enough Amps?

Sun Apr 18, 2021 12:22 pm

How can I tell if my Pi is getting enough Amps from the USB Power Supply?

Recently, I noticed that my Pi was just freezing for some unknown reason. I was not getting any low voltage warnings. The red power light was not blinking, but the Pi would just freeze requiring it to be rebooted. And sometimes it would not boot.

I switched power supplies and now everything appears to be fine. It's been running days now with no issues whereas before as was lucky to keep it running for a whole day.

While the Pi had been running fine on its old power supply, and like I said: the red power light was not blinking, I think that it was just wearing out and not supplying enough amps for the Pi.

There's nothing plugged into it except ethernet.

So, is there a way to tell if the Pi is getting enough amps?? Like a utility or log file to examine?

Thanks!

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13886
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Enough Amps?

Sun Apr 18, 2021 12:27 pm

NO! The PI simply draws the current it needs, and when that doesn't result in a voltage drop all is okay.

There is NO way to measure the actual current draw without using external devices.

If a power supply cannot deliver peak currents, the PI can crash because the voltage collapses below a level that it can operate with, as the crash will be immediate the PI doesn't have time to log anything.

you could say "the proof of the pudding is in the eating", if a better power supply resolves the problem, the problem was the old supply.

User avatar
XueHai8
Posts: 74
Joined: Mon Jul 24, 2017 12:19 pm

Re: Enough Amps?

Sun Apr 18, 2021 12:39 pm

mahjongg wrote:
Sun Apr 18, 2021 12:27 pm
If a power supply cannot deliver peak currents, the PI can crash because the voltage collapses below a level that it can operate with, as the crash will be immediate the PI doesn't have time to log anything.
And that's the odd part, the red light never flashed indicating a voltage problem.
I tried it with both a 3B+ and a 2B and they both froze without any indication of low voltage.
And they both would sometimes fail to boot, again without any indication of low voltage.

But once I changed to a new power supply, everything has been working well for many days.

JumpZero
Posts: 1231
Joined: Thu Mar 28, 2013 7:35 pm
Location: Arcachon, France

Re: Enough Amps?

Sun Apr 18, 2021 1:47 pm

Hi,

When an under-voltage happens it is recorded by the kernel. You can check kernel logs.
Of course if the under-voltage is too big the pi won't boot and won't record anything.

Code: Select all

moi@pihole:~ $ zgrep -i volt /var/log/kern.log*
/var/log/kern.log.1:Apr 17 13:15:59 pihole kernel: [   20.962616] Under-voltage detected! (0x00050000)
/var/log/kern.log.1:Apr 17 13:15:59 pihole kernel: [   23.042327] Voltage normalised (0x00000000)

User avatar
XueHai8
Posts: 74
Joined: Mon Jul 24, 2017 12:19 pm

Re: Enough Amps?

Mon Apr 19, 2021 1:21 am

JumpZero wrote:
Sun Apr 18, 2021 1:47 pm
Hi,

When an under-voltage happens it is recorded by the kernel. You can check kernel logs.
Of course if the under-voltage is too big the pi won't boot and won't record anything.
Already know that. Post is regarding AMPS, not Volts
Thanks

User avatar
Imperf3kt
Posts: 4398
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia
Contact: Twitter

Re: Enough Amps?

Mon Apr 19, 2021 1:28 am

XueHai8 wrote:
Mon Apr 19, 2021 1:21 am
JumpZero wrote:
Sun Apr 18, 2021 1:47 pm
Hi,

When an under-voltage happens it is recorded by the kernel. You can check kernel logs.
Of course if the under-voltage is too big the pi won't boot and won't record anything.
Already know that. Post is regarding AMPS, not Volts
Thanks
If your Pi isn't getting enough amperage, the voltage will drop to compensate.
Not the best explanation, but that's basically what happens and why the voltage is as important as the current.
55:55:44:44:4C
52:4C:52:42:41

Rose tinted glasses are difficult to see through.

User avatar
butchkemper
Posts: 78
Joined: Sat Jul 22, 2017 8:03 pm
Location: Sachse, Texas USA

Re: Enough Amps?

Mon Apr 19, 2021 1:34 am

XueHai8 wrote:
Mon Apr 19, 2021 1:21 am
JumpZero wrote:
Sun Apr 18, 2021 1:47 pm
Hi,

When an under-voltage happens it is recorded by the kernel. You can check kernel logs.
Of course if the under-voltage is too big the pi won't boot and won't record anything.
Already know that. Post is regarding AMPS, not Volts
Thanks
If the power supply is not supplying enough current - AMPS, then the Volts will drop below the minimum acceptable level which causes bad things to happen.

You may not be familiar with the relationship between Volts, Amps, and Resistance which is expressed by the formula V=IR:
  • V = volts
  • I = current or amps
  • R = resistance
Butch

User avatar
AZdave
Posts: 8
Joined: Thu Jul 30, 2020 11:29 pm
Location: Chandler AZ

Re: Enough Amps?

Mon Apr 19, 2021 3:09 am

I monitor the voltage and current with an external USB monitor. Also inexpensive around $5-$10 US. These due drop the voltage a little since a resistor is used to monitor current.

My pi-400 desktop is using 5.15 V and 0.65A now.

I have had numerous freezes on my 400 (4G main and 2G swap) but tracked all of these to not enough memory. One was from the Sieve of Eratosthenes prime number finder. Also firefox/chrome and too many applications open and or data downloads, and or watching videos full screen.
Last edited by AZdave on Mon Apr 19, 2021 3:59 am, edited 2 times in total.
"You shouldn't anthropomorphize computers; they don't like it."
"In /dev/null, no one can hear you scream..."

User avatar
AZdave
Posts: 8
Joined: Thu Jul 30, 2020 11:29 pm
Location: Chandler AZ

Re: Enough Amps?

Mon Apr 19, 2021 3:33 am

My 400 Added 2G of swap right before one of the under voltages.

From my 400
$ grep -C 2 -i voltage /var/log/kern.log.1
Apr 14 22:33:01 my-400 kernel: [ 11.438486] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
Apr 14 22:33:02 my-400 kernel: [ 11.713752] Adding 2097148k swap on /var/swap. Priority:-2 extents:4 across:2310140k SSFS
Apr 14 22:33:03 my-400 kernel: [ 13.113944] Under-voltage detected! (0x00050005)

Apr 14 22:33:05 my-400 kernel: [ 15.593853] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
Apr 14 22:33:05 my-400 kernel: [ 15.593881] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
--
Apr 14 22:33:07 my-400 kernel: [ 16.871916] Bluetooth: BNEP filters: protocol multicast
Apr 14 22:33:07 my-400 kernel: [ 16.871930] Bluetooth: BNEP socket layer initialized
Apr 14 22:33:07 my-400 kernel: [ 17.273760] Voltage normalised (0x00000000)
Apr 15 11:43:22 my-400 kernel: [ 30.398404] fuse: init (API version 7.32)
Apr 15 11:43:25 my-400 kernel: [ 32.790444] Bluetooth: RFCOMM TTY layer initialized
--
Apr 15 11:43:25 my-400 kernel: [ 32.790492] Bluetooth: RFCOMM ver 1.11
Apr 15 11:43:39 my-400 kernel: [ 47.398755] v3d fec00000.v3d: MMU error from client L2T (0) at 0x5201000, pte invalid
Apr 15 11:44:03 my-400 kernel: [ 71.355817] Under-voltage detected! (0x00050005)
Apr 15 11:44:12 my-400 kernel: [ 79.676375] Voltage normalised (0x00000000)
"You shouldn't anthropomorphize computers; they don't like it."
"In /dev/null, no one can hear you scream..."

Return to “General discussion”