Skip to the content
PCBKitNew board
2 layers122.2 × 122.8 mmDcpower, the printed circuit board in 3D

DC Power Unit for Breadboard based on ESP32-S3 microcontroller and AP33772S USB Power Delivery (PD) Sink Controller.

Size
122.2 × 122.8 mm
Copper layers
2
Thickness
1.6 mm
Parts
115
Nets
99
Pads
398
Tracks, vias
855, 207
Pours
14
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
14 Sep 2025
Updated
19 Oct 2025

Overview

Dcpower is an open-source printed circuit board by hnz1102, from the hnz1102/dcpower repository on GitHub. It is a 2-layer board of 122.2 × 122.8 mm with 115 parts on 99 nets, routed with 855 tracks and 207 vias.

It is built around the ESP32-S3-WROOM-1-N16R8, TSB611ILT and AP33772SDKZ-13-FA01, with the PCA9306D, 0.1UF 50V 5*11 and SK36A-LTP among its other parts. Its parts include 37 resistors, 30 capacitors, 11 ICs, 11 connectors and 5 transistors. It belongs with the power boards and the ESP32 boards of this library.

Main components

12

README

README.md

DC Power Unit for Breadboard

DC Power Unit for Breadboard

This is a DC Power Unit for Breadboard based on ESP32-S3 microcontroller and AP33772S USB Power Delivery (PD) Sink Controller. It can supply power to the breadboard from USB Power Delivery (PD) Charger with support for both Standard Power Range (SPR) and Extended Power Range (EPR) modes. The output voltage can be controlled from 0v to 20V in SPR mode and up to 28V(*1) in EPR mode with step of 10mV.
There are 2 types of adopters for the output terminal: Single positive power output terminal and dual positive/negative output terminal. It is easy to connect to the breadboard with standard 2.54mm pitch pin header. If you select the dual positive/negative output terminal adopter, the output voltage can be halved by positive and negative voltage. E.g. If you set the output voltage to 20V, you can get +10V and -10V from the positive and negative output terminal.

*1: Maximum voltage is limited to 28V by AP33772S hardware specifications. Some PD chargers may not support EPR mode or only support up to 16V/5A. Please check your PD charger specifications.

adopter

The left image shows the single positive output terminal adopter, and the right image shows the dual positive/negative output terminal adopter.

Key Features

  • High Power Delivery: Up to 100W from USB PD Charger
  • Multiple Voltage Outputs: 0V to 20V in SPR mode, 0V to 28V in EPR mode (10mV steps)
  • High Current Support: Up to 5A when PD Charger supports EPR, but some chargers support up to 90% of the maximum current.
  • Touch Control Interface: Front panel touch switch for voltage selection and output control
  • Precise Control: PID controller maintains constant output voltage
  • High Accuracy Monitoring and Control: 10mV voltage accuracy using shunt resistor and INA228 current sensor, with 1mV resolution.
  • Real-time Display: OLED display shows voltage, current, power consumption, and temperature
  • Data Logging: WiFi connectivity for sending measurement data to InfluxDB server
  • Web Dashboard: Data visualization using InfluxDB dashboard
  • Safety Features: Over Voltage Protection (OVP), Under Voltage Protection (UVP), Over Current Protection (OCP). Over Temperature Protection (OTP) does not implemented.

Note: If you use 21V or higher voltage, input voltage is 28v or higher, and differential voltage is over 3V and output current is over 3A, the MOSFET device is in the high consumption state and the unit temperature may rise over 80 degrees Celsius. Please be careful about the temperature. You can set the maximum temperature in the configuration file. The default value is 80 degrees Celsius. If the temperature exceeds the limit, the output will be disabled automatically. I recommend using less than 0.7A current at 21V or higher voltage. Otherwise, if you set the output voltage to 27V or higher, the temperature rise is not a problem.

Note: This unit uses a micro controller and a USB PD controller. These controllers need the power to operate. Therefore, if you use a over current, the power source may be shut down by the over current protection of the PD charger. In this case, This unit cannot operate and will be turned off. Please use the current within the specification of your PD charger.

