Improving the stability of the Pi


#1

I setup my Pi to reboot every night, but despite that, it still hangs several times a week and requires a power-reset to clear it.

Do you have any suggestions to improve the stability? I’m using an Edimax USB wireless plug.


#2

It’s usually the power supply that’s the problem.


#3

Mine runs on and on - for weeks at a time uninterrupted.

I did consider getting something like one of these ebay.com/itm/311248443545

to put on continuous charge while it runs the Pi as a sort of uninterruptable power supply (don’t know if it would work like that though…)


#4

I’ve had stability problems in the past with other programs running on the Pi using USB WiFi dongles. The problems went away after I switched to wired Ethernet. I never could pin down the cause but it appeared there was an occasional problem with the WiFi connectivity dropping and not being able to recover. It wasn’t a power supply problem as I was using a powered USB hub in addition to the power supply feeding the Pi.

I’ve only run PiAware wired, and never had a problem.


#5

Right, I’ve had flaky wireless too, but that would only take out networking, not cause a hard hang that requires a power cycle. A hard hang smells much more like power problems.


#6

You may be hearing a common tune here?

Most of the problems people have with the Pi are power supply problems. While the B+ is a little better, earlier units (particularly the original B) are very sensitive to power issues.

(You can check the operating voltage on your pi with a reliable, calibrated, quality voltmeter by measuring the voltage on the Pi board – for me, it should be above 4.9 Volts.)

I have multiple Pi systems that run continuously with no problems, only being rebooted for firmware updates.

Here’s what I do with every Pi I use. Rather than use the little USB connector for power, I connect a Pololu +5V 2A buck/boost converter:

https://www.pololu.com/product/2574

to the +5 power pins on the Pi (usually through the expansion connector), and feed power to the Pololu module.

This gives me at least the following advantages:

(1) Reverse polarity protection not present in the Pi
(2) Operates from 3 to 32 Volts DC
(3) Overcurrent and overtemp protection
(4) Provides a power-off function not present in the Pi (ground the ENABLE* pin on the Pololu switcher to reduce load to < 50 uA)

Adding the Pololu switcher gives me a system that is safer, more reliable, and gives me a power off switch.

I can power a Pi system using one of these from one or more of: solar cells, a single Lithium Ion cell, a pack of AA, C, or D cells, +12v automotive power, high power USB ports, or cheezy wall warts including USB wall warts and cables as long as they provide enough current.

Yes, these little switchers cost $15 – that’s nearly half the price of the Pi! So? How much is reliability worth to you? How valuable is your time?

The Pololu stuff is great. Put one of these on your Pi.

bob k6rtm


#7

I switched from a 5m USB extension cable (between USB hub and the RTL dongle) to 2m - since then my Pi is running rock-stable.
All the freezes and reboots are history now :wink:


#8

hm, sugestion.
i think you have both devices on the pi ,right?
get a powered usb hub, that wil proberly solve all the problems.
i got my pi on atic, where i dont have access in a few seconds, hehe.

as all above wrote, its a power isue.


#9

I implemented the following changes several month ago on my pi. Since then I have not had a single lockup that has required me to reboot the device. Prior to that, however, I was going up to the attic a couple times a week.

The pi connects to the network over wifi and gets power from a “noisy” outlet (due to the start surge of a fluorescent light on the same circuit). However neither are an issue with the following changes.

  1. Reboot the raspberry pi if it is unable to connect with the router. See:
    weworkweplay.com/play/rebooting- … tion-wifi/

  2. Use the watchdog to reboot the raspberry pi if it locks up for any other reason:
    blog.adafruit.com/2013/01/18/au … pberry_pi/


#10

@spatieman: yes, it’s a power issue, sure.

My configuration: antenna at the attic, 3m HF cable to RTL dongle, 2m USB to the lower floor, powered USB hub -> Pi.
The WiFi connection using an Edimax nano dongle uses a 5m(!) USB extension cable to the lower floor, also connected to the hub.

It seems, the RTL is very hungry :wink:


#11

ya, thats why i placed all, inc a powered hub on atic, with wifi, also for making antenna cable as SHORT as posible.


#12

I’ve had a lot of marginal results with marginal power supplies, mostly resulting in hangs and requiring power-cycles to recover.

Switching to Apple 2A USB supplies and Monoprice heavy-duty USB cables solved them all.

Apple’s probably overkill, as they cost almost as much as the Pi, but life’s too short to chase phantoms like this.

Never had any problems with PoE splitters either, but those are usually rated at well over 2 amps.


#13

Those who want a good, but cheap power supply, go find a old transformer based power supply from the 90’s. I’m using from an old ZIP drive. Cost = free.

Yes, they use more power, but sometimes older tech is more reliable and costs less.


#14

I was already using a powered USB hub to power both the Pi and the RTLSDR. I suspect the hangs have to do with the wireless network. I made the following changes:

  1. Changed the wireless from the Edimax to a Alfa AWUS036H with a proper antenna.

  2. Added a watchdog timer as described here: blog.ricardoarturocabral.com/201 … ng-on.html
    so that if the Pi does hang, it will be automatically rebooted.