K-9

April, 2015

I’ve been a Whovian for many years and the 4th Doctor (Tom Baker) will always be my favorite.  There are many reasons including his playful quirkiness, colorful scarf, his fondness for Jelly Babies, but definitely K-9, his robot dog companion.  30+ years later, I finally built up the courage and skills (and funds) to try to build a replica K-9 for my own and I’m really happy with the results!

K-9 Compare

This project has been significant for me in many ways.  It exposed me to a bunch of new technologies and I’ve learned a lot!  It is the largest, most elaborate, and most powerful (not to mention, most expensive) robot I’ve ever attempted to build.  The total project duration from conception to completion was about 4 months.  The bulk of the time was done over the winter holidays when I had lots of free time with large portions of weekends consumed after the winter vacation concluded.

Overview of Features:

K-9 has lots of great features that allow him to stay true to the TV series character:

  • Remote control movement – Forward/Backward, Left/Right and Lateral movements
  • Remote triggered voice playback – 12 different voice and sound clips recorded from the TV series (Yes, that is John Leeson’s voice)
  • Glowing red eyes, pivoting “radar” ears, and a glowing blue undercarriage
  • Nose laser extends, glows, and retracts
  • Eye sensor-thingy extends and retracts
  • Head raises/lowers
  • Back buttons act as power switches and trigger sound clip playback

The Build Process:

The build process was greatly accelerated by the excellent documentation posted on fan sites (Podpadstudios, TK560).  I cobbled together details about the dimensions and quickly assembled a paper prototype of the body shell and head.  I then used the paper as templates to cut out the final parts.

IMAG0354

The paper models helped me fine tune the parts.  For example, I found that the head plans were too big, so I scaled them to 85% and used that instead.

IMAG0375

My original thought was to build the body shell and head out of aluminum.  My thinking was that it would be easy to machine and bend without having to invest in a lot of new tools.  However, the weight of the material was prohibitive.  Also, I was concerned it would interfere with the radio signals to control the robot, so I rejected that idea.  I’ve used High Density Polyethylene (HDPE) on other robot projects, and found it very easy to work with, so I thought I would give it a try for K-9.  I bought 24″x36″ sheets of 3/32″ thick HDPE for the shell.  Plastic is light weight, easy to machine, bendable (using heat) and transparent to radio waves.  Also, it can be painted to look like metal.

IMAG0368

I custom-built a bend table using Nichrome wire (based on this tutorial) for the larger plastic pieces and used it to form the shapes.  My DC power supply was not powerful enough, so I had to buy a 500 VA Variac transformer which worked well.

IMAG0369

For another robot, I also used some Actobotic pieces and found them to be wonderful to work with.  The channel pieces were made of lightweight aluminum that is very strong and the hole patterns make them easy to work with.  They also offer a variety of different sizes and connectors, so I decided to use that for the inner frame of the robot.

IMAG0457

A key design requirement was that I needed the ability to pick up K-9 to lift him into cars, onto carts, etc.  K-9 has handled on the outside, but the real trick would be to provide an inner frame that can allow those handles to take the full load of the robot.  I had to do some non-standard angles with Actobotic parts to make this work, but it turned out well.

IMAG0526

My original thought was that I would weld all the joints so I would have the cleanest exterior possible.  I splurged and bought a Master  PH-1400WK Proheat Plastic Welding Kit.

IMAG0366

Unfortunately, I got varying results and the risk of cracking joints was too great.  Reluctantly, I resigned myself to using loads of angle brackets and nuts/bolts to reinforce all the joints.  In the end, I was able to paint over the flat screw heads, but I still think they look ugly.

Along the way, I built various jigs to help me with special parts.  For example, the bend in the snout required a considerable amount of prep work.  I cut a piece of PVC pipe at an angle and used this custom vice to apply pressure while applying heat to shape the piece.

IMAG0378

There were some key parts of K-9 that I knew I did not have the right tools for.  After much research I found Ponoko.com and decided to use them to laser cut some plastic pieces for use on K-9.  Since these were 2D models, I used Inkscape because I had previous experience using it for the EggBot project.  I must say the folks at Ponoko were very patient with me as it took me multiple tries to submit the file in the proper format for their laser cutter to use.  I used Ponoko to laser cut the logo (white plastic), the LCD frame (white plastic) and the eye grill (red transparent acrylic) and was surprised how affordable their prices were (each part was less than $15).  I layered strips of the red transparent plastic to give a 3D effect for the eye grill.

K9 eyes

K9 Logot

Fabricating the ears was a multi-step process involving some metal work and some clay.  Penwiper had excellent ideas about cutting up a mesh pencil cup for the ears.  I wired them to a 3/16″ wood dowel and then applied Apoxy Sculpt around the edges and for the base.  Apoxy Sculpt is a binary compound that air-dries to a rock-hard finish that can be sanded.

IMAG0473

One of the final steps was to paint the exterior shell.  I had read that plastics were notoriously difficult to paint, so I did extra prep steps to ensure proper adhesion.  I used a wire-brush to score each piece before painting.  I then applied a primer layer of Kilz2 Latex, and then a top coat using Behr Premium Plus hi-gloss (color:  Magnetic Grey).  The hi-gloss finish really turned out well and made it look like metal

IMAG0506

The Components:

  • Structure
    • Various Actobotics aluminum channels, angle brackets and hubs
    • I used some left-over RGB LED strips zip-tied to the bottom of the frame for the blue glow effect.  I cut all but the blue wire and added a 10 ohm current-limiting resistor to adjust the brightness.
  • Brain
    • K-9 actually has 3 brains that all work together.  I mounted them on a custom mezzanine board using 2.5″ stand-offs.  See a link below for the source code.
      • An Arduino Uno with a Xbee Shield and Xbee Pro that controls the remote voice, the laser, and the eye sensor
      • An Arduino Uno with a Adafruit Motor Shield v2 that controls the linear actuator for the neck
      • A Raspberry Pi that controls the slideshow for the LDC screen

IMAG0469

  • RC
    • I had an existing Spektrum DX7s from another project that I wanted to use.  I wish it had more channels.
    • I was ready to buy another Spektrum AR8000 receiver when a friend made me aware of the OrangeRX 910 – functionally identical and a fraction of the cost!
    • The remote for the voice control was a custom box I built based off of a very similar design for another robot.
  • Voice
    • I originally bought a new Adafruit AudioFX sound board, but discovered the serial interface was not yet functional.
    • I then bought a MDFly MP3 module and found it met my needs, but was too quiet.  I bought an Adafruit Class D Amp circuit to boost the signal and it worked well.
    • I found the MDFly had a bunch of extra pins that could be tied to Ground to trigger voices on demand.  I wired each of the pins to a button on the back via a ribbon cable.
  • Neck
  • Ears
    • To drive the pair of ears, I modified a Hitec HS-311 servo for continuous rotation.  I built a custom push rod using 18 AWG wire attached to some standard servo horns on the bottoms of each ear.  I used a Servo City Aluminum Vertical Servo Mount to mount one side of the servo to the inside top of the curved head.
    • The motor is a bit loud, but also gives the reminder that it is a robot, so I’ve not attempted to dampen the sound.
    • To allow the ears to swivel freely, I bought a pair of Spyraflo Flanged Ball Bearing (3/16″) BFM-187-N which turned out to be ridiculously difficult to source (only place on the planet I could find them was in Australia!)
  • Display
    • I bought a generic 6″ LCD monitor and connected it to a Raspberry Pi after removing its plastic frame
    • I found a great hardened, automated slideshow app for the Pi from Binary Emotions and use that to drive the random pictures displayed
    • I downloaded dozens of images from the Internet of various characters in the Dr. Who universe.  Not all of them are related to K-9, but they are all certainly memorable.