Hardware Components

  • ESP32-S3-WROOM-1-N16R8: Main microcontroller
  • AP33772S: USB Power Delivery Sink Controller with EPR support
  • INA228: High-precision current/voltage sensor
  • SSD1331: Color OLED display (96x64 pixels)
  • Touch Interface: Capacitive touch sensors for user interaction
  • MOSFET Load Circuit: Electronic load for testing and regulation

board

Software Architecture

The firmware is written in Rust using the ESP-IDF framework and consists of several modules:

  • main.rs: Main application logic and system initialization
  • usbpd.rs: AP33772S USB-PD driver interface using the ap33772s-driver crate
  • displayctl.rs: OLED display control and user interface
  • currentlogs.rs: Current and voltage measurement using INA228
  • touchpad.rs: Touch sensor interface and user input handling
  • pidcont.rs: PID controller for voltage regulation
  • wifi.rs: WiFi connectivity and network management
  • transfer.rs: Data transmission to InfluxDB server
  • syslogger.rs: System logging functionality

ap33772s-driver crate is used for USB-PD communication with the AP33772S controller. Please see the ap33772s-driver for more details.

How to Use the Unit

Basic Operation

  1. Connection: Connect a USB-C PD charger to the input port
  2. Power On: The unit automatically detects the PD source and displays available power profiles
  3. Voltage Selection: Use the touch interface to select desired output voltage
  4. Output Control: Press the center touch position to enable/disable output
  5. Monitoring: View real-time measurements on the OLED display

Touch Interface Controls

  • Up/Down Touch: Increase or decrease output voltage in 100mV steps, long press for 1V steps
  • Left/Right Touch: Increase or decrease output voltage in 10mV steps
  • Center Touch: Long press to toggle output ON/OFF
  • Display Information: Shows current voltage, current, power, unit temperature, and WiFi status

If the output is disabled due to over current, over power, or over temperature, you can clear the error message by pressing the center touch position once.

Safety Features

  • Under Voltage Protection (UVP)
  • Over Voltage Protection (OVP)
  • Over Current Protection (OCP)
  • Automatic fault detection and shutdown

These protections are implemented by the AP33772S.

Dependencies and Crates

The project uses the custom ap33772s-driver crate for USB-PD communication:

toml
[dependencies]
ap33772s-driver = { version = "0.1.4", features = ["std"] }

Other key dependencies include:

  • esp-idf-hal v0.45.2: ESP32 hardware abstraction
  • embedded-hal v1.0.0: Platform-agnostic hardware interfaces
  • ssd1331 v0.3.0: OLED display driver
  • embedded-graphics v0.7: Graphics primitives for display
  • chrono v0.4.38: Date and time handling
  • toml-cfg v0.1.3: Configuration file parsing

How to build from code and Install to the unit.

Using Ubuntu 22.04.3 LTS and ESP-IDF V5.4.2

Prerequisites

Ensure that your system meets the following requirements before proceeding with the installation:

  • Operating System: Linux-based distribution
  • Required Packages: git, python3, python3-pip, gcc, build-essential, curl, pkg-config, libudev-dev, libtinfo5, clang, libclang-dev, llvm-dev, udev, libssl-dev, python3.10-venv

Installation Steps

1. System Update and Package Installation

Update your system and install the necessary packages using:

bash
sudo apt update && sudo apt -y install git python3 python3-pip gcc build-essential curl pkg-config libudev-dev libtinfo5 clang libclang-dev llvm-dev udev libssl-dev python3.10-venv

2. Rust Installation

Install Rust programming language and Cargo package manager:

bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

After installation, activate Rust by sourcing the environment:

bash
. "$HOME/.cargo/env"

3. Additional Tools Installation

Install the following Rust tools:

  • ldproxy
  • espup
  • cargo-espflash

Use the following commands:

bash
cargo install ldproxy
cargo install espup
cargo install cargo-espflash

At this time (2025-07-25), espup cannot be compiled. If you get an error, please use the following command to install the toolchain.

bash
cargo install cargo-binstall
cargo binstall espup

4. ESP Environment Setup

Run the following command to install and update the Espressif Rust ecosystem:

bash
espup install
espup update

Set up environment variables:

bash
. ./export-esp.sh

5. Udev Rules Configuration

Configure udev rules for device permissions:

bash
sudo sh -c 'echo "SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"303a\", ATTRS{idProduct}==\"1001\", MODE=\"0666\"" > /etc/udev/rules.d/99-esp32.rules'
sudo udevadm control --reload-rules
sudo udevadm trigger

6. Clone Repository

Clone the DC Power Unit repository:

bash
git clone https://github.com/hnz1102/dcpower.git
cd dcpower/code

7. Setting WiFi SSID, Password, etc.

Change the following configuration file: cfg.toml You have to set the following parameters: WiFi SSID, Password, InfluxDB Server IP Address, InfluxDB API Key, and InfluxDB API with your ORG. You can get the API Key from the InfluxDB Web Console. Please see the 'How to Install the InfluxDB and Configure the Dashboard' section No.3.

toml
[dcpowerunit]
wifi_ssid = "<Your AP SSID>"  # Set your AP SSID
wifi_psk = "<Your AP Password>" # Set your AP Password
influxdb_server = "<InfluxDB Server IP Address:Port>" # Set your InfluxDB Server IP Address and Port ex. 192.168.1.100:8086
pid_kp = "0.0000005"
pid_ki = "0.00002"
pid_kd = "0.1"
pwm_offset = "0"
pd_config_offset = "1.5"
shunt_resistance = "0.005"
shunt_temp_coefficient = "50"
max_current_limit = "5.2"
max_power_limit = "100.0"
max_temperature_limit = "75" # Set the maximum temperature limit in degrees Celsius. Default is 75 degrees.
influxdb_api_key = "<InfluxDB API KEY>" # Set your InfluxDB API Key
influxdb_api = "/api/v2/write?org=<ORG>&bucket=LOGGER&precision=ns" # Set your InfluxDB API with your ORG and BUCKET
influxdb_tag = "dcpowerunit"  # Tag for InfluxDB measurements
influxdb_measurement = "dcpowerunit" # Measurement name for InfluxDB
syslog_server = "<Syslog Server IP Address:Port>" # Set your Syslog Server IP Address and Port ex. 192.168.2.140:514
syslog_enable = "false" # Set to "true" to enable syslog

8. Build and Flash

Build the project:

bash
cargo build --release

9. Flash the Firmware

Connect the DC Power Unit to your PC using a USB cable. Then, flash the firmware:

bash
cargo espflash flash --release --monitor

If your device is not detected, power on the device and during the boot, press the BOOT button. Then, run the flash command again.

10. Monitor the Output

After flashing the firmware, the console shows the booting messages and system initialization including:

  • WiFi connection status
  • AP33772S USB-PD controller initialization
  • Available PDO (Power Data Object) detection
  • Touch interface activation
  • OLED display initialization
bash
Chip type:         esp32s3 (revision v0.2)
Crystal frequency: 40 MHz
Flash size:        16MB
Features:          WiFi, BLE, Embedded Flash
MAC address:       80:65:99:b8:8e:90
App/part. size:    1,383,760/1,536,000 bytes, 90.09%
[00:00:00] [========================================]      14/14      0x0      Verifying... OK!                   
[00:00:00] [========================================]       1/1       0x8000   Skipped! (checksum matches)        
[00:00:15] [========================================]     864/864     0x10000  Verifying... OK!                   
[2025-09-15T07:23:38Z INFO ] Flashing has completed!
Commands:
    CTRL+R    Reset chip
    CTRL+C    Exit

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40378d03
0x40378d03 - setup_priv_desc$isra$0
    at ??:??
SPIWP:0xee
mode:DIO, clock div:2
load:0x3fce2810,len:0x1564
load:0x403c8700,len:0x4

How to Install the influxDB and Configure the Dashboard

1. Download influxDB and Install.

bash
$ wget https://dl.influxdata.com/influxdb/releases/influxdb2-2.7.0-amd64.deb
$ sudo dpkg -i influxdb2-2.7.0-amd64.deb
$ sudo service influxdb start

2. Configure the influxDB

text
Connect to the 'http://<influxDB installed PC Address>:8086'

Click GET STARTED and set Username, Password, Initial Organization Name, and Initial Bucket Name

TermValue
UsernameSet login username as influxDB administrator web console
PasswordSet login password as influxDB administrator web console
Initial Organization NameOrganization Name ex. ORG
Initial Bucket NameLOGGER

