TinkPics

#TinkTrak
Evolution of a robot

In Pictures, Text and Steam (from the ears)

Last updated 7th December 2015  @01:39. Come back once a week and see how far I've got.
I will be adding the #RaspberryPi #Python code Tink.py here at some point.

There may be a few mistakes in here, and things out of order, but I proof read and fix things by chipping away, so I'll sort it sooner or eventually.

Please see also
My Twitter Extended Profile
_________________________

These instructions are intended to help anyone to build their own RaspberryPi powered robot and doesn't set out to appear condescending,, I just have to put it in such a way as if it's the first time people have come across a RaspberruPi. If you have any suggestions, or ideas for Tink, let me know on Twitter. I'm always open to suggestions and constructive criticism :)

Also if you need a bit of help with your #Raspi projects or you want my #!32 to know about your creations, post them at me and I'll retweet them for you. I'd like to know what inspired you.

A Brief History of Home Computers in the Eighties

So you always wanted to build a robot didn't you? Come on, after pulling the dolls heads off your sisters dolls and feeding them to the dog, you needed a bit more excitement didn't you?

Since I was about 7 I wanted to build a robot, and though I have no prior knowledge of electronics, and my soldering is particularly bad, this is what I've come up with so far.

This is BigTrak, an electronic 1980s toy that hardly did anything. It had no sensors and one bulb for it's laser cannon. It was programmed using the control panel on the back there, and it could be issued with 16 commands. It could be commanded to go down the stairs, so this video makes no sense, because the kid put the vehicle in danger in the first place!
Click here for the advert
Being robust and well designed and with quite a bit of room inside, the chassis, gearbox and wheels are ideal to use for the basis of an autonomous robot.
Anyone can build a project like this, and it will also explain all about the #RaspberryPi computer.

Sunday 11th October 2015
Now how did that one get in there I wonder?

___________________________________________________________________

DaftFacts: Tink was so named after a character in TVs Lovejoy, (10m 43 seconds in - Dudley Sutton, who also appeared in Porridge), a UK program from the 80s.

What Will Tink Be?
I really don't know! I didn't make any plans and am building Tink on the fly, though I obviously have a rough idea.

I've put a lot of thought into Tink, and so his full name is Tink Chow Choop and he is a Cyber Dragon Lobster ~ The first of his kind.

So what plans have I for the little fella so far? Well, he's going to be:
1. A programmable night light and alarm clock, with selectable media

2. A Multimedia player, mp3, ogg, wav, mp4, avi

3. A Tweeter

4. A cup carrier/courier, who will remind you that you need to drink your beverage

5. An autonomous robot who will move around, avoid obstacles, interact with objects and the cat, make observations and try to make himself useful, or annoying, depending on how he feels.

The Parts and the Progress
1. A BigTrak.
Opening up the Bigtrak isn't that difficult, but the back bit in the middle? Take a breath and go Ohm and you prize it apart.

I've removed most of the screws that hold the lid to the body since it was overkill, though recently I've discovered that kids had been ordering them to go down the stairs, probably because they were boring. And why were they boring? Because the designers had brought out a model before called The Brain, which tried to look intelligent, but failed.

There's now only four main screws for the body.

I am aiming to make Tink lighter by using less metal, and version 2, which will be 3d printed, will have plastic clips, seals and screws.

I have a 3d printer called a MendelMax 3 3d with dual nozzles which I got from Oklahoma (and which I had to pay £200 import duty on!) but which I haven't yet assembled.

Oh and the screws in the four outer wheels are an absolute pain the the harris! Best magnetise the screws or use a tiny bit of Blu-Tack to hold the screw on the screwdriver and have Bigtrak on it's side when you guide the screw back in.

So when you get in (a Philips or posidrive) you can unscrew the ribbon cable cover and desolder the circuit board, and turn the speaker upside down if you like (I don't know why it's pointing at the floor?)


2. A #RaspberryPi 2 Model B Linux computer, 1Ghz Ram, runs on 5 volts, has 4 USB ports

3. This UBEC regulator keeps the battery power regulated to a steady 5 volts. I added a mini USB jack instead of putting it through the GPIO, which is not recommended because it bypasses the fuse, and also because the Pi crashed a few times when I had done that.
Makes a bit of a buzzing noise, but it reminds me of Orac, so it adds to the ambiance.
Installed.