IMAG0503

  • Propulsion
    • I’m using a set of 100mm Mecanum wheels & hubs from Robot Shop.com.  I’ll be honest, the concept of these wheels still makes my brain hurt thinking about how they work.
    • I’m using the 165 RPM Planetary Gear Motors from ServoCity to drive the wheels.  These are really good motors – a good balance of speed and torque, and are also fairly quiet.  Robot Shop’s excellent Drive Motor Sizing Tool was very helpful in finding the right specs for the motors.
    • I selected a pair of Sabertooth Dual 12A Motor Controllers to drive the motors and interface directly into the OrangeRX RC receiver.  I found these to be a bit flaky at first and had to add liberal amounts of capacitors to make them work consistently.  I’ve found that they do not work as advertised with regard to shutdown when no RF signal is received – in fact, I’ve had a few accidents when I didn’t power things in the proper order because they just make the robot take-off at full speed unexpectedly.  I’ve got most of this worked out, but every once in a while, when it first starts up, it acts strangely and I have to recycle the power to get them to re-calibrate.
    • Rather than roll my own, I bought the RobotLogic Mecanum Mixer – it works well and was easy to setup.  Much better than attempting to drive the robot by moving the stick in a diagonal direction.
  • Shell
    • As discussed above, I selected 3/16″ HDPE for the shell material.
    • I invested in a good plastic scoring cutter with replaceable blades to make the cuts go faster.
    • I also bought lots of right angle brackets and used a variety of lock-nut/bolt sizes for different parts of the robot.  #6-32 for the head, #8-32 for the body, #4-40 for attaching the logo.
    • I used some Neodyne magnets to hold the side panel
  • Back
    • It took a LOT of shopping to find the buttons I wanted for the back panel.  I finally found some that met my specs from a supplier in China.
    • I used 22mm illuminated square (non-latching) push buttons of different colours for most of the back buttons.
    • I put in a pair of 22mm illuminated square (latching) push buttons to allow me to use them as power switches for the robot and the Raspberry Pi.  I found the frequent on/off of the robot was fragging the Pi’s boot SD card and I was having to re-load the OS frequently.  I solved this by giving the Pi it’s own power switch.
    • I found some nice big 1.5″ square buttons for the top of the panel.  Unfortunately, I could not find anything this size with an LED bulb, so had to settle for these with a standard T-10 incandescent bulb.  I tried 3 different LED T-10 replacement bulbs, but could not get them to fit up inside the button.
    • I had to put in a current limiting resistor (10 ohm, 1W) to adjust the brightness of the lamps inside these switches.
    • I installed a an Adafruit T-Cobbler breakout board for the Raspberry Pi.  I built a custom length 26-pin ribbon cable and extended it down to the MDFly board.  This let me easily detach the wiring from the top to allow it to be removed.

IMAG0532

  • Head
    • After much trial and error, I settled on a 12″ Actobotic channel with 4 brass stand-offs to be the main structure for the head.  It gave me a good mounting platform for a plastic threaded flange that I used to attach to the 1″ PVC pipe used for the neck
    • I used this great tutorial to learn how to bend the PVC pipe to the angle needed for the neck.
    • The eye-sensor uses a suction cup from a toy ninja throwing star, a 3/16″ aluminum rod, and a Hitec HS-65HB Servo.  The servo is quiet and designed for 90 degrees of movement which was perfect for my needs.  I mounted the servo using Servo City’s 90 degree universal servo mount.
    • The nose laser uses a hollow 5/8″ plastic tube with a standard 5mm red LED inside.  I used a crappy Firgelli PQ12 linear actuator to extend/retract the nose.  I bought it for another project and had it lying around.  It’s a major pain to work with, but I had already made the investment, so found a use for it.
    • I mounted a small 8 ohm speaker to the mouth-area of the head and drilled tiny holes to allow the sound to come through.
    • I also wired 2 5mm red LEDs for the eyes.

K9 head

  • Battery
    • I had a 12V Lead-Acid battery from another robot, and decided to give it a try.  As it turned out, this was the perfect fit for my needs.
    • It is an 8 amp-hour battery and is quite heavy, but my average current usage is about 1 Amp which means about 8 hours of fun!
    • The only down side to this battery is that it requires a LONG time to recharge – up to 12 hours if fully drained.
  • Finding parts in unusual places

