Jump to content

Recommended Posts

Posted

Some SBCs for which Armbian images are available (supported, wip or csc) can be powered via USB-C. Depending on its implementation, some pitfalls must be considered. This short tutorial should give you an overview. 

 

'Dumb mode':

The USB-C connector is used similar to the microUSB connectors in previous SBCs. Means that the pitfalls must be considered when you choose a charger and cable. See the following thread for some background:

Additionally, those boards may be problematic with PD compatible chargers. Without a proper PD implementation those PSUs will only deliver up to 900mA at 5V (4.5W). In case you have a board which isn't PD compliant you should go for a PSU without PD implementation aka 'dumb PSU'. Voltage drop from cable and voltage drop of the PSU at hight load itself must be kept in mind similar to microUSB powered boards!

SBCs which don't support PD (also boards not supported in any form by Armbian):

  • Vim
  • Vim2
  • NanoPi M4
  • NanoPi NEO4
  • Orange Pi 4

 

PD mode (power detection):

With a proper PD implementation, a PD capable PSU can deliver 'more juice' on demand. It's also possible to deliver power at higher voltage (between 5V and 20V). See graphic (12V is missing here):

article-2017march-designing-in-usb-type-

(source: https://www.digikey.ch/en/articles/techzone/2017/mar/designing-in-usb-type-c-and-using-power-delivery-for-rapid-charging)

To ensure proper powering you should go for a PD compliant PSU. See documentation of your board to see which PD modes are supported within your SBC. Boards known to support PD-Mode:

  • ROC-RK3399-PC (Renegade Elite)

 

Board:
  • chwe pinned this topic
Posted
On 10/2/2018 at 5:09 AM, chwe said:

'Dump mode':

 

I'm assuming you mean "Dumb Mode"

 

USB-C PD mode is complicated, no doubt...

 

Recently I received a ODM smartphone from Shenzen - USB-C on the Device, and USB-A on the power adapter - close my eyes, and trust that it works with the adapter/cable/device - all together for just charging the battery... and it does.

 

I'm probably not going to plug it into my MacBook Pro - just because, like facebook and relationships, it's complicated :D

 

Once all sorted, USB-C can be very cool - image just a couple of ports, charge/sync/video, OTG even for gadgets...

 

Posted
3 hours ago, sfx2000 said:

I'm assuming you mean "Dumb Mode"

fixed.. :thumbup:

3 hours ago, sfx2000 said:

close my eyes, and trust that it works with the adapter/cable/device - all together for just charging the battery... and it does.

well like USB-A --> microUSB.. As long as it's @5V it shouldn't make much a difference (expect for 'smart' PSUs - they might charge slower, but most smartphone PSUs are 5V 1A anyway.. not much a difference to 5V 900mA). 

3 hours ago, sfx2000 said:

I'm probably not going to plug it into my MacBook Pro

apple was the first one catching USB-C (at least for their notebooks - even when they had actually a good solution with mag jack).. I assume that a bunch of the cheaper smartphones will change to USB-C and they'll be as dumb as before.. E.g. just a connector change. This will only change if SoC makers deliver PMICs which are capable to handle PD. For LiPo I assume 5V input isn't that bad.. @TonyMac32 is the EE here not me. :D  

Posted
On 10/4/2018 at 3:13 AM, chwe said:

apple was the first one catching USB-C (at least for their notebooks - even when they had actually a good solution with mag jack).. I assume that a bunch of the cheaper smartphones will change to USB-C and they'll be as dumb as before.. E.g. just a connector change. This will only change if SoC makers deliver PMICs which are capable to handle PD. For LiPo I assume 5V input isn't that bad.. @TonyMac32 is the EE here not me. :D  

 

I've had mixed results overall with USB-C - when it works, it's really good... overall, I'm in favor of it, but with different implementations, it's a challenge for users.

 

Challenge is quality of cables, which if one gets from a trusted vendor shouldn't be a problem.

 

I've also got an Intel NUC7i5BNH - which like the Macbook Pro's is full blown let's put everything we can on that port - Display Port, Thunderbolt 3, USB3.1, about the only thing that port doesn't do is support power in...  Kaby Lake with Sunrise Point (i5-7260), which is about as official of a reference that one can image perhaps - and it's still a bit of a work in progress on both Windows and Linux. - Ubuntu 18.04 does have some thunderbolt support, which is encouraging now that Intel has changed the licensing a bit for other OEM's - hopefully Thunderbolt doesn't suffer the sad outcome of FireWire (which died eventually because of onerous licensing terms from Apple and others (sony for example)).

 

On the high end SBC's - now that we're seeing SoC's and boards with PCI-e support, USB-C and even Thunderbolt makes things interesting in an odd sort of way - it could actually simplify the layouts - pop a couple of USB-C ports and one can remove some ports and save some space... and add new capabilities if they do the Thunderbolt path - want a SATA dock, external GPU, WiFi, 10Gbe even...

 

You do make a good point about LiPo - but one would assume that a board that supports USB-C probably would have a PMIC, and there, depending on the capabilities of the chip, battery support for charging shouldn't be an issue.

Posted
8 minutes ago, sfx2000 said:

 

Challenge is quality of cables, which if one gets from a trusted vendor shouldn't be a problem.

no difference to microUSB... Crappy cables everywhere.. The microUSB wasn't developed with a focus in powering *random crap*. Powering and USB at the same time was actually the job for the USB B... Nobody expect my thermoprinter used it.. :D 

00139-03-L.jpg

compare the pads, they're made for such purposes. 

 

 

11 minutes ago, sfx2000 said:

You do make a good point about LiPo - but one would assume that a board that supports USB-C probably would have a PMIC, and there, depending on the capabilities of the chip, battery support for charging shouldn't be an issue.

PMIC (assuming with implemented charge function) for phones need voltage monitoring anyway..  Doesn't matter if they implement one too for the input voltage.. PMIC for TV-box SoC (~90% of our SBCs) expects simple a sufficient powering... :lol: Deliver something around 1.2V for CPU, 1.8V for RAM and 3.3V for system, sensors and other crap and you're mostly fine. And the 5V for USB came directly from the Input line.. E.g. only the microUSB port of most H3 SBCs is 'somehow managed'.

opi_one_otg.jpg.34ced0c77d9857464b3b8cf67dec17c4.jpg

So stuff connected to it can be power-cycled by toggeling PL2 (example OPi One). 

 

USB-C is IMO a nice connector.. If you don't buy crap, a bunch of stuff can be done on it.. If you buy crap.. well, crap is crap.. I would like to have a 'de facto' standard for notebook charges (and USB-C looks like the only connector which can do this). It's painful if you run out of battery.. With a standard connector chances are high that someone else has a charger. Also for giving talks. My notebook has an HDMI, I've always 'known working' HDMI-DVI and HDMI-VGA adapters at me (and the presentation as well as PDF on an USB-Stick) just to ensure everything works. 90% of the fears I've have before giving a talk is that the *random multimedia system* they've in this room wont work with my notebook.. Still happened it that I had to give a whole talk with a blackboard and chalk pens cause nothing else worked.. Let's hope for good PMICs in the future and USB-C may solve us some power related issues. :) 

 

 

