Ghost Toddler: Esp32 Fpv Pan Tilt Power Wheels
About the project
I use an RC remote and receiver, an esp32, high-current motor drivers, servos, an FPV camera, and a little propane.
Project info
Difficulty: Moderate
Estimated time: 1 month
License: GNU General Public License, version 3 or later (GPL3+)
Items used in this project
Hardware components
View all
Story
An ESP32 is the brains. The ESP32 reads a serial stream with a 32-byte payload from an RC receiver (packaging is called "I-Bus"). The code interprets the payload into the 10 channels (e.g., joysticks and switches) from the transmitter. The ESP32 outputs to:
- Two BTS7960 DC motor drivers (wheels forward or reverse)
- One 35kg*cm servo (steering shaft pulley)
- Two 25kg*cm servos (skull pan and tilt servos)
- One 12V relay controlling a gas solenoid valve
- One 12V relay controlling a mini high-voltage transformer
I put an analog FPV camera in the right eye socket so I could look around with one joystick while I drove with the other joystick—kind of like the Legend of Zelda.
The end product: I made a radio-controlled power wheels that allowed me to FPV the experience of being the pediatric version of Ghost Rider, all accoutrements accounted for.
Details
This project happened on a dare. I just figured out how to receive/interpret/use the serial stream from an RC receiver on an ESP32 using the Arduino IDE. I was never really an RC person, but I was RC curious.
However, I had not yet completed two rites of passage for most maker-types:
- I had never built anything really robotic.
- I had never built anything seriously battery-powered.
Despite this lack of experience, I proclaimed on September 26 that I thought I could do this project and publish a video on it by Halloween.
You can read the instructions and follow along on my full build video as well:
Instructions
Interpreting an RC receiver serial payload
I saw how relatively inexpensive these transmitter/receiver bundles were and how much functionality was built into them, and I knew they worked at a longer range than Bluetooth and standard Wi-Fi. I had to experiment with one.
Instead of having a PWM line for each channel fed into the ESP32, this brand of remote has a thing called "I-Bus," which involves reading a serial stream of bytes from an RC receiver and turning that into meaningful information.
Luckily, I created a class for reading off a second UART stream to the ESP32. Here is the class:
Connect ESP32 to two BTS7960 motor drivers to control wheel DC motors
We are going to use some beefy but inexpensive motor drivers, one for each wheel. The BTS7960 is rated up to 43A, which is more than sufficient unless you live on a steep hill.
This code uses the MCPWM library to drive the BTS7960:
#include "driver/mcpwm.h" // MyMotor class for controlling the BTS7960 motor driver // (Include full code here)
Now that we have both the motor drivers and the steering servo controlled by the ESP32, we can do things like this:
Pan and Tilt Skull Servos
I made a custom mechanism for the pan and tilt functions of the skull.
Leave your feedback...