GP-3 Board on Sale


The GP-3 is a powerful board that you can use with or without a PC to do many physical computing tasks. I’ve talked about this board several times in this blog including and this .

The boards are currently . This is a great chance to pick up one or more for your next project.

The original purpose for this board was to act as an I/O device for a host computer (typically a PC). An efficient serial protocol (you can use a USB adapter) allows you to read analog voltages (5 channels of 10 bit A/D), output PWM, create and read pulses accurately, and control 8 bits of digital I/O. Library support is available for nearly any language. There are ActiveX and DLL libraries that you can use from C#, C++, Visual Basic, and many other Windows languages (for example, there’s a demo that uses the board with Microsoft Excel). There’s also a generic C library that works with Linux and most other platforms too.

With the free software, you can do many tasks (like the robot example above) using no programming at all. Better still once you have a script built using GP3EZ’s easy-to-use interface, you can “compile” the script down to the board and it will run without the PC until you reprogram it. In fact, things like timing become more accurate after you compile since the PC is notoriously bad at keeping time on small scales.

These boards aren’t on sale often, so pick one up while they are. Once you have simple I/O on your PC, you’d be surprised how handy it is. And since the GP3EZ scripts can run without a PC, using just one somewhere to replace a PC in a control application will save a bundle.

An Easy Robot

This little robot is made with two perf boards from Radio Shack (one of them cut into two for the sides). This board is easy to work with because it has a grid of holes. It is very easy to make nice straight cuts (or even just score and snap). It is also perfect for drilling exact holes. Basswood and polyurethane glue holds it all together (along with a few screws).

The drive consists of two Futuba RC servos modified for continuous rotation and a caster wheel from Home Depot in the rear. The tires are 2.25″ RC aircraft tires.

A 4xAA holder under the top deck powers the motors. The 9V battery on the top is just for the electronics.

The electronics is the board which has been programmed by the software so programming the robot is simple point and click.

The sensor is a Panasonic IR sensor tuned for about 38kHz. The IR LED is pulsed through a 2N2222 with the GP3’s PWM at 32kHz which is close enough that it works. A piece of antistatic foam pushed into a pin header blocks the sensor from seeing the LED directly. When something is in front of the bot, it sees the IR bounce off of it. It would be easy to add more LEDs (for example, two on the corners). The sensors could be paralleled or just connected to more I/O pins.

Here’s the software (dumped out to HTML by GP3EZ; the real software is all constructed using GP3EZ’s point and click interface):

Step # Tag Condition Action Next Notes
1 Start Always LED Off

PWM: 200 freq=32766

  Start IR and reset LED (for when we finish turning)
2 MainLoop Input: XXXXXXX0 LED On object Check IR sensor
3   Always Pulse: pin 7 2000   Drive forward
4   Always Pulse: pin 6 1000   Drive forward
5   After 20 ms   MainLoop Servo delay (20ms)
6 object Always   back (set bookmark) We detected something, so back up a little.
7 turn Always Set Loop A to 20   Start turning (just under 1/2 second)
8 turn0 Always Pulse: pin 7 2000   pulse motors the same way
9   Always Pulse: pin 6 2000   Inserted step
10   After 20 ms   turn0 (Loop A) Pause and loop for 2 seconds
11   Input: XXXXXXX1   Start If sensor shows clear (high) then go back to forward motion
12   Always   turn Sensor wasn’t clear so do some more turns
13 back Always Set Loop A to 100   Back up for about 2 seconds
14 back0 Always Pulse: pin 7 1000   Turn motors in reverse
15   Always Pulse: pin 6 2000    
16   After 20 ms   back0 (Loop A) Delay and loop
17   Always   {last bookmark} Go back to caller

The table is easy to understand. The step number should be obvious. The “Tag” is a label that names a particular step so you can refer to it later. Each step has 3 major parts:

  1. Condition – This must be true for the step to execute. Many of the steps are marked “always” and some are marked “After xxx milliseconds”. These will always execute, of course. Note the lines that work with the IR sensor, however. They only execute when a specific condition is true.
  2. Action – When the condition occurs, this is what will happen. The GP3EZ can output digital values, PWM, pulses, and do a variety of other tasks as part of the action. If you are connected to a PC (the robot isn’t) you can write data to a file or execute external commands.
  3. Next – When a step executes, this column tells the program where to go next (which is usually the next step).

The note field is just a comment and is ignored by GP3EZ.

Note that the GP3EZ supports looping and subroutines. For example, at the “object” tag, there is a transfer (in the next field) to the tab “back”. The notation says that a “bookmark” is set. If you find the back label, you’ll see it does several steps and then goes to the “last bookmark.” This is nothing more than a subroutine call and return. You can see examples of looping in the object and back routines which generate a specific number of motor pulses.

A Simple Cheap Robot Platform

I’m not very mechanical, so here’s a simple robot chassis I built while teaching a robot class at a local school. The top and sides are Radio Shack perf board. This is great because you can easily cut straight lines in it by just cutting along the holes in the grid. The parts:

  • The motors are modified RC servos that rotate all the way around.
  • The angle brackets came from Home Depot in the cabinent section.
  • There is a brace at the rear made of some scrap lumber.
  • The front brace is part of an IC tube cut off and hot glued for support.
  • You can’t see it, but Home Depot also provided a small caster at the front (or back depending on your point of view; it is mounted on the wooden brace).
  • The wheels are actually landing gear for model planes.
  • The screws at the top are holding a 4xAA battery holder under the chassis and a 9V battery clip. The 9V battery runs the computer and the AA batteries run the motors.
  • The breadboard is secured with doublestick tape. That’s an running the monster.

If I can make this, anyone can make it. You can connect a Basic Stamp or just about any old processor to the breadboard. Plenty of room to hook up other things too. Let me know if you build anything similar.