Building an Autonomous Vehicle: The Batmobile
The control electronics are complex. We had a total of seven microcontrollers on this beast, plus three used in the distance sensors for a total of 216 bits of processing power. The system operated on an I2C bus with the brain sending commands to the locomotion controller and LCD and receiving data from the sensors.
For a previous 2010 AVC entry, I did everything on a single microcontroller. This made coding and debugging a challenge. On our 2016 entry, we focused each sub-system to do one thing very well.
The subsystems are broken down as follows:
- Brain Controller: A SAMD21 Mini was used to communicate with and process all the data from the distance sensors, GPS and compass, and to send out commands to control throttle and steering. It monitored a start switch and relayed debug information to an LCD.
- Locomotion Controller: An Arduino Pro Mini read the throttle, steering position, brake switch and autonomous rocket switch. It controlled motor speed and the linear actuator for steering.
- Wireless Kill Switch: An Arduino Pro Mini lived in the wireless kill switch, a requirement for the autonomous part of our Batmobile. To learn more about the wireless controller, check out our tutorial on how to build a wireless kill switch.
- A dedicated Arduino Pro Mini controlled the relays for the wireless kill switch system.
- Debug LCD: We counted our LCD screen as a microcontroller since it has an Arduino in it.
- Sensor Combinator: A SAMD21 Mini polled the serial GPS and I2C compass.
- Laser Controller: A SAMD21 Mini controlled the three serial-based laser distance sensors, combined the relevant information and responded to requests from the Brain.
- Three STM32s were the brains within the laser distance sensors.
Interested in learning more about distance sensing?
Learn all about the different technologies distance sensors use and which products would work best for you next project.Take me there!