davidbuckley.net |
home > | Zeaker2 < Zero2 > Beeber | 19 May 2023 |
Zero2 - by David Buckley | July 1984 |
Maplin Magazine article![]() |
Sinclair QL Zero2 control program![]() QL-program Commands |
2017
I was ill for the first four months of 2017 and couldn't walk much. Once I was a little better I decided to get Zeaker2 and Zero2 running from the PC by changing my QL program to send out ASCII commands instead of the byte stream and using an Arduino Uno to decode the ASCII commands and send out the required byte stream. I modified a program I had written for Bambino and built simple Arduino shields to take the umbilicals. Also I added a Pen-cam stop to allow automatic initialisation of the pen position to up.
The Arduino programs, controlled fom a serial terminal, allow sixteen 32 byte command strings to be stored and replayed as well as allowing control by converting the ASCII commands from the PC.
Using an original Zero2 PSU
Zero2 total current 870mA @ 9.75v
Zero2 electronics only, 130mA @ 12.9v
Programming
Setup Zero2 as in the photograph and connect to a computer Serial port through a suitable interface, see the interface diagrams.
Zero2 responds to character codes sent at 4800 baud, no parity, and 2 stop bits.
Each time a motor code is sent the motors will step to their next position, if codes are sent out of sequence then the motors will just judder.
When driving the motors a small delay must be inserted after each character to give time for the motor to turn. When Zero2 was conceived time delays generally were not necessary because the computers were not too fast. If a delay can't be inserted then sending the same character several times will have the same effect. In fact the QL software supplied with Zero2 did just that.
Sending the codes 5, 0,10,15 makes Zero2 go forwards four 0.5mm steps Sending the codes 5, 0,10,15 again makes Zero2 go forwards another four steps Sending the codes 5, 0, will make Zero2 go forwards another two steps Sending the codes 10,15 will make Zero2 go forwards another two stepsSending the codes 10, 0, 5,15 makes Zero2 go backwards four 0.5mm steps Sending the codes 10, 0, 5,15 again makes Zero2 go backwards another four steps Sending the codes 10, 0 will make Zero2 go backwards another two steps Sending the codes 5,15 will make Zero2 go backwards another two steps
similarly Sending the codes 6, 0, 9,15 makes Zero2 turn right four 1 degree steps Sending the codes 9, 0, 6,15 makes Zero2 turn left four 1 degree steps and Sending the codes 7, 3,11,15 makes Zero2 turn right two degrees only the left wheel moves four 0.5 degree steps Sending the codes 13,12,14,15 makes Zero2 turn left two degrees only the right wheel moves four 0.5 degree steps
You will note that all the sequences have been arranged to end on 15
so no matter what the next sequence is that is sent it will continue on
without missing any steps.
By sending individual codes in the correct sequence Zero2 can be made to move in 0.5mm steps
and turn through 0.5 degree (only one wheel is moved).
for detailed information see the Manual Chapter 4 - Writing to Zero2
Programming Model
Spectrum interface
The D9male on the Spectrum interface can be plugged into a standard PC D9 serial connector using a female/female gender changer.
However direct control of Zero2 from a Windows PC program will be poor because of Window's Serial Buffers.
D9 serial interface | 12v power 3.5mm jack-socket, tip +ve |
Spectrum/QL/PC-serial interface circuit
PC-serial interface 2006
The umbilical for Zero2 uses Sinclair QL CTL/Joystick connectors, similar to BT phone connectors but left-handed and with 'W' style polarisation.
Ordinary ribbon cable can be used with them by stripping the ends and lightly touching the ends with solder to make them easier to insert in the plugs, there are holes just to the end of the contacts so you can see the cores going to each contact, make sure a core goes to each contact before pressing down the contacts.
Parts:
6-way W-polarisation socket
3.5mm jack socket for standard Zero2 12v 1A 12.6VA PSU (14v off load)
5v 1A 7805 regulator
1A In4001 diode
2x 0u1 disc ceramic
100u 6v
green LED
220R resistor
9pin D R/A socket
The Four way header [1:0v][2:--][3:Tx][4:Rx] in the bottom right is to connect the interface to to a Parallax Stamp board, [1:0v][2:--][3:Rx][4:Tx]
and the three way header is my standard serial header [1:Rx][2:0v][3:Tx].
Motor Wiring
Motors are ID31004 2.8N.cm 175mA per coil @12v, 7.5deg/step max 240step/sec, so 350mA per motor.
drive boss is 0.301"dia giving 24.02 circumference so each step is 0.5mm
Motor and Speaker Cables
red / brown need swapping on motors to accord with my Z2 otherwise motors go backwards.
Or plug is back to front turning plug round works as well.
Add-Ons
A lifter and pallets to allow Zero2 to do a horezontal Towers of Hanoi. The pallets were stacked in a line rather than the normal way of stacking rings vertically. The vertical column is fixed in place of the pen.
This is similar to the proposed Trailor-Lift.