4. 12 x Eneloop rechargeable AA batteries
Need to order 4 more for the 7 inch screen

5. 2 battery holders AA for those batteries

6. A Webcam - plugged into one of the USB ports - will be able to manually switch it's power off

7. USB extension. I don't want to have to keep taking the lid off every 5 minutes

8. 2 motion sensors, not yet coded

9. Echo distance sensor. Like a bat. Code started

10. 7 inch HDMI screen where the Bigtrak membrane control panel was.
Need to order a touchscreen so I can use the original Bigtrak membrane keypad graphic and have it on the screen when he boots (starts up) 

11. Flashing light on top (I call it Belisha) that indicates if the CPU is busy. Toggled with B

12. 2 front white low beams. Xmas tree LEDs. H toggles them

13. Main white beam. Xmas tree LED - Toggled with 0

14. Back red main lights. mas tree LEDs. Toggled with 5

15. A Mr Fusion made out of one of these LED lights from the Poundshop. Had to crack this one open as it wouldn't open by hand. Arc welded plastic?
Comes on when Tink boots.

2nd December, 2014
Building a better one than before, that's why I just did this :)

16. Lights on cup holder and scanner at front, and one of the middle wheels, indicating power is on the #Raspi

17. A mini servo motor to be used as a knight rider / cylon scanner hybrid. Not installed. Part coded. Will be putting it on the PWM/Servo board anyway

18. Two motor controllers, which will be replaced with the PWM/Servo HAT (below, once soldered), as will most of the LEDs.
Installed.
A few people have enjoyed telling me Tink is either Johnny 5 or Wall-E or a cross of both, but i don't know why they can't help themselves. Lol.

21st November 2015
19. This is a 16 channel PWM/Servo HAT controller board from Adafruit.
This means it can drive a combination of a maximum of 16 servos, DC motors and LEDs.
PWM stands for Pulse Width Modulation, Basically it means the voltage to connected components can be increased and decreased, so LEDs will fade in and out, and motors can be made to go faster and slower. And it's called a HAT because it sits on the #RaspberryPi, though of course it can be extended away from the #Raspi, like mine will be. I'm just looking to install it now.
Spilled coffee all over it for a laugh, but it wasn't a total waste as I was out of milk. Still works :) Have to solder the 40 pin header on. This is taking some time!

20. 9th November 2015
LM386 Amplifier Module (20 x gain)
Ordered.

21. 8th November 2015
Just ordered this RTC Real Time Clock module so Tink won't lose the time when not connected to the Internet.
Installed,
But had to put a header riser on to get it above other wires I have plugged into the GPIO, due to bad design, because all people want to do is plug an RTC into the #Raspi's, and nothing else :)
Thinks: The riser may come in handy for connecting the upper body and head wires though.

22. And a few hours later I ordered this :)

23. And this is so I can get the sound out of the audio/video jack.
Ordered, since the 7 inch screen doesn't have speakers (though if I look into it I'll probably found an audio out on the screen driver board, with maybe a 2 watt amp.

21st November 2015
24. SD Card Module.
Not installed (came today).


Total Cost: Around £180 (I'll work all prices out and put them here)

Bear in mind that Tink has been prototyped to death, and as I chip away at the granite to reveal the statue underneath, it stands to reason he ain't gonna look like a production model.

The #Python Code
Keys have been defined for wheel movement. Wagging tail coded but also has to be recoded. The S key toggles Stealth Mode, where all LEDs go off except for power indicator lights. The scanner servo will be moved to one side so it looks like it's off. This is because the scanner, power indicator LED and cup holder LEDs run straight off +3.3 volts.

Code written to tweet, but not completed. He can tweet but not read tweets or post pictures.
Webcam takes pictures with the file names being the date and time.

etc.
___________________________________________________________________

Current Status
20th November 2015
Wiring up the front claw to the second motor controller.

18th November 2015
Well Tink just ran on batteries for 9 hours and 17 minutes. The batteries weren't fully charged & I took the Wifi dongle out part way as I must have pressed R by accident and some test tweets were posted. The lid wasn't on and so the full complement of LEDs and motors weren't connected and running, and I only drove him round briefly, so I need to do a burn in with web cam on, taking pics, posting to twitter, driving round, with all sensors active and basically stress the system to get a good idea of how long Tink can last on batteries :)

So I have a bit more work to do :)

