esk8 calc donate now

FlexiCharger USB-PD, concept stage

So I’ve been interested for some time about making a project with USB-PD and getting a better understanding of the begotiation protocol, but haven’t found anything quite interesting enough to build with it. I then recently discovered the USB-C for charging thread on this forum and saw @kevingraehl 's ( USB-C for charging ) “box-o-power” and that got me going.

So from there I started to float the concept in my head and been looking at different component choices and sourcing with what to possibly build it with.

Here’s a block diagram of the currently planned approach.

As this is my first project with the USB-C connector and more importantly the USB-PD protocol I’m planning to go with an available negotiator IC for the consumer (sink) PD role.

I’ve also included inside the dashed line a possibility of having a general voltage input (e.g. 12V from a car) and being able to also use that to boost for the board or some other voltage source (e.g. old laptop PSU). And the possibility of just using the charger for the USB-PD negotiation and getting that voltage passed-through as is.

There would be a display with a couple of buttons to able to configure the wanted settings and to be able to monitor the input and output voltages and currents. You would be able to configure the wanted currents and voltages from the USB-PD connected source device in case you’re using a lower power brick for example or if you want to directly feed that voltage to a device through the pass-through connector. Max power monitoring and regulating would also be available, so you don’t sink too much power from the source device or feed too much power to the load side.

The real work horse on the board would be the LTC3788 2-phase boost charger, so it should be able to handle some real power as well. So if you have more powerful voltage sources you would be able to take advantage of that.

I’ve been reading the official PD documentation and been scavenging the internet for more info and have a pretty good idea what’s going on in the protocol, but I’ll rather go with an easier approach for the first project and then analyze the bus more closely to understand it.

There are STM-microcontrollers (G0-series), which have a USB-PD communication peripheral (UCPD), but as I’m still not familiar enough with the protocol, I’m going with the ready solution.


There are compromises though with these negotiator ICs, which is that they are usually only for a specific power role: sink OR source, not for dual power role, which would be something more desirable for a powerbank use or maybe being able to charge your laptop from your board and being able to charge your board with your laptop’s charger???



Go for it! Interesting project :beer:


USB-C charging is a nice idea. However having to carry “box-o-power” is not optimal I think, you might as well carry your charger instead.

The optimal user experience in my view is:

  • Having 2 charge ports, one USB-C (max 100W), another for faster charging
  • USB-PD booster is hidden inside the board / is part of the BMS
  • USB-C can be used for charging and as power bank (for phone / laptop)

Interesting to see what you come up with! :+1:


Having these connectors available directly on the board enclosure itself, so you just plug in?

Don’t trigger me like this…

What a thermal nightmare it was…

I suppose you could get a pretty compact design and good enough thermal handling if you were to make a Trampa VESC 6 style milled aluminium heatsink and you couple the thermally active components directly to it. Optimize the setup for the USB-PD max 100W use case as well.

Gotta get familiar with that USB-PD protocol so I can make a dual power role supporting port. Then it’s just a question of getting a bi-directional buck-boost controller that can work up to the board battery voltages.


Yes, directly on the board itself, just plug in whatever charger you want. I know it is not easy with placement / space and cooling. That’s why we probably don’t have a solution like this yet.


I second this

No tinkering needed interface, just plug and go, if heat is a problem, you can make a heatsink that either bolts into the existing ESC heatsink if the board has one, or just use the thermal mass of the ESC enclosure as heatsink

If direcional energy is not possible, I only see this making more sense for boards with small battery capacity (>200 Wh), but if it can be used both ways, having a massive powerbank would awesome

@SimosMCmuffin any idea how much power loss it would have at 100W?

1 Like

Well assuming we are boosting from the max 20V at the USB-C end to 12S ~50V at the battery… Depends on how many phases we can fit, I would probably try to get at least 2 to just distribute heat generation and minimize losses without eating too much board space…

2-6W I would guess/ballpark.

1 Like

Is pretty low if we can heatsink it, using a ESC case should work, the losses of a ESC and probably way higher than this and even completely enclosed it manage the heat just fine

