logo

flickr.com
Bluetooth Robot (work in progress)

Who doesn't want to build a robot?

I studied A-Level Electronics and have done a lot of reading in the area of embedded systems and digital electronics, so it is only natural to want to built a man-crushing robot. Having started at IBM (having more free time than at Uni), and having found a flat-mate with LEGO(!), it strikes me that the time has come to make a start.

Features

So what can Rusty do I hear you say... (his name is Rusty by the way). Well, he is controlled via my Via Eden server running linux. On this machine is a Bluetooth, MQTT adapter program I've written in C using the BlueZ stack which MQTT enables the robot. This is a publish and subscribe messaging mechanism, allowing Rusty to 'subscribe' to be controlled and 'publish' to notify. Using the internet, any kind of application can check on Rusty's status and issue commands. At the moment, I have written a web applet, and a program for my phone. A web camera server allows me to see whats happening whilst I'm at the office (or in the middle of a field on my phone). Basic control includes moving him arround, toggling LED's, and reading the amount of light in the room (riviting I know)!

Rusty also supports wireless firmware flashing, and until I ran out of room on the prototyping breadboard he also could act as a wireless IR receiver / decoder.

I have high ambition for Rusty... Wireless mini-cameras are on order, and I'm looking out for some cheap(ish) angular rate accelerometers to allow rusty to stand on his own two feet (or two-wheels, segway style). I also have an ultrasonic transmit receive pair ready to be attatched when I find some time

Once Rusty has enough hardware for sensing his environment, I also hope to make him semi-autonomous. Rusty is only running a 20Mhz processor which helps make him so compact, so the plan is to let rusty take care of critical real-time problems, and let my server worry about higher-level decisions through off-board programming via bluetooth. I guess we'll see how all this goes soon...

Main Parts

  • Microchip PIC16F877
  • BlueStamp BR-SC11A Class 1
  • Voltage Regulator - 5v and 3.3v

The Bluetooth chip came from Spark Fun who take the surface mount Bluetooth chip, and place it onto a DIL package for prototyping.

Details

The Bluetooth chip has an onboard UART which can easily be connected to your standard PIC microprocessor. You can then use standard AT commands to establish a SPP link.

I programmed the PIC16F877 in ASM, which is pretty simple. The complete specification for the chip family is relative small and easy to read. C compilers exist, but add their own complexities.

Client side, is a mish-mash of C, C++ and Java (Both J2ME and J2SE). Communication is primerily MQTT over TCP/IP and then the bluetooth software making use of the BlueZ linux stack.

UPDATE: Download the PIC Source

The PC side source is probably now a little defunct, but maybe you could find something useful in the PIC Source.

ASM Source Code for PIC16F877 Robot

ASM Source Code for PIC16F877 Firmware Flash inc

googlewave.com!w+h0cGV7DCM

Shoutback

by Steven Lovegrove Jump to top