The Valiant Turtle was the Best in the World: Its Secrets Revealed

  • Published February 2, 2017
  • By Simon Inns

The Most Successful Logo Turtle in Educational Robotics

In 1983 a teacher and aspiring journalist Anth Ginn introduced me to the ideas of Seymour Papert and Turtle Robots.  I loved it and set out to design my first educational robot.  I was a mechanical engineer working on different contracts so I knew large numbers of talented people.  I soon got a team together: Dave Ewins to do the electronics, Graham Carpenter for the software and Peter Pavlitski who organised the production.  The result was the Valiant Turtle.  The British Design Council included it their book the Best of British Design and I soon found out that education was how I wanted to spend my working life.  We sold the last Turtle in about 2010 (we could not get the parts to make them anymore).  A few days ago I came across Simon’s blog.  He kindly let me add it to our records.  I hope you find it interesting – Dave Catlin.

The Valiant Turtle is a floor roving robot made by Valiant Technologies and was a popular education robot for teaching geometry and programming during the 1980s and 1990s. The robot was first sold in 1983 and was often used with the LOGO programming language. I started writing this article in 2009 when I obtained my first Valiant Turtle, however the turtle was not repairable due to the stepper motors being destroyed. Now (in 2016 and two turtles later!) I finally have a restored and working robot. Since it was such a struggle to find the necessary information on the turtle, I have collected the results of my research here. I hope this will make your restoration project easier than mine (and a lot quicker!). It is possible to connect the turtle using either serial or parallel connections from a microcomputer. Supported models (that I’m aware of) are the BBC Model B, RM Nimbus 186, Acorn Archimedes, Commodore 64, Apple IIe and a modern 9-pin serial connection to a PC. Here is a video of my restored Valiant Turtle in action:

The Commander MKII control unit

The Commander MKII control unit PCB

The control unit has 3 connectors; a 15 pin male D-sub parallel connector, a 5 pin female DIN serial connector and a 2 pin power supply socket. The Valiant Turtle service manual contains the following circuit schematic for the MKII version:

Since this diagram is low resolution and hard to read (also there are some component values missing) I have recreated the schematic in Eagle CAD including much more detail about the ports and notes about the operation of various parts of the circuit:

The service manual also provides a board layout diagram showing the placement of the various components shown in the schematic:

Power supply

The original power supply supplied with the turtle also doubles as a charger. The rating of the original PSU is 19V @ 500mA. Whilst this is good for charging the turtle, it’s not so good for the control box (which gets really hot). I would suggest that, if you have an original power supply, you only use it for charging and power the control box from 6-9Vs. My Turtle’s control box is powered from a 6V @ 500mA power supply. The DC jack connecting the power supply to the control board should be centre-positive.

Serial cable

The serial connector for the BBC Micro requires that the the RTS and CTS lines are linked together. Since there were no diagrams available on the web, I have included a diagram of the required connections below:

In order to use a serial connection the control unit needs to be configured for the Valiant Mover software on a serial interface. There are 4 switches on the side of the unit which should be set as: 1-ON, 2-ON, 3-OFF and 4-OFF. Furthermore the two switches on the base of the turtle should be set to OFF. Whilst the cable shown above works perfectly with a BBC Micro there are other connections available from the controller board (I constructed the cable before performing a more detailed reverse-engineering of the controller circuitry). The Eagle CAD schematic of the controller gives a detailed view of the available serial port signals that may assist if you are attempting to connect the turtle to other types of computer.

Parallel cable

If you want to use the turtle with languages such as Acornsoft’s logo, the turtle must be controlled using a parallel cable (connected to the BBC Micro’s user port) rather than serial. Since there was no information about this available on the web, so I reverse-engineered the cable pinout from the control box circuitry. Here is the pin out (this has been tested successfully with Acornsoft Logo on the BBC): BBC micro User Port to Valiant Turtle DB15:

  • 01 (+5V) -> Not connected
  • 02 (CB1) -> Pin 14 (DTR/BUSY)
  • 03 (+5V) -> Not connected
  • 04 (CB2) -> Pin 15 (!Data strobe)
  • 05 (0V) -> Not connected
  • 06 (PB0) -> Pin 1 (DAT1)
  • 07 (0V) -> Not connected
  • 08 (PB1) -> Pin 2 (DAT2)
  • 09 (0V) -> Pin 9 (signal 0V)
  • 10 (PB2) -> Pin 3 (DAT3)
  • 11 (0V) -> Not connected
  • 12 (PB3) -> Pin 4 (DAT4)
  • 13 (0V) -> Not connected
  • 14 (PB4) -> Pin 5 (DAT5)
  • 15 (0V) -> Not connected
  • 16 (PB5) -> Pin 6 (DAT6)
  • 17 (0V) -> Not connected
  • 18 (PB6) -> Pin 7 (DAT 7)
  • 19 (0V) -> Not connected
  • 20 (PB7) -> Pin 8 (DAT 8)

The control unit needs to be configured for the parallel interface. There are 4 switches on the side of the unit which should be set as: 1-OFF, 2-ON, 3-ON and 4-ON. Furthermore the two switches on the base of the turtle should be set to OFF.

DIP Switch Settings

There are three modes that can be selected using the communicators DIP switches:

  • 1-ON, 2-ON, 3-OFF, 4-OFF – Serial port communication
  • 1-OFF, 2-ON, 3-ON, 4-ON – One byte parallel communication (supports only 1 turtle with ID:0)
  • 1-OFF, 2-OFF, 3-ON, 4-ON – Two byte parallel communication (supports up to 4 turtles)

Note that DIP switches 3 and 4 enable the (NOT) data-strobe line on the parallel interface. DIP switches 1 and 2 are read by the communicator’s processor directly. In two byte parallel communication mode all commands are split into two bytes; the first byte identifies the turtle (to which the command is to be sent) and the second byte contains the command. Two-byte command mode is only supported over the parallel interface.

The Turtle

Main board

Turtle mainboard

Similar in design to the to the control unit; the turtle’s main board is a microcontroller based board with IR receivers in the centre. When the turtle is switched to ‘on’ the red LED should light (and the turtle’s eyes), when switched to ‘charge’ the yellow LED should light. The service manual provides the following circuit diagram for the turtle’s main board:

In addition the service manual also shows the schematic for the various external components such as the motors and batteries as shown in the following diagram:

The layout of the various components on the main board are shown in the following diagram (also from the service manual):

 Batteries

If you have an old turtle like mine then the chances are the battery pack has been there a long time and is probably badly corroded. Luckily the corrosion does not affect the plastic, although you will have to remove the battery connectors and replace them with new ones or clean them completely. To remove the batteries remove the covers on the top and the bottom of the machine (you will have to take the main board off first, make sure you note which connector goes where as the LED and pen motor both have the same connectors). To replace the batteries I used some NiMH 2400mAh AA cell rechargeable batteries (you need 10 in all); if the springs in the battery compartment are completely missing you can buy the ones ready-made with soldering tags. Simply connect them up like the old batteries, replace the battery connectors and reassemble. The case should be properly cleaned and any battery ‘goo’ removed. You can use a 50/50 mix of vinegar and water to do this (the ‘goo’ is alkaline, so vinegar is good for neutralizing it).

Stepper Motors and wheels

The stepper motors are manufactured by Sterling Instruments Limited and have a phase resistance of 60 Ohms and a step angle of 7 degrees and 30 minutes. The stepper motor and wheel assembly can be seen in the following picture:

Stepper motor and wheels

Underside

The underside of the turtle contains the battery compartment covers and a small ball bearing which acts as the front-wheel of the turtle. There are also two DIP switches that are used to set the ID of the turtle (Acornsoft Logo can use up to 4 turtles at once, but each one must have a unique ID):

The underside of the turtle

DIP Switch Settings

There are four IDs that can be selected using the turtle’s DIP switches:

  • 1-OFF, 2-OFF – ID:0
  • 1-ON, 2-OFF – ID:1
  • 1-OFF, 2-ON – ID:2
  • 1-ON, 2-ON – ID:3

Pen

