Powering through micro USB

Recommended Posts

Since there are a lot of issiues with underpowered boards, this ‘White Paper’ should explain why it’s recommendet to think about the powering situation of your board (especially if it’s powered throught micro USB).

Basics:

It’s all about Ohm’s Law (eq. 1), your SBC needs a defined voltage (U) and current (I). So the only variable that we can influence is the resistance (R)!

The micro USB cable which powers our board acts as resistor between the output of the power source and the input of our board. For the moment, let’s assume our power source delivers a stable Voltage (what isn’t true, depends on current needed) and our cable has fixed resistance (what’s more or less correct). It’s clear that the more current is needed, the more drops the voltage (fig. 1).

Figure 1: Voltage droping (cable ressistance was assumed to 0.5 Ohm)

Depending on your SBC, it’s more or less tolerant to such a voltage drop. But the result is mostly the same à software instability.

How can we influence the resistance of our cable, this is simple à Use the thickest and shortest cable that you can find. The resistance of a round coper wire is defined by eq. 2.

Cause ρ is a material constant, only length and thickness could be changed. The length can easily be checked. Whereas for the thickness you have to cut the cable and check it, or trust the vendor that he doesn't cheat you (the more copper inside a cable, the higher the production cost). The American wire gauge (AWG) classifys the thickness of your copper wires inside your cable. Its often written on your cable. Micro USB cables have mostly a AWG number between 30 (d=0.255mm) to 20 (d=0.812mm) for realy good ones (Illustration 1).

Illustration 1: AWG print on cable

Example:

If we assume that there’s no voltage drop from the connector (which is not true) and the power source has an output of 5.1 V @ 2.0 A and our SBC needs >4.8 V to run properly*. How long can a copper-cable with a defined diameter be before the SBC crashes?

*this numbers are chosen randomly, since I don’t have any validatet numbers when a specific board runs into instability.

Using eq. 2 for cables between EWG 20 and EWG 30 gives us the following results (fig. 2).

Figure 2: Voltage drop of a copper cable at various thiknesses

If we only had a voltage drop due to the cable length (no resistance from the USB connectors nor inside the SBC) we could have cable lenghts between 40cm (AWG30) up to 4.8m (AWG 20). But that’s not the reallity! To illustrate this, some measurements on a real issue were done.

Case Study:

Three different USB-Chargers and four different micro USB cables were used to charge a ‘xtorm’ powerbank (from the powerbank spec, it should be possible to charge it with 2.0A @5V). This powerbank has to possibilities for charging. With the ‘onboard’ USB-cable or with a micro-USB input. With a ‘Keweisi’ USB-Powermeter on one side and a multimeter on the other side current, and voltage drop during charging was measured (Illustration 2).

Illustration 2: Setup vor measurement

FYI: These measurements weren't made under laboratory conditions nor with high precision equipment. All chargers are listed in Table 1.

Table 1: Specification of the tested chargers

Table 2 displays the tested micro-USB cables, they came mostly from buyed usb devices and were not especially buyed to power a SBC!

Table 2: Tested micro USB cables

Results:

After all this theory, lets have a look how much the voltage drops at delivered current. All resulsts are sumarized in Fig. 3.

Figure 3: Voltage drop at delivered current of all chargers

Firstly, we see that the noname USB charger from aliexpress couldn’t deliver the claimed 2A, it seems like that it is more or less a 1A charger sold as 2A charger. The short USB-cable and the one deliverd to power a tablet (cable 1&2) performe well, with only a small voltage drop and the highest current. Even at arround 1A the thin cables (cable 3&4) have a realy hight voltage drop of around 0.5-0.7V! This is similar on the iPhone charger.  If we go to high current, the situation becomes interesting. Even if the charger can deliver such a high current (cable 1&2), thin long cables (cable 3&4) can't deliver it and the voltage drops more than 0.8V! That’s definitely not a recommended setting for a SBC.

All these chargers are a little bit above the 5.0V at its output so no problem, right? ‘If I use a short cable this small voltage-drop of around 0.3-0.5V wouldn’t be a problem. That’s not true! As soon as the charger must deliver higher current the voltage drops at its output (Fig 4)

Figure 4: Voltage without load, with load and on output and @powerbank

.

Worst in class here to is also the noname cell phone charger. It delivers around 4.1V on the powerbank side.  The iPhone charger doesn’t perfome much better. Even the Trekstore charger, which is able to deliver 2.0A couldn’t do this at 5V. With a short cable, it’s around 4.6V. I wouldn’t recommend one of these chargers to power a SBC with some peripherals attached to it.

Conclusion:

What's next? Should we never buy again a micro USB powered SBC?  IMO no! A micro USB powered board is not a no go. But we should keep the powering situation in mind when we have such a device. Long thin cables are definitely not recommended for powering such a device. Even short cables with a bad power source will end in touble. It stands and falls with your setup (e. g. powerconsumption of your SBC, perepherials attachted to it) and the choosing of the right charger. For example, I use a charger (2A @5V) with a fix attached AWG 22 cable (Ill. 2). Doing the same test with it (current and voltage under load at its output could not been mesured since there is no USB for the powermeter) showed 4.84V on the output of the powerbank and 5.20V without load.  Which is about 0.2V more than the Trekstore charger with the best cable attached to it. Spend a little bit more money on your powersource and you eliminate one of the possibilities to frustrate you!

Illustration 3: Recommended powersource

Share on other sites
 Armbian is a community driven open source project. Do you like to contribute your code?

Very well done, for anyone from my side of the pond, "U" is "V" for voltage.  I have many French and German coworkers, so I've seen the different notations.  ;-). To add some insight on some of the details, I'll do some explaining of mysteries:

Power supplies have an intrinsic output "impedance", which means they will act resistively and reactively to changes in consumed current.  This is why the open circuit voltage on such devices is above the spec, the supplier knows they have to overcome the internal resistances at load.  As for the reactance, that's primarily an audio quality concern we can talk about later.

Resistances along a transmission path can be broken down into 2 types: material resistance and interconnect resistance.  @chwe covered materials perfectly.  For interconnects, the same rules apply, however unlike a continuous stance of material, the electrons have to jump small gaps and navigate narrow pathways to make it to the other side, which is a large resistance.  The obvious one is the connector solution itself, however a not so obvious one is the internal termination between the wire and the connector.  In general, smaller wire means a less robust and smaller contact area in the termination, and so an added resistance.

Share on other sites
10 minutes ago, TonyMac32 said:

Power supplies have an intrinsic output "impedance", which means they will act resistively and reactively to changes in consumed current.

Also it's worth noting that the Ohm's law doesn't really apply to the internal impedance of a power supply since it will be non-linear.

Also measuring the output voltage can be tricky. With a low quality (or overloaded, or with dried output capacitors) power supply the voltage will be pulsating, and a cheap multimeter won't be able to display a good (RMS) value.

Share on other sites
30 minutes ago, TonyMac32 said:

Very well done, for anyone from my side of the pond, "U" is "V" for voltage.  I have many French and German coworkers, so I've seen the different notations.  ;-). To add some insight on some of the details, I'll do some explaining of mysteries:

Notations are always an issue, thats why I tried to have it somewere described. But I'm open for a US-version  (imagine someone wants to fly with armbian to mars and fails due to undervoltage of his board )

44 minutes ago, TonyMac32 said:

For interconnects, the same rules apply, however unlike a continuous stance of material, the electrons have to jump small gaps and navigate narrow pathways to make it to the other side, which is a large resistance.

I think this could be explained by the tunneling effect. So, let's decide which model of anharmonic oscillator we choose (since we do not have a one electron system there's no possibility to solve this with an agebraic solution) and calculate this.

Also measuring the output voltage can be tricky. With a low quality (or overloaded, or with dried output capacitors) power supply the voltage will be pulsating, and a cheap multimeter won't be able to display a good (RMS) value.

Thats why the 'FYI: These measurements weren't made under laboratory conditions nor with high precision equipment' is inside this post. I don't have professional equipment nor beeing an electrical engineer, so it's also interessting to me learning something about power supply from you and others!

What i noticed: the cheap chinese charger (new) flipped much more in the voltage than the 5 years old iphone charger, maybe they used old capacitors or had some other design flaws inside the powersupply.

Share on other sites

Also it's worth noting that the Ohm's law doesn't really apply to the internal impedance of a power supply since it will be non-linear.

Also measuring the output voltage can be tricky. With a low quality (or overloaded, or with dried output capacitors) power supply the voltage will be pulsating, and a cheap multimeter won't be able to display a good (RMS) value.

Right, I wasn't sure how far into the weeds we wanted to go.  If you reference my post in the Tinker Board thread, I always characterize mine by putting a minimal load and measuring the voltage there.

For voltmeters, I recommend spending around \$40 USD minimum for one that will function acceptably well.  A Fluke is the "ideal", but let's be serious at least half the cost is BS.

Share on other sites

Also measuring the output voltage can be tricky. With a low quality (or overloaded, or with dried output capacitors) power supply the voltage will be pulsating, and a cheap multimeter won't be able to display a good (RMS) value.

It also not so easy to measure the ripples of the SPS's with an oscilloscope. I tried and failed... Grounding, noise etc play a major role and my setup could not overcome these...

Very good PIN-UP btw

Share on other sites
• Tido pinned this topic

Awesome write up! Thanks!

Share on other sites

I've picked up a couple USB meters: https://www.amazon.com/gp/product/B01D9Y6ZFW/

And a chassis supply: https://www.amazon.com/gp/product/B018TDT20I/

I'll verify the meters with a Fluke I have access to (I'm a simple son of a farmer, I can't afford toys that nice) and will be setting up a multi-board bench feed.  There is actually good reason for my choice of power supply:

1. I got tired of having 6+ wall adapters lying about and no wall sockets left.  I have everything I need to make a proper power distribution block with the chassis supply.
2. The USB powerstrips do not offer the flexibility of the MEANWELL, it can be adjusted from 4.5 to 5.5 Volts and has some acceptable regulation
3. It is cheap.
4. If I decide using it is a waste of time I can use it a permanent solution elsewhere.

I plan on doing voltage dropout testing and power monitoring.  And having less of a mess, maybe...

Share on other sites

I have just watched the documentation of this swiss guy, he not only explains in detail, he also puts massive load on the cable and film it with a infrared camera.

As a rule of thumb, 50cm maximum length and at least AWG 22 copper leads are the bare minimum

but hey, watch it yourself and see with your eyes

Share on other sites

I now try to find USB power supplies that regulate to around 5.2vdc out with no load...or wire directly to the IO power pins on the Orange Pi's much more stable (as long as the regulated power supplies are in fact regulated...remember "cheap"...)

Also..I get better USB cables if I do use them...BlitzWolf are some of the best...

Share on other sites

**UPDATE August 9 2018**

After some messing around I determined I had some sort of contaminant on my Tinker Board GPIO pins interfering with their conductivity.  I have rerun my GPIO powering test and added the results below, there is no additional drop ( @tkaiser, @Frank Wu  I apologize for the bad information)  Other small updates include a possible reason for the small voltage reporting measurement error.

After having received an official Tinker Board Power supply, I submit my findings:

Test load hardware:  Tinker Board S with internal voltage monitoring

Condition:  No peripherals save mouse/keyboard/small cooling fan to prevent throttling

Measurement:  For this I diverged from my typical labor-intensive periodic check with a meter and instead allowed the Tinker S to do the work.  It for sure added noise to the measurement, and so some uncertainty, however I think for the purpose here it is sufficient.

• The Tinker S reads low when you get to the 5.0V area.  I measured the system voltage at 5.11V using the chassis supply, Tinker reported 5.02, however the values converged as they approached 4.7 Volts.  This is possibly due to the reference voltage for the ADC drifting ever so slightly with or without load.  With the new GPIO information, my meter and the Tinker Board were registering almost exactly the same voltage (within 0.02 volts) during the test, at 5 volts under load.

As to the supply itself:

Laser marked info is a nice touch, molded strain reliefs at the adapter and the plug, rocker switch for power, and 18 AWG wire.

Electrical:

• 5.0 V 3.0 A.  This will be operating near the bottom end of the spec for USB peripherals on the Tinker due to voltage drop.
• The wire is heavy gauge and is in a "lamp cord" format, the jacket is flexible so I don't foresee too many internal strain breaks in anyone's future while using this supply.

Data:

Analysis/Commentary (very loose format):