It would probably be okay if it had just a 3mm thick aluminium heatsink on the bottom that couples well to the inductors and FETs, just need more surface area then just on the power components to be able to deal with the heat in a reasonable way.

Looking forward to seeing this happen!

It might be worth exploring some of the documentation over at TI. Even if not using their stuff the app notes and other docs might prove useful.

1 Like

Always wanted something like this, but I keep hitting the brick wall of reality.
More complexity = less reliability, a skateboard is just too harsh of an operating environment :pensive:


That just means many other products have been designed to a price point and not for great reliability in this application. :slightly_smiling_face: Almost indestructible electronics can certainly be created but who will pay for it? The price could easily triple, if not a lot more.

1 Like

Sounds pretty neat, we don’t actually charge at that high of amps compared to what some large laptops pull

Ive been trying to make something like this for my board- great concept if it can transfer data too can be used to pull SD cards data as well.

I’ve been doing this for a few years.

Nothing special and what would you like to know if


What I’m curious about without asking you to reveal all the innards.

Did you make it out of available modules or did you design your board and circuits?

What is this SD card connected to in the board?

1 Like

If we’re thinking of getting the design small enough to be integrated into the board enclosure.
Should the USB-C -connector be fixed to the power board or be on the end of a little bit of flexible cable so it can be more easily brought to the wall of the enclosure?

I did find some protective plugs for the female connector:ürth-elektronik/726144001/732-11387-ND/7244571ürth-elektronik/726144003/732-11389-ND/7244573

But figuring how to make the panel cutout pass-through at least dust and water resistant on the female USB -C itself would be a good thing to figure out.

And what I mean is that the mechanical assembly of the female end should be “one-piece” as much as possible in terms of no extra holes or anything, so that it when used with the protective end-cap would stop as much water and dust ingress.


1 Like

Something like this would be nice:


I’ve been working on the charger&powerbank concept and have pretty good idea hardware wise how to go about implementing it, but there are a couple challenging aspects that need to be solved to be able to support both the charging and powerbank use cases.

I will refer to the charger/powerbank module as a “charger module” in hereafter.

Here’s the current block diagram with a couple of the challenges written out in the white boxes.

First and foremost is the challenge of how to connect the charger module to the battery pack if there is a BMS in the system? Charging is easy whether the charger module is connected to the BMS’ charger side pins or directly to the pack, as the external power source can power-on the charger module, which can then boost the voltage up for the BMS’s charger connector, which should then detect the voltage on the charger side, close and connect the charger module to the battery.

But what do we do if the connected USB-device is a sinking device (e.g. phone). The charger module is separated from the battery pack by the BMS, so it can’t provide a pathway to the pack for the charger module to power up.

“Well, connect the charger module directly to the battery pack”

True, this would work. By skipping the BMS in the middle we can always stay powered and we can change between charger and powerbank mode freely, but now the BMS can’t stop the charge/discharge cycle if cells are hitting top or bottom termination limits… And that ain’t good…

From the higher design overview, having the BMS in the middle doesn’t really work, as the charger module will stay unpowered if the BMS blocks the pathway to the battery pack and a sinking USB-device is connected. So based on that I would say a direct connection to the pack would be the way to go. How do we then use the charger module in either charger or powerbank mode safely if we can’t directly monitor the pack cell voltages or temperature.

I’d say connect to the CAN-bus. FlexiBMS Lite for example supports getting the cell voltages and configuration values via the CAN-bus, so the charger module could monitor the battery pack cell voltages that way and keep it safe. Maybe provide also couple GPIO-inputs and -outputs that can signal start/stop-condition if the CAN-bus isn’t available.

But that’s what I’ve been trying to logic’ddddd out, but does that sound sensible?

The real challenge is the dual mode support, if it were one or the other then it would be much simpler (charger only, use with BMS. powerbank only, connect directly to pack), but because it needs to be able to change the power role there are some extra requirements that we need to be able to meet.


This sounds so much more complicated than just having it not be able to charge a phone unless the AS switch is turned on.