Skip to main content

Home/ Robotics P1/ Group items tagged pid

Rss Feed Group items tagged

Declan Coen

PID Controller For Lego Mindstorms Robots - 7 views

  • light sensor "sees white" then we know it is left of the line's edge (and the line). If it "sees black" then we know it is to the right of the line's edge (and on the line). This is called a "left hand line follower" since it is following the line's left edge
  • We need to know what values the light sensor returns when it "sees white" and when it "sees black". A typical uncalibrated sensor might give a "white" reading of 50 and a "black" reading of 40 (uncalibrated, on a 0 to 100 scale). It is convenient to draw the values on a simple number line to help visualize how we convert light sensor values into changes in the robot's movement.
  • Below are our made up light values for white and black.
  • ...4 more annotations...
  • We'll just divide the range into two equal pieces and say that if the light level is less than 45 we want the robot to turn left. If it is greater than 45 we want to turn right. I won't go into how exactly the turns should be done. I'll just say that gentle turns work well for a fairly straight line
  • line with lots of curves usually needs to be making sharper turns. For gentle turns you might use Power levels of 50% on the fast wheel and 20% on the slow wheel. For sharper turns on a curvy line you might need to use 30% power for the fast wheel and coast or brake the slow wheel. Whatever power levels you use the numbers will be the same for the two turns, you just switch which motor gets the big number and which get the smaller number (or a stop command).
  • This type of a line follower will follow a line but it isn't very pretty. It looks OK on a straight line with with the motors programmed for gentle turns. But if the line has any curves then you have tell the robot to use sharper turns to follow line. That makes the robot swing back and forth across the line. The robot only "knows" how to do two things; turn left and turn right. This approach can be made to work but it is not very fast or accurate and looks terrible.
  • In the above approach the robot never drives straight, even if it is perfectly aligned with line's edge and the line is straight. That doesn't seem very efficient does it? Lets try to fix that. Instead of dividing our light value number line into two regions lets divide it into three.
  •  
    seems useful for following a line effectively
  • ...1 more comment...
  •  
    this is a really good technique
  •  
    the top of this article explains how it would be easier to follow the edge of the line rather than the center of the line. As it detects the white it will turn back to the black and as it detects the black it will turn back to the white.
  •  
    i found the edge thing on another site too
1 - 1 of 1
Showing 20 items per page