Posted
3 minutes ago, chwe said:

Let's hope for good PMICs in the future and USB-C may solve us some power related issues. :)

 

Indeed...

Posted
On 10/4/2018 at 12:01 AM, sfx2000 said:

Recently I received a ODM smartphone from Shenzen - USB-C on the Device, and USB-A on the power adapter - close my eyes, and trust that it works with the adapter/cable/device - all together for just charging the battery... and it does.

 

BTW - never did try to charge the phone from a true USB-C charger - was concerned that it would allow the magic smoke to appear, and I'm fresh out of smoke...

 

Smokekit2.jpg.1d41a3048729a43214442fb12a87afea.jpg

Posted

@chwe Have you seen the posts about the undervoltage on the NanoPi M4?

Undervoltage
----------------
Lubuntu 32-bit
No load on USB - no load on CPU    = 5.07V
                                 max load          = 4.92V
1A load on USB - no load on CPU    = 4.55V
                                max load          = average 4.33V
                                                           lowest 4.26V
1.5A load on USB no load on cpu    = 4.10V
                             max load cpu      = under 4V My devices stop working and cut the power

Powerbanks only charge at 0.2A - 0.4A
Armbian    @ 2Ghz/1.5Ghz is worse. A load of 1A and max cpu load and it can dip under 4V
Using multiple USB ports has the same result


I don't know why it's undervolting so badly. I think the resistance overall is too big. Maybe the usb-c?
The PSU seems very stable. It's 4A.
Cheers

Posted
20 minutes ago, NicoD said:

