Sunday, July 7, 2013

Week 5/6: Line Following

It's been a slow two weeks, honestly. We waited for a part for the robot that was integral to its functioning and communication with the Arduino chip, and read up on papers and books while we waited.

But that's the nature of our project. It's not pipetting something twenty million times and filling columns of Excel spreadsheets with measurements. It's not like any lab class here at Tech, where a book guides you step-by-step and more or less holds your hand. We have a concept, and we put the pieces of the puzzle together from there. Some pieces take longer to find than others, but the idea of finishing an entire do-it-yourself project will be a sense of satisfaction all its own. And like my Grandma engraved into my head, always start with the frame and corner pieces; in other words take what you know and build on it.

The wire connections are those frame pieces. They're easy enough to understand, and certain pieces of hardware can ease the programming process. The Adafruit Motorshield is a flat chip placed on top of the Arduino board that allows easier programming and direct control of the wheels' speed and direction. It also comes with a whole slew of resistors and capacitors that must be soldered in. The three black rectangles are H-bridges, chips that allow varying currents in either direction.


The blue boxes are inputs for the DC motors that power the wheels. The orange taped wires come from  a battery pack under the hood that provide the power.

Assigning each motor a specific name, commands such as motorForward(MOTOR_1) can control each wheel independently. But what we want here is autonomous control, since the bacteria will eventually control the robot's direction. We fitted three infrared sensors on a board in front of the robot to allow it to sense dark-colored lines and follow them. This will come in handy when the robot needs to follow a path to a food source dictated by bacteria.


The three IR sensors are the red boxes spaced equally apart on the yellow-gold board. They send data to the shield/Arduino, which will rotate the robot accordingly via the motors.

We'll be refining the line-following program in the next week, while eventually getting a bacterial interface hooked up. It wouldn't be any fun if this was easy. 

Cheers,

Ben

No comments:

Post a Comment