

Electropneu
Control elements for pneumatic actuated soft robots. Including microcontroller controller firmware, controller PCBs, control board use guidelines and more.
- Size
- 100 × 100 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 29
- Nets
- 49
- Pads
- 114
- Tracks, vias
- 121, 0
- Pours
- 1
- Routed
- Yes
- KiCad
- KiCad 9.0 (file 20241229)
- Created
- 30 Nov 2025
- Updated
- 12 Oct 2026
Overview
Electropneu is an open-source printed circuit board by aldrick-t, from the aldrick-t/softrobot-electropneu-ctrlsys repository on GitHub, published under the Apache-2.0 licence. It is a 2-layer board of 100 × 100 mm with 29 parts on 49 nets, routed with 121 tracks and 0 vias.
It is built around the ADS1115 and LM7805. Its parts include 6 resistors, 6 connectors, 3 diodes, 2 capacitors and 2 switches. It belongs with the robots and motor control boards and the ESP32 boards of this library.
Main components
2ADS1115
UncategorisedTexas InstrumentsLM7805
TO-2630℃~+125℃ 1 1A 20V 2V 42uV 5V 62dB@(120Hz) 8mA Fixed Over Temperature Protection、Short Circuit Protection Positive TO-263 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSYONGYUTAIVoltage Regulators - Linear, Low Drop Out (LDO) Regulators
README
README.mdsoftrobot-electropneu-ctrlsys
Control elements for pneumatic actuated soft robots. Including microcontroller controller firmware, controller PCBs, control board use guidelines and more.
Closed-loop vacuum controller
This PlatformIO firmware regulates a negative-pressure pneumatic circuit with
an ESP32 DevKit V1, a vacuum-pump motor, a solenoid valve, an ADS1115 ADC, and
a 5 V XGZP6847A pressure sensor. It is set up for the installed
XGZP6847A100KPGPN variant: its nominal 0.5–4.5 V output represents −100 to
+100 kPa gauge pressure. The controller only commands negative pressure.
Hardware and signal path
| Function | Connection | Firmware behavior |
|---|---|---|
| Pump motor PWM | ESP32 GPIO 2 | 0 is off; 255 is full duty cycle. |
| Solenoid valve | ESP32 GPIO 5 | HIGH opens the pump-to-gripper path; LOW de-energizes the valve and vents the gripper. |
| Target-reached LED1 (green) | ESP32 GPIO 12 through 220 Ω to GND | On only when serial closed-loop pressure is within the configured deadband. |
| Active LED2 | ESP32 GPIO 13 through 220 Ω to GND | On when firmware commands nonzero pump PWM or energizes the valve. |
| Mode switch: manual full | ESP32 GPIO 26 with 1 kΩ pulldown | 3.3 V selects pump PWM 255 and valve open. |
| Mode switch: serial control | ESP32 GPIO 27 with 1 kΩ pulldown | 3.3 V enables serial closed-loop control. |
| ADS1115 SDA | ESP32 GPIO 21 through the 3.3 V/5 V I2C level shifter | Initialized with Wire.begin(21, 22). |
| ADS1115 SCL | ESP32 GPIO 22 through the 3.3 V/5 V I2C level shifter | Initialized with Wire.begin(21, 22). |
| XGZP6847A output | ADS1115 A0 | Read as a 5 V-domain analog signal; it never connects directly to the ESP32. |
The ADC uses its ±6.144 V range (GAIN_TWOTHIRDS), so the sensor's 0.5–4.5 V
signal cannot clip. After field zeroing, the nominal conversion is:
pressure_kPa = 50 × (sensor_volts − zero_volts)ZERO removes the atmospheric offset; it does not replace a calibrated span
check against a reference gauge.
Operation
With the pressure port open to atmosphere, first send:
ZEROThe controller turns both outputs off for one second, then averages 32 stable pressure samples. Do not obstruct the vent or run the pump while it calibrates.
After ZERO complete, send a negative gauge-pressure target as a bare number:
-20
-65.93The accepted range is −90 to 0 kPa. Values below −90 kPa clamp to −90; positive values clamp to zero and vent. Any zero representation stops control and vents:
0
0.0
-0.0Serial commands
| Command | Effect |
|---|---|
ZERO | In serial mode, vent, establish atmospheric offset, and permit negative targets. Required after every reboot. |
STATUS | Print controller state, mode, voltage, pressure, target, PWM, valve state, LED states, ADC address, calibration state, and tuning. |
STATUS_STREAM | Toggle continuous STATUS output at 20 Hz. Send STATUS_STREAM again to stop it. |
KP <value> | Set proportional gain in RAM; allowed range 0–50. |
KI <value> | Set integral gain in RAM; allowed range 0–20. |
KD <value> | Set derivative damping gain in RAM; allowed range 0–10. |
BAND <kPa> | Set deadband in RAM; allowed range 0.1–5 kPa. |
SAVE | Persist current validated tuning in ESP32 Preferences. |
DEFAULTS | Restore conservative default tuning in RAM; send SAVE to retain it after reboot. |
Malformed commands stop active control and vent as a precaution.
Controller behavior
The loop runs every 50 ms and averages four ADS1115 readings per update. PID control uses anti-windup, a filtered pressure-rate term, and a PWM slew limit.
- If pressure is not negative enough, the valve opens to the pump and PWM rises gradually.
- At or beyond the target deadband, the pump turns off while the valve remains on the pump-to-gripper path. The controller does not use the full-flow atmosphere vent as a corrective actuator.
- Passive venting (valve off) remains the safety/release path for
0, faults, malformed commands, andZERO.
This checkout's defaults are KP=18, KI=1, KD=0.3, and BAND=0.5 kPa.
Tune them on the real pump, tubing volume, valve flow, and gripper before
relying on them. In particular, confirm that valve-on/pump-off holds vacuum
without overheating a non-continuous-duty valve coil.
Switch modes and LEDs
The SPDT mode switch is the output authority. The firmware reads both switch inputs on every loop and accepts only these complementary states:
| GPIO 26 | GPIO 27 | Mode | Output behavior |
|---|---|---|---|
| HIGH | LOW | Manual full-drive | Pump PWM is 255 and the valve is energized, even if the ADS1115 is unavailable or faulted. Entering this mode cancels any serial target or calibration in progress. LED2 is on; LED1 is off. |
| LOW | HIGH | Serial closed-loop | The controller remains vented/idle until a new negative serial target is sent. Existing ADC, ZERO, target-range, and fault checks apply. |
| LOW | LOW | Safe off | Pump and valve are de-energized. |
| HIGH | HIGH | Safe off | Pump and valve are de-energized. |
Returning from manual full-drive to serial mode does not restore an earlier
target; send ZERO if needed, then a new negative target. In manual or
safe-off mode, ZERO and numeric target commands are rejected. STATUS,
tuning commands, SAVE, and DEFAULTS remain available.
LED1 is off while the controller ramps, vents, settles, calibrates, idles, is faulted, or is in manual/safe-off mode. LED2 represents commanded drive: it cannot prove that a disconnected, stalled, or failed motor/valve is drawing current because this board has no current-sense circuit.
ADS1115 ADDR override
For reliable normal operation, wire ADS1115 ADDR to GND and use I2C address
0x48. The ADS1115 samples this address-selection pin continuously, so a
floating pin is not dependable.
For initial bench testing, src/main.cpp includes:
const bool ALLOW_FLOATING_ADS1115_ADDR_FOR_TESTING = true;With this temporary toggle enabled, firmware first tries 0x48, then the
other legal ADS1115 addresses (0x49, 0x4A, 0x4B). It prints a warning if
the ADC is found away from 0x48; STATUS also reports ADS_ADDR. This only
accommodates an accidentally stable floating pin. After wiring ADDR → GND,
set this toggle to false and rebuild.
Installation and upload
-
Install PlatformIO for VS Code and open this repository as a PlatformIO project.
-
Confirm
platformio.initargetsesp32doit-devkit-v1. -
Build. PlatformIO installs
Adafruit ADS1X15automatically;Arduino,Wire, and ESP32Preferencesare framework libraries.sh pio run -
Connect the ESP32 by USB and upload:
sh pio run --target upload -
Open a serial monitor at 115200 baud with line ending set to
Newline:sh pio device monitor --baud 115200
Boot starts deliberately uncalibrated. The firmware leaves the pump and valve
off and rejects negative targets until ZERO succeeds.
Idle, off, and fault behavior
The firmware commands both motor and valve off electrically when it is idle or at atmospheric pressure:
setOutputs(PWM_OFF, false);
// pump: analogWrite(GPIO 2, 0)
// valve: analogWrite(GPIO 5, 0)This output path is used at boot, after 0, after a positive target clamps to
zero, after malformed input, during zeroing, on pressure/ADC faults, and for
invalid mode-switch states. The D26 manual-full mode is the explicit exception:
it deliberately drives both outputs even with a sensor fault. With the stated
plumbing, valve-off is also the pneumatic vent state; it does not attempt to
hold vacuum. Therefore the valve coil is not intentionally kept energized while
idle, avoiding prolonged activation and overheating.
This conclusion assumes a non-inverting valve driver where GPIO 5 HIGH energizes the coil, as defined by the original controller. Confirm that once with a multimeter or indicator LED before connecting a gripper.
First physical test
- Test with the gripper disconnected or a conservative vented fixture.
- Select serial mode (GPIO 27 HIGH) and send
STATUS; verifyMODE=SERIAL,PWM=0,VALVE=VENT,LED1=OFF,LED2=OFF, andZERO=REQUIRED. - Run
ZEROwith the port open to atmosphere. If possible, compare reported voltage with a multimeter at ADS1115 A0. - Start with
-5, then-10; verify motor PWM ramps rather than jumps, LED2 is on while the pump or valve is commanded, and LED1 turns on only after pressure reaches the configured deadband. - Send
0and verify both PWM outputs and both LEDs are off before longer tests. - Select manual full-drive (GPIO 26 HIGH) and verify
PWM=255,VALVE=OPEN, LED2 on, and LED1 off. Return to serial mode and verify it remains vented until a new negative target is sent. - Verify both-low and both-high switch input states keep both outputs and LEDs off.
- Tune one variable at a time and send
SAVEonly after physical validation.
Never treat the −90 kPa software clamp as proof that the gripper, tubing, fittings, or pump are safe at that pressure.
Parts
29| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | 1k | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R5, R6 |
| 2 | 220 | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal | R3, R4 |
| 2 | LED | LED_THT:LED_D5.0mm | D1, D2 |
| 2 | SW_SPDT | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | SW1, SW2 |
| 1 | 0.33uF | Capacitor_THT:C_Radial_D4.0mm_H5.0mm_P1.50mm | C1 |
| 1 | 100nF | Capacitor_THT:C_Rect_L11.0mm_W3.4mm_P10.00mm_MKT | C2 |
| 1 | 12V Terminal | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal | J6 |
| 1 | 12V_OUT_MOTOR | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal | J3 |
| 1 | 12V_OUT_VALVE | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal | J5 |
| 1 | 3v3-5v_Level_Shifter | CustomBoards:LevelShifter_3V3-5V | B3 |
| 1 | 5 | Resistor_THT:R_Axial_DIN0414_L11.9mm_D4.5mm_P15.24mm_Horizontal | R2 |
| 1 | 5k | Resistor_THT:R_Axial_DIN0414_L11.9mm_D4.5mm_P15.24mm_Horizontal | R1 |
| 1 | ADS1115 | CustomBoards:ADS1115 Board | B4 |
| 1 | Barrel_Jack_Switch | Connector_BarrelJack:BarrelJack_Horizontal | J1 |
| 1 | DC-DC Converter | CustomBoards:MP1584EN Board | B5 |
| 1 | D_Schottky | Diode_THT:D_DO-34_SOD68_P7.62mm_Horizontal | D3 |
| 1 | ESP32-DEVKIT-V1 | PCM_Espressif:ESP32-DEVKIT-V1 | B1 |
| 1 | LM7805 | Package_TO_SOT_THT:TO-220-3_Vertical | Q1 |
| 1 | PWM_OUT_MOTOR | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal | J2 |
| 1 | PWM_OUT_VALVE | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal | J4 |
| 1 | XGZP6847A | CustomBoards:XGZP6847A Sensor Board | B2 |
The 25 most common of 29 parts.
Similar boards
- 2 layers97 × 100.1 mm

- 2 layers168.9 × 123.3 mm

OEM ECU
aeonSolutions/AeonLabs-AI-Volvo-MKII-Open-Hardware
Volvo MKII Open Hardware
296 parts161CC0-1.0 - 2 layers94 × 79 mm

- 2 layers54.6 × 33 mm

JuntekOnSteroidsTTGO
rin67630/Drok-Juntek-on-steroids
Extend the possibilities of cheap digital power supplies with a WiFi module
35 parts62 - 2 layers155 × 70 mm

Payphone v1
sdylewski/Analog-Redial
A circuit board for old telephones to come back to life. Plug one or two phones in, and you can call the other phone, use bluetooth, connect to others via voip, and do a variety of other things with a plain old rotary…
137 parts46 - 2 layers32.4 × 33 mm

- 2 layers33.9 × 90 mm

BiasPro InputProtection v3
ToneAlchemy/BiasPro
A professional-grade, dual-probe Arduino Bias Meter for guitar tube amplifiers. Open source hardware & firmware
18 parts16MIT - 4 layers52.5 × 59.7 mm

ESPHome Indoor Multi Sensor
mikelawrence/esphome-indoor-multi-sensor-hardware
ESPHome Indoor Multi-Sensor hardware. This design supports Radar/PIR Presence, Temperature, Humidity, Pressure, Light, CO2, CO, VOC, NOX and PM sensors.
113 parts14CERN-OHL-P-2.0
Questions
How big is the Electropneu PCB?
It measures 100 × 100 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Electropneu use?
29 parts, built around the ADS1115 and LM7805. 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 Electropneu KiCad files?
From the aldrick-t/softrobot-electropneu-ctrlsys repository on GitHub, at the commit this page was made from: the board is electropneu/electropneu.kicad_pcb and its schematic electropneu/electropneu.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Electropneu design in my own project?
Its repository publishes it under the Apache-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).