My progress so far: Bought a small 1/24 scale RC from China. A bounch of sensors and of course a bunch of Maple Minis (so far i killed two of them). Designed a circuit and PCB in Kicad, along with the sensor array. I bought a cheap stepper motor driver from China, it's not the best design Ive seen but it allows for a lot more current than a regular L298N. It looks like this without the shell of the car:
It does actually drive pretty well using minimum viable code:
This saturday I worked more with the code, reusing a FSM (finite state machine) I use with my minisumos (a different kind of robot), and a PID-controller. It runs pretty good. Lets say it crashes into the wall just to show that the FSM is working Still a long way to go.
It seems to run perfectly fine even though the use of several doubles (which btw are 8 byte each on the Maple Mini). The sensors are polled every 30 ms, which may seem slow and I will try a shorter interval between the polls.
What needs to be done: * Tuning the PID * Serial protocol for Bluetooth communication, to make the PID tuning easier. * EEPROM read/write/update. I put an EEPROM chip on the board which the Maple Mini communicates with on the I2C bus. * Higher capacity battery.
What could be done: * Custom wheels and tires. For lower CG and better traction.
Did some more work on the steering this afternoon.
The Maple can handle a lot of computing! I included a secondary PID to adjust the speed, along with filters for all 7 sensors. Adjusted the gains for the steering PID, it's finally satisfactory. In the video the robot runs for 2 minutes and some seconds, I counted to 37 laps. Thats 10 more than sunday.
Next big step is to get the speed PID running good. Then comes object avoidance. Still a long way to go.
Its best not to use the onboard regulator to run too many other things, as often the regulators are not good quality.
I know a lot of people have blown up the regulator on other STM32 boards (like the Blue Pill board), but those boards have very cheap components and the USB connectors often break as well.
Some of the Maple mini's on eBay and AliExpress are factory rejects from the original manufacturer (who is called "Baite") I think if you buy direct from Baite's store on AliExpress the boards are usually OK as they are not rejects that someone else has tried to fix and then resell.