After set them, click CONTINUE.

3. Copy the operator API token.

You can see the operator API token on the browser. YOU WON'T BE ABLE TO SEE IT AGAIN! If you want to get new API token, click API Tokens menu form Sources Icon, then click GENERATE API TOKEN and select All access token, click Save. You can see a new API token and get it. After copy the token, click CONFIGURE LATER.

4. Import the Dashboard Template.

Click the Dashboard icon, and select Import Dashboard from the CREATE DASHBOARD menu.

Drop the influxdb/dc_power_station.json file to Drop a file here, then click IMPORT JSON AS DASHBOARD.

You can see the DC POWER STATION pannel on the Dashboards page.

Click this panel, and You can see the dashboard.

dashboard

If you want to customize the dashboard design, click configure mark. You can change the graph design.

Schematic, PCB Gabar Data

There is a Schematic data in hardware directory.

This PCB is designed by Kicad.

LICENSE

This source code is licensed under MIT. Other Hardware Schematic documents are licensed under CC-BY-SA V4.0.

Parts

115
QtyValueFootprintReferences
1010K 1%Resistor_SMD:R_0603_1608MetricR301, R306, R309, R310, R316, R317, R318, R319, R601, R602
90.1uFCapacitor_SMD:C_0603_1608MetricC201, C202, C304, C308, C401, C402, C404, C405, C409
90.1uF/50VCapacitor_SMD:C_0603_1608MetricC303, C305, C306, C307, C310, C314, C406, C408, C601
710KResistor_SMD:R_0603_1608MetricR201, R202, R205, R302, R303, R304, R405
41K 1%Resistor_SMD:R_0603_1608MetricR305, R307, R311, R312
4470uFCapacitor_THT:CP_Radial_D8.0mm_P5.00mmC501, C502, C602, C603
3SK36A-LTPDiode_SMD:D_SMAD501, D601, D602
210uF/50VCapacitor_SMD:C_0805_2012MetricC316, C407
21KResistor_SMD:R_0603_1608MetricR314, R411
24.7KResistor_SMD:R_0603_1608MetricR412, R413
25K1Resistor_SMD:R_0603_1608MetricR409, R410
25mResistor_SMD:R_2512_6332Metric_Pad1.40x3.35mm_HandSolderR308, R414
2ADPINConnector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_VerticalJ503, J601
2LOWER OUTConnector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_VerticalJ505, J603
2OPA187IDBVRPackage_TO_SOT_SMD:SOT-23-5U301, U305
2Screw_Terminal_3PLibrary:TB112-2-2-3-E-1 Terminal BlockJ501, J502
2TSB611ILTPackage_TO_SOT_SMD:SOT-23-5U304, U601
2UPPER OUTConnector_PinHeader_2.54mm:PinHeader_2x02_P2.54mm_VerticalJ504, J602
10.01uF/50VCapacitor_SMD:C_0603_1608MetricC312
10.47uF/50VCapacitor_SMD:C_0603_1608MetricC403
1100Resistor_SMD:R_0603_1608MetricR417
11000pFCapacitor_SMD:C_0603_1608MetricC309
1100K 1%Resistor_SMD:R_0603_1608MetricR315
110uFCapacitor_SMD:C_0805_2012MetricC301
1150Resistor_SMD:R_0603_1608MetricR203
11uFCapacitor_SMD:C_0805_2012MetricC410
1200KResistor_SMD:R_0603_1608MetricR401
1220Resistor_SMD:R_0603_1608MetricR603
12N7002KPackage_TO_SOT_SMD:SOT-23Q303
12SA1943Package_TO_SOT_THT:TO-3P-3_Horizontal_TabDownQ602
12SC3325Package_TO_SOT_SMD:SC-59Q301
12SC5200Package_TO_SOT_THT:TO-3P-3_Horizontal_TabDownQ601
13.09K 1%Resistor_SMD:R_0603_1608MetricR313
13.5x2.6 Tact SWLibrary:WS-TASV SMT Tact SwitchSW201
14.7K 1%Resistor_SMD:R_0603_1608MetricR206
147K 1%Resistor_SMD:R_0603_1608MetricR204
147pFCapacitor_SMD:C_0603_1608MetricC311
1AP33772SDKZ-13-FA01Library:W-QFN4040-24_Type_A1_DIOU403
1BOOTTestPoint:TestPoint_Pad_D1.0mmTP202
1ESP32-S3-WROOM-1-N16R8Library:ESP32-S3-WROOM-1_EXPU201
1GNDTestPoint:TestPoint_Pad_D1.0mmTP309
1GPIOConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ506
1INA228Package_SO:VSSOP-10_3x3mm_P0.5mmU302
1IRFP9140NPBFPackage_TO_SOT_THT:TO-247-3_Horizontal_TabUpQ302
1JumperJumper:SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mmJP301
1LED BLUELED_SMD:LED_0603_1608MetricD402
1LM35-NEBPackage_TO_SOT_THT:TO-220-3_Horizontal_TabDownU303
1MH2029-601YInductor_SMD:L_0805_2012MetricFB401
1OP-VCCTestPoint:TestPoint_Pad_D1.0mmTP304
1PCA9306DPackage_SO:SSOP-8_2.95x2.8mm_P0.65mmU401
1PINOUTConnector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_VerticalJ305
1PWMTestPoint:TestPoint_Pad_D1.0mmTP301
1SET-VrTestPoint:TestPoint_Pad_D1.0mmTP302
1SSD1331_DISPLAYLibrary:OLED SSD1331 SPI DISPLAYU202
1TOUCH1Library:TestPoint_Pad_3.2x1.6mmTP-PAD201
1TOUCH2Library:TestPoint_Pad_3.2x1.6mmTP-PAD202
1TOUCH3Library:TestPoint_Pad_3.2x1.6mmTP-PAD203
1TOUCH4Library:TestPoint_Pad_3.2x1.6mmTP-PAD204
1TOUCH5Library:TestPoint_Pad_3.2x1.6mmTP-PAD205
1TPGNDLibrary:TestPoint_Pad_3.2x1.6mmTP-PAD301
1UA78M33Package_TO_SOT_THT:TO-220-3_Horizontal_TabUpU402
1USB4105-GF-ALibrary:USB_C_5077CR-16-SMC2-BK-TRJ401
1VbTestPoint:TestPoint_Pad_D1.0mmTP306
1VfbTestPoint:TestPoint_Pad_D1.0mmTP303
1VrefTestPoint:TestPoint_Pad_D1.0mmTP310

