Thursday, 30 November 2017

LINE FOLLOWER Part 3 : CONNECTING ALL TOGETHER AND CONCEPT

LINE FOLLOWER Part 3 : CONNECTING ALL TOGETHER AND CONCEPT

Coming to the part 3 all you need is- 
  1. Arduino UNO(you can use others also,but I prefer UNO for beginners)
  2. Sensor Array(min 3 to max 5 numbers of ir sensors)
  3. Motor Driver(L298 or any other)
  4. Line follower Chassis
  5. Two DC motors
  6. Jumper Wires(male-female,female-female)
  7. Wheels and an Castro Wheel(Multi directional wheel)

Connect all the Modules According to the diagram given below:-



Points Worth Noting:-
  • All the modules should have a common ground. Every time you add any module to your project you should add ground of module to the ground pin of Arduino.
  • Connect the enable of motor Driver to any of PWM pins(3,5,6,9,10,11). It will help you to control the speed of Motor.
  • If you don't want speed Control then add enable pin to 5V of motor Driver or Vin, it will then take max speed in default.
  • Put all your sensor input to the analog pins. Its more convenient and gracious. You can use these pins as analog(A0....A5) or as digital pins(14-19). Digital input is better for line follower.
Concept Behind the Line follower Algorithm:
I will discuss the concept or the idea that can you use easily. Suppose you have 3 sensors so there are total of 8 possibilities of sensor values.
You can use the formula-2^(No. of sensors)"
If you are using 5 sensors then you have 2^5=32 possibilities.
Lets go in detail....
See the figure

  • The sensor give digital HIGH while on white surface and digital LOW on black surface or VICE VERSA if you have sensor of inverting mode(op-amp).
  • Here we are considering following black line on white surface.
  • Going case by case.
CASE
ACTION REQUIRED
LEFT MOTOR
RIGHT MOTOR
1
FORWARD
FORWARD
FORWARD
2
SMOOTH TURN RIGHT  
FORWARD
STOP
3
SMOOTH TURN LEFT  
STOP
FORWARD
4
STOP OR START
STOP OR FORWARD
STOP OR FORWARD
5
STOP OR START
STOP OR FORWARD
STOP OR FORWARD
6
SHARP RIGHT TURN
FORWARD
REVERSE
7
SHARP LEFT TURN
REVERSE
FORWARD
8
ANTINODE DETECT
STOP OR FORWARD
STOP OR FORWARD


  • For simplicity here speed control is not disscussed. You can do that using Enable pin and analogWrite(pin number, 0-255) in arduino codes.
  • Codes to the line follower bot is in next blog.



No comments:

Post a Comment