Pololu IR Sensor, Parallax B.O.E. Shield Bot and Arduino Uno HELP
Psychobagger
Posts: 2
Hi there! Thanks for opening this thread. Please open up the linked document and images for a full understanding of my dilemma. Also sorry if I'm in the wrong thread...
[url="http://pastebin.com/RvSWcYDs"[/url] <--- Document
[url="http://imgur.com/a/zcPtf"[/url] <--- Pictures
First off, I am entirely lost in this process, as I have only programmed digital things- I haven't ever played with robots before. I'm doing a project, for which I have linked the exact instructions up above. You can see the details there.
I am also only given one IR module that has three little IR sensors built into it. (Pictures linked above!) I linked the product(s) page below, but I don't know if the sensor is the digital I/O (QTR-3RC) or analog (QTR-3A) version. Both have the same ID number...
[url="http://www.pololu.com/category/123/pololu-qtr-reflectance-sensors"[/url]
Going around either of their product pages, it says the optimal line width is a little under 3/4"- so, progress! Then, going here...
[url="http://www.pololu.com/product/2457/resources"[/url]
IMPORTANT: Some resources are listed, including the third one on how to install the QTR sensor's library in the Arduino IDE. I did that, and even tried out their example code (which they explain how to get on the webpage), but it's meant for an 8-sensor model. I can't understand it.
So, yeah. I'm pretty much useless here. But I can make a mean grilled cheese sandwich.
Basically, instead of a line following robot, I have to place the bot in between two black lines and have it follow in between them, like on a highway. Here are the only two options I've come up with:
1) Have the QTR IR sensor high above the road to detect each line, which I know to be impossible. Even a child can speculate that the range of the IR sensor is no more than an inch or two.
2) I attach a long L-shaped bracket to either the front left or front right of the bot and detect only one line, thus following the curved highway decently enough.
One of the big issues is I don't know how to connect my sensor to the bot itself. It's sautered to an old ethernet cable that you can see in the linked pictures. Five wires are coming from it. I don't know where to put them in, except red in ground and white in the 5V header. Also, the wires are really thin so they don't stay too well in the breadboard.
What I know:
1) The sensor will need to be placed directly over a line, so that the left and right sensors, when they hit black, will adjust the servos.
2) All sensors on black = stop.
3) How to mount the sensor (I work with my hands a lot).
What I need from you kind people:
1) A good guide/video on how the BOE bot's breadboard works... I'm lost.
2) How the attach the sensor to the bot.
3) How to get the sensor to respond and how to program it.
Any help is greatly appreciated, and I'm sorry if I'm just adding to the clutter of scared amateurs on this forum. Thanks for anything,
Bagger
[url="http://pastebin.com/RvSWcYDs"[/url] <--- Document
[url="http://imgur.com/a/zcPtf"[/url] <--- Pictures
First off, I am entirely lost in this process, as I have only programmed digital things- I haven't ever played with robots before. I'm doing a project, for which I have linked the exact instructions up above. You can see the details there.
I am also only given one IR module that has three little IR sensors built into it. (Pictures linked above!) I linked the product(s) page below, but I don't know if the sensor is the digital I/O (QTR-3RC) or analog (QTR-3A) version. Both have the same ID number...
[url="http://www.pololu.com/category/123/pololu-qtr-reflectance-sensors"[/url]
Going around either of their product pages, it says the optimal line width is a little under 3/4"- so, progress! Then, going here...
[url="http://www.pololu.com/product/2457/resources"[/url]
IMPORTANT: Some resources are listed, including the third one on how to install the QTR sensor's library in the Arduino IDE. I did that, and even tried out their example code (which they explain how to get on the webpage), but it's meant for an 8-sensor model. I can't understand it.
So, yeah. I'm pretty much useless here. But I can make a mean grilled cheese sandwich.
Basically, instead of a line following robot, I have to place the bot in between two black lines and have it follow in between them, like on a highway. Here are the only two options I've come up with:
1) Have the QTR IR sensor high above the road to detect each line, which I know to be impossible. Even a child can speculate that the range of the IR sensor is no more than an inch or two.
2) I attach a long L-shaped bracket to either the front left or front right of the bot and detect only one line, thus following the curved highway decently enough.
One of the big issues is I don't know how to connect my sensor to the bot itself. It's sautered to an old ethernet cable that you can see in the linked pictures. Five wires are coming from it. I don't know where to put them in, except red in ground and white in the 5V header. Also, the wires are really thin so they don't stay too well in the breadboard.
What I know:
1) The sensor will need to be placed directly over a line, so that the left and right sensors, when they hit black, will adjust the servos.
2) All sensors on black = stop.
3) How to mount the sensor (I work with my hands a lot).
What I need from you kind people:
1) A good guide/video on how the BOE bot's breadboard works... I'm lost.
2) How the attach the sensor to the bot.
3) How to get the sensor to respond and how to program it.
Any help is greatly appreciated, and I'm sorry if I'm just adding to the clutter of scared amateurs on this forum. Thanks for anything,
Bagger
Comments
I have moved this the the robotics section where it will get more replies
Thanks a ton! I figured it was in the wrong place...
I will suggest that if the lane is much wider than your robot, you may be better off just following one line (inside or out, presuming they are smooth and continuous) by hanging the sensor off to one side. Riding that smoothly would be easier than ping-ponging back & forth between two widely-spaced lines.
Assuming you're using a Boebot, you need to start at the beginning with Parallax's fine 'What's a Microcontroller" and "Robotics with the BoeBot" texts.
http://learn.parallax.com/tutorials/projects/boe-bot-line-following-four-qti-sensors/test-qti-sensors
The difference being the BS2 versus the BOE shield. So you will need Arduino compatible code instead. The Pololu page has application notes on how to use C (Arduino sketch) to operate the sensor, so that should help with the code.
I've used the Pololu RC sensors with both the BS2 and the Arduino. They're pretty short range and I usually keep them about 1/4" from the line.