User:1sfoerster/enes100/fall2014/Line Following Robot

Problem
Line following robots are needed to teach programming. This project is to design fabricate and test a line following robot using materials that are available in the HCC Engineering Laboratory.

Here is a video of robots programmed to solve a maze drawn with electrical tape on cardboard.

Conceive
Requirements:
 * Constructed from materials available in the HCC Engineering Laboratory.
 * Follow black lines on a white background.
 * Make pivoting turns.
 * Have a provision for an on-board micro-controller and motor controller.
 * Have a provision for on-board "breadboarding".
 * Have provision for mounting an IR sensor array


 * Robot chassis kits containing:
 * An acrylic platform on which to mount parts
 * Two DC gearmotors
 * Two metal mounting posts for the gearmotors
 * A battery box
 * Two driving wheels
 * Two tachometer wheels
 * Two red and two black lengths of wire
 * A swivel caster
 * Assorted #4 machine screws and nuts
 * Microcontrollers
 * Motor controllers
 * Infrared (I/R) sensor array
 * PLA (plastic rod for the Maker-bot)
 * Acrylic plastic and thin plywood for Laser Cutter

Issues
 * Space for micro-controller and motor controller
 * I/R Sensors works best when within 1/8 inch of surface

Requirements for brackets used to mount QTR sensor
 * position the sensor so that the robot's rear will not spin out.
 * position the sensor so that the sensor will recognize the black tape (needs to be low to the ground).
 * position the sensor so that the sensor is in the same direction as the car's forward direction.
 * cannot interfere with other parts of the robot.

Design
Weight Distribution
 * Arduino is 30g
 * motor shield is 34g
 * battery pack is 17g

-From ground to sensor: 1/8 inches

-From ground to platform of robot: 1.5 inches

-From sensor to platform of robot: 1.375 inches

Conclusion: Metal bracket can 1.375 inches maximum in length

include 

AF_DCMotor motor(1, MOTOR12_64KHZ); // create motor #2, 64KHz pwm

AF_DCMotor motor2(2, MOTOR12_64KHZ); // create motor #2, 64KHz pwm

void setup {

motor.setSpeed(255); // set the speed to 200/255

motor2.setSpeed(255); // set the speed to 200/255 }

void loop {

motor.run(FORWARD); // turn it on going forward

motor2.run(FORWARD); // turn it on going forward

delay(1000);

}

The code enables the user to control the speed and direction of the motors

Demo

 * Video
 * Presentation fall 2014

Next Steps

 * Future ENES 100 students:
 * Need to work on better packaging of the robot
 * Revise the code so that robot will make 90 degree turns
 * Revise the code so that robot will read black line from ANY angles