14th November 2015

15th November 2015
Decided to put the robot arm thingy that I got out of a dead white scotty dog toy, underneath the main beam at the front.


3rd November 2015
The next four pics show the servo motors installed for the head up and down motion:



5th November 2015
Edited 19 sound samples for Tink output, and saved them in Ogg Vorbis 128kbs 44100mhz, then emailed them to myself to get them on Tink, since my pen drive isn't being recognized on the Pi.
___________________________________________________________________

The Build
So I opened up the Bigtrak like it was Christmas, 'cos I like taking things apart, and losing screws. I removed everything from the base, and used a soldering iron to melt the contacts to the two motors on the gearbox so I could release the circuit board I wouldn't be needing, and soldered four wires to the motor contacts, using a piece of four core from a half decent Scart lead with quality thin wire I had knocking around. I glue gunned a piece of plastic along the length of where the old Bigtrak circuit board had been, to sit the motor controllers on and to avoid any contact from other wires with the motor contacts.

Using my soldering iron to melt plastic (which should be supervised, well ventilated, and don't breath in the fumes), I melted a hole for the headphone jack, one for the micro Usb power input to the #Raspi, a slit for the SD card and another for the composite video out jack (the yellow one, only on models A, B and B+).

I also melted out the top of the battery compartment to make room for the two battery holders.

I unplug the soldering iron as soon as I've used it on plastic, and hang it out of the window till it's cool, then sandpaper off the plastic, or crack it off with a pair of pliers.

Anyway, I mucked about for months until I could get the wires and LEDs to do as they were told. It was months before I got Tink to move, since I got a Laika board initially, but the instructions were few and far between, and even then not easy to follow, so I ditched that and got 2 motor controllers instead. The second is for the head, but that isn't in place yet.

         These are the various stages of development and redevelopment, since I didn't start with a plan.

Motors

Tink wasn't supposed to be a public project, and now there have been 10,000+ views on this blog I've stripped it all down again. I had to because the wires were so damn messy, and I wanted to get the 7 inch screen in, and needed pictures to show how I made it, so I can help others make robots.

I never had any specific plans for Tink, and I don't measure things. This explains a lot.

Initial positioning of RaspberryPi Model B, with Wifi adaptor and wireless dongle for wireless keypad and mouse combo.

This is an early version with the camera on, and the speakers for ears.

The first neck in place and some pincers.



Some red and green car spray paint. Good times and bad times. Lol

I cut the top out of the battery compartment to make room for the dual battery holders, 6 batteries to run the #RaspberryPi and 6 to run the motor controllers and motors. Eneloop batteries highly recommended as they last longer and hold charge for a lot longer

Third neck in place

With echo sensor, new antennae and rotating head 

7 inch monitor for the trailer below (note: No more trailer. Screen is now in Tink)

No room for anything else, but the amp still needs to slot in there somewhere?

Tink and trailer

Swapping Model B with Pi 2 in front. Wireless and bluetooth dongles are inserted, as well as the lead to the USB extension.

RaspberryPi 2 installed, more lights added to GPIO. Old Pi case turned upside down and glued in

Worked on the head - added a new base below the motor that turns the neck for stability - new antennae, speakers added and half wired.

Lol added some margarine and ointment to cogs in neck to make it run smooth!
Started work on autonomy code so he will flash eyes and move neck. Average temperature of Pi is 42 degrees C.

11/05/2015
Looking bad! :)

27/06/2015

03/09/15
Decided to do a mass rewiring as the previous mass was a messy mass.
Top left is the back of the tail motor, then the wires from the neck for the motor and LEDs, bottom right are the two motor controllers, one for the wheels, the other for the head and tail.

The Pi can output 3.3volts and isn't enough to drive most motors, hence the motor controllers.

06/09/2015
Out with the old motor, which made the head swing too much and wasn't accurate, and in with a stepper motor, which makes the head swing too much, but even more smoothly, but I'll code it out.
removed and replaced with a nice juicy servo motor.

Tools
As I've been building Tink I've collected a variety of tools, and below are the main ones.