
PlugInDC Load
janni0609/DC-Load
A programmable DC electronic load built on the Raspberry Pi Pico 2 (RP2350). It sinks a user-defined current from a DC source under test and measures voltage, current, power, capacity, and energy in real time on a…

A programmable DC electronic load built on the Raspberry Pi Pico 2 (RP2350). It sinks a user-defined current from a DC source under test and measures voltage, current, power, capacity, and energy in real time on a…
Front Panel is an open-source printed circuit board by janni0609, from the janni0609/DC-Load repository on GitHub. It is a 2-layer board of 63.4 × 91.5 mm with 40 parts on 42 nets, routed with 255 tracks and 11 vias.
It is built around the BSS138 and EE2-5NU. Its parts include 9 resistors, 8 switches, 6 capacitors, 4 connectors and 1 IC.
A programmable DC electronic load built on the Raspberry Pi Pico 2 (RP2350). It sinks a user-defined current from a DC source under test and measures voltage, current, power, capacity, and energy in real time on a colour TFT display.
| Component | Part | Interface |
|---|---|---|
| MCU | Raspberry Pi Pico 2 (RP2350) | — |
| Display | ILI9488 TFT 240×320 | SPI (GPIO 16/18/19/17/20) |
| DAC (current setpoint) | DAC80501 16-bit | I2C1 0x48 |
| ADC (V + I measurement) | ADS1115 16-bit | I2C1 0x49 |
| I/O expander (buttons/encoder) | TCAL9539 16-bit | I2C1 0x74 |
| Temperature sensors | 3× MCP9700 | ADC (GPIO 26/27/28) |
| Fans | 2× PWM | GPIO 2, 3 (25 kHz) |
| Beeper | — | GPIO 22 |
I2C1 runs on GPIO 14 (SDA) / GPIO 15 (SCL) at 1 MHz.
KiCad design files live in hardware/:
hardware/PlugInDC Load/ — main plug-in board (MCU, DAC/ADC, pass elements, power supply)hardware/Front Panel/ — front panel boardEach project includes the schematic, PCB layout, a schematic PDF, and a STEP model.
| Parameter | Range |
|---|---|
| Input voltage | 0 – 100 V |
| Set current | 0 – 100 A |
| Under-voltage / CV setpoint (UVP) | 0 – 99.99 V |
| Max power (beeper threshold) | 1000 W |
The DAC output (0–2.5 V) drives the current-control circuit: 2.5 V = 100 A full scale. The ADS1115 uses auto-ranging PGA for both channels, scaling 2.5 V → 100 V (voltage) and 2.5 V → 100 A (current).
Portrait 240×320, divided into sections:
┌──────────────────────────┐
│ DC ELECTRONIC LOAD │ ← green = load ON, yellow = load OFF
├──────────────────────────┤
│ VOLTAGE xx.xx V │
├──────────────────────────┤
│ CURRENT x.xxx A │
├──────────────────────────┤
│ POWER xxx.xx W │
├──────────────┬───────────┤
│ CAPACITY x.xxx Ah │ x.xx Wh ENERGY │
├──────────────┬───────────┤
│ SET CURR x.x A │ SET UVP xx.xx V │ ← UVP turns red in CV mode
├──────────────┬───────────┤
│ TEMP xx.x°C │ HH:MM:SS │
└──────────────┴───────────┘All buttons and the rotary encoder are read via the TCAL9539 I/O expander. Button behaviour is context-sensitive: the main screen, debug screen, and calibration screens each respond differently.
| Input | Function |
|---|---|
| Rotary encoder | Increment/decrement the selected digit of the active setpoint |
| P0.0 (encoder push) | Toggle between editing SET CURR and SET UVP |
| P0.3 | Move cursor left |
| P0.4 | Move cursor right |
| P0.5 | Switch to debug screen |
| P0.6 | Reset elapsed timer and clear Ah/Wh accumulators |
| P0.7 | Toggle internal / external voltage sense |
| P1.0 | Load ON / OFF (blocked while OTP is active) |
The debug screen is a navigable menu. P0.3/P0.4 move the selection, the encoder adjusts the highlighted item, and P0.0 (encoder push) activates it.
| Menu item | Function |
|---|---|
| I SENSE | Toggle internal / external current shunt (persisted to EEPROM) |
| VOLT CAL | Enter voltage calibration wizard |
| CURR CAL | Enter current calibration wizard |
| VIEW CAL | Display stored calibration tables |
| OTP TRIP | Set over-temperature protection threshold with encoder (persisted) |
| UVP Kp | Adjust UVP PI proportional gain with encoder (persisted) |
| UVP Ki | Adjust UVP PI integral gain with encoder (persisted) |
| Input | Function |
|---|---|
| Rotary encoder | Adjust the entered reference value |
| P0.3 / P0.4 | Move digit cursor left / right |
| P0.0 (encoder push) | Confirm step and advance |
| P0.5 | Cancel and return to debug screen |
When SET UVP is non-zero and the load is on, a software PI controller monitors the measured voltage. If it drops below the UVP setpoint, the controller reduces the sink current to regulate voltage at that level (constant-voltage / CV mode). The SET UVP field turns red while CV mode is active.
CV mode exits with 0.5 V hysteresis to avoid chattering. The PI gains (Kp, Ki) are tunable from the debug screen and stored in EEPROM.
The OTP threshold (default 70 °C, adjustable 30–120 °C) is compared against the highest reading across all three MCP9700 sensors. When the threshold is exceeded:
Fan speed is temperature-controlled using the highest reading across all three MCP9700 sensors:
Both voltage and current channels support piecewise-linear calibration (4 points for voltage, 5 for current). The calibration wizard drives the load to each reference point, reads the raw ADC value, and prompts for the reference meter reading. Calibration data is stored in EEPROM and applied on every measurement via piecewiseLerp.
| Address | Content |
|---|---|
| 0 | Current shunt select (0x01 = external) |
| 1 | Current cal valid marker (0xCA) |
| 2 | Voltage cal valid marker (0xCA) |
| 3–42 | Current cal: 5× raw + 5× user (10 floats) |
| 43–74 | Voltage cal: 4× raw + 4× user (8 floats) |
| 75 | OTP valid marker (0xCA) |
| 76–79 | OTP threshold (float) |
| 80 | UVP PI valid marker (0xCA) |
| 81–84 | UVP Kp (float) |
| 85–88 | UVP Ki (float) |
The project uses PlatformIO with the Arduino framework.
# Build
pio run
# Upload
pio run --target upload
# Serial monitor
pio device monitor --baud 115200Target board: rpipico2. Dependencies are fetched automatically (Bodmer/TFT_eSPI).
| Qty | Value | Footprint | References |
|---|---|---|---|
| 6 | SW_Push 18mm | Button_Switch_THT:SW_PUSH_6mm_H13mm | SW1, SW2, SW3, SW4, SW5, SW8 |
| 6 | TestPoint | TestPoint:TestPoint_Pad_D1.0mm | TP1, TP2, TP3, TP4, TP5, TP6 |
| 5 | 10k | Resistor_SMD:R_0603_1608Metric | R8, R10, R12, R13, R14 |
| 3 | R | Resistor_SMD:R_0603_1608Metric | R7, R9, R11 |
| 2 | 10u | Capacitor_SMD:C_1206_3216Metric | C1, C2 |
| 2 | C | Capacitor_SMD:C_0603_1608Metric | C3, C5 |
| 2 | M3 | MountingHole:MountingHole_3.2mm_M3_DIN965_Pad | H1, H2 |
| 2 | TestPoint | TestPoint:TestPoint_Pad_D1.5mm | TP7, TP8 |
| 1 | 100n | Capacitor_SMD:C_0603_1608Metric | C6 |
| 1 | 10n | Capacitor_SMD:C_0603_1608Metric | C4 |
| 1 | 1N4007 | Diode_SMD:D_SOD-123F | D1 |
| 1 | 1k | Resistor_SMD:R_0603_1608Metric | R16 |
| 1 | BSS138 | Package_TO_SOT_SMD:SOT-23 | Q1 |
| 1 | Conn_02x08_Odd_Even | Connector_IDC:IDC-Header_2x08_P2.54mm_Vertical | J13 |
| 1 | Display | Connector_PinSocket_2.54mm:PinSocket_1x14_P2.54mm_Vertical | J1 |
| 1 | EE2-5NU | Relay_SMD:Relay_DPDT_Kemet_EE2_NU | K1 |
| 1 | Ex_Sense | Connector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J3 |
| 1 | RotaryEncoder_Switch_MP | Rotary_Encoder:RotaryEncoder_Bourns_Vertical_PEC12R-3x17F-Sxxxx | SW7 |
| 1 | Sense | Connector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J2 |
| 1 | TCAL9539RPWR | Package_SO:TSSOP-24_4.4x7.8mm_P0.65mm | U1 |
It measures 63.4 × 91.5 mm and has 2 copper layers, 1.6 mm thick.
40 parts, built around the BSS138 and EE2-5NU. 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.
From the janni0609/DC-Load repository on GitHub, at the commit this page was made from: the board is hardware/Front Panel/Front Panel.kicad_pcb and its schematic hardware/Front Panel/Front Panel.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask janni0609 before reusing the design.

janni0609/DC-Load
A programmable DC electronic load built on the Raspberry Pi Pico 2 (RP2350). It sinks a user-defined current from a DC source under test and measures voltage, current, power, capacity, and energy in real time on a…

precision-sustainable-ag/PlantMap3D-Hardware
The system management board handles all power distribution in the multi-camera system and a few other auxiliary functions. The PCB is designed using KiCad.

gabriele-moretto/dinospand
Agricultural PCB project design and firmware developing.

imaginaryimpedance/Differential-Probe
Device is based on AD8130 differential amplifier and THS3491 amplifier on output stage.


TMaxElectronics/PanaHacks_PCB
A PCB for communication with Panasonic PACi air conditioners



StuckAtPrototype/Racer
These are structured into their own files. I could have used submodules, but decided against it.