Palm Pilot Robot Software Utilities And Notes

By James Caple
Copyright © 2001, All Rights Reserved
Date: 10/30/01

Welcome to my burgeoning list of Palm Pilot Robot notes and software.

Waba Open Robot Framework (WORF)

WORF is a Waba framework making it somewhat easier to develop Palm Pilot Robot software applications. Grab the source code and examples from SourceForge.

PPRK Robot and Software Debugging Techniques

Here are some of my notes for debugging your PPRK hardware and software:

Hardware Debugging and Troubleshooting

It took me days to get my servo motors working. The main reason for this is because I built the PPRK from scratch using only the plans found at CMU's PPRK web site. The directions for wiring your serial cradle connection at the CMU web site seems to be for older versions of the Palm (if they're correct at all - I assume they are...), and I have a newer Palm V. Therefore, I had to do a little research to determine the correct wiring and color scheme. This website helped me a great deal in working out the correct wiring pinouts for my serial cable.


A great way to test your PPRK hardware is to buy a serial cable from RadioShack and connect your SV203 to your PC using this serial cable. You can then use a terminal emulation program to send commands to the SV203 board to see if any of your servos or IR sensors respond to your commands.

I'm a Linux user, so I fired-up minicom, set it to talk to my serial port (/dev/ttyS3), at 9600 N81. Typing ALT M causes the serial port initialization allowing minicom to talk over the serial port to the SV203 board. Then, after finally breaking down and looking at the SV203 manual, I figured out I could type

SV1 M50 
to make servo motor 1 move. Eureka!

Using minicom and a serial cable to connect my PC to my PPRK has proved very valuable in troubleshooting both hardware and software. Most recently, I've been troubleshooting my IR Sensors. By typing

AD1 
inside of minicom, you should get back a one, two, or three digit number. In total, you should get four bytes back from the board, the final byte being ASCII 13, or '\r'. The number received depends on how much voltage is on that port on your SV203 board. Of interest is the fact that regardless if an IR Sensor is on any of your AD ports or not, you will still get values back when polling it. Pontech tells me this is due to chip noise. Nevertheless, there is a notable difference in readings when an object comes close to the sensor eyes.

Another Note: Pontech sells several versions of their SV203 board. You only need the standard SV203 (the cheap(er) one); I thought some of my problems were due to not having the sexy SV203C, but robot's IR sensor should work fine with just the SV203.

IR Sensor Troubleshooting

Lately, this has been my area of focus. First of all, you need to determine if those little things are getting power. I discovered that if you power-up your board with the IR Sensor in question properly connected, and you turn off the lights, you should see one of the sensor eyes emitting a red glow ever so faintly. You really have to look and move the sensor around to see it. When I did see the light, this was a good indication that at least the sensor was getting juice. I then used my PC-to-PPRK serial cable setup to see if I could get IR readings, which as stated earlier can be deceiving, since you can get readings back regardless of whether your sensor is working or not. Put your hand a couple of centimeters away from the eye (no, not your eye, the sensor's eye!) and take a reading, then take a reading with nothing in from of the eye. There should be a significant difference in the before and after reading results, like a 24 for before and something like 108 with your hand in the way.

Software Debugging and Troubleshooting

Running diagnostic software on your Palm, of course, is the ultimate way to test your robot. You can get several utilities from the CMU PPRK site, or you can twiddle with my Java utilities (worf.sourceforge.net) - or, you can write your own, which is an even better way to learn about this robot, the board, the sensors, motors, etc.

I discovered that the Palm OS Emulator (POSE) is another excellent way to test the integration of your Palm software with the hardware, if things don't appear to be working with the actual Palm device in the serial cradle connection. Again, hook up your serial cable between your PC and your robot. Launch POSE and configure it to 'talk' over your serial port. I also checked the box telling it to redirect all network calls over TCP/IP, but I'm not sure you need to do that. Since I'm on Linux, I configured POSE to use /dev/ttyS3 as the serial port. On windows, set this to either COM1 or COM2. Now I can load my PPRK programs into the emulator and control the robot from the emulator. I thought this was pretty cool! If your programs are working and your hardware is also working in this configuration, then you know your serial cradle connection must be hosed if the device is not working properly when hooked up to your robot.

Links


| T-Rex Labs |