Wednesday, August 27, 2014

Legacy Robot notes.

Have not made much time to work on special projects. One thing I need to start back on is robopet.  There is nothing real super snazzy about this unit although it could be. Mainly I will use it for carrying snacks back and forth from the kitchen during sporting events. There will be a second level not currently attached to hold the goodies. More information about the unit follows.


Using an old Pentium I computer, usb wireless, DC battery power, dc-dc atx ps and compact flash with an ide conversion interface. Powered wheels came from two Tonka RC cars that I dissected.

Made a special wiring hardness to connect the parallel port with the control electronics. Now I need to start testing the electronics for the motor control. Hoping the h-bridge can take the current. If not, I think I have a IC that will. Worst case scenarios is to do it the old fashion way with transistors. After that, everything should fall into place.

Using a standard power supply to test the unit, but it will run on battery when I finish it. Since the motherboard is AT and the DC-DC PS is ATX, I had to make a special cable from scratch to interface the two. Tested the cable and it works.

Have the wireless working via a usb interface set up to work with a specific router via the mac address and the zone. Albeit the wireless is 11 mb, more than fast enough to receive and send communication

Special home made turn signals to be added also.

No sensors added yet.


The Linux OS is installed.  The OS resides on a compact flash.The iso file for the version of the Ubuntu distribution also resides on the flash drive and gets mounted as a loop.

Using my own home grown robot control software to gather data from sensors and to operate the unit. Found a binary of the very lightweight web server Boa on for the version of Ubuntu I am using. Installed it. Apache2 is too bulky for this project. Eventually, I want to make an autonomous unit.  This unit will be more like a remote controlled car via wifi.

Code to control the motors has already been tested (using parcon.c) and is working.   Using a hardwired connection, already tested client/server socket programming to communicate with and control the unit. That should be way more efficient and possibly more secure than using a web server per se..


Had to make special adapter plates to connect the wheel assemblies to the cart. Originally I used clear plastic, but those broke too easily. Wood worked much better, but not as pretty. Attached a third generic cart wheel.

Extra: We installed ptelnet on an old Palm pda to use it as a dumb terminal. That way we do not have to hook the robot to a monitor when we want to access the unit. Saves electricity and makes it more portable. With the installation of Boa, the Chumby can also be used to control the robot without requiring an umbilical cord. Which means that getting an Android or the like tablet more feasible.

Added schematic for turning blinker.


 Parcon.c for controlling parallel port

To compile:
$ gcc parcon.c -o parcon

To run (l is off and h is on.)
$ sudo parcon 1l 2l 3h 5h 8l

 Turns off pins 1,2, and 8. Tuns on pins 3 and 5.

 #include <stdio.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/io.h>

char *binprint( unsigned char x, char *buf )
  int i;
  for( i=0; i<8; i++ )
  return buf;

int main( int argc, char *argv[] )
  char c;
  unsigned char val;
  char buf[9];
  int x;
  if( argc<2 )
    printf("  example usage: parcon 1l 2l 3h 5h 8l\n");
    return 2;
  if( ioperm(888,1,1) )
    printf("Couldn't get port 888\n");
    return 1;
  val = inb(888);
  printf("old = %s\n",binprint(val,buf));
  for( x=1; x<argc; x++ )
    if( argv[x][1]!='h' )
      val &= ~(1<<(argv[x][0]-'1'));
      val |= 1<<(argv[x][0]-'1');
  printf("new = %s\n",binprint(val,buf));
  return 0;



No comments:

Post a Comment