Power Problems – Mike Richards G4WNC https://photobyte.org Freelance Technical Author, Illustrator & Photographer Sun, 03 Jul 2022 18:39:21 +0000 en-GB hourly 1 https://wordpress.org/?v=6.4.2 Raspberry Pi Unreliable WiFi & Power Saving https://photobyte.org/raspberry-pi-unreliable-wifi-power-saving/ https://photobyte.org/raspberry-pi-unreliable-wifi-power-saving/#respond Sat, 21 May 2022 16:44:47 +0000 https://photobyte.org/?p=10481 When using the Raspberry Pi over marginal Wi-Fi links I have experienced problems with the Pi dropping the network entirely. When that happens the only fix is a reboot. After much searching, it would appear that the Wi-Fi power save feature may be contributing to the problem. The Wi-Fi power save is enabled by default but can be temporarily disabled by entering:

iw wlan0 set power_save off

To make the change permanent, open a terminal session and use the following commands to edit the rc.local file.

sudo nano /etc/rc.local

In a blank line above exit 0, enter the following:

/sbin/iw dev wlan0 set power_save off

Next press Ctl+X followed by Enter to exit and save the file
That completes the changes and you can reboot the Pi. To check that the wlan power save is disabled use the following command:

iw wlan0 get power_save

]]>
https://photobyte.org/raspberry-pi-unreliable-wifi-power-saving/feed/ 0
Unstable Raspberry Pi – Taming the Power Supply https://photobyte.org/unstable-raspberry-pi-taming-the-power-supply/ https://photobyte.org/unstable-raspberry-pi-taming-the-power-supply/#comments Tue, 04 Feb 2020 10:59:27 +0000 https://photobyte.org/?p=8504 I frequently get asked to help with, seemingly random, behaviour of the Raspberry Pi. By far the most common cause is the power supply. Whilst the use of a USB socket for the power supply connection is very convenient, it brings a problem that many overlook. That is the DC resistance of the USB cable.

In an attempt to make cables more attractive and easier to use, many cable suppliers reduce the conductor size. This reduction in copper content makes the cables cheaper to manufacture and helps create soft, flexible, cables that appeal to the end user. BUT the thin conductor increases the DC resistance and hence the voltage drop. It is not uncommon to find poor quality leads that have a resistance of 0.25 ohm or more. Whilst this doesn’t sound very serious, you have to bear in mind that the Pi requires one wire for the +ve supply and another for the -ve, so the resistance is double that of a single wire. Simple ohms law will show you that a Pi drawing 1 amp from a 5 volt supply with 0.5 ohm of resistance in the supply lead will drop 0.5V, leaving just 4.5V reaching the Pi. This is below the Pi minimum operating voltage of 4.75V!

To help overcome the voltage drop, the official Pi power supplies now produce a 5.1 volt output. To indicate power problems, the Pi displays a lightning bolt icon at the top right of the screen. However, it is not uncommon to find a Pi based system behaves reliably most of the time but occasionally does odd things. This can be due to a short-term increase in current draw, such as accessing a USB hard drive or other peripheral. These short term drops can be hard to spot, but the Pi has a very useful system log that can be used to identify power problems. These can be observed using the following from the command line:

sudo grep -a Under-voltage /var/log/syslog | wc -l

This will return details of the number of under-volt events and should be 0 in a good system. Any reports here mean you have a supply problem.

Good Quality USB Cables

As you can see, good quality USB cables are important. The best way to be sure your have the right cable is to only buy cables that support the latest mobile phone fast-charging standards. These have to be able to carry up to 2.4 amps, so require a healthy conductor size. In my experience, Anker power cables are usually a safe buy.

]]>
https://photobyte.org/unstable-raspberry-pi-taming-the-power-supply/feed/ 1