Blockly RC Car for Programming

by VadymOstanin in Circuits > Arduino

66 Views, 1 Favorites, 0 Comments

Blockly RC Car for Programming

ezgif-764960e0a93bd3.gif

In this Instructable I will add Google Blockly programming functionality to RC 8 wheels stunt car that I gave to my son at Birthday.

I started to write the instruction after I finished the project, so the initial disassembled RC controller' photos already include final electronics.

Supplies

Supplies.png

These are the list of materials that are needed to make this project:

- RC car - 1 piece, but it won't be changed

- RC controller - 1 piece

- ESP32 Lolin S2 Mini - 1 piece

- resistors 500 - 2000 Om, 1kOm is fine - 6 pieces

- optocoupler PC817 - 6 pieces

- Boost converter Li-ion 3.7V to 5V - 1 piece

- Button with fixation - 1 piece

- Wire 0.2 mm, about 2.5 meters

- 18650 accumulator - 1 piece

- Case for 18650 accumulator - 1 piece

RC Disassembling

IMG_20250905_173559.jpg
IMG_20250905_173643.jpg

Unscrew the bolts and open the cover

RC Soldering Electronics

RC_controller_schema.png
drawing.png
IMG_20250905_174134.jpg
IMG_20250905_174316.jpg
IMG_20250905_174107.jpg

I found six buttons and it's soldered points.

Then:

  1. I cutted and tinned 6 * 4 = 24 pieces of 0.2mm thickess wires with length dependant on length from button soldered points to Lilo S2 Mini pins, from 5 cm up to 10 cm.
  2. Soldered resistor to input PIN 1 of each optocouple, and all wires to each optocouple
  3. I did not solder resistor to output PINs 3 or 4 of optocouple, beause RC controller already limit current, otherwise pressed buttons would fry RC controller.

RC Soldering Power

IMG_20250905_174145.jpg
IMG_20250907_113929.jpg
IMG_20250905_174134_2.jpg

I attached 18650 case and passed power wires through the holes and twisted around inner plastic guides for fixation and glued by hot glue.

Then:

- I glued power button to place of fake antenna.

- I soldered boost converter to button and to ESP32 VBUS/GND pins

Arduino IDE Preparation

Clone sources https://github.com/vadimostanin/BlocklyRCCar

Steps for preparing Arduino IDE:

- Install Arduino IDE 2.3.X

- Install ESP board:

  1. "esp32" by Espressif Systems, version 3.0.0

3.0.0 works fine, but 3.1.0-3.3.0 have DHCP issue with assigning IP to WiFi client while connecting.

But maybe it's just my code issue.

- Install Arduino libraries:

  1. "ESP Async WebServer" by EP32Async, version 3.8.0
  2. ArduinoJson" by Benoit Blanchon, version 7.4.2

- Install tool for uploading HTML file to LittleFS/SPIFFS memory:

  1. According to the instruction https://randomnerdtutorials.com/arduino-ide-2-install-esp32-littlefs/:

Copy https://github.com/earlephilhower/arduino-littlefs-upload/releases/download/1.5.4/arduino-littlefs-upload-1.5.4.vsix or other newest to folder "<Windows_User>\.arduinoIDE\plugins\" and restart Arduino IDE 2.3.X

Flashing Firmware

  1. Plug-in Lolin S2 mini to PC USB port
  2. If Lolin S2 mini is not recognizable, then at the board press-hold "0" button, then press-release "RST" button, then release "0" button
  3. Select port
  4. Pressing "Upload" button will compile and upload firmware

Uploading HTML

Uploading_HTML.png

- Check that file "arduino-littlefs-upload-1.5.4.vsix" is present at folder "<Windows_User>\.arduinoIDE\plugins\" and Arduino IDE 2.3.X was restarted after copying, as specified at "Step 4: Arduino IDE preparation"

- Close "Serial monitor" as it will interfere process.

- Check Port, it should be the same value as during flashing.

- Press "Ctrl+Shift+P", and type "Upload LittleFS", press Enter

Process will fail and will switch port to another, select new port value and try again, now process should success.

Testing

Screenshot_20250907-155052.png
Screenshot_20250907-155028.png
  1. Insert 18650 to battery case
  2. Turn-on CAR
  3. Turn-on power button for ESP
  4. Connect Tablet or smartphone to WiFi AP "ESP32_Robot"
  5. Open web browser to URL "httpt://192.168.4.1", wait and reload page 1-2 times, it can lag due to HTML size.
  6. Make program and press "Send to ESP32"

Expected behaviour is that the car should move and follow the program.


Feel free to extend project.