DIY 60W PD Power Bank With Arduino Real Time Battery Info Display

by tobychui in Circuits > Electronics

27184 Views, 169 Favorites, 0 Comments

DIY 60W PD Power Bank With Arduino Real Time Battery Info Display

banner.png
272983830_10218137504943970_3906996138014400390_n.jpg
273104233_10218137503743940_5723113881907596071_n.jpg

Recently, I was planning to get a 60W PD power bank for my laptop so that I don't need to worry about my laptop running out of battery during lectures. However, all the 60W power bank on the market are bulk and expensive. That is why I decided to make my own.


While I was designing the power bank, I thought to myself, why can't I make one with a real time battery display? That is why I started this project: A 60W PD power bank with real time battery information display!

Supplies

IMG_20220125_193211.jpg
IMG_20220121_200117.jpg
IMG_20220121_200048.jpg

To make this power bank, you will need some general parts that you might have already lying around in your home workshop.

  • 10K resistors x 2
  • 10K variable resistors x 2
  • 5.1V zener diode x 2
  • Arduino nano
  • prototyping boards
  • 3D printer
  • M2x5 screws x 4
  • soldering tools
  • buck converter (16.8V -> 5V)
  • ACS712 (5A)
  • power switch

However, you will also need to get some unique parts, which includes

  • UART HMI display (The one I am using is 2.2 inch)
  • 4S (14.8v) Lithium Ion Battery (I am using 4 x Panasonic 3200mAH cells)
  • 60W IP2716 based power boost & charging module

Voltage Divider & Buck Converter

voltage divider.png
IMG_20220125_210608.jpg
IMG_20220125_210615.jpg
IMG_20220126_150137.jpg

First, you need to make the voltage divider for the Arduino to read the voltage from the battery and the type C output port. The diagram is attached in the images above. Following the configuration in the photos, you can make it really small and it should be able to fit in a corner next to the green buck converter which covert the 16.8v battery voltage into 5V for the Arduino.

ACS712

current.png

Next, connect the ACS712 sensor as described in the picture. Notes that you would want to get the 5A version of the sensor instead of the 10A or 20A versions. After finish, glue this to the back of the HMI display

Program the UART HMI Display

IMG_20220126_181836.jpg

Then, you can download the UART HMI Studio tool from the HMI display supplier and program it. The one I am using was from a manufacturer named "Taojingchi" and they have offer me the interface editor where I can download from here. But notes that your HMI displat might be from another manufacturer and they should have their own software for editing the UI.

After finished editing the code and uploaded the interface to the UART HMI display, unplug the display from your PC and connect it to the Arduino nano's pin 2 and 3 for its Software Serial.

You can find the zip file for the interface code attached here as a pdf file. Download the pdf file and rename its file extension to .zip, unzip it to get the source code for my interface.

Downloads

Program the Arduino Nano

Next, edit the code based on your configurations and upload the following code to the Arduino. Fields that you might need to change includes

  • currentCalibrationOffset (The offset current for your current sensor)
  • debugMode (Set to true if you want to test the code without the HMI display)
  • HMISerial.begin(9600) (Change this line if your HMI display doesn't runs on 9600 baudrate)


Downloads

Finalizing the Information Display

IMG_20220125_214237.jpg
IMG_20220126_150131.jpg
IMG_20220126_150143.jpg
IMG_20220126_181847.jpg
IMG_20220126_205837.jpg

After all the wiring and program are uploaded, glue everything together and supply a voltage on 16.8V on the battery+ and a 20V on the out+ pins. You should be able to see the information displaying correctly. If not, try adjust the variable resistor so that the voltage on the screen matches your lab bench power supply output. For the current testing, you can observe the difference between your power supply and the displayed information and adjust the offset value in Arduino code manually.

Notes: You should get the power for the buck converter from the BAT+ wire instead of the current sensing wire that runs through the ACS712.

3D Printing Case

untitled.1.png
untitled.2.png
untitled.3.png
untitled.4.png
untitled.5.png
untitled.6.png
untitled.7.png

Then, you can start 3D printing the case. You can print all of them in single color but don't you think adding a purple layer in between makes it feel really amazing?

Seal Up the Display & Arduino

DSC_0627.JPG
DSC_0629.JPG
DSC_0630.JPG
DSC_0626.JPG

After the printing is done, you can use the screen cover and the black plate to seal up the screen unit with the Arduino and current sensor.

After this stage, you should only got a few wires exposed, they should be

  • BAT+ (Battery + terminal, also use as powering the buck converter)
  • OUT+ (Type C output port)
  • GND
  • Current Measure Input
  • Current Measure Output

Connect the Battery and PD Power Board

batconn.png
DSC_0632.JPG
DSC_0631.JPG

After that, connect the battery to the power switch, PD power board and the information display as follows.


Done!

272771072_10218137505623987_7696865411869103089_n.jpg
272923069_10218137505423982_8860310197078707234_n.jpg
272983830_10218137504943970_3906996138014400390_n.jpg
273018862_10218137504583961_3492313546518381761_n.jpg
273048333_10218137504103949_500078068296105798_n.jpg
273100965_10218137502903919_1505471354527480093_n.jpg
273104233_10218137503743940_5723113881907596071_n.jpg
273114188_10218137503263928_5347572948593314406_n.jpg

Lastly, seal it up and turn it on, your unique 60W PD power bank is now ready to use!