Saturday, October 12, 2013

BEAM/Picaxe 20x2 Turbot

Well... I finally wrapped up the little Turbot I have been working on. A Turbot is a robot that moves about using spinning flagella (arms) much like a bacteria moves about. Tumbling along, charging, looking for light and then moving towards it. With only two arms, a Turbot with bi-directional flagella is capable of a surprising number of gaits or series of motions that move it along. My favorite besides the basic forward tumble is a backward hop scoot that reminds me of a crab.

The first Turbot was designed and named by Mark Tilden as "Turing Machine Robot" A turing machine is described by Turing himself as having "an unlimited memory capacity obtained in the form of an infinite tape marked out into squares, on each of which a symbol could be printed. At any moment there is one symbol in the machine; it is called the scanned symbol. The machine can alter the scanned symbol and its behavior is in part determined by that symbol, but the symbols on the tape elsewhere do not affect the behavior of the machine."


Tilden reasoned that this type of robot then in effect is operating with the earth itself as the "infinate string" and based on the string of information provided (gravity and light).

I initially was using the scruff circuit by J Wolfgang Goerlich and a Miller Solar Engine. I developed the 08m2 solar engine when I fried my miller solar engine, and added it to the turbot. It worked great, but there was a problem somewhere in the 74AC245 portion of the circuit, I could only get it to work if I shielded the eyes from light with a piece of black electrical tape. Bummer! I tried to troubleshoot the problem, but because I tightly freeformed the circuit inside the IC socket, and making changes to it were troublesome to say the least. I considered a few alternatives, like redoing the circuit or changing it so the '245 would only drive the motors under the Picaxe's direction. Finally I settled on using a Picaxe 20x2 that I had on hand.

Although I couldn't find and references on the 'net to anyone driving a motor directly from uC pins, but because the 74AC245 could drive them, I knew my motors (GM14a) were efficient enough... if I ganged up the outputs. The risk is you might toast your Picaxe chip by forcing it to source and sink too much current, but this is a risk I was willing to take. So after freeforming a new IC socket for the 20X2 and re-assembling this bot for (hopefully) the last time, I wrote a basic program that combines the solar engine and light sensing from the eyes and the solar panels. I made the program emulate the scruff circuit, by driving one motor or the other, forward or reverse, based on which side is up and which eye is seeing more light. I had to make sure that the Picaxe turned the outputs in just the right order to avoid a short circuit or wasted power dropped across both motors through the common connection. Using the dirsX and pinsX basic commands allowed me to achieve this.

It was alive! Next I tweaked the trigger level higher until it never triggered without having enough voltage to power the motors. It was tempting to set the trigger level low so it would work better in lower light conditions (a desk lamp), but testing with a multimeter revealed that a trigger level lower then 3.3v would sometimes activate and not spin the motors ,wasting it's charge. With lower voltage motors one could easily lower this number for better low light operation.

This Turbot's 'tail' is a 4x6 pin male header (actually (2) 2x6 super glued together) with the pins laid out such that by connecting jumpers to the proper pins you can change which motor moves which direction. It is like a switchboard allowing motor connections to be change on the fly, this allows for less thought when assembling as to which motor is going to spin which direction. I recommend taking the time to make this piece since it has proven very useful, and in this layout it is the perfect size.

The motors, IC socket, and male headers are all the same size, allowing a for unibody construction sandwiched between the (2) 4.2v 22mA solar panels. The up/down sensing is achieved by reading the ADC the midpoint of the two panels, thereby avoiding another set of eyes. The arms are made out of a wire handle from a fruit basket, washers, and dubro wheel collars. Super gluing the pieces of the arm together and then pouring JB Weld into the space in between the washers and the wire made very strong arms that are removable too.

Update: I can't stop blogger from stripping parts of the Picaxe code out every time I post it. If you have a solution to this issue please let me know so I can repost it or you can get it from pastebin here: http://pastebin.com/raw.php?i=hmNjPfeu