SummaryThis project is all about creating an autonomous model car that can drive around a track totally on its own. It will be my entry in the Folkrace category at the Stockholm Robot Championship in Sweden in November 2016. The cars are not allowed to be remotely controlled, and all sensors and computing needs to be done onboard. Four cars can compete at the same time on the track, and the goal is to complete as many laps as possible in a set amount of time. This video shows the final race at a previous competition.
The car I'm building consists of an off-the-shelf RC car, which I'm going to totally pull apart and just use the base as my platform. All the electronics will be replaced with my custom circuit board, and all the logic will be programmed into an onboard Teensy. The goal of the project is to enter the car into the competition, and have it perform optimally. As few crashes as possible, with as high a speed as I can get it to go. It will use IR sensors and an IMU to detect where it must drive, and a PID controller for smooth steering.
With the recent popularity of self driving cars, like the Tesla and Google Car, there will be an increased need for engineers interested in these kind of challenges. Joining these type of robotic racing competitions, using fairly cheap hardware and self-written software, will hopefully help recruiting new students to the field, and result in safer and better cars in the future.
For myself, I want to increase my mechanical skills, improve on physics and math, and learn to do laser cutting. On the electronics side I've got a real thing for making things neat and compact. I like to use SMD components, and want to become better at making compact designs and better at soldering SMD components. On the software side I want to improve my Arduino-C skills.
I've bought a Losi 1/24 Rally car, and I'm going to rip out all the electronics, and just keep the wheels, gear, driveshaft and chassis. Most of the other parts will be removed or replaced.
The motor on the original Losi car is replaced by a brushless motor. The one I'm currenly aiming for has a fairly low KV value, about 4000KV, which means that the car is slower but stronger. It is controlled by an electronic speed control from HobbyKing.
The original Losi comes with a four-pin steering servo. For easier control from Arduino I've bought a replacement servo, (partno LOSB0814) also from Losi, which has the more familiar three-pin connector. This allows me to control the steering using regular PWM signal.
Encoder on driveshaft
In an attempt to monitor the current speed I'm adding a phototransistor on the driveshaft, and use it to detect how many times pr second the wheels are turning, and from that I get the speed of the car.
The electronics in the original car is all removed. Absolutely all of it. Instead I'm adding my own custom PCB, and IR sensors for detecting the walls of the racing track.
The PCB has a Teensy 3.2 at the center. It is the brain of the car. Currenly I'm using a stock Teensy which fits into some female headers, but later I'm considering replacing this by incorporating the Teensy components directly into my PCB.
The IR sensors used to sense the walls are GP2Y0E02B digital sensors, which use I2C. They can sense objects from 4 to 50 cm away. I've put eight connectors on the PCB for the IR sensors. Since the sensors all share the same I2C addrecss I've also included an TCA9548ARGER, which is an I2C multiplexer. From the Arduino code I tell the mux which sensor I want to talk to, and then query the sensor.
Power to the board comes via an Electronic Speed Control, a XC-10A ESC from HobbyKing. A 7.4V LiPo battery is connected to the ESC, and then it supplies my PCB with regulated 5V. The ESC is capable of 1A, which should be more than enough.
Wireless communication for debugging
During the competition the car needs to be totally autonomous. The cars are started with one common startmodule,...Read more »