Autonomous Robot Part 2 – Donatello – The Turtle Bot

IMG_5372

 

We started this project with the goal of creating a robot that makes its own art. Donatello is a simple robot designed to draw turtle graphics on whiteboard tables. Named after the teenage mutant ninja turtle, Donatello uses a two DC motors, a dry erase marker, and a webcam to move around, draw lines, and see where it has been. The body of the robot is constructed out of open beam components and custom 1/8th inch plexiglass laser cut pieces. Donatello uses a raspberry pi as a brain. The pi is running a custom python program that uses the wiringpi and OpenCV libraries. The future holds many possibility for the logic that Donatello follows. The current rendition of the code has a simple two state system. When the camera detects a blue line under the robot it drives in a zig-zac line, when no line is detected under the robot Donatello draws a slowly drifting spiral shape.

Below are detailed photos, code, and diagrams that should help you build your own version of Donatello.
IMG_5337

 

The first diagram of the robot. (top view). NOTE: The second marker has been replaced with a wheel.

IMG_5343

 

The robot drawing a line.

IMG_5353

An early attempt at drawing lines. (one of many)

974723_10205175597655457_1533963184_n

View the code here. 

The electrical diagram of the robot.

afgg

 

What the robot sees. (the small window near the mouse is the computer’s view of what is blue)