RPi RC Car Part 1 - video


15 posts
by shaunuk » Sun Nov 04, 2012 8:55 pm
Hello All, First project, not sure if this has been done already - perhaps not like this exactly.

I've spent many years working in software so when I have a chance to play with hardware and linking in what I already know - i get exited - Im hoping to learn a little about robotics and have a bit of fun.

The plan is to make a simple module for an RC Car consisting of a raspberry Pi and a WiFi dongle.
From there you will be able to log onto it as a WiFi access point, launch a web browser and then use the gyro (if your phone supports it) or push buttons to control the car. Eventually to integrate a camera so you can drive the car from the screen. I may also have a go at a bluetooth version and 3G dongle version and perhaps a Wii controller. I want it to be simple and responsive and I think using a website to control the car should be simple and universal.

In this first video, after 30 minutes or plugging the SD Card in I have the servo and speed controller being controlled from the command line.

Im using the daughter board to make controlling the servos easy. Apparently use PWM or some timing to control the servos accurately is hard or impossible with out something in-between - i have seen people using arduinos and other boards - this wants to be simple. Im also not a hardware person so I brought this board in so I can concentrate on the software.

Big thanks to Mikael at Chroma electronics for soldering me up one of his awesome and simple servo boards: http://electronics.chroma.se/rpisb.php

Next update soon :-)

Video
http://youtu.be/FTGY3E4c4ZA

p.s. anyone know how to embed a youtube vid in a post ?
Posts: 7
Joined: Tue Jun 19, 2012 10:45 pm
by rickseiden » Sun Nov 04, 2012 9:40 pm
Pretty. Friggin'. Awesome!

Where'd you get the daughter board?
There are 10 types of people in this world. Those that understand binary, and those that don't.
Posts: 390
Joined: Thu Aug 02, 2012 12:21 pm
Location: Buffalo, NY, USA
by shaunuk » Mon Nov 05, 2012 8:35 am
http://electronics.chroma.se/rpisb.php


It's in the original post as well ;) - i think the guy has an ebay or paypal thing going.
Posts: 7
Joined: Tue Jun 19, 2012 10:45 pm
by aonsquared » Mon Nov 05, 2012 8:14 pm
We should start a Raspberry Pi car club! :D

Here's mine:

http://youtu.be/a234ivx7LDE ;)
Posts: 21
Joined: Sat Jan 28, 2012 6:40 pm
Location: Bristol, UK
by shaunuk » Mon Nov 05, 2012 8:54 pm
Cool. Your video is a tad more dramatic than mine ;)

I got the steering working from the gyro on the iPhone over wifi today. And powered the pi from the cars battery.

Hoping to get something good working by the weekend. Will do another vid with some music ;)
Posts: 7
Joined: Tue Jun 19, 2012 10:45 pm
by aonsquared » Mon Nov 05, 2012 9:06 pm
Haha yeah I get that a lot - most notably from a 9 year old who said "don't you think it's a little bit overdramatic?" :lol:

I kinda got carried away by iMovie trailer templates...
Posts: 21
Joined: Sat Jan 28, 2012 6:40 pm
Location: Bristol, UK
by MattHawkinsUK » Mon Nov 05, 2012 10:16 pm
I saw that Dark Pi video and remembered why I decided to become an engineer when I was a teenager ... rather than an accountant.

There are a few RC car projects but everyone's is different so it's always worth seeing what people are up to.

I keep expecting an aonsquared Pi powered drone to fly over my house as I live in "Dark Pi" country ...
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook and Twitter (@RPiSpy)
User avatar
Posts: 450
Joined: Tue Jan 10, 2012 8:48 pm
Location: UK
by rpi4ever » Wed Nov 14, 2012 8:07 am
Nice:)

I am looking to do a similar project also involving my arduino and camera. I want to hook it all up and create a web interface so people can control it over the web and see the cam. maybe even create a android app.

I will give it a bash and if successful and I have the cash try something similar with a quad copter.

I love the idea that a few others are doing it too and a club can form.

:)
Posts: 2
Joined: Fri Nov 09, 2012 5:43 am
by adentse » Fri Nov 16, 2012 12:21 am
Ah, cool you're actually using my servo-board! Are you still happy with it? :)

I would love to make an autonomous boat with it some day, when I get time, I live pretty close
to the second largest lake in Sweden, and my brother lives about 70km north, at the same lake.

So it would be reaaaaally cool to send a boat there by it self. But i doubt I can get batteries to last... Hmmm Solar cells are getting cheap and at summer that could work.... The project is in the queue.

// Mikael
Posts: 4
Joined: Thu Nov 15, 2012 11:33 pm
by shaunuk » Mon Dec 31, 2012 2:27 pm
adentse wrote:Ah, cool you're actually using my servo-board! Are you still happy with it? :)

I would love to make an autonomous boat with it some day, when I get time, I live pretty close
to the second largest lake in Sweden, and my brother lives about 70km north, at the same lake.

So it would be reaaaaally cool to send a boat there by it self. But i doubt I can get batteries to last... Hmmm Solar cells are getting cheap and at summer that could work.... The project is in the queue.

// Mikael


Im very happy with the Server Board - just had a few hours to do some more on it - will post shortly.
RC Boat would be cool, with a camera on it.

My eventual plan is to build a quad copter which can follow an object - so for instance, I can leave home when i trigger it remotely and then it can come and find me, perhaps filming some interesting stuff on the way. It should be able to find my phones GPS. Then if you ever get into trouble, load the app and press go for eye in the sky footage :)
Posts: 7
Joined: Tue Jun 19, 2012 10:45 pm
by shaunuk » Mon Dec 31, 2012 2:47 pm
Image
OK, sorry for taking so long.

New video here: http://www.youtube.com/watch?v=a6_O2T5SPBQ

So I turned up to the raspberry jam last month at Mozilla - London with the plan of showing a working RC Car - but. 4pm the same day the sd card died. No backup.
Grr

Anyway, not one to be defeated, downloaded the os again and imaged it to a new sd card, jumped on the 5pm train getting into London at 6 and spent a whole hour re-writing everything from scratch.
Image
Some how - kinda got it working - and a bit faster this time.

Image

Quite happy with the result after so little time. Video can be found here:

The next and final update will include streaming camera live from the car to controller device, Software safety controls for loss of signal and smoothing of inputs, switch to node.js and html5 web sockets for faster communication and maybe some twitter integration - but i don't know what for ;)

Then this project will be put to bed - will focus on quad copters for 2013 :-)
Posts: 7
Joined: Tue Jun 19, 2012 10:45 pm
by squareone » Fri Jan 25, 2013 5:24 pm
Very inspiring.
Any plan you will release the code and a step by step tutorial?
Thanks
Posts: 1
Joined: Fri Jan 25, 2013 5:22 pm
by mc5240 » Sat Jan 26, 2013 2:28 pm
Could you put a tutorial with parts list and code
thanks
Posts: 1
Joined: Sat Jan 26, 2013 2:05 pm
by lsdaniel01 » Thu May 23, 2013 12:05 am
Could you post or PM me the code/ the car you used? I have just started coding things and i am only 10 so, I would like to know the car you used, code for the webserver, and code for controlling the car. Thanks in advance! :D :idea: ;)
Posts: 1
Joined: Wed May 22, 2013 12:14 am
by shaunuk » Thu May 23, 2013 7:31 am
Only 10, thats good.


Ill try and put a tutorial together and put some code up on the net (or at least some well commented code) for people to have a go.

It now has a Camera and is pretty quick out in the open. Ill make a video to go with it.

FOr now you need to research nodejs with socket.io for speed.

I cant say i found it easy though first time i had a go !

Ill post back here when i have something more, could be a good few weeks though.
Posts: 7
Joined: Tue Jun 19, 2012 10:45 pm