Undervoltage
----------------
Lubuntu 32-bit
No load on USB - no load on CPU    = 5.07V
                                 max load          = 4.92V
1A load on USB - no load on CPU    = 4.55V
                                max load          = average 4.33V
                                                           lowest 4.26V
1.5A load on USB no load on cpu    = 4.10V
                             max load cpu      = under 4V My devices stop working and cut the power

Powerbanks only charge at 0.2A - 0.4A
Armbian    @ 2Ghz/1.5Ghz is worse. A load of 1A and max cpu load and it can dip under 4V
Using multiple USB ports has the same result

IMO you should test with a max 900mA current drawn, everything else is above specs. 

Posted
5 minutes ago, chwe said:

IMO you should test with a max 900mA current drawn, everything else is above specs. 

I thought the USB3 should be albe to give 2A? I got an email from friendlyElec where they say it's limited to 2A.(for all ports together)
Even without a load on the usb it goes down a bit in Armbian when maxed out.
The clock of 1.8Ghz/1.4Ghz they use is a difference of 0.5A maxed. 1.5A in their Lubuntu, 2A maxed in Armbian. Also the maximum temp after 30 minutes with their Lubuntu is 69°C. In Armbian it goes to 85°C after 14m30s and stays there. (all without a fan)

I use a fan so I rather have the 2Ghz. But it does have some disadvantage. More undervoltage and a lot higher temps. 
I'll do the voltage tests again with Armbian and then give you the numbers. I lost them the first time.
With 0.9A on USB as you say and maxed CPU it goes to 4V-4.3V. Doesn't seem a good voltage to power an hd or so.
I'll also check if there is a noticeable performance difference when powering a small load.

It is a 5V small form factor board. So it's more than expectable. It's still an awesome board. But know to not power anything with it. For that there's the T4 and others.

Posted
40 minutes ago, NicoD said:

I thought the USB3 should be albe to give 2A? I got an email from friendlyElec where they say it's limited to 2A.(for all ports together)

USB3 (unless it is charging port compliant) is 900mA --> https://en.wikipedia.org/wiki/USB_3.0#Power_and_charging

Maybe FriendlyElec allows more.. No idea. Do you use their charger and cables? 

 

Thermals and operating points for RK3399 and the board itself are WIP. IMO we might consider to limit CPU freq to default 1.8/1.4 GHz if threads for this board get often moved into https://forum.armbian.com/forum/31-sd-card-and-power-supply/... Even when the situation is IMO sufficient pointed out on the download page and with this thread. 

Posted
22 minutes ago, chwe said:

Do you use their charger and cables? 

Yes. The 4A charger and the cable they gave. I also tried another usb-c cable.
@hjc did a check on his M4 and saw the same behaviour.  Only with 1 network adapter connected.

Quote

I can confirm that my M4 also has the voltage drop issue.

1 RTL8153 connected, system idle: 4.9V

Running iperf3 and generate 2Gbps traffic: 4.7V

Running iperf3 with 6x cpuburn: 4.5V 


For the board's safety 1.8Ghz/1.4Ghz would be a good idea. But it hurts the performance a lot.

 

Armbian Bionic       blender     1h13m50s              kdenlive     41m01s
http://ix.io/1nLh
Armbian Stretch
http://ix.io/1odF
Lubuntu armhf
http://ix.io/1oCb
Lubuntu arm64     blender       1h28m13s           49m21s
http://ix.io/1oGJ


A bit a shame it goes from 1.8 to 2Ghz. Maybe 1.9Ghz-1.5Ghz/1.9Ghz-1.4Ghz would have been enough to not overheat.
It would be good if people could easily change between 1.8Ghz/1.4Ghz - 2Ghz/1.5Ghz.
With a fan it doesn't go over 65°C, but I know many people will not use a fan.
 
Posted
1 minute ago, NicoD said:

A bit a shame it goes from 1.8 to 2Ghz. Maybe 1.9Ghz-1.5Ghz/1.9Ghz-1.4Ghz would have been enough to not overheat.
It would be good if people could easily change between 1.8Ghz/1.4Ghz - 2Ghz/1.5Ghz.
With a fan it doesn't go over 65°C, but I know many people will not use a fan.

well, there you go: http://docs.armbian.com/Process_Contribute/ :)

The way this might be possible is over devicetree overlay. Someone has to implement it, someone has to test it and to quote @Igor: Those 'someones' are rare and the few we have are already overloaded. You may want to make a video how you improved armbian by patching not only reporting? :P 

Maybe you can simply adjust it similar to here?

 

I never tested it on big.LITTLE SoCs 

Posted
18 minutes ago, chwe said:

Maybe you can simply adjust it similar to here?

I'll see into that.
I know it all costs a lot of time and work. And you guys do a great job with what you all do. I wished I had the Linux knowledge you guys have so I could do more.
I used to be a programmer, and with Windows I can do what I want. But I can't seem to get enough insight in Linux to know what I do. I only work with linux for 2years. I hope it will improve.

Here are the results of Armbian Bionic. Only with a 0.7A stable load of my 7" display.
And the no load on usb and max load on cpu says enough. 4.44V. The more current the board draws, the lower the voltage. So I think a resistance problem?


Armbian Bionic/Stretch
No load on USB     - no load on CPU   = 5.00V                                0.45A @ PSU
                                 max load on CPU  = 4.44V                               2A @ PSU with stable voltage 5.10V
0.7A load on USB  - no load on CPU   = 4.60V                                1A
                                 max load on CPU  = 4.10A(lowest 4.05A)      2.6A     

 

Posted
32 minutes ago, NicoD said:

I used to be a programmer, and with Windows I can do what I want. But I can't seem to get enough insight in Linux to know what I do. I only work with linux for 2years. I hope it will improve.

well.. before Armbian, linux was mostly change floppys to install suse on a 486 DX.. :lol: Knopix from live CDs and a long break with Windows/OSX only (okay I had a beaglebord & RPi but I did never something low-level).. 

E.g. https://github.com/torvalds/linux/tree/master/Documentation is a great part of linux as well.. Together with your preferred web-search site most of the stuff can be learned. :) 

 

47 minutes ago, NicoD said:

0.7A load on USB  - no load on CPU   = 4.60V                                1A
                                 max load on CPU  = 4.10A(lowest 4.05A)      2.6A     

Voltage at PSUs output might be interesting as well. But it might be hard to measure it without adding more connectors in between (e.g. 'USB powermeter') which will just add a higher voltagedrop due to more connectors. 

But if voltage is that low with friendly elecs default PSU/cable we might need to keep an eye on this. People will likely add USB attached storage to this board and then it becomes an issue. 

Posted
50 minutes ago, chwe said:

oltage at PSUs output might be interesting as well.

I was using 2 powermeters. The voltage at the psu was always stable at 5.15V. When at 2A it's 5.10V.
Now doing a blender test with my 7" display attached to the usb. The voltage is 5.05V at 2.8A at PSU. Voltage on the USB 4.05V.
I'll let you know if there's a performance hit like this.
I haven't seen any instabilities because of it like with the rpi.

Edit:
No performance hit with an undervoltage on 5V.

Posted

 

 

On 10/8/2018 at 9:31 PM, chwe said:

But if voltage is that low with friendly elecs default PSU/cable we might need to keep an eye on this.

The problem was my cable. I'm sorry for the confusion.
I've tried again with the short cable they gave with it, and it's a lot better. 1A load and cpu maxed in Armbian makes it sink 0.4V instead of 1V. A huge difference. I should have seen it earlier. The cable was too short to put the M4 on my table with it...
Sorry. Only issue is that it reached 85°C without a fan. But that's only after +14minutes full load. People who max these things should know to use a fan.
Cheers
 

Posted (edited)

Hi guys!

 

I`m new to this. Wonder if this PD-compliance is something that can be solved with firmware/OS update, or is that something already set in stone in the chip.

Edited by Ilya Kalujny
Posted
8 hours ago, Ilya Kalujny said:

Hi guys!

 

I`m new to this. Wonder if this PD-compliance is something that can be solved with firmware/OS update, or is that something already set in stone in the chip.

PD-compliance is done by a voltage regulator chip. So you can't have PD-compliance with the NanoPi M4/T4/Nano4. These can only work with 5V.
There is the Rock Pi 4 which has PD-compliance/Quick-charge. I like it even more than the NanoPi M4. It's faster at the same clockspeed. Very stable 5V power on the usb-ports. And a lot better software + software support.
You can still power it with 5V, but also with higher voltage(up to 20V).
There's also an M.2 slot on it(not on the M4) and the camera and display ports are Raspberry Pi compatible(you can use raspberry camera+display) while FriendlyElec has proprietary MIPI CSI/DSI ports.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines