A PIC-Based Scripted Robot System

The last time I used the aforementioned scripting framework was in the robot system described here. It was intended for a spherical robot, however, I also used an old RC truck chassis for testing. It was fairly generic—there wasn’t anything specific to spherical robots in the board design or programming, with the exception of the size and shape of the board which was made to fit in the sphere shell.

The Board

My embedded robot control board.

My embedded robot control board.

This robot used an 8-bit microcontroller (uC) based board that I hacked together. All of the robot code, including comms, the script engine, sensor interaction, and motor control ran on the uC. There was no in circuit debugging / programming; I used a separate device programmer (specifically, the EPIC Plus Pocket PIC Programmer with the 40/28 pin ZIF adapter). The uC I used was a Microchip PIC18LF458.

The main components of the board are:

  • computer (the PIC uC)
  • oscillator (clock for the uC)
  • H-bridge (for controlling motors with PWM)
  • comms interface
  • voltage regulator

The H-Bridge was an SN754410. I had planned on controlling three motors, which would require two of the H-bridge ICs, but as you can see the final board only had one H-bridge chip and only controlled two motors. The oscillator was a CRY 20 MHz crystal. The comms interface  was a simple circuit to connect the wireless transceiver to the PIC’s RX and TX pins using resistors. The voltage regulator was an LM317. I’m looking over the documentation from 2004 and I don’t see a single final schematic for the whole board, just sub-module schematics, mostly hand written in my notebook.

The board is about 10 cm x 10 cm (not including the transceiver, which is the metal rectangular box in the photo). I was powering the system off of two 9V batteries (one for the uC and one for the motors).

In case you were curious, here’s a photo I just took (in 2013) of the bottom of the board. The yellow stuff is double-stick tape (I think it’s been changing color since 2004). The wood pieces are from a clothespin. The red button is the uC reset button.

The back of my robot control board.

The bottom of the board.

The Breadboard

Breadboards allow you to hack on circuits quickly and without soldering. Before soldering together the board shown above, I did initial testing for this project on a breadboard and used an ICL232 chip (RS-232 transmitter/receiver) to do direct serial comms.

breadboard using serial cable for comms

breadboard using serial cable for comms (photo taken 2013)

breadboard with wireless comms

breadboard with wireless comms (photo taken 2004)

After that I soldered together the actual board, and got wireless comms to work successfully as well. From the photo above, it would appear I also tested wireless on the breadboard (which probably involved circumventing the RS-232 part).

The truck chassis was originally a RadioShack Black Phantom II. It has a drive motor and a steering servo motor.

my robot truck

the board and radio on the truck chassis (photo taken 2005)


For wireless, I used Cirronet WIT2410 2.4 GHz frequency hopping spread spectrum serial transceiver modules (Cirronet doesn’t exist anymore; it was apparently bought out by RFM). The WIT2410 module is that metal rectangular box in the photos above. The antenna is the little tan rectangular object on the edge of it.

I also had the packaged version of those (model HN-510) used for testing.

Packaged wireless serial transceiver.

Packaged wireless serial transceiver.

Eventually I had the Cirronet SNAP 2410 running as the base station. The SNAP 2410 is an access point that interfaces Ethernet to wireless serial. The base station is what’s connected to the operator’s computer. In the GitHub repo you’ll notice there’s a TCP server—that was thrown together for initial testing of comms interfaces: PC <-> SNAP 2410 <-> 2410 radio modem.

Ethernet access point connected to operator station laptop

Ethernet access point connected to operator station laptop (crappy photo from 2004).

Human-Robot Interaction

operator station screenshot

operator station screenshot

The operator interface was a GTK GUI which I ran on a PC. It moved the map concept (shown in the previous blog post) to a tab, and included other tabs for the programmer (me) to make new scripts or control the robot in Immediate mode. My sketches imagined extending this to have multithreaded scripts, each with their own scrollable column in the Script tab.

operator station screenshot - Immediate Mode tab

operator station screenshot – Immediate Mode tab

Immediate mode means basically manual real time control of basic functions like movement (like an RC vehicle). The cam tab, if it worked, would have shown video from the robot’s camera (video was transmitted through its own separate analog radio link and had to be redigitized with a video input box on the PC—not a recommended method).


As a poor undergraduate, one might wonder how I was acquiring hardware for making robots. And how was I able to afford to go to various conferences during the same time period? Well, by being crafty that’s how. For this robot, the PIC microcontrollers were free samples shipped free of charge from Microchip. I convinced Cirronet to donate the  transceiver equipment (the radios).  A lot of miscellaneous small parts like resisters and capacitors came from a Northeastern University lab that gave out small amounts of those kinds of components to engineering students. The truck chassis was donated by my fellow NU student Rob Borgeson. And I got $1000 by applying for a little-known NU Undergraduate research grant. I bucketed some of that for my senior project team (which was trying to make a spherical robot) for mechanical parts and used a large chunk of it to go to an SPIE conference where I presented a paper.

For more info:

Post to Twitter Post to Facebook Post to LinkedIn Post to Reddit Post to StumbleUpon

Tags: , , ,

Leave a Reply

You must be logged in to post a comment.