USB PD charger for 36V lithium battery (e.g. Bosch ebike, Xiaomi 2 pro escooter)

Step up voltage converter with USB PD input and two adjustable outputs, eg 42V and 5V for bosch ebike charging.
1
1
0
51
updated September 15, 2025

Description

PDF

I wanted to be able to charge my bosch ebike without the availability of 230V AC and without having to carry around the big original charger. To be able to charge a bosch ebike two voltage levels are required, 5V to set the battery to charging mode and 42V for the actual charging. My aim was to have it as compact as possible for easy carrying. As my escooter (Xiaomi pro 2) also has a 36V battery i decided i want to be able to use it to charge both.

To avoid potential heat issues especially in this tiny enclosure and a potentially poorly ventilated area i decided to use active cooling.

Required parts

  • Step up boost converter for 42V: “DC 400W 15A Step-up Boost Converter Constant Current Power Supply LED Driver 8.5-50V to 10-60V Voltage Charger Step Up ModuleDC 400W 15A Step-up Boost Converter Constant Current Power Supply LED Driver 8.5-50V to 10-60V Voltage Charger Step Up Module” (the big voltage regulator with a red board on the pictures)
  • Step down converter for 5V: “XL6009 DC-DC Buck Boost Voltage Converter Power Module 4A 400KHz Adjustable Switch Module 3.8-30V to 1.25-35V Power SupplyXL6009 DC-DC Buck Boost Voltage Converter Power Module 4A 400KHz Adjustable Switch Module 3.8-30V to 1.25-35V Power Supply” (smaller voltage regulator with a blue board on the pictures)
  • 20V USB PD trigger module (everything with at least 9V will work, but only allow lower charging current): “PDC004”, “Type-C PD decoy module PD23.0 to DC DC trigger extension cable QC4 charger 9V 12V 15V 20V PDC004-PDType-C PD decoy module PD23.0 to DC DC trigger extension cable QC4 charger 9V 12V 15V 20V PDC004-PD” (small one, blue board, USB-C port protrudes slightly over the board)
  • M3 countersunk screws ~4mm
  • 4-6 <M3 countersunk screws for the voltage regulators, with some force M3 also works, but not ideal
  • Heated inserts with OD 4.2mm for the screws
  • Fan 5V 50x50x10mm (“5010”) with 2 pins
  • 2 pin PC fan connector male and female. Search term on aliexpress: KF2510
  • 5525 male and female DC connector. The female side will be screwed into the case, the hole in the case as a diameter of 11mm. The ones i used have full metal connectors
  • Some sort of DIY PCB. you will have to solder the 2 Pin KF2510 connector and 2 wires on it and drill two mounting holes in it.
  • Thick enough wires to handle your current. Most likely 5A will be your highest current (max input on USB C connector), 18 AWG should be good.
  • recommended: 2x 221-413 Wago clamps. You can also solder the wires together, but being able to disconnect them came in handy many times for me.
  • recommended: some capton tape
  • recommended: 45C normally closed thermal switch “KSD9700” (overheat protection)

Assembly

Refer to the images, they have numbers on them corresponding to the step numbers.

