Introduction: [arduino Motor Shield] Line Following Robot (FC-51)

I have noticed a lot of people make line following robots but not much using the arduino motor shield. And Since arduino didn't name it a pop-out name it got messed up between the shield and the arduino itself.So I said instead of making other people go through the process that I did I'll make a tutorial for them.


NOTE:

motors on the shield require more amps than an AA or a 9V battery can supply keep in mind that the shield can supply 4 amps to both channels (2 amps each) and a range from 6v to 12v DC. To know how much yours is visit:

https://en.wikipedia.org/wiki/AA_battery

and

https://en.wikipedia.org/wiki/Nine-volt_battery

I had the problem where the motors don't move unless i plug it using USB, until I found out that my battery only supplies less than 500mAh (milliAmps an Hour) so i went and bought 2200mAh rechargeable AA batteries and that did the trick.

So what are we waiting for lets begin...

Step 1: PARTS

In this project you will need:

1. 2x IR line follow sensor (I used fc-51)

2. 1x arduino motor shield

3. 1x any arduino

4. (optional) 2WD robot platform [or create your own]

5. 2x 6v motors (9v would work as well)

6. 5x AA (1000mAh or more) batteries

Step 2: Circuit and Connections

NOTE:

I couldn't find the fc-51 in fritzing so i put the humidity sensor there is no differences in the connection.


OUT of left sensor goes to A5

OUT of right sesnor goes to A4

POWER of both sensors go to 5V

GND of both sensors go to GND


Step 3: CODE

Please keep in mind that I wrote the code and it took me a lot of time so if you want to post it anywhere else please refer them to THIS instructable.

Thanks to all of you who read my post.

THIS IS my first post, I hope you like it.

and follow me because I will post the obstacle avoiding and many more robots soon with this motor shield too.

If you have ANY question don't hesitate to post them below.

youtube channel:
youtube.com/mwnllt

instagram:
instagram.com/thethoughtfulguy

Comments

author
Ofibro made it!(author)2015-06-15

Hope you all like it.

Again, any questions? reply to this post.

author
harshits62 made it!(author)2017-06-30

I am having adafruit motor shield , used the circuit and code but my robot is not moving. Any suggestions? And please reply as soon as possble

author
MOD4 made it!(author)2015-08-29

what about making it with H-bridge

author
Ofibro made it!(author)2015-08-30

H-bridge is programmed the same way.. search online for programming it.

Sorry I cant write the code for you as I have exams maybe a month or 2 so follow me to get the good news.

Thanks Ofibro.

author
Sasuch+Uzuto made it!(author)2016-10-01

I am going to make this for my Physics project. Just the one I needed, with motor shield. Thank you very much! Arigatto!

author
KomalH1 made it!(author)2016-04-07

hello,

I am trying linefollower robot using this instructable but i hav motorshield of adafruit.can i use the my motorshield for this robot?