Questions

How big is the Dcpower PCB?

It measures 122.2 × 122.8 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Dcpower use?

115 parts, built around the ESP32-S3-WROOM-1-N16R8, TSB611ILT, AP33772SDKZ-13-FA01 and PCA9306D. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Dcpower KiCad files?

From the hnz1102/dcpower repository on GitHub, at the commit this page was made from: the board is hardware/dcpower.kicad_pcb and its schematic hardware/adoptpr-r2.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Dcpower design in my own project?

Its repository states no licence, so its author keeps all rights: ask hnz1102 before reusing the design.

Similar boards

  • 2 layers46 × 54 mmMini power, the printed circuit board in 3D

    Mini power

    hnz1102/mini-power

    Mini-Power is a small, portable DC power supply unit designed to provide a convenient and reliable source of adjustable voltage for your electronic devices and breadboard experiments.

    52 parts3
  • 2 layers185 × 98 mmMosfetload, the printed circuit board in 3D

    Mosfetload

    hnz1102/electricload

    Electric Load and Logger

    96 parts5
  • 2 layers170 × 65 mmPower audio, the printed circuit board in 3D

    Power audio

    picli3/etapa-potencia-500w

    Barra de potencia de audio con múltiples transistores en paralelo, pensada para entregar alta corriente y robustez térmica en amplificadores de gran potencia.

    37 parts
  • 2 layers167.1 × 67 mmSubAmp, the printed circuit board in 3D

    SubAmp

    smileym4n-collab/Kicadprojects

    55 parts
  • 4 layers216 × 144 mmSheet1, the printed circuit board in 3D

    Sheet1

    motor-and-motion-control-lab/mmlab-12PhaseDrive-388Slave

    PCB Electronics for Humanoid Robots and Bearingless Motor Systems

    620 parts3GPL-3.0