basilmir
Posts: 7
Joined: Fri Mar 20, 2015 4:32 pm

Using modern 'smart' USB Power Adapters with Raspberry Pi?

Fri Mar 20, 2015 4:34 pm

Pi / Pi 2 using modern 'smart' USB Power Adapters to supply power to the Raspberry?

Once upon a time there was only one way to charge a usb device and that was done at 5V and 500mA max, or so I've been told.

'Modern' USB Power Adapters like the Apple 1Amp, 2Amp and 2.4Amp and many Samsung chargers used for their tablets use a way of 'negotiating' higher power draws (anything above 500mA I presume) via Resistors or some other 'Smart' circuit on the D+ and D- (the data ports of the USB cable).

I have a couple of iPad chargers both the 10W (5V, 2Amp) and the 12W (5v, 2.4Amp) models and I tried to use them on the Raspberry Pi 2. I was surprised to notice that the Pi's red power LED was blinking all the time, plus the 'pulsing colored square in the top right of the screen' (apparently a newer firmware way to alert as to the insufficient current) was going on and off when I used the Pi 2 to compile something.

There is no question of faulty components, I have three Pi 2s exhibiting the same behavior on all my Apple chargers. My only conclusion it that the Pi can't use these 'smart' chargers and talk to them via the D+, D- data ports to 'negotiate' more power and is so kept on a short leash.

There is also this very good 3 USB port charger that IKEA has on sale (so new most websites don't have it) http://www.ikea.is/products/38976 that has a max of 2.4Amps on each port with a 3.4Amp total that also fails to work with the Pi 2 in exactly the same fashion.

Is this the case? Does the Pi need 'classic' (non-smart) power supplies to give it 'all they've got' without asking questions?

If so, is there a way to mod the Pi to tell these 'smart' chargers to give it more power? (heard something about shorting the D+, D- pin together on the Pi to achieve this or a 'smarter' solution of actually adding the right resistors to the ports to manually choose one of these 'smart'er modes.

PS. The internet is full of articles on how to mod a 'dumb' power supply for use in 'modern' devices, but none on how to use classic devices which need more power with 'modern' 'smart' chargers that behave in this way.

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

Re: Using modern 'smart' USB Power Adapters with Raspberry P

Fri Mar 20, 2015 5:03 pm

All RPis don't have any data lines on the micro USB power connector.
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

basilmir
Posts: 7
Joined: Fri Mar 20, 2015 4:32 pm

Re: Using modern 'smart' USB Power Adapters with Raspberry P

Fri Mar 20, 2015 6:33 pm

Hmm... So in theory one could solder some resistors to the Raspberry Pi 2 for example, to get it to 'negotiate' a higher current draw from 'modern' chargers? Because the two lines are unused on the Pi s they would't interfere with the current charging behavior?
This is accomplished using two common methods. The first, and most common method for all non-Apple devices is to simply short the two data pins (pin2 and pin3) together in the charger. Since the data pins wouldn't be shorted in a computer, or any USB data port, the device can assume it is connected to a charger, and it is safe to draw over 0.5A.

The second approach, used by Apple does not fully short the data pins, rather applying different voltages to the Data(-) and Data(+) pins, to indicate to the device exactly how much power it can draw.
Apple's approach to using the data ports seems to be a more 'educated' version of "shorting out the data pins, since the data pins wouldn't be shorted in a computer, or any USB data port, the device can assume it is connected to a charger" and adding some 'logic' to that behavior.

Some info about the voltages on those data ports.
http://www.speedguide.net/faq/how-do-us ... ithout-414

And more data on the charging modes.
http://www.plutanium.cz/babca/cs/1718-a ... s-analysis

User avatar
topguy
Posts: 5566
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Using modern 'smart' USB Power Adapters with Raspberry P

Fri Mar 20, 2015 7:32 pm

I did some testing on different chargers since I had access to a usb-power meter. And I found that the main difference between a charger that gives a power warning and one that doesn't was the starting voltage. A charger that give 5.20V at 0 amps, drops down to 5.0V with some load and gives no warning. The new 2.4A and 3.4A ones I bought recently actually starts on 4.97V with no load and drops to 4.85V and then the warning appears.

I feel the powerwarning on the Pi2 is too sensitive. But high quality cabling if probably also desirable to avoid additional voltage drop.

The usb-tester I had was at the end of 1m cable. I now got the USB Charger Doctor (http://www.adafruit.com/products/1852) from Adafruit so I will do the tests again with the shortest cable I have. ( 20cm cable from usb-batterypack )

basilmir
Posts: 7
Joined: Fri Mar 20, 2015 4:32 pm

Re: Using modern 'smart' USB Power Adapters with Raspberry P

Fri Mar 20, 2015 10:26 pm

One thing I remember is that the High Power USB port must be between 4.75 and 5.25 volts. The Pi signaling low voltage at 4.85 might be by design, actually signaling before it drops too low.

What bugs me, is that I'm using these chinese 1.5$ 5v-2A USB chargers that don't blink at all while a 30$ 12W Apple power supply blinks like there's no tomorrow.

In my tests the red LED blinks like crazy, but there is no corruption of any kind, the system runs just fine and has been running for two weeks now. I never even took notice of the blinking red power led, thinking it was normal. It was the top right color square on screen that annoyed me into figuring out what it meant.

Later edit:
Had a little time on my hands and tested the IKEA KOPPLA 3-usb-port charger max 2.4Amps per port 3.4Amp Total, mentioned in my first post, with my Kyoritsu model 1009 Multimeter. It's a smart charger. Measuring exactly 5.0Volts on each port and 444mAmps (there might be a little loss because of the length of the cable I used), so to access the upper 1Amp, 2Amp or 2.4Amp modes you need to connect the D+, D- ports with the required voltages.
Tested it with my iPad and it can certainly convince the charger to give it 2Amps or power because it charges at a rate of 1% every 3 min or so, which is very fast given the size of it's battery.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 4947
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: Using modern 'smart' USB Power Adapters with Raspberry P

Mon Mar 23, 2015 10:20 pm

FWIW (and, albeit, slightly O.T.) you might be interested in my measurements of the (passive) loading behaviour of two Apple iPhone chargers and a "clone":
http://www.cpmspectrepi.webspace.virgin ... dPSUs.html
Trev.
Still running Raspbian Jessie on some older Pi's (an A, B1, B2, B+, P2B, 3xP0, P0W) but Stretch on my 2xP3A+, P3B+, P3B, B+, A+ and a B2. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

Return to “General discussion”