vthielen
Posts: 35
Joined: Wed Mar 05, 2014 9:32 am

USB current capacity improvement

Thu Aug 28, 2014 11:31 am

Hello,

I am using the B+ with a GSM modem USB stick.
This stick can draw very large current pulses from the USB port (2A during 1ms), during which the voltage on the USB port can go down from 5 to 3.3V, evidently causing some problems in the link (wvdial drops regularly)
I already changed the config of the B+ by adding "safe_mode_gpio=4" to /boot/config.txt (before it didn't work at all)
I cannot go to a powered USB hub, because I want to be sure that the stick is fully resettable by turning USB power off.

The problem is in the USB current limiter, because on the GPIO header the 5V is much more stable (only 0.3V drop)
Is there a way to improve USB current capacity?
Is there a component (the limiter) on the board that I can bypass? (short circuit and overload protection will be handled by a dedicated, short circuit protected, supply so I don't really need it on the board)

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: USB current capacity improvement

Thu Aug 28, 2014 11:44 am

Is there a way to improve USB current capacity?
That's very odd I used a GSM modem on my Model B and this didn't experience any power problem.

If you want to improve power stability then add a fairly sizable electrolytic capacitor across the USB 5v / Gnd supply rails.

Richard S.

vthielen
Posts: 35
Joined: Wed Mar 05, 2014 9:32 am

Re: USB current capacity improvement

Thu Aug 28, 2014 11:58 am

I already added a 1000uF elco, but that seemed to make matters worse.
I put it on the scope, and with the additional 1000uF, minimum voltage (during dip) went from 3.3 to 4V
Maybe I get more fails with the elco because the dips become wider?
I don't want to put a bigger elco, because the USB port might not start up any more (due to large current drain at startup)

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: USB current capacity improvement

Thu Aug 28, 2014 12:01 pm

What GSM modem are you using??

Richard S.

User avatar
RaTTuS
Posts: 10558
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: USB current capacity improvement

Thu Aug 28, 2014 12:02 pm

if it wants 2A it's going to need it's own power supply TBH
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: USB current capacity improvement

Thu Aug 28, 2014 12:05 pm

I don't think USB devices were designed to draw 2A either the GSM modem is defected or the power supply to the Pi isn't current rated high enough.

Richard S.

gkreidl
Posts: 6307
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: USB current capacity improvement

Thu Aug 28, 2014 12:08 pm

If this is a USB2 device it's far beyond USB2 specification (500 mA allowed). Throw it into the rubbish bin (or return it to the supplier).
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

vthielen
Posts: 35
Joined: Wed Mar 05, 2014 9:32 am

Re: USB current capacity improvement

Thu Aug 28, 2014 12:40 pm

The modem is a huawei HSDPA (E173) modem. The 2 amp is very short (1ms), I guess the Chinese didn't want to put a large capacitor inside and where counting on there being one on the other side of the USB port :-)

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

Re: USB current capacity improvement

Thu Aug 28, 2014 12:54 pm

The current limit can be changed in software from 0.6A to 1.2A using an entry in config.txt (google for it).

I think this is clearly a design error in the modem, I wouldn't use a large (1000µF) wound capacitor, as they act like coils thus do not deliver fast current pulses, use a ceramic capacitor, or a tantalum capacitor, 100µF should be more than enough.

vthielen
Posts: 35
Joined: Wed Mar 05, 2014 9:32 am

Re: USB current capacity improvement

Fri Aug 29, 2014 6:34 am

Redhawk: which 3G modem are you using? Are you feeding it straight off the RPIB+ USB, or off a powered hub? How many times per day does it auto-reconnect? (if any)
Maybe yours works more stable because it has a 3.3V internal linear regulator and the internal electronic don't see the external voltage drops.
Can it be operated using wvdial, usb_modeswitch and the option kernel modules?

I would also like to put it on it's own supply, but then I can't power-cycle it any more should it hang. The beauty now is that if anything goes wrong I can just reboot the pi and the modem will be POR'ed during reboot.

I thing 100uF would be to small: with a current pulse of 2A during 1ms, the voltage drop after the pulse for a 100uF capacitor would be 2*1e-3/100e-6= 20V. These are not fast (us/ns) pulses, but slow (ms) ones.

vthielen
Posts: 35
Joined: Wed Mar 05, 2014 9:32 am

Re: USB current capacity improvement

Tue Sep 02, 2014 8:32 am

I have had a look at the board and the datasheet of the U13 limiter chip (AP2553W6).

If I change the R4 resistor, that is switched by the Q4 FET, from 39K to 15K, then the current limit (when max_usb_current=1 in the config file) should go up from 1.2A to about 2A.
This should be sufficient I hope.
I just have to make sure that the main power supply has a large (2200uF), low ESR capacitor.

User avatar
AndrewS
Posts: 3625
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
Contact: Website

Re: USB current capacity improvement

Wed Sep 03, 2014 1:03 am

vthielen wrote:If I change the R4 resistor, that is switched by the Q4 FET, from 39K to 15K, then the current limit (when max_usb_current=1 in the config file) should go up from 1.2A to about 2A.
:shock: You've seen how small R4 is on the B+, right?

Maybe it'd just be easier to use a different USB modem that's better-behaved in terms of power usage...? ;)

Return to “HATs and other add-ons”