

Stone pcb v1
A collection of motor control implementations for the ESP32-S2 Mini with DRV8833 motor driver.
- Size
- 70.4 × 38.9 mm
- Copper layers
- 2
- Thickness
- 1.6 mm
- Parts
- 20
- Nets
- 28
- Pads
- 77
- Tracks, vias
- 102, 2
- Pours
- 1
- Routed
- Yes
- KiCad
- KiCad 9.0 (file 20241229)
- Created
- 5 Mar 2025
- Updated
- 23 May 2025
Overview
Stone pcb v1 is an open-source printed circuit board by prt-prt, from the prt-prt/esp32-MotorController repository on GitHub. It is a 2-layer board of 70.4 × 38.9 mm with 20 parts on 28 nets, routed with 102 tracks and 2 vias.
It is built around the DRV8833PW. Its parts include 8 connectors and 1 diode.
Main components
1README
README.mdESP32 Motor Controller
A collection of motor control implementations for the ESP32-S2 Mini with DRV8833 motor driver.
Version Overview
v1: Basic Test
- Simple motor test sequence
- Basic forward/backward/turn movements
- No fault detection
v2: Mode System
- Multiple movement modes (wander, rotate, test)
- Mode switching logic
- Basic error handling
v3: Power Management
- Improved power handling
- Speed ramping
- Basic fault detection
- Reduced motor speeds
v4: Organic Movement
- Slow, rock-like movement patterns
- Advanced fault detection
- PWM-based motor control
- Random movement generation
- Detailed debugging
v5: Simple Forward Test
- Continuous forward movement
- Basic PWM control
- Minimal code for testing
- No mode switching or complex logic
v6: All Directions Test
- Tests all motor directions sequentially
- Basic PWM control
- Auxiliary pin control (GPIO39)
- Cycle between directions automatically
Hardware
- ESP32-S2 Mini (Lolin)
- DRV8833 Motor Driver
- 2 DC Motors
- Power Supply (5V recommended)
Pin Configuration
- Motor A: GPIO11 (IN1), GPIO9 (IN2)
- Motor B: GPIO7 (IN1), GPIO5 (IN2)
- Fault Pin: GPIO12
- LED: GPIO15
Project Structure
This project is organized into two versions:
- v1: Uses the ESP32-CAM and L298N motor driver (older, traditional driver)
- v2: Uses the ESP32-S2 Mini and DRV8833 motor driver (more efficient, modern setup)
Each version contains its own complete implementation for its respective hardware. For detailed wiring and implementation specifics, see the WIRING.md file in each subproject folder.
Hardware Requirements
Common Components for Both Versions
- 2-wheel drive robot car chassis with DC motors
- Jumper wires
- Small breadboard (optional, for cleaner wiring)
Version Specific Components
-
v1:
- ESP32-CAM development board
- L298N dual H-bridge motor driver (detailed documentation)
- MP1584EN buck converter module (for power regulation)
- Power supply for motors (battery pack/power bank)
-
v2:
- Wemos ESP32-S2 Mini development board
- DRV8833 dual H-bridge motor driver (detailed documentation)
- 5V powerbank with USB output
- USB splitter/hub or adapter
- USB in-line power switch (for global power control)
- Step-up converter (boosts 5V from powerbank to 6V for motors)
Power Supply Architecture Differences
The v1 and v2 versions use different power supply approaches:
v1 Power Supply:
- Battery/power source → MP1584EN buck converter → ESP32-CAM (5V)
- Battery/power source → L298N motor driver (higher voltage)
v2 Power Supply:
- Powerbank USB output → Global power switch → USB splitter/hub
- First output: USB-C connection to ESP32-S2 Mini (direct connection)
- Second output: 5V to Step-up converter → DRV8833 motor driver (6V)
The v2 setup uses a true global power switch that controls the entire system with a single switch, turning both the microcontroller and motors on/off together.
Hardware Comparison
Microcontroller Comparison
| Feature | v1: ESP32-CAM | v2: ESP32-S2 Mini |
|---|---|---|
| USB Connection | External programmer required | Built-in USB-C port |
| Size | Larger | Compact |
| Power Input | 5V via pins | Direct USB-C |
| Programming | Via serial adapter | Native USB |
| Unnecessary Features | Camera module | None |
| Form Factor | Less robot-friendly | Ideal for robotics |
Motor Driver Comparison
| Feature | v1: L298N | v2: DRV8833 |
|---|---|---|
| Efficiency | ~70% | >90% |
| Control Pins | 6 total | 4 total |
| Heat Generation | High | Low |
| Size | Large | Compact |
| Control Method | Enable + Direction pins | PWM on all pins |
Power Control Comparison
| Feature | v1 Approach | v2 Approach |
|---|---|---|
| Power Switch | Controls motors only | True global control (entire system) |
| Power Source | Separate paths | Single source with distribution |
| Wiring Complexity | More complex | Simplified with USB connectivity |
| Development Mode | ESP32 always on | System fully controlled by one switch |
For detailed pin connections, wiring diagrams, and implementation specifics, see:
Software Setup
This project uses PlatformIO for development and deployment:
- Install Visual Studio Code
- Install the PlatformIO extension
- Clone or download this repository
- Open either the v1 or v2 project folder in VS Code
- Build and upload the project using PlatformIO
V2 Programming Advantage
The v2 version with ESP32-S2 Mini can be programmed directly via USB-C connection without additional hardware, making development and testing significantly easier. During development, you can disconnect the powerbank and connect the ESP32-S2 Mini directly to your computer.
Features
Movement Modes
The robot car supports three different movement modes:
- Test Mode: Demonstrates basic movements in a sequence
- Wander Mode: Robot randomly wanders with organic movements
- Rotate Mode: Robot slowly rotates around its axis
By default, the robot switches between Wander Mode and Rotate Mode every 30 seconds.
Basic Movement Functions
The code includes the following standard movement functions:
moveForward(speed): Moves the robot forwardmoveBackward(speed): Moves the robot backwardturnLeft(speed): Turns the robot leftturnRight(speed): Turns the robot rightstopMotors(): Stops all motor movement
Differential Steering
Advanced movement control is achieved through differential steering:
moveDifferential(leftSpeed, rightSpeed): Allows independent control of each wheelcurveLeft(leftSpeed, rightSpeed): Creates curved left movementcurveRight(leftSpeed, rightSpeed): Creates curved right movement
Speed Control
All movement functions support variable speed control through PWM, with speed values ranging from 0 (stop) to 255 (full speed).
Movement Modes in Detail
Test Mode
Cycles through a series of basic movements to test motor functionality:
- Forward → Stop → Backward → Stop → Left turn → Stop → Right turn → Stop
Wander Mode
Implements organic, randomized movement with varying speeds and paths:
- Straight forward movement
- Gentle left and right curves
- Sharp left and right curves
- 180° spin turns
- Backward movement
- Random stops
Rotate Mode
Performs a slow, controlled rotation around the robot's center:
- Rotates in a random direction (left or right)
- Changes direction every 10 seconds
- Uses reduced speed for careful rotation
Customization
You can customize the pin assignments at the beginning of the motor_control.cpp file if you need to use different GPIO pins on your microcontroller.
To implement additional movement modes or alter the existing ones, refer to the corresponding mode files in the src directory.
Troubleshooting
Basic troubleshooting tips are included in the WIRING.md file for each version:
Project Structure
For each version (v1 and v2):
platformio.ini: PlatformIO configurationWIRING.md: Detailed wiring and implementation documentationinclude/motor_control.h: Header file for motor control functionsinclude/movement_modes.h: Defines the movement modes enuminclude/test_mode.h: Header for test modeinclude/wander_mode.h: Header for wander modeinclude/rotate_mode.h: Header for rotate modesrc/motor_control.cpp: Motor control functions implementationsrc/main.cpp: Main program with setup, loop, and mode switching logicsrc/test_mode.cpp: Test mode implementationsrc/wander_mode.cpp: Wander mode implementation with organic movementsrc/rotate_mode.cpp: Rotate mode implementation
License
This project is open source and available under the MIT License.
Parts
20| Qty | Value | Footprint | References |
|---|---|---|---|
| 3 | R | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | 5.1k1, 5.1k2, R2 |
| 2 | S2-Mini | Connector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_Vertical | J6, J8 |
| 1 | Breakouts | Connector_PinSocket_2.54mm:PinSocket_1x07_P2.54mm_Vertical | J7 |
| 1 | Conn_01x02_Socket 5V & GND CAMLINE | Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_Vertical | J10 |
| 1 | Conn_01x02_Socket EXT_5V & GND | Connector_PinSocket_2.54mm:PinSocket_1x02_P2.54mm_Vertical | J9 |
| 1 | DRV8833 | Connector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_Vertical | J2 |
| 1 | LED | LED_THT:LED_D5.0mm | D1 |
| 1 | Switch1 | TestPoint:TestPoint_Pad_D2.0mm | TP7 |
| 1 | Switch2 | TestPoint:TestPoint_Pad_D2.0mm | TP8 |
| 1 | TP Ground | TestPoint:TestPoint_Pad_D2.0mm | TP5 |
| 1 | TP Motor1 | TestPoint:TestPoint_Pad_D2.0mm | TP1 |
| 1 | TP Motor2 | TestPoint:TestPoint_Pad_D2.0mm | TP2 |
| 1 | TP Motor3 | TestPoint:TestPoint_Pad_D2.0mm | TP3 |
| 1 | TP Motor4 | TestPoint:TestPoint_Pad_D2.0mm | TP4 |
| 1 | TP VBUS | TestPoint:TestPoint_Pad_D2.0mm | TP6 |
| 1 | USB_C_Receptacle_USB2.0_14P | Connector_USB:USB_C_Receptacle_HRO_TYPE-C-31-M-12 | J5 |
| 1 | ~ | Connector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_Vertical | J1 |
Questions
How big is the Stone pcb v1 PCB?
It measures 70.4 × 38.9 mm and has 2 copper layers, 1.6 mm thick.
What parts does the Stone pcb v1 use?
20 parts, built around the DRV8833PW. 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 Stone pcb v1 KiCad files?
From the prt-prt/esp32-MotorController repository on GitHub, at the commit this page was made from: the board is cad/stone_pcb_v1.kicad_pcb and its schematic cad/stone_pcb_v1.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Stone pcb v1 design in my own project?
Its repository states no licence, so its author keeps all rights: ask prt-prt before reusing the design.
Similar boards
- 2 layers110 × 110 mm

