Close
0%
0%

Smart Lab Power Supply with ESP32

Dual-channel smart lab power supply with ESP32, TFT display, encoder control, current sensing and OTA update support.

Public Chat
Similar projects worth following
This is a dual-channel smart lab power supply built with an ESP32, using stepper motors to mechanically adjust voltages via potentiometers. The control is closed-loop, with feedback from live voltage readings to ensure precise regulation.

Each channel supports 3V, 5V, 7V, and a custom preset, saved in EEPROM. A rotary encoder allows quick navigation and selection.

The system features a TFT display (ILI9488) showing:

Voltage (V)

Current (A)

Power (W)

Peak power draw (dynamically updated)

Firmware updates are handled via OTA over Wi-Fi.

Ideal for prototyping, education, and lab setups.

Overview

This project is a dual-channel smart lab power supply powered by the ESP32 microcontroller. It features a TFT display, a rotary encoder with push-button, and provides preset voltage outputs with precise closed-loop feedback control. Voltage adjustment is done mechanically via stepper motors, which are driven by the ESP32 based on live voltage readings — ensuring accurate and reliable output regulation.

Key Features

  • Dual independent output channels

  • Selectable voltage presets: 3V, 5V, 7V, and a customizable value per channel

  • EEPROM-based preset storage

  • OTA (Over-the-Air) firmware updates via Wi-Fi

  • Real-time display of:

    • Voltage (V)

    • Current (A)

    • Power (W)

    • Peak power draw (dynamically updated)

Hardware Components

  • ESP32 Dev Board (WROOM-32 or ESP32-S3)

  • TFT Display (ILI9488 or similar, 320x480)

  • Rotary encoder + push button for user input

  • INA219 current sensors (one per channel)

  • Stepper motors + motor drivers (for mechanical voltage adjustment)

  • Potentiometers or analog regulators controlled via motor

  • 3D printed enclosure

Closed-Loop Voltage Control

Voltage on each channel is regulated through mechanically adjusted potentiometers, driven by stepper motors. The ESP32 reads the output voltage and adjusts the motor position accordingly — forming a closed-loop feedback system. This approach combines digital precision with the flexibility of analog regulation, while still avoiding the complexity of high-frequency PWM filtering or linear heat dissipation.

Software Features

  • Clean, non-blocking Arduino code

  • Dynamic UI using TFT_eSPI

  • Rotary encoder navigation for preset selection

  • EEPROM saving of custom presets

  • OTA updates over Wi-Fi

  • Continuous tracking of maximum power draw

Voltage Preset System

Each channel provides four selectable presets:

  • 3.3V

  • 5V

  • 7V

  • Custom (user-defined, stored in EEPROM)

Presets can be selected with the encoder. The custom preset is editable and saved permanently.

Displayed Information

The TFT screen shows, per channel:

  • Output voltage

  • Load current

  • Instantaneous power consumption

  • Peak power usage since last boot

All values refresh in real-time, offering an at-a-glance diagnostic view.

Applications

  • Bench power supply for electronics prototyping

  • DIY lab equipment

  • Embedded systems development

  • Smart power management and logging

Planned Features

  • SD card logging

  • USB-C power input

  • Serial terminal control

  • Overcurrent detection & protection

Schematic_ESP32-Based-Bench-Power-Supply_2025-07-29.pdf

Adobe Portable Document Format - 98.30 kB - 08/08/2025 at 06:09

Preview

left_bracket.stl

Standard Tesselated Geometry - 59.46 kB - 08/08/2025 at 06:09

Download

bottom_panel.stl

Standard Tesselated Geometry - 635.43 kB - 08/08/2025 at 06:09

Download

fornt_panel.stl

Standard Tesselated Geometry - 191.68 kB - 08/08/2025 at 06:09

Download

fan_consol.stl

Standard Tesselated Geometry - 212.97 kB - 08/08/2025 at 06:09

Download

View all 12 files

  • 2 × XH M401 Buck konverter
  • 2 × INA219 I²C current and power sensor Power Management ICs / Power Supply Support
  • 2 × ULN2003 stepper motor driver module Semiconductors and Integrated Circuits / Misc. Semiconductors and Integrated Circuits
  • 2 × 28BYJ-48 Stepper motor
  • 1 × ILI9488 3.5" TFT

View all 14 components

  • 1
    Prepare the firmware:

    1.1. Upload the firmware to the ESP32 using the appropriate tool (e.g., Arduino IDE or PlatformIO).

    1.2. Make sure the ESP32 is properly connected to the computer and that the correct board and port are selected.

  • 2
    3D Print the enclosure parts:

    2.1. Print all the enclosure components using the provided STL models.

    2.2. Ensure proper layer height and material for durability.

    2.3. Verify the printed parts fit together before proceeding with assembly.

  • 3
    Press the brass nuts:

    3.1. Insert all the brass nuts into the designated screw holes in the enclosure parts (main panel and side panels ).

    3.2. Use a soldering iron or an appropriate target wire gauge for this purpose.

View all 9 instructions

Enjoy this project?

Share

Discussions

rafununu wrote 08/09/2025 at 07:28 point

You could replace the potentiometers with digital pots, thus no more motors and a direct link between setup and result, moreover it should be costless. Great anyway.

  Are you sure? yes | no

Németh József László wrote 08/09/2025 at 08:14 point

Thanks for the suggestion! I built it this way mainly because I wanted to explore what can be achieved with closed-loop motor control, which I can also reuse in other robotics projects. This was more of a study project in that sense, but I appreciate your feedback.

  Are you sure? yes | no

Does this project spark your interest?

Become a member to follow this project and never miss any updates