Using a 5.25 V chassis supply with my standard issue 1.5 meter 20 AWG cable that has seen a few hundred mate/unmate cycles for comparison, you can see that the system really needs to see more than 5V at the microUSB connector, and that cable age and wire gauge matter (my cable showed significantly more than 200 mV of drop, the new Tinker Board supply is showing a good bit less (the 4.9+ V spike is an anomaly I am attributing to the sudden release of electrical load)

Keeping an eye on the dmesg for indications of my USB peripherals resetting yielded no complaints.  It is experiencing excursions just below the acceptable minimum, so that will be something to look out for.  There is also the simple reality that the Tinker Board is not adequately cooled to pull this sort of current continuously, it goes into thermal throttling within seconds under full CPU load.

Recommendations for consumers:

This supply will work, and is at least on par with the other similar units on the market.  The large conductors reduce one of the most common causes of voltage drop, and connector, I assume, is validated to exceed the 1.8 Amp minimum spec requirement for micro USB as per @Frank Wu.  Such a validation provides some insight into the voltage loss, as increased voltage loss results in increased power dissipation at the connector, the thing being actively minimized by such design/test work.

Recommendation to ASUS:

If it is at all possible request the supplier increase the output voltage of this supply by 250 mV.  At that point it could be considered the "go-to" supply for anyone wanting to maintain the micro-USB RPi form-factor compatibility.

Share on other sites

Hi @TonyMac32, thank you very much for this testing, it is a switching PowerSupply.

In the US you run that at 115V 60Hz? I wonder whether ASUS has done their testing on the full voltage range  or  for example only with 230V 50Hz.

Share on other sites

I missed your question, @Tido, sorry.  As far as the test voltage goes, unless you have quite a poor quality supply, it is validated over 50 to 60 hz and often from 100 to 240 volts.  There are some efficiency considerations if we were talking about transformers, but otherwise it should be fine.

Share on other sites

Couple of interesting reads about USB chargers - Ken Shirriff has done quite a bit of in depth research on various adapters...

Cable quality - obviously very important - as is the adapter itself - esp with devices where the power in is also a USB-OTG - a bad power supply there can be a bag of hurt even more...

Share on other sites
On 8/9/2018 at 7:27 PM, TonyMac32 said:

Keep in mind that it's supplying volts/amps to a PMIC on the Tinker... on a non-PMIC device, might be a concern there.

PMIC's are smart  to some degree.

Volts might be on lower side, but as long as current is good - everything should be fine, as the PMIC regulates things to the rest of the board...

Other than that - looks like a decent enough PSU, good gauge over to the uUSB connector (which is always a concern) - seems similar to RPi's "official" adapter which has solved many problems with their gen3 boards... both 3B and 3B+ - and those are pretty power hungry - not as much as tinker I'll say...

Share on other sites
Just now, sfx2000 said:

PMIC's are smart  to some degree.

Nothing on that board that is fed 5.0 Volts (USB, HDMI, etc) is protected by the PMIC.  As I've said before, the Tinker itself does not crash, but it's peripherals fail (mice, keyboards, external USB storage, etc etc etc.)

Current is irrelevant if there is not adequate voltage to get it where it needs to go.  I can attach a 3000 amp supply to a tinker or a Pi and it will not make any improvement if it is 5.0 Volts as opposed to one that can source 3 amps at 5.0 volts.  A 5.25 volts supply at 3 Amps will outperform a supply with infinite amperage available operating at 5.0 volts on a Tinker Board.

Share on other sites
5 minutes ago, TonyMac32 said:

Nothing on that board that is fed 5.0 Volts (USB, HDMI, etc) is protected by the PMIC.  As I've said before, the Tinker itself does not crash, but it's peripherals fail (mice, keyboards, external USB storage, etc etc etc.)

Going past PMIC into powering the Tinker on GPIO - all bets are off... PMIC is only going to cover on the input side - which is rather limited as we can all agree on...

Share on other sites
9 minutes ago, sfx2000 said:

Going past PMIC into powering the Tinker on GPIO - all bets are off...

You aren't bypassing the PMIC when you do this.  The RK808 only provides 3.3V/1.8V/etc.  anything on the board that needs 5V has no interaction with the PMIC at any point.  You are bypassing some filtering, so that should be understood and accounted for in the powering solution chosen.

Share on other sites
1 minute ago, TonyMac32 said:

You aren't bypassing the PMIC when you do this.  The RK808 only provides 3.3V/1.8V/etc.  anything on the board that needs 5V has no interaction with the PMIC at any point.  You are bypassing some filtering, so that should be understood and accounted for in the powering solution chosen.

You might be right there on the 5V line...

Anyways, with any PSU, going into the GPIO's - just be careful - inputs there assume that all is good... lest one gets the opportunity to see some magic smoke - but at these levels, likely a dead board if one doesn't get it right.

Share on other sites

a bit off topic, while this board maybe okay with MicroUSB (sad news my tinker board no longer works on MicroUSB) you can replace MicroUSB with a barrel jack !!

Share on other sites
1 hour ago, Tido said:

sad news my tinker board no longer works on MicroUSB

That is actually a good news

Share on other sites

Not really, I was very careful (almost never unplugged it) because if @TonyMac32 is right I lose capacitors & resistors by powering via GPIO.

Sadly it happend after I have put it into an enclosure which even needed some modification to fit my large cooler. At least I got the money back.

Share on other sites
15 hours ago, Tido said:

if @TonyMac32 is right I lose capacitors & resistors by powering via GPIO. ﻿

That's exactly what happened to my first Tinker. I was so stupid to buy another one

Share on other sites
On 10/9/2018 at 10:59 PM, Tido said:

a bit off topic, while this board maybe okay with MicroUSB (sad news my tinker board no longer works on MicroUSB) you can replace MicroUSB with a barrel jack !!

That's a BPi - not a tinker...

Share on other sites

Perhaps this fits here:

Share on other sites
5 hours ago, Igor said:

Perhaps this fits here:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Restore formatting

Only 75 emoji are allowed.