- 4 layers102 × 100 mm

Zelvicka
RoboticsBrno/Robutek
Robůtek je robotická platforma založená na čipu ESP32-S3. Je velice rozšitiřelný, ale ze základu umí jezdit, kreslit fixou, jezdit po čáře, pohybovat se bludištěm. Programování je přes Jaculus.
214 parts12 - 2 layers60 × 100 mm

- 2 layers91.9 × 67.1 mm

UpdatedPCB2024
CWRUbotix/Micromouse-2023-24
A fully autonomous maze-solving not-quite-mouse-sized robot.
31 parts6GPL-3.0 - 2 layers119.4 × 98.9 mm

PCB Pami
FIPATECH/CDFR26_PAMI
Open source firmware and PCB for a differential mobile robot (PAMI) based on ESP32-S3 - Coupe de France de Robotique
25 parts6 - 2 layers93.6 × 102.8 mm

Mote hardware
empriselab/mote
A low cost, high confidence mobile robot optimized for education.
75 parts5MIT - 2 layers104.1 × 76.2 mm

Biotracker tracks
interspecifics/ComunicacionesEspeculativas
Es un proyecto basado en una máquina que es capaz de observar y aprender de microorganismos para crear un score audiovisual a partir de los patrones que encuentre en su comportamiento.
16 parts4 - 2 layers71.5 × 48.3 mm

Esp32-2wd
nochkin/esp-line-follower
A simple educational project to build a line following 2WD robot
13 parts3MIT