The Valiant Turtle is designed to use a Berol pen. The pen is held in place by the top of the pen (of which Berol pens have a distinctive design). The correct type of pen (which fits perfectly in the pen holder of the turtle) is shown in the following picture:

The correct pen for the Valiant Turtle

Reverse engineering

Purpose

There seems to be far more Valiant Turtle robots available than communicator interfaces as evidenced by many posts from curious owners wondering if the robot can be used without the original interface and sales on sites such as EBay for robots missing the communicator. As the Valiant Turtle communicator Mark II uses a mask-programmed single chip computer (i.e. the programming in ROM was set during manufacture) it is not possible to simply duplicate a circuit schematic in order to create a new controller. The only way to create a new communicator is to reverse engineer a working unit (from the logic perspective as well as circuitry) and then programmatically reproduce the functions of the unit using either a modern computer or microcontroller device (or a combination of the two) with the required electronics for the host communication and infrared link to the turtle. To facilitate such a project (and since I own a complete Valiant Turtle with communicator) I have provided the results of reverse engineering the communicator below.

Communicator Mark II host communication protocol

The Valiant Turtle communicator mark II offers both a serial and 8-bit parallel interface to the host computer. In order to reverse-engineer the communication protocol the Acornsoft Logo programming language was used on a BBC Microcomputer along with the Valiant extensions that allow the programming language to control the physical turtle robot. Since both the serial and the parallel interfaces use the same 8-bit communication protocol, this reverse-engineering allows either interface to be used towards the host. The communication protocol is effectively one-way; the exception being the handshaking used by both parallel and serial devices. For serial (RS423/RS232) this is well documented (and the communicator supports between 2400 and 4800 baud with 7N1 and 8N1 byte-length/handshaking). In the case of the parallel interface the BBC uses the user port’s CB2 line bi-directionally for handshaking. The host pulses CB2 low when a byte is ready for the communicator to receive, and the communicator pulses CB2 low once the byte has been read. This style of handshaking is directly supported by the BBC’s 6522 VIA chip (which acts as the interface between the user port and the BBC’s CPU). Although both the parallel and serial interfaces support 8-bit communication, the Valiant Turtle communicator mark II only uses 7-bits. The most significant bit is always zero when using either 8-bit parallel or 8-bit serial communication. On the BBC microcomputer it is possible to communicate directly using BASIC via the user port to the Valiant Turtle communicator. The following BBC BASIC code shows a simple example program that configures the user port correctly and sends bytes to the communicator:

    10 MODE 4 20 REM Set user VIA port B to output 30 ?&FE62 = &FF
    40 REM Set VIA port B handshake mode to pulse 50 ?&FE6C = &A0 60
    PRINT “Byte value in decimal?” 70 INPUT byte% 80 REM Send byte to user
    VIA port B 90 ?&FE60 = byte% 100 GOTO 60

The first command sent by the host initializes the communicator (and causes the status LED on the communicator to turn off). This command, for compatibility between serial and parallel interfaces is 0b00001101 (0x0D or decimal 13). This is the ASCII code for carriage return (CR). When the ‘FLOOR’ command is sent from Acornsoft logo the host sends two bytes: 0x0D and 0x10 – the second byte is the ‘PENDOWN’ command (this is explained in more detail below). Analysis of the commands (with the exception of the initialise byte) shows that the 7-bit commands are in fact bit flags that are interpreted by the Turtle’s processor (note that the VT Communicator Mark II does not interpret any commands except the initialise command – all command bytes are passed directly to the IR interface). The bit flags of the command byte are as follows: AMMPLLRR

  • A = This is the most significant bit and is not used (it is also not transferred over the IR link which is 7-bit only)
  • MM = This is the motor step sequence indicator and alternates between 10 and 11 in order to step the motors on the turtle
  • P = This is the pen state which can either be 0 for pen up or 1 for pen down.
  • LL = The left (starboard) motor direction – This can either be 00 for motor off, 10 for motor reverse, 01 for motor forward or 11 for motor on.
  • RR = The right (port) motor direction – This can either be 00 for motor off, 01 for motor reverse, 10 for motor forward or 11 for motor on.

You have to log in to Comment.