0) Assemble the 5V connector. Solder the cables so that they lead away to the rear. For some reason my cad model of the board did not fit the reality, mabe you have to vary your PCB a bit to make it fit. Just prepare to do 2 or 3 of them.

  1. Bottom part
    1. install heated inserts (ideally < M3)
    2. Adjust voltage and current of the big voltage regulator. See below to figure out the correct values.
    3. install big voltage regulator and thermal switch into the bottom part
      1. Install the wires to the voltage regulator before installing it. Use Cord-End Sleeves. I did cut them a few millimeters after crimping. They are quite long for the short screw terminals on the voltage regulator and the case is designed quite tight
  2. Middle part assembly
    1. Adjust the voltage of the small voltage regulator to 5V (I set it to 4.5V to reduce fan speed, the bosch battery still charged for me with that voltage). If you want to use the 5V output for something that potentially will draw significant power, you might want to add a fuse to the output of the 5V voltage regulator
    2. solder the wires from the 5V regulator output to the 5V connector and the fan. Put heat shrinking tubes over the solder points to prevent shorts
    3. install headed inserts M3, for voltage regulator maybe <M3
    4. screw these 3 parts to the printed middle part
  3. install the middle part in the bottom part. Use 4 screws for that
  4. install USB PD board
    1. solder a wire to one of the solder pads and the thermal switch to the other one (i decided to use the thermal switch on the negative as the cables are black to stay color consistent). The cables have to lead upwards (to the side of of the board with the IC)
    2. Put some capton tape around the board. The soldered cables get dangerously near to the components of the baord (i should have designed it with the trigger board flipped upside down)
    3. Install the USB C board on the middle plate and secure it with the small printed clip
  5. Install the 5525 female connector
    1. Solder the connector cables to the output cables of the big Voltage regulator
    2. Connect the power input side using the wago clamps. thermal switch, big voltage converter and small voltage converter negative to one (assuming you used the thermal switch on the negative connector of the USB board) and the positive side of the USB board, big voltage converter and small voltage converter with the other wago clamp
  6. There are two lids for the voltage regulator. 
    1. “A”: This was my first solution, i just like tops closed to avoid stuff falling in. Just use this one if you do not want to use “B”
    2. “B” My USB power brick gets very hot, especially when used in an ebike charging station in the sun. I decided to try out attaching a fan to the power supply to maybe reduce the heat issue a bit and as this voltage regulator box already contains a fan i decided to use it to also cool the power brick. I did not yet test it in practice so no idea if it actually helps. But the “B” solution is a drop in replacement to A. 
      1. Printed parts needed: All “B” parts: plastic plates for the ventilation slots, lid, charger “case” (fits Ugreen Nexode 100W and Ugreen Nexode X 160W)
      2. block the main case exhaust ventilation slots by sliding in the plastic plates
      3. “7B” screw on the lid with ventilation slots
      4. Put the power brick in the “charger case” and slide it on top of the lid.
Voltage and current for big voltage regulator

Voltage: This is the easy part. For a 36V lithium battery the typical charge voltage is 42V. I did choose 41V for two reasons: not charging the battery to 100% will increase its lifespan and reduce the usable capacity by only a few percent and i wanted to have some safety margin in case these cheap chineese voltage regulators might fluctuate in the maximum output voltage. 

Be 100% sure about your maximum charging voltage. Overcharging lithium batteries is dangerous and can lead to fires. If unsure: do not use this! The case of the device you want to charge should mention the maximum charging voltage.

Current: The charging current depends on many factors.

  1. heat of the voltage regulator. As it is actively cooled this should not be an issue when using USB (20V/5A) as power input. But keep this in mind, especially if you might use a 28V trigger board (do not use more than that as the 5V step down converter is limited to 30V input)
  2. Maximum charging voltage.
  3. Power supply. It is not possible to adjust the output current to the power your power brick can deliver. Think of what the lowest power output of the USB PD power supplies you might use is. I decided i will only use mine with 100W PD chargers. Also take into account your USB cable. Not all cables allow 5A.

To calculate the maximum current you can follow this formula:

<Power brick output in W> * 0.7 / <maximum charging voltage>

Reason of the 0.7 factor: If you draw too much power most power bricks will stop charging. You want to avoid that for obvious reasons. The voltage of the power brick might drop below 20V so you can not draw the full power. Also the voltage regulator wastes engery in form of heat. And the fan also draws power. 0.7 should be a save factor.

You can finetune the charging current, but keep in mind how battery charging works. Simply spoken you charge it with a constant current and the charging voltage rises up to the maximum charging voltage. Then the voltage is constant and the current goes down. So you can only test it when you are at specific point in your charging cicle. For simplification you can just wait till the voltage is near to your maximum charging voltage, adjust your current until you find the maximum current and then decrease it again by (5-)10%

Usage

  • Charging bosch ebike: You need a connector for the battery. I did use this model. solder the cables to the 5525 male connector and crimp the 5V wire to the KF2510 female. You do not have to connect the negative terminal of the 5V connection (it will use the negative terminal of the 42V connection)
  • Charging xiaomi pro 2 escooter: You only need the 42V connector. I ordered a replacement charging cable from aliexpress and soldered it to the 5525 male connector. It only works if things are connected in the correct order, otherwise it will not charge. But i do not remember which order is the correct one 🤦♂. It was either: first connect charger to input power and then the scooter, or first connect the scooter to the voltage regulator box and then the box to input power.

 

Tags



Model origin

The author marked this model as their own original creation.

License


Highlighted models from creator

View more