One day I saw a clip of a woman in China livestreaming herself driving an FPV RC crawler controlled with cellular data so she has unlimited control range, I knew I had to make one for myself. They sell kits of FPV RC cars but they are expensive $$$, I managed to make one for under $150.
How toOpen up the RC car and unplug the control board so we can replace it with an ESP-32. Get a perf board, some male pin headers and a soldering iron.
Connections:
Brushed motor ESC +5V -> ESP-32 +5V (input) pin -> servo +5V
Brushed motor ESC GND -> ESP-32 GND -> servo GND
ESP-32 GPIO 4 -> servo pwm
ESP-32 GPIO 1 -> ESC pwm
The ESC will provide the ESP-32 with +5V from the RC battery.
Grab the code from https://github.com/alexchang0229/budget-fpv-car . I used Electron JS to build a websocket server that'll control the car. To run the server you'll need to install Node JS, then go into /Server and run
npm install
then
npm start
You'll see the control panel with Hello World! (don't @me, it's my first Electron app)
In /TruckScript, create a file called config.h and copy the format found in the example config.h file, update the fields to match your network and computer IP address. Using the Arduino IDE, compile and upload the script to the ESP32. The ESP-32 should connect to WiFi and connect to the Electron websocket server and you'll see the text change to 'Connected'. You can use the arrow keys as inputs to drive the RC car around but I'd recommend a gamepad for the full experience.
If you have a steering wheel or gamepad, head over to https://hardwaretester.com/gamepad to find out the mappings, and you can update the /Server/preload.js file to match your gamepad.
For the FPV portion, I 3D printed an enclosure for my phone and stuck it on the truck bed. Open up https://vdo.ninja/ on your computer and create a room, then join it from your phone, now you'll have a live stream to control the RC car from.
If you want to drive outside of your home WiFi range, open your modem control page and forward port 8000 on your computer. Open up a hotspot on your phone and update the ESP-32 configs to connect to your phone's WiFi, also update it to connect to your external IP. Now you can drive as far as you want! (A chaperon is highly recommended for outdoor excursions to save you from potholes and curbs)
Comments