Lessons Learned:

  • Paint issues – flaking
    • Everything thing I read online warned me that painting HDPE would be difficult.  I did all the recommended prep work, and they were still right – the paint scrapes off very easily.  No amount of brushing or priming seems to help.
    • Luckily I have lots of paint left over and have been doing touch-ups
  • Carrying Case
    • I got this great idea from a post on Google+ (sorry who ever you are, I can’t find your post to give you credit) – use an inexpensive Plano pistol case to build a custom foam-lined case for the remote controls, chargers and tools.
    • Now when I go to a Con to show off K-9, I’ll have fewer things to carry.

IMAG0538

  • Brush vs. sponge
    • When I started applying paint, I used an old paint 1.5″ brush I had left over from a previous project.  This left ugly streaks on the finish and often left behind bristles.
    • My went to the hardware store and found a variety pack of sponge brushes.  These provided a much more even coat of paint without the brush strokes.  It helped to give the appearance of metal.
  • Bad Vibrations
    • The Mecanum wheels are one of the coolest features of the robot and help it do some amazing things.  Unfortunately they come at the price of adding a lot of vibration when moving.
    • I was concerned that the nuts would start to loosen over time, so I invested in some lock nuts which provide a plastic ring that prevents loosening due to vibration
  • Plastic welding is not easy to do right
    • My very first attempt at plastic welding was with 2 scrap pieces at a right angle.  The finish was smooth and the pieces received enough heat that they are truly 1 solid piece now.  I remember thinking “this is going to be easy!” – wrong.
    • In all subsequent attempts, I was never able to get the same result – very frustrating!
    • Many of the weld attempts resulted in cracking and ugly finishes.  I suspect it had to do with my environment (a cold garage) and inconsistent application speed.
    • In the future, I’ll be reluctant to use the plastic welding
  • Power Distribution Units
    • In order to reduce the number of wires stung to different parts of the robot (especially the head), I developed Power Distribution Units (PDUs) that provided +5V, +12V and Ground.  I then soldered shorter wires to the PDU and used it to power the remote circuits.
    • Unfortunately, I did not label them well and when re-attaching, I flipped the +5V and +12V lines which resulted in catastrophy – fried LEDs and servos.  Lesson learned (hopefully):  Label everything!

IMAG0548

Source Code

September, 2015 Update

All the hard work paid off.  K-9 won first prize in a local con’s cosplay competition in the Props category!  However, I think the real highlight was driving him around the con floor and seeing the reactions of all age groups.  The pure delight on the faces of passing conventioners warmed my heart.  I was pleasantly surprised to see the number of teens know who he was.  I got lots of folks who just recognized him as a robot dog – that’s OK too.  Everyone seemed to want to pet him on the head which was nerve racking for me since that is quite a delicate area.  Lots of kids enjoyed pressing his back buttons, but the noise level was so high, it was hard to hear him speaking and making noises.

K9 at the Con

Just before pre-judging, I was preparing K-9 for the show.  Everything was working fine.  Suddenly, 30 seconds before we went into the judging room, catastrophe happened.  The push wire to one of his ears broke, and stopped swiveling.   One judge said “that’s ok, he’s just suffered a mild stroke”.  Also, something happened to the Raspberry pi’s boot disk and the slide show would not function! I’ve seen this before when I recycle power too frequently to the pi and the SD card gets corrupted.  I can re-format and re-build the drive, but it takes a while.  Regardless of the system failures, he was a huge hit and I’ll definitely bring him to other cons int he future.

I was lucky enough to find an empty room where I could leave the cart and some of the supporting equipment.  It also gave me a chance to re-charge K-9 part-way through the show which extended the enjoyment.  At the very end of the show, his batteries were completely spent and I could barely get him to move on the carpeted floor.

Lesson’s learned for next time:

  • Bring a charger for the voice remote – forgot that
  • Bring needle nosed pliers – I brought lots of tools, but really needed the pliers to fix the broken push wire.
  • Bring a charged, spare battery
  • Find a way to connect the voice remote to the movement remote for single person usage
  • Increase the volume of K-9

Emerging from the Tardis.JPG

Advertisements

8 Comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s