Ralph's Homemade robot
This page is a diary of progress on my robot. Entries are in
chronological order with the most recent at the bottom of the
page here.
Primary Design Specifications
| Two motors and two 12v Gel Cells on a piece of wood I might use as the base board (December 2002) |
First thing was to choose a suitable computer to get a motherboard from. I have several computers I could have used but the one I chose was more suitable because:
It was a 386- Not worth much if I break it, not too low powered and easy to program
It had onboard mouse(PS2), keyboard(PS2), VGA, parallel and 2 COM ports. This means it is essentially a single board computer except it had a daughter card with expansion slots and a card to replace the optional extended memory cache. Once I figure out which pins connect to which others, I should be able to puts loops of wire in and get rid of the need for any extra boards at all.
It had an onboard speaker and power LED. There were no other switches. It had a main power switch on the PSU and that was it.
I got the computer from a company that was throwing them out. It refused to recognize the hard drive no matter what I tried so I disconnected the hard drive and all its cabling. The case was a massive metal thing, but the motherboard was tiny for that age machine so I took the motherboard out and put it in a cardboard box. The next thing was to figure out how to power the motherboard without using its PSU. I used a digital multimeter to measure the output voltages on the motherboard and floppy dive power connectors. The results I got were as follows:
Motherboard connector ____________________________________________________________ |White|Orange|Blue|Black|Black|Black|Black|Yellow|Red|Red|Red| | +5 | +12 | -12| 0 | 0 | 0 | 0 | -5 | +5| +5| +5| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Large power connectors ______________________________ | Yellow | Black | Black | Red | | +12v | 0v | 0v | +5v | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Small power connectors ______________________________ | Yellow | Black | Black | Red | | +12v | 0v | 0v | +5v | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I was intending to make the robot primarily out of wood because I am better at making things out or it than I am at making things out of metal. I was thinking of a plywood base with blocks underneath to hold axles etc. So far I have some wheels and axles and 1 motor(12v wheelchair type). The motor has a reduction box fitted to it that brings it down to about the right speed (Have used it in a go-cart).
| Housing for motherboard completed(September 2003) |
I'm trying to power the motherboard from batteries. I'm going to need something to drop the voltage from 12v to 5v for the motherboard logic. I'm a bit lacking in knowledge on that area so I might just do some of the programming side instead.

M_CNTRL2.BAS
'This program controls two motors attached to H-Bridge control
'circuits that are attached to lpt1.
'1-4 is motor1, 5-8 is motor2
'1,2,5,6 are high side drivers
'3,4,7,8 are low side drivers
'
'Programmed by Ralph Hughes 2004
'
DECLARE SUB center (t$)
DIM pin(1 TO 8)
FOR i = 1 TO 8: pin(i) = 0: NEXT i
m1stat = 0: m2stat = 0
CLS
LOCATE 6: center ("Ralph's Interface/Motor Controller")
LOCATE 7: center ("(Use numpad for controlling)")
LOCATE 9, 17: PRINT "Motor A"
LOCATE 10, 17: PRINT "7:Forward"
LOCATE 11, 17: PRINT "4:Stopped <"
LOCATE 12, 17: PRINT "1:Reverse"
LOCATE 9, 57: PRINT "Motor B"
LOCATE 10, 57: PRINT "8:Forward"
LOCATE 11, 57: PRINT "5:Stopped <"
LOCATE 12, 57: PRINT "2:Reverse"
DO
DO
a$ = INKEY$
LOOP UNTIL a$ <> ""
SELECT CASE a$
CASE CHR$(27)
OUT 888, 0
END
CASE "1": GOSUB m1rev
CASE "4": GOSUB m1stop
CASE "7": GOSUB m1fwd
CASE "2": GOSUB m2rev
CASE "5": GOSUB m2stop
CASE "8": GOSUB m2fwd
CASE ELSE: LOCATE 1, 1: PRINT "Key doesn't do anything": SLEEP 1: LOCATE 1, 1: PRINT SPACE$(60)
END SELECT
GOSUB out2motors
GOSUB drawstat
LOOP UNTIL a$ = CHR$(27)
END
drawstat:
LOCATE 10, 17: PRINT "7:Forward "
LOCATE 11, 17: PRINT "4:Stopped "
LOCATE 12, 17: PRINT "1:Reverse "
LOCATE 10, 57: PRINT "8:Forward "
LOCATE 11, 57: PRINT "5:Stopped "
LOCATE 12, 57: PRINT "2:Reverse "
LOCATE 11 - m1stat, 27: PRINT "<"
LOCATE 11 - m2stat, 67: PRINT "<"
RETURN
out2motors:
t = 0
IF pin(1) = 1 THEN t = t + 128
IF pin(2) = 1 THEN t = t + 64
IF pin(3) = 1 THEN t = t + 32
IF pin(4) = 1 THEN t = t + 16
IF pin(5) = 1 THEN t = t + 8
IF pin(6) = 1 THEN t = t + 4
IF pin(7) = 1 THEN t = t + 2
IF pin(8) = 1 THEN t = t + 1
OUT 888, t
RETURN
m1fwd:
pin(1) = 1:pin(2) = 0:pin(3) = 0:pin(4) = 1
m1stat = 1
RETURN
m1stop:
pin(1) = 0:pin(2) = 0:pin(3) = 0:pin(4) = 0
m1stat = 0
RETURN
m1rev:
pin(1) = 0:pin(2) = 1:pin(3) = 1:pin(4) = 0
m1stat = -1
RETURN
m2fwd:
pin(5) = 1:pin(6) = 0:pin(7) = 0:pin(8) = 1
m2stat = 1
RETURN
m2stop:
pin(5) = 0:pin(6) = 0:pin(7) = 0:pin(8) = 0
m2stat = 0
RETURN
m2rev:
pin(5) = 0:pin(6) = 1:pin(7) = 1:pin(8) = 0
m2stat = -1
RETURN
SUB center (t$)
LOCATE , 40 - (LEN(t$) / 2): PRINT t$
END SUB