A) Hardware Required : ( All in one package) http://amzn.to/2m4P9W5 (Rs.1100/- only) without Arduino
- Arduino Board : http://amzn.to/2mlLbKP
- Motor Shield L293D : http://amzn.to/2mX5mvM
- IR Sensor x2 : http://amzn.to/2mlJNYQ
- DC Motor and wheel x2 : http://amzn.to/2lJeynf
- Bovine Wheel
- Chassis plate : http://amzn.to/2mlMee1
- Battery 9V
- Battery Buckle
- Wires
- Button
1) The DC motors attach to the chassis
2) The Arduino attach to the chassis
3) The Motor Shield attach to the Arduino.
About the Motor Shield:
- The motor controllers on this shield are designed to run from 4.5V to 25V.
- There are two places you can get your motor 'high voltage supply' from. One is the DC jack on the Arduino board and the other is the 2-terminal block on the shield that is labeled EXT_PWR.
- To connect a motor, simply solder two wires to the terminals and then connect them to either the M1, M2, M3, or M4.
4) The QTR-8RC Reflectance Sensor attach to the chassis.
----------
C) Connections :
1) DC Motors connect to the Motor Shield
5) Battery and on / off button connection
- The (+) from the battery is connect to a leg of the button
- Connect a cable to the other legs of the button. This cable is for Motor Shield (+)
6) Attach wheels
----------
1) Open the new Arduino IDE page and Delete everything on the page
Nice ..Thankx For sharing .
ReplyDeleteThanks for visiting in our Blog
DeleteI have made a line following robot I have insert left motor to m3 and right for m4.i have inserted ir sensor to +5v for both and Gnd for both .as u I have given in the Blog pictures. But the robot isn't working I tried uploading ur code but still .What should I do.
ReplyDelete//CAMELLIA INSTITUTE OF TECHNOLOGY
Delete//SCIENCE EXHIBITION 2K17
//(RONI,MONDIRA,AJIT)
// declaring Shield
int dataPin = 8;
int latchPin = 12;
int clockPin = 4;
int en = 7;
// declaring Sensor Pins.
int LeftSensor = A0;
int RightSensor = A1;
int L_sensor_val = 0; // To store value from sensors.
int R_sensor_val = 0;
int threshold = 300; // Threshold value to distinguish black and white.
void setup()
{ // setting up shield.
pinMode(dataPin, OUTPUT);
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(en, OUTPUT);
digitalWrite(en, LOW);
}
void loop()
{
L_sensor_val = analogRead(LeftSensor); // Reading Left sensor data
R_sensor_val = analogRead(RightSensor); // Reading Right sensor data
if(R_sensor_val>threshold && L_sensor_valthreshold && L_sensor_valthreshold && R_sensor_valthreshold && R_sensor_val<threshold){
turn_left();
L_sensor_val = analogRead(LeftSensor);
R_sensor_val = analogRead(RightSensor);
}
}
else if(L_sensor_val<threshold && R_sensor_val<threshold){ // tesing for halt
while (L_sensor_val<threshold && R_sensor_val<threshold){
halt();
L_sensor_val = analogRead(LeftSensor);
R_sensor_val = analogRead(RightSensor);
}
}
forward(); // Default movement is forward.
}
void forward(void){ // function for forward movement.
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, 3);
digitalWrite(latchPin, HIGH);
}
void turn_left(void){ // function for left turn.
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, 161);
digitalWrite(latchPin, HIGH);
}
void turn_right(void){ // function for Right turn.
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, 38);
digitalWrite(latchPin, HIGH);
}
void halt(void){ // function for stopping robot.
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, 32);
digitalWrite(latchPin, HIGH);
}
Check your IR Pin connections...
DeleteNice Website i like it
ReplyDeletei had bought this kit with lot of expectations but i found nothing i.e no coding or some tutorials are present but i am thankful that you gave the circuit diagrams and all other things but its so messy
ReplyDeletei feel you should buy any other line following machine
Thank you...
DeleteHai, im using the same configuration and coding as yours but my robot doesnt work where my sensor need to be lift up to move, if theres any item block the sensor and it will stop. Can u help me \?
ReplyDeletei want to increase the speeed of the bot can u help me plz i hav used 1000rpm geared dc otor but it didnt work
ReplyDeleteUse proper power supply...
Deletehow if I add more ir sensor (become 4 ir sensor)?
ReplyDelete