Wednesday, 7 May 2014

My Rover

I know I haven’t written anything about electronics or robotics recently, but I am about to get back into it. Over the past few weeks I have been working out how to interface an Arduino microcontroller with a Windows PC. This is basically so I can control things directly from a panel or button on my computer desktop such as a robot arm, buzzer or rover.

This is surprisingly easy to do once you know how. It took me so long to work it all out because virtually every tutorial on the Internet assumes you have certain knowledge. Like you are supposed to know A before learning about B, but if you don’t know A it is going to be very difficult to understand B.

We have a crap load of electronic crap around our place specifically old radio control cars with old tyres, batteries and other assorted RC stuff. It would be great if I could use some of that gear to experiment with robotics.

I also wanted to learn the programming language C sharp (C#) and the .NET framework as I had heard good things about it. So I started learning a bit about C# and it was just as awesome as the reports said it was. The best thing about this language is it is very similar to its relatives C, C ++, Java and PHP. It is also backed by Microsoft and an absolute ton of developers and programmers, so there is heaps of information about it online. Microsoft Visual Studio Express 2013 a free .NET development environment is very user friendly tool for creating applications. All this make it the perfect language for the home tinkerer.

Now all I had to do was combine my new knowledge with the resources at hand to create something really cool - a rover controlled by radio from the PC. I would also need to find a way to transmit serial signals wirelessly. An Arduino would replace the receiver inside one of my RC cars and the PC would act as the controller. The old speed controller and front servo would be connected to the Arduino. I was in luck because someone had written a Command Messenger Library for Arduino and .NET - it was specifically designed to do what I need.

After head-butting down a number of brick walls I started to have some serious success. I created what I call a virtual trackpad application that when coupled with the correct code on the Arduino side allows me to control servos with my mouse. Moving servos is one thing but a 10 year old RC car? Piss easy apparently. We just charged a battery, plugged the speed controller and the servo that turns the front wheels into the Arduino and it worked… backwards. The backwards thing was easily fixed with an addition of a single line of code.

The next stage was to get send serial signals wirelessly from the PC to the Arduino. I did a bit of research and found out that an XBee was the way to do this. So we dug around in our large pile of electronic crap and discovered two XBees. For some strange reason we couldn’t get them to work so after another frustrating day we worked out that we were using the wrong baud rate. The default rate is usually 9600 but in our case it was 57600. So if you think you have a bricked XBee try different baud rates.

The last step is to get a camera system that I can mount on the rover and send the video to the PC. It will be just like a racing game but awesomer!

This is the story of the project, but eventually I will be putting all the technical details in a number of future posts so anyone can duplicate what I have done.


  1. You can also connect a smartphone to the Arduino in your RC car. A lot of people have old smartphones or tablets lying around unused.
    This would give your RC car a lot of good robotic goodies: GPS, accelerometers, magnetic compass, fast & efficient CPU+GPU, camera, the camera's light, WIFI, bluetooth, big high-res display, etc.
    It's something i've been planning on mucking around with for a while now - my "eventual project".

    The phone/tablet can be connected to your Arduino via Bluetooth, or USB (if your phone is modern it may have host-mode USB support, but if not then you'll need a usb host Arduino shield for ~$15 on ebay).

    I'll be expecting your southern armies of robots to be encroaching into QLD within the next 6 months Chris :P

    - Jordan

  2. A lot of tutorials on robotics and the like are too complicated, especially for beginners who want to learn or start building their own device. It would be nice to have something that can be easily grasped by many. Anyway, I hope you'll be able to post all the technical process and details on this project soon. I for one am excited to read about it. Thank you for sharing!

    Kellie Taylor @ Aim Dynamics