This project is undergoing a huge change and will be updated with new information and code. The project is now being prepared for ScaniaHack 2025 and use the progress we made in 2024 as a starting point.
The old branches are still available and can be used for reference but the main branch will be uppdated and restructured.
The main branch is now protected and the only way to get changes in to it, is to make a pull-request from your own fork. I also removed the old access-rights to the repo but will add them again if needed.
The goal here is to make an 'autonomous' toy-monster-truck, using my own electronic design and software for the control system. To get a head-start I used a cheap radio-controlled toy-truck as a start and replaced the radio-control-pcb with my own designed control-system-pcb.
The 'brain' of the truck is an ESP32 and the sensors used are ultrasonic distance-sensors and acc/gyro/compass. This design was made to be simple and easy to both understand and replicate. I hope it will be a source of inspiration and give ideas for improvements.
-
Fork this repo from main and do your thing in this fork on your own github-account
-
When done, make a pull-request back to main and describe your changes in the pull-request
-
Try to keep one feature or bug-fix per pull-request to make the merging easier
-
If you have any questions or need help, just ask me by pm, email, IRL or in the pull-request and I will try to help you out.
Note: when working in vscode with platformio you need to open the \sw subfolder from where you have cloned the repo, and then you can work, build and download to esp from there.
All sections are undergoing a change and will be updated with new information and code.
-
doc: documentation and images,
-
A workdescription for the conversion
-
A proposal for how to setup the work at ScaniaHack
-
-
hw: the toy-truck hardware including:
-
PCB layout and all the schematics in KiCAD format.
-
References to used components etc.
-
CAD models and 3d printables for some add-ons to the chassi.
-
-
sw: this is the VsCode project you should open in order to work with the software.
-
www: software for the backend web-server, like
-
post log script
-
view log script
-
It is possible to use my PCB-design for an other type of vehicle or use the schematics and build any other sort of control-board. The ESP32 is a very versatile microcontroller and can be used for many different applications.
-
To keep the ESP safe on the io-side I am using rechargable batteries summing up to 3.6 volts which works just fine, but with alkalines you will probably get like 4.6 or 4.7 volts with fresh batteries which might damage the ESP32 io. Don’t use those…
-
In the schematics I used a 1N4148 diode for reversed polarity protection but this was NOT a good choice. This can be left out completely or replaced by a schottky type of diode with a low voltage-drop.
-
Connecting and downloading to the ESP might be a nightmare some times. Usually it goes well but when it starts to bug it can go on forever. However, you are not alone, google will help out when you search for your error message. Sometimes it works better if you power the pcb from the usb-port using a 3.3V type of FTD like FTDI1232 set to 3.3V. In this case the power from the batteries needs to be off or you might destroy the circuit. Allways leave battery-power off when using power from the programming interface.