Newsgroups: comp.robotics
Path: brunix!uunet!timbuk.cray.com!hemlock.cray.com!kilian
From: kilian@cray.com (Alan Kilian)
Subject: My robot project. Status #2
Message-ID: <1992Mar23.151812.12698@hemlock.cray.com>
Date: 23 Mar 92 15:18:12 CST


    Some folks have asked me to keep them up to date on my robot project
    here is the second update.

    Here are my plans for the project over the next 6 months.
	Add two ultrasonic range modules from Polaroid.
	Add a speech synthesizer board. $150.00 From RC Systems
	Add a flux gate compass. Maybe from Radio Shack.
	Tons of software.

    Things done this week:
	LCD display  module running.
	Motor feedback speed control running.

    This LCD module from EPSON is great. I had some trouble getting it running
	First I ALWAYS screw up if the module refers to power and ground as
	VSS/VDD Every damn time. If it's VCC/VDD I'm O.K. but VSS/VDD I
	always connect +5 to VSS and GND to VDD. Well the + is where the
	power comes out isn't it? so +5 is the Source and GND is the sink
  	right? Of course not that's only the way they teach it to kids in
	school. I just hate it when I learn that something that I understood
	in grade school was intentionally taught to me wrong. (You mean that
	even at absolute zero helium is a liquid? I thought absolute zero
	was the lack of ALL atomic motion. Well Noooooooooo we only told
	you that because we didn't think you could understand the REAL concept.
	What about billiard ball electrons? No? The earths orbital axis
	is parallel to the Moon's orbital axis. No? O.K. That's about enough
	whining about education). So I connected the power supply backwards
	and blew a fuse. Then I hooked up my ammeter and the module was
	drawing 2.2 Amps at 5 Volts. Yipes. I must have something hooked up
	wrong. Well Well Well I swapped VSS and VDD and it drew only 20 Ma
	but it didn't do anything. So I started interfacing it to the 68HC16
	and I couldn't get any display. You have to send this thing a few
	commands to get it running and the EPSON data sheet was shall we say
	"lacking in the most fundamental details" about how to go about this.
	so I started sending things like "Turn on the display and blink the
	cursor" commands. Nothing. I tried Set DAA (Data Address Address as far
	as I can tell) Nothing. Send some ASCII chars. Nothing. Well I guess
	it's blown up. One last thing. There's this Vo pin that says "Display
	contrast resistor" but that's it. I have a 51 page document talking
	about all the EPSON displays from 1X16 chars to 768X1024 arrays and
	it doesn't tell you what the Contrast resistor is. Oh here it is.
	On one of the application notes for a 256X192 array (Or something) 
	there is a 500KOhm variable resistor from Vo to GND. Cool. Well I
	don't have a 500KOhm Thats pretty large so I'll use a 10KOhm. Oh My GOD
	it works. I've got a blinking cursor!!! So I fiddle around with 500K
	fixed resistors and the display is blank. It turns out that 10KOhm
	is the correct value. You'd never get any display with a 500K Ohm 
	resistor. I lucked out again. Now the module is running but I can't
	boot the 68HC16 with the module plugged in. BooHoo. I turns out that
	one of the pins I am using for a digital output pin also functions
	as the external clock select pin when the processor is reset.
	If this pin is low at reset then the processor selects an external
	clock source. (Which I thoughtlessly didn't provide) Well a simple
	diode with it's cathode on the processor and it's anode on the LCD
	prevents the LCD from pulling this line low. It also interferes
	with me reading the DAA Least significant bit but that's just tough.
	If I can't keep track of where the cursor is in software then I'm
	out of a job anyway. So I wrote some routines to print values
	in HEX and It's just great.

    Motor speed control:
	This took some work also. There are 6.02 X 10^23 different sources
	for interrupts on the 68HC16 and I had to figure them out. I did
	get them running though. My speed controller simply checks the
	interval between two Tachometer pulses and compares them to the
	desired interval and increments or decrements the Pulse Width
	register appropriately. I wrote a second order feedback loop to
	control the motors and simulated it on my Sun workstation but I
	won't install it. The simple control works just fine. I'll soup
	it up a bit so that if the motor speed is way off from the desired
	speed I'll add a few to the PWM resistor instead of just one.

    Platform testing:
	I blow rubber bands like butter now. Crap. I'll install some bands
	that I got off some Broccoli they are perfect. about 1/4 Inch wide
	and 1 Inch diameter when not stretched. I also think I'll put the
	pulleys back on for a little more speed. I was running the drive right
	off the tiny motor shaft in the beginning. This will hopefully be
	the solution to my platform troubles.

    To do this week:
	Add buffers to get the direction outputs to the relays.
	Play around for a few days with fixed movement to run any more bugs out
	  of the platform.
	Get one range module running.

    To do next week: 
	I'm in Denver for a PEX meeting all week. Whine about PEX a lot.
	Take lots of photos.

    To do the third week:
  	More software to avoid objects.
	Build a scanning platform for the front range module.
	Build a position encoder for the front range module.
	Develop and print Denver photos.

                         -Alan Kilian



-- 
 -Alan Kilian         kilian@cray.com 612.683.5499 (Work) 612.729.1652 (Home)
  Cray Research, Inc.           | 
  655 F Lone Oak Drive          | 
  Eagan  MN,     55121          |
