Page 1 of 1

Extremely unreliable USB (includes the onboard ethernet)

Posted: Sun Nov 17, 2013 4:52 am
by Los Frijoles
My raspberry pi has been constantly plagued with connectivity issues which has really prevented me from using it and has caused a lot of frustration on my part. These issues have been with it since day 1 and I am really starting to become upset since I have yet to find a solution. I apologize for the tone and "rant list" format for this...I just gave up trying to get it to play MP4 videos from a flash drive for about 3 hours.

With nothing plugged in except either a VGA or HDMI cable, it boots and runs fine and could remain in that state indefinitely. This is ok, except its entirely useless (so it's not ok). Here is a summary of my issues I have had with devices and connectivity:

Ethernet: When it is plugged into my router, it works fine for a while. This could be anywhere from 5 minutes to several hours. However, it invariably suddenly drops from the network and becomes unresponsive to things such as plugging in a keyboard. I know the ethernet is actually just a usb ethernet chip (or at least that's what I have been led to believe), so I could see those two being related. I am fairly sure the processor isn't stalling or something since if I have something like xmbc up, the little banner on the bottom keeps scrolling. Not being able to have this thing operate in a "headless" mode reliably is a serious serious issue for me since I kinda purchased it with that sort of application in mind.

USB Wireless Dongles: I have tried two or three of these with the same result: It works fine for just a little while and then suddenly stops responding. It usually corrisponds with some sort of high cpu load event. This one is a little more tolerant than the ethernet one since plugging in a keyboard still works. It also passes the "xmbc bottom banner" test to make sure the processor hasn't stalled.

Flash Drives: Aside from some OS issues, these work ok...until they disconnect and reconnect in rapid succession. For example, I had one today that I was trying to read my movies off of. It would work fine for a little while and then suddenly disconnect and reconnect, showing up as a new device (/dev/sda would disconnect and reconnect as /dev/sdb, then as /dev/sdc and so on). Seriously annoying...

Keyboards: Yes, the lowly keyboard has issues. This one actually gives me errors sometimes that I can see. I generally keep num lock on when I have one plugged into the raspberry pi so that I can see a light go out. When all other usb devices (ethernet, wireless dongles, etc) go down, the light also shuts off. Sometimes, it even spits out a whole slew of error messages onto /dev/tty1 about how it lost contact with the device.

I have not modified my raspberry pi in any way, nor have I overvolted or done anything to it to damage it. My immediate thought jumps to my power supply...its a transformer, bridge, and large capacitor hooked up to a 7805. I do not have an oscilloscope to see this, but I suspect that there may be some voltage ripple going on when the rasperry pi is pulling lots of current since the 7805 is kinda rated for <1A and I'm drawing around 2. Also, my transformer is getting awfully hot, but I'm pretty sure that's a product of the fact that the 7805 is dropping ~10V to 5V (a testament to the fact that I literally threw that PS together out of junk after the usb wall wart I was using died) and having to consume much more current than is actually being sent to the pi. I have plans to build or find a better power supply (I found a small 10W one on deal extreme), but I am still not fully sure of the best way to go for this.

Has anyone had these sort of issues before and remedied them? I am really feeling discouraged and frustrated at the moment.

Re: Extremely unreliable USB (includes the onboard ethernet)

Posted: Sun Nov 17, 2013 4:59 am
by jbeale
I believe that all the problems you mention can be caused by a marginal power supply. That USB/LAN chip is the first to go when the voltage drops below 5V, the CPU hangs around longer. So replacing your existing supply with a "real" 5V 1A supply (which is dedicated to the Pi, not shared with other devices) would be my first suggestion. Maybe you can borrow one, just to test it and see if that is the issue, or not.

I believe your 7805 regulator has internal thermal limiting. Meaning, if your heatsink isn't good enough and it gets too hot, it is going to reduce output current, meaning your Pi will see a power brown-out which could certainly cause the problems you see.

Anyway if you are building your own power supplies you surely have a voltmeter? Check the voltage between TP1 and TP2 on the R-Pi board when it is under load. That may well tell you the answer right away. See also: http://elinux.org/R-Pi_Troubleshooting# ... r_problems

Re: Extremely unreliable USB (includes the onboard ethernet)

Posted: Sun Nov 17, 2013 5:17 am
by Los Frijoles
I do have a voltmeter and I have checked that. It hovers between 4.7 and 5.0 volts depending on the load of the raspberry pi. Strangely, the power supply side of things shows it at a steady 5.0V which also makes me wonder about my usb cable quality and if it has a less than optimal internal resistance. I have had a really difficult time locating quality cables without feeling like I'm going to be ripped off (perhaps some direction there would be nice...where do most people here buy their cables?). The reason I would like to use an oscilloscope is that I would like to actually see it dip and see how far down it goes since it could actually be fluctuating quite a bit more than that and my voltmeter wouldn't pick it up.

Re: Extremely unreliable USB (includes the onboard ethernet)

Posted: Sun Nov 17, 2013 5:52 am
by rpdom
The USB cable I got for my main Pi was a really cheap one and the internal resistance was way too high.

In the end I chopped the plugs off each end with a very short stub of cable, stripped back the red and black wires and soldered in a long length of decent twin power cable between then. The resistance of the short stubs of the old cable is negligible and the resistance of the power cable is well within acceptable values. My measured voltage on TP1/TP2 went from 4.6V to 4.98V and my Pi became totally stable.

Power is almost certainly your issue, from the 7805 overheating to the USB cable probably being inadequate and possibly some HF ripple on your power (or have you got a couple of low value (0.1uF ish) capacitors either side of that 7805?). You could always buy a cheap switch-mode 5V module. Something that will take anything from 6V to 30V with 80%+ efficiency, very stable at up to 3A and minimal heat output. They cost just a few quid.

Re: Extremely unreliable USB (includes the onboard ethernet)

Posted: Mon Nov 18, 2013 4:12 pm
by kiike
I have the same problem as you. I have already tried several adapters:

- The RS components 5V adapter that came with my Pi kit.

- A universal laptop adapter that provides with 5V USB output.

- Another adaptor I bought that is specifically designed for the Pi

However, i also find the Pi connectivity (USB, Ethernet) really unreliable, although this only happens when using the HDMI output. Without HDMI, the Pi will run with total stability, no connectivity dropouts for weeks, overclocked or otherwise.

Have you found any workarounds? I might try a shorter power cable as advised.

Re: Extremely unreliable USB (includes the onboard ethernet)

Posted: Mon Nov 18, 2013 6:28 pm
by mahjongg
Measure the voltage between tp1 and tp2, preferably with an oscilloscope, this is the ONLY way to rule out power problems.
The voltage should at all times be between 4.8 and 5.2 Volt.

One reason why simply saying that the PSU is a good one, so it must be fine doesn't work (apart from the cable) is that there is a polyfuse in between that can "go bad" and lower the voltage the PI actually receives.

Re: Extremely unreliable USB (includes the onboard ethernet)

Posted: Mon Nov 18, 2013 7:00 pm
by redhawk
The LM7805 gets hot because it's a linear regulator the voltage is controlled by varying the resistance between the input voltage and output voltage terminals.
If it gets too hot due to lack of heat sink / cooling fan then the thermal overload protection could kick in and the output voltage falls.
To reduce heat and increase your power output I would recommend using a switching regulator with your Pi something like an LM2596S.
Have a look on eBay they’re sold as step-down buck converts modules and usually come with an adjustable voltage output rated at 3A

Richard S.

Re: Extremely unreliable USB (includes the onboard ethernet)

Posted: Mon Nov 18, 2013 9:50 pm
by mahjongg
for a few pound/dollar/euro you can pick up car cigar plugs with an USB output. These contain a switching power supply that convert anything between 9 and 18 Volt into 5V stabilized within the required range, mostly at 1.1A max, but there are also models that do 2.1 A (a 1.1A is enough for a PI, as its fuse will blow if you try to draw more than that anyway).

All you need to get good power is a suitable micro USB cable, a short and thick one. Some sellers will sell you a long and cheap one, for say €1,00 from China, these are only suitable for slowly charging a phone, where it doesn't matter that the cable has a large resistance and drops a lot of the 5V, as this will still charge the device. But its no good to feed a PI with.
If you open the thin cable you will see its 99% made of plastic, with hair thin copper wires (or even just aluminum wires) just to keep the price down.

Re: Extremely unreliable USB (includes the onboard ethernet)

Posted: Fri Nov 22, 2013 4:02 am
by Los Frijoles
So here's what I'm thinking:

I'm pretty sure my 7805 was heating up because it was dissipating power from dropping 10V to 5V at around 1.5A. Waaay to much for a 7805 even with the heatsink I slapped on it. I don't believe it was browning out (5V was held steady on the 7805 side of the USB cable), but I did observe that my transformer was getting ridiculously hot and so I would imagine that if I keep running like this it will fail given enough time. I think my problem is in the USB cable. Most cables are probably not designed for that much current since usually one only sees 500mA coming out of a USB port.

So here is what I'm going to do:

I'm going to get this power supply (5V@2A rated and it looks more robust than some USB supplies that I have seen): https://dx.com/p/5v-2a-regulated-switch ... 220v-94518
With this USB cable: https://dx.com/p/usb-male-to-micro-usb- ... lue-188409

I will then chop off the USB-A end of the cable and wire it in to the power supply. Then I'm going to keep chopping down the cable until it stops having such a big voltage drop problem. I'll post back with how it goes (but it could be a while since dx.com sometimes likes to ship things from hong kong and it takes a long time).

My usual style would be to build my own power supply, but for now it seems more cost effective to go with the cheap dx one above (yay free shipping!). If that doesn't work, I'll build a proper switching supply.

Re: Extremely unreliable USB (includes the onboard ethernet)

Posted: Fri Nov 22, 2013 9:05 am
by jamesh
Los Frijoles wrote:So here's what I'm thinking:

I'm pretty sure my 7805 was heating up because it was dissipating power from dropping 10V to 5V at around 1.5A. Waaay to much for a 7805 even with the heatsink I slapped on it. I don't believe it was browning out (5V was held steady on the 7805 side of the USB cable), but I did observe that my transformer was getting ridiculously hot and so I would imagine that if I keep running like this it will fail given enough time. I think my problem is in the USB cable. Most cables are probably not designed for that much current since usually one only sees 500mA coming out of a USB port.

So here is what I'm going to do:

I'm going to get this power supply (5V@2A rated and it looks more robust than some USB supplies that I have seen): https://dx.com/p/5v-2a-regulated-switch ... 220v-94518
With this USB cable: https://dx.com/p/usb-male-to-micro-usb- ... lue-188409

I will then chop off the USB-A end of the cable and wire it in to the power supply. Then I'm going to keep chopping down the cable until it stops having such a big voltage drop problem. I'll post back with how it goes (but it could be a while since dx.com sometimes likes to ship things from hong kong and it takes a long time).

My usual style would be to build my own power supply, but for now it seems more cost effective to go with the cheap dx one above (yay free shipping!). If that doesn't work, I'll build a proper switching supply.
A good approach. I posted about this a while back, but I use a desktop power supply and was seeing similar problems when using the camera. I assumed it wasnt the supply, since, hey, its a desktop supply! But when I eventually check the voltage drop, it turned out the USB adapter to plug connectors I made for the supply was hopeless. Shortened it and everything started working.

Re: Extremely unreliable USB (includes the onboard ethernet)

Posted: Fri Nov 22, 2013 3:20 pm
by merlin32768
In my experience, most of this kind of intermittent reliability issues can be traced back to an inadequate power supply. Beware of all those 5V/1A phone chargers being sold on ebay - I've had to return a few of these as they were not rated to run the RPi - In all cases, the ebay item description said "5V/1A" but in one case the supplied charger was a Blackberry-branded 5V/550mA (marked as such on the case) unit which bore no resemblance whatsoever (including visually) to the one in the listing, and another was again listed as 5V/1A and turned out to be 5V/750mA (again marked as such on the case).

It's hard to say whether these were genuine mistakes (ie. packing errors) or a deliberate attempt to mislead consumers. In both cases the matter was resolved (in the first one by ebay issuing a refund after the seller failed to answer any emails) and in the second by the seller sending out the correct replacement.

As with many things (such as buying memory cards on ebay etc), it's very much a case of buyer beware. Ebay are great for sorting out these kinds of issues, but it's still a lot more aggravation than it should be...