Self-driving car

Full disclosure: This car is perhaps not quite as big as the car you envisioned when you read the headline.

img_8988 (1)


Zheng Wang from Bridgwater State University has used a Raspberry Pi and some other hardware to modify a remote-controlled (RC) car to follow a track, detect, understand and respond to stop signs and traffic lights, and to avoid collisions. Once scaled up and able to do parallel parking, you’ve got something that looks a bit like Google’s self-driving car project. (A bit.)

Here’s a rather neat technology demo.

So what’s happening here? The Pi is hooked up to a Raspberry Pi Camera Module and an ultrasonic sensor. Two client programs on the Pi are used to serve the information it gathers from those devices to another computer over WiFi, with streaming video. The RC controller for the car is given instructions by an Arduino which is hooked up to the computer doing the processing by USB.

Zheng has provided a very detailed writeup, which dives into the maths behind all of this, and provides a look at the neural network on the machine doing the processing.


Geometric model for detecting distance with monocular vision

Head over to his website to have a look – it’s a fascinating read. Thanks Zheng – drop us a line if you take this project any further!




karan avatar

Awesome!This is a great project.

Steve Foster avatar

Having seen some image processing running on a Pi, by way of face tracking, I was keen just to see what this project involved. Not only sign/light tracking but also recognising the colour of the light and keeping the car on track, What a great project.

Zeki avatar

Very cool

Alejandro Castillo avatar

Which programming language was used?

Autodidact avatar

Very cool! And the code is open-source on GitHub:

Marcos avatar

It would be cool if Quake is played in real life toys and Pi’s are used to control them.

Chandrashekhar avatar

Really awesome project. Keep it up.

tkoc avatar

A morning view of your project made my day. Thanks for sharing.

Muhammed avatar

Awesome!This is a verry good project.

Richard avatar

Love to see it with two cars and given free roam. Cops and robbers anyone? :)

Satyadev avatar

Awesome! I will give a try.

Sudheesh avatar

How does the car turn so smoothly? Do you control the front wheels of the car? If so, how ?

Gianfx avatar

Raspberry pi isn’t able to process opencv real time video flow (it takes a few second/vga image). I think video processing is provided by remote PC.

Enes Kemal avatar

That was exactly what I had in my mind. I was planning to to self driving taxi model using raspberry pi but I guess it is a little late for that :(

Raul S avatar

very interesting example and exactly what I was looking for to build, would it be possible to share documentation on how the raspberry got connected with the rc car?

Ink Factory avatar

Thanks for sharing – this is brilliant! We’re building one now.

@Raul S – I wondered the same, take a look at the write up on Zheng’s blog where he explains “The RC car used in this project has an on/off switch type controller. When a button is pressed, the resistance between the relevant chip pin and ground is zero. Thus, an Arduino board is used to simulate button-press actions.” there’s more info there..

Kenborne avatar


mahmod rafat avatar

thanks for amazing project but can any one help me how to make it auto parking car?
i think in GPS but i don’t know .
thanks .

Comments are closed