Build Your Own Self Racing Car

Tom Jacobs
Jul 28, 2017 · 4 min read

Following up from my post on Self Racing Cars, I thought I’d put together a guide on how to get started building your own Self Racing Racer. Let’s go!

Let’s Build One!

Step one. Buy these.

You’ll also need a computer and a microUSB cable.

Building the Self Racing Car

Get the Beagle Bone and plug the USB cable into your computer.

Next up, take a look at this 10 minute video, it’s pretty good. The Beagle Bone Blue is a little different from other boards, with no HDMI port. So, follow these commands using connmanctl to jump on your Wifi.

Now you’re on your Wifi, and you have a command line session going.

Now we could update our board from cloud9, but I did, and it broke cloud9, because cloud9 was upgraded and wasn’t restarted. So I recommend upgrading the board directly from SSH instead. Also from cloud9 everything gets cloned as root, and that’s no good, we want a real user to own things. So let’s do that. With the Beagle Bone plugged into your computer via USB, open up cmd or terminal on your computer, and do:

ssh debian@192.168.7.2
temppwd

sudo apt-get update

sudo apt-get upgrade

sudo reboot

If asked, you can select rc_blink if asked for a choice on startup. It’s fun. After that’s all done, let’s get installing the robotics library:

cd /home/debian

git clone https://github.com/StrawsonDesign/Robotics_Cape_Installer

cd Robotics_Cape_Installer

cd examples/rc_blink

make

./rc_blink

Now you’ll have a blinky Beagle Bone. That’s a good first step. First comes the blinking, then comes the racing.

Next up, I recommend installing my OpenRover software. It includes setup scripts for installing things like OpenCV and TensorFlow which we’ll need down the line.

cd /home/debian

git clone https://github.com/tjacobs/OpenRover

cd OpenRover

cd install

./install

That should install a few things needed for Python support, and take perhaps 30 minutes. It will also install auto-start of OpenRover.

Next up we’ll want the Beagle to be running on its own power supply. So plug in the lipo battery, and the 12V power supply. Be careful with running it on battery on its own— that little lipo won’t last too long, and when it’s down low enough to turn the board off, the battery may be so low it gets damaged. So charge the battery before running it on battery only by having the 12V plugged in, and just run it on battery when needed, for less than 30 minutes at a time. Run rc_check_battery to check the battery status — you don’t want each cell to be below 3.5V.

For untethered racing, unplug the USB cable. Now that you’re not connected via USB, you’ll need to SSH to it via the IP address that your Wifi network gives it, instead of the magic direct USB cable network. In my case, it is:

ssh debian@10.0.0.16

You can get LanScan to find its IP.

Next up, for a bit of a background in how to control the car, have a read through how to control the PWM outputs in Beagle Bone Blue, in either C:

Or in Python:

After installing OpenRover, you’ll find that “drive.py” will be running when the board starts up. Run:

ps aux | grep drive

to make sure it’s listed and running.

Now we’re running the software, let’s plug in some motors.

Back to the Hardware

While you’re putting the hardware together, have a go at 3D printing this. If you don’t happen to have a 3D printer lying around (who doesn’t these days, really), contact us and we can get you one printed. (The beagle base that is, not the 3D printer.)

Take the 3-pin white, red, and black jumper coming from the car’s speed controller. Now, it’s going to be outputting 5v along the red wire, so we’re going to have to do a classic ‘over the phone dangerous materials defusing situation here’… and you literally need to cut the red wire. (That’s the RED wire goddamnit!)

This is because it will be outputting 5v, but the Beagle will be outputting 6v to feed into the servos, at 4A, and these are going to conflict and cause all sorts of smokey problems. So as the speed controller already has its power, we’ll just cut that red line. See here for details.

Now it’s just ground and signal, plug it into the first PWM output on the Beagle (labelled “8 servo motor outputs”, 3-pin jumper set 1, on the side closest to middle of the board). Black wire is ground, labelled “—” on the board.

Then plug the car’s steering servo into the second PWM servo motor jumper set. Take the car’s battery and plug it into the car’s speed controller and clip it in its little holder space on the car.

Restart the Beagle Bone, turn on the ESC, and you’ll see the steering go straight forward, the ESC stop beeping. This means it’s ready to go!

The next post is about getting some camera action into the mix, so he sees the track and steers around it, and using the OpenRover software.

Sweet sweet steering

Australian Robotics Society

The Australian Robotics Society is a community of robot builders.

Tom Jacobs

Written by

Making robots.

Australian Robotics Society

The Australian Robotics Society is a community of robot builders.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade