TinCan R2D2

Introduction

This page just gives a roundup for my tin can based R2D2 build (which is also my first project I used 3D printing) . For a detailed build log see the blog.

The idea in general for this project was to convert a tin can, which normally is used for coffee powder, into a R2D2 like robot which could be remote controlled from a smart phone or tablet.

The first start was a little clumsy as you can see in the picture below since my metal work skills are poor, and also I don’t have the right tools for precise metal crafting.

The Tin Can

The Tin Can

First Attempt

First Attempt

 

 

 

 

 

 

 

 

 

Things changed dramatically at the day I bought a Ultimaker 3D printer and started designing the parts around the tin can with OpenSCAD:

Tin Can R2D exploded view

Tin Can R2D exploded view

Thus it was really easy to transform the model:

Tin Can R2D2 in pink

Tin Can R2D2 in pink

Into something real which pretty much looks like the model:

Tin Can R2D2

Tin Can R2D2

The final robot turned out to have the following features:

  • Remote controlled through Android App from smart phone or tablet by using bluetoooth
  • Play sound from PCM (like typical R2D2 bleep-bleep)
  • Show some “emotions” through LED face (like sad, happy)
  • Use ultrasonic range finder to run in “save” mode (prevent it from crashing in to objects)

The following things are used for this:

  • Parallax Propeller QuickStart board as on-board MCU, firmware programmed in spin
  • Android Application written with Processings Android mode
  • OpenSCAD to create the models for the 3D printed parts
  • Ultimaker 3D printer to print the parts
  • ….

All code, plans etc. for this project could be found on github.

Here is a short video of the two robots I build in action:

Electronics

Schematic:

Tin Can R2D2 Schematic

Tin Can R2D2 Schematic

BOM:

The full BOM for the electronics looks like so:

3D Printed Parts

The following parts are 3D printed:

    • Front wheel
    • Bottom base
    • Top base
    • Legs
    • Dome
    • Dome cover
    • LED face housing
    • Speaker housing
    • Inlay to hold electronics
Front Wheel and Legs

Front Wheel and Legs

Inlay with batteries

Inlay with batteries

Skeleton of tin can R2KT

Skeleton of tin can R2KT

Software

1. Firmware

The firmware is entirely written in Propeller Spin. Using Spin helped speeding up development a lot. Also having 8 cores on the propeller is very convenient :-). Roughly the software is structured like this:

The tinshell connects to the BTBee through serial line receiving commands from BT (I also made the library for creating shells available separately).

The shell ques the commands for driving the bot to the drivepilot. The drivepilot controls the DC motors through the motor controller library (also available separately), queries the ultrasonic distance sensor for obstacles and sends commands to the effects processors for sound and light. Since the tin can robot easily flips over when speed up to fast, the drivepilot slowly increases speed (by using a PWM) when starting or stopping.

The lighteffects module is responsible to drive the “LED face”. Showing emotions like a sad face when the robot is stopped, or a happy face when the robot is driven.

The soundeffects module is responsible for playing PCM sounds. E.g. typical R2D2 bleeps.

2. Android App

The Android App is written using the Processing Android mode together with the Ketai library to access the smart phones bluetooth. Since Processing does not provide GUI elements by default, I wrote a simple framework to provide basic buttons an stuff. Since one of my childs is left handed, I made the GUI in a lefty and righty variant.

Discovering Devices

Discovering Devices

Right Hand Control

Right Hand Control

Left Hand Control

Left Hand Control

Assembly

Not much to say about that, but I do have some pictures showing the assembly:

Main components of a tin can robot

Main components of a tin can robot

Wiring everything up

Wiring everything up

Brain surgery

Brain surgery

Leg connected to base with motor

Leg connected to base with motor

Perf Board Wiring

Perf Board Wiring

Wiring Pen

Wiring Pen

Perf Board Shield

Perf Board Shield

Perf Board Shield on QuickStart

Perf Board Shield on QuickStart

And a short video of the first electronics tests:

Leave a Reply

You must be logged in to post a comment.