Lego robot design competetion

Team 21

TEAM MEMBERS:

  1. Osama Badar
  2. Alex Speltz
  3. Zara Ibrahim


This is a mail link: Mail Us

Design

The design of the robot was simple.We made a forklift in the front.This had a gate which was operated by the servo.The gates would open at specific time intervals after the ball had been spotted.A chain was used to connect the gears from one end of the gate to the other so that the gates open at the same time.The main chasis of the robot was made solid by passing vertical beams through so that it could withstand a fall of 3 feet.Two motors were mounted at the back which moved the robot.The gear train which was located at the back had the ratio of 25 to 1.This provided a lot of torque to the wheels.At the back we also mounted the battery and the happyboard and therefore all the connections ran from the back.Wires and sensors were properly sodered in place and used later.We used two servos,one was used to open the gates and the other was used to lift the forklift as seen in the picture.

An image:

An image:here we can see the forklift without the gates.


Code

The code was designed as such to make the robot follow a specific path.The robot was suppose to align itself using a set of three LED and phototransistor pair and than move towards the big ball.One of the LED was in the top left and two of them were located at the back at equal spacing.Given the color of the board the LED would either be in dark or lighter regions and through experiments we determine the threshold region.The robot after detecting where it was placed was given 8 conditions to rotate a specific amount of angle.Gyroscopes helped us to rotate the robot at certain angle.After having rotated it would move a given amount of distance.This was achieved using shaft encoders.The shaft encoders would calculate the rotations of the wheel.Later the robot was made to align itself perpendicular to the wall.This was done by installing bump sensors at the back.The robot would catch one ball raise the lift and throw the ball in the goal.It would than go for the second ball.After that it would go to block the opponents goal.

Code

Designing intelligent robot

We tried to make the robot intelligent by installing the distance sensor on the central axis of the robot.This sensor would sense the ball while the robot was rotating.The idea behind it was to make sure that since the gyroscope was inaccurate it always offshooted the robot by a certain angle.this little angle deviateion would result in a large offshooting from the target as we know s=r(theta).Therefore, a distance sensor in the front would spot the ball while the robot was in motion and thereafter stop the robot , open the gates and move towards the ball. We also calibrated the distance sensor and made the best fit line .The equation obtained was :y = 1.7371x - 3.4669. Continuous data was obtained and averaged and graphed.We were able to do this for the left motion but due to certain technicalities we were unable to complete this project.I am attaching the code for this aswell.