DrawBot Field Trip

Arduino is an open-source electronics prototyping platform that allows students, engineers, and hobbyists to relatively easily attach sensors, motors, and other peripherals to a microcontroller, and program it using a desktop computer.

We were given a task that would build our familiarity with this platform that will come in handy for our upcoming project, in which we will have to design a bioreactor.  If our bioreactor has mechanical components, we will likely end up controlling them with the Arduino because of its cost, simplicity, and strong community.  1 Arduino Uno (a midrange model) is ~$25, and there are hundreds of compatible components at Adafruit, including the Motor Shield v2, which we were also provided with.

Our task was to have the Arduino control two stepper motors that would spool strings attached to a pen, and have the pen draw a triangle on a provided easel (thereby inspiring the name “DrawBot”).  There are a number of variations on this task online, with openly available solutions, many of which also call themselves DrawBots.  Here’s an impressively precise prior implementation called the Makelangelo DrawBot.

Our group set out to The Cooper Union to learn a little Arduino wisdom and check out their lab space.

IMG_1131

The first task was to wire up the boards to a power supply and stepper motors, which takes a steady hand and a soldering iron.  AK is hard at work on this task:

drawbot1

Now that everything is wired up, time to fire up the Arduino IDE and see if the computer can control the stepper motors.  Initial twitches of the motors are greeted with relief.  Alright, we’re in business!

drawbot2

Our instructor looks on nervously as we order our DrawBots to gyrate in strange and unpredictable ways.

drawbot4

Here Ben is scouring Ted’s code for bugs that seem to be distorting the DrawBot’s coordinate conversion functions.  Since the strings are not orthogonal and the angle between them changes as the spools vary the string length, the motions to produce a straight line are not simple and require precise acceleration curves for the stepper motors.  Since our task is to draw a triangle, we need the pen tip to move in straight lines from vertex to vertex.

drawbot3

We decide to wrap our mostly-assembled DrawBots for the day and proceed with further work back at Mount Sinai.  Except for Ted, who is clearly not looking forward to debugging his own code, the team is pleased with this outcome.

drawbot5

Comments are closed.