DIY Two-Wheel Self-Balancing Robot from PVC Pipe: A Complete ESP32 + LoRa Build Guide

A self-taught builder creates a PVC-based self-balancing rover with ESP32, LoRa, and fully custom firmware.
A Reddit user documented their self-taught robotics journey, building a two-wheel self-balancing rover from PVC pipe and 3D-printed parts using an ESP32, BNO08x IMU, and SX1262 LoRa radio — plus a custom handheld controller with Hall effect joystick and gesture control. The project covers PID balancing, modular drivetrain design, telemetry feedback, and plans for V2 with either vision capabilities or off-road suspension.
In an era where open-source hardware and 3D printing are increasingly accessible, hobbyists are building impressive robots at remarkably low cost. Recently, a Reddit user shared a project he completed after months of self-taught robotics study: a two-wheel self-balancing rover built around PVC pipe, paired with a fully custom-built LoRa long-range remote controller. From mechanical structure to firmware code, nearly everything was designed from scratch — making it a rare and valuable real-world DIY robotics reference.

Proving That Low-Cost Materials Can Build Powerful Robots
What makes this project so compelling is the answer it gives to the question: "How capable can a robot built from cheap materials actually be?" The creator's starting point was simple: use a section of ordinary PVC pipe as the chassis for a two-wheel self-balancing platform, while designing as much of the hardware as possible from scratch.
The result is a machine where nearly every structural component was CAD-modeled and 3D printed. Around that PVC pipe, the builder assembled a remarkably complete system: a self-balancing two-wheel structure, long-range LoRa remote control, real-time telemetry data feedback, a custom handheld controller, fully custom drivetrain, traction system, and 3D-printed electronics mounts.
This combination of "cheap base materials + precision custom-printed parts" is a hallmark of modern maker culture — using engineering design to compensate for budget constraints. FDM 3D printing, popularized since the 2010s through the RepRap open-source project, has fundamentally transformed personal manufacturing. Common PLA filament costs roughly $15–25 per kilogram, and a moderately complex structural part often costs less than $1–2 to print, compared to tens or even hundreds of dollars for equivalent injection-molded or CNC-machined custom parts. Combined with free or low-cost CAD tools like Fusion 360 or FreeCAD, makers can truly practice "design is manufacturing."
Modular Drivetrain: Designed from Scratch, Not Bought Off the Shelf
Rather than purchasing ready-made wheels, the builder designed a complete modular traction system from the ground up — including drive rings, traction pads, wheel hubs, motor mounts, and internal support structures — all modeled and 3D printed.
While this approach significantly increased design and debugging effort, it gave the system exceptional customizability and maintainability. For anyone learning robot mechanical design, the experience of independently designing a drivetrain from scratch is far more educational than assembling a pre-built kit.
Hardware: The Proven ESP32 + LoRa Combination
The component list reveals a set of well-validated, budget-friendly choices popular in the maker community.
Rover Core Hardware
- Heltec ESP32 LoRa: Main controller with integrated Wi-Fi, Bluetooth, and LoRa
- BNO08x IMU: High-precision 9-axis attitude sensor — the heart of the self-balancing system
- TB6612 motor driver: Drives two DC motors
- SX1262 LoRa radio: Handles long-range communication
- WS2812 LEDs: RGB status indicators
- 2S LiPo battery + buck converter
- Dual geared DC motors
The ESP32 is a 32-bit dual-core microcontroller from Espressif with integrated Wi-Fi and Bluetooth, running at up to 240MHz, with rich peripheral support including GPIO, SPI, I2C, and UART — all at a remarkably low price (typically a few dollars). The Heltec ESP32 LoRa development board integrates an SX1262 LoRa RF module and a small OLED display alongside the ESP32, allowing a single board to handle main control logic, wireless communication, and status display simultaneously. This greatly simplifies prototyping and has made it a popular choice for wireless control nodes in the maker community.
The SX1262 is Semtech's second-generation LoRa chip, based on Chirp Spread Spectrum (CSS) modulation technology, which spreads the signal across a wider bandwidth to significantly improve interference resistance and transmission range. Compared to the earlier SX127x series, the SX1262 offers increased transmit power of +22dBm and a receive sensitivity of -148dBm, enabling communication distances of several kilometers in open environments — ideal for robots requiring long-range, low-latency control.
The BNO08x series (such as BNO085/BNO086) from Bosch is a highly integrated 9-axis inertial measurement unit featuring a three-axis accelerometer, three-axis gyroscope, and three-axis magnetometer, with an onboard ARM Cortex-M0+ coprocessor that directly outputs fused quaternion or Euler angle attitude data — significantly reducing the processing burden on the host MCU. Compared to the commonly used MPU6050 (six-axis only, no built-in fusion algorithm), the BNO08x can output attitude data at up to 1kHz with lower drift, making it an ideal choice for obtaining real-time tilt information in self-balancing robots.
Custom Handheld Controller
The controller side is equally well-equipped: a Heltec ESP32 LoRa as the main controller, a 1.5-inch RGB OLED display, a built-in OLED, an MPU6050 IMU, a Hall effect joystick, a rotary encoder, and a 2S battery.
The joystick choice is worth noting. Traditional RC joysticks typically use potentiometers (resistive), which change a voltage divider output via sliding contacts to indicate position. This approach is inexpensive but subject to contact wear over time, leading to "drift" — where the joystick outputs a non-zero value after returning to center — a serious flaw in precision control scenarios. The Hall effect joystick chosen here detects position through magnetic field changes, with no physical contact, no wear, longer service life, and higher accuracy. This type of joystick is more commonly found in competitive FPV drones or industrial remote controls, and is relatively rare in DIY projects.
Also noteworthy is the dual OLED display design and the IMU-based gesture control — users can tilt the handheld controller to steer the rover, while still having access to traditional joystick and rotary encoder inputs. This multi-modal interaction design is uncommon in DIY projects and reflects the builder's deep thinking about human-machine interaction.
Software: Arduino Firmware Written from Scratch
All software is written on the Arduino platform, and the builder explicitly states it is custom firmware — not a port of existing libraries. Currently implemented features include:
- PID balance control: The core algorithm for self-balancing
- Heading hold: Maintains straight-line driving stability
- LoRa communication: Remote command transmission
- Telemetry data feedback: Real-time status monitoring
- Battery level monitoring and RSSI signal strength display
- OLED user interface
- Gesture control mode
- Adjustable parameter tuning
PID balancing is the unavoidable technical challenge in any two-wheel self-balancing robot. Physically, a two-wheel self-balancing robot is equivalent to the classic "Inverted Pendulum" control problem — an inherently unstable system that will inevitably fall over without continuous active control. The core of self-balancing is closed-loop control: the IMU continuously reads the body tilt angle, and the PID controller uses the error (difference between the current angle and the target upright angle), error integral, and error derivative to compute and output a motor drive signal in real time, accelerating the wheels toward the direction of tipping to counteract the gravitational torque. The control loop frequency typically needs to be maintained above 100Hz to ensure timely response. Tuning the three PID parameters (Kp, Ki, Kd) is the most time-consuming part of practical debugging — even a slight parameter deviation can cause oscillation or tipping — which is exactly why the builder made "adjustable parameter tuning" a core firmware feature.
Furthermore, displaying telemetry information such as RSSI signal strength and battery level on the controller's OLED screen reflects complete system-level engineering thinking. This is no longer just a toy that can move; it's a complete remote control system with state awareness.
V2 Direction: Two Evolutionary Paths to Choose From
After V1 was running stably, the builder asked the community for input on next steps. Two paths were on the table:
Option 1: Perception and Vision Upgrade Add a pan/tilt turret with an ESP32 camera, laser module, and target tracking capabilities. This path evolves the robot from "can drive" to "can see and track," and is well-suited for developers interested in computer vision and embedded AI.
Option 2: Mechanical Platform Redesign Scrapping the existing chassis and rebuilding V2 from scratch with independent cantilever suspension, larger wheels, and a more powerful drivetrain for significantly improved off-road capability and payload. Independent suspension means each wheel has its own independent suspension mechanism, allowing each wheel to respond individually to terrain changes and maintain continuous ground contact — greatly improving traction and handling on unpaved surfaces. NASA's Mars rovers use the Rocker-Bogie suspension system as the ultimate expression of this concept. Introducing independent suspension would evolve the robot from a smooth-surface demo platform into a capable off-road field rover, with a significant increase in mechanical design complexity.
These two directions represent two classic evolutionary paths in robot development: one extending toward intelligent perception, the other deepening mechanical performance. For learners, the first path opens doors to computer vision and embedded AI, while the second strengthens mechanical design and motion control fundamentals — each with its own distinct value.
Final Thoughts: The Real Value of DIY Robotics
The significance of this project lies not in how advanced it is, but in how it completely documents how a self-taught builder — in just a few months — independently worked through an entire robotics system pipeline: mechanical design, 3D printing, circuit assembly, and firmware development.
In an age where ready-made kits are readily available, choosing to build from a PVC pipe and a pile of self-designed printed parts is itself a rare learning mindset. It proves that what truly limits makers is never the budget, but imagination and hands-on capability. For anyone looking to get started in robot development, learn ESP32 applications, or put PID control into practice, this kind of project is an invaluable real-world blueprint.
Related articles

The Truth Behind Codex 'Build a Website in 5 Minutes': AI Isn't Creating Sites—It's Helping You Copy Them
Exposing the truth behind viral Codex 5-minute website videos: creators aren't building original sites with AI—they're copying shared prompts or scraping others' work. Learn AI coding tools' real limits.

Getting Started with AI Agent Development: A Complete Guide from Concept to Practice
A comprehensive guide to AI Agent architecture and development, covering automated marketing, intelligent customer service, and investment analysis scenarios with single and multi-agent collaboration.

The Truth Behind Codex 'Build a Website in 5 Minutes': AI Isn't Creating Sites — It's Helping You Copy Them
Exposing the truth behind viral Codex 5-minute website videos: creators aren't building original sites with AI — they're copying shared prompts or scraping others' work.