Boe-Bot - IR sensor only returning 0 - need help please :)
Hi everyone!
I am doing a Boe-Bot for a district scholarship project. I have made it to chapter 8 however I am having a serious problem..... for some reason I can't get the IR sensor to work since one fried. Yeah, I fried one and got them both replaced (the transmitter/reciever) and it still won't work. What happens: When I run "TestLeftIRPair" from the manual, I am always getting a value of 0 regardless of whether an object is detected. I tried it in a dark and light room and no difference. I have checked and redone my circuity numerous times and no luck. When I run "FollowingBoeBot" the Boe-Bot moves forward but none of the sensors are picking up on anything. It just keeps driving straight when it should be turning and doing manouvers. I am in a time crunch here to get this done and I have no idea what is going on.·Let me know if you need a copy of the code- I don't have it on this computer but·I copied the code exactly from·"TestLeftIRPair"·and "FollowingBoeBot" from the manual as well as all the circuits however they are fairly basic. I have tried all the resisters possible. Any help would be wonderful.
Thanks everyone [noparse]:)[/noparse]
-Chris
I am doing a Boe-Bot for a district scholarship project. I have made it to chapter 8 however I am having a serious problem..... for some reason I can't get the IR sensor to work since one fried. Yeah, I fried one and got them both replaced (the transmitter/reciever) and it still won't work. What happens: When I run "TestLeftIRPair" from the manual, I am always getting a value of 0 regardless of whether an object is detected. I tried it in a dark and light room and no difference. I have checked and redone my circuity numerous times and no luck. When I run "FollowingBoeBot" the Boe-Bot moves forward but none of the sensors are picking up on anything. It just keeps driving straight when it should be turning and doing manouvers. I am in a time crunch here to get this done and I have no idea what is going on.·Let me know if you need a copy of the code- I don't have it on this computer but·I copied the code exactly from·"TestLeftIRPair"·and "FollowingBoeBot" from the manual as well as all the circuits however they are fairly basic. I have tried all the resisters possible. Any help would be wonderful.
Thanks everyone [noparse]:)[/noparse]
-Chris
Comments
I am trying to read out of PIN 0 and 2 for the right sensor and 8 and 9 for the left. I tried different pins too no difference. Also, the pins flash the LED's so I assume the pins are still okay. Any other ideas?
-Chris
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
http://www.parallax.com/Portals/0/Downloads/docs/books/edu/Roboticsv2_2.pdf
-Chris
Assuming that checks out, you can connect the module's output pin to any stamp pin through a 220-ohm resistor. Make sure the pin is set to be an input, and test it with a simple program to DEBUG the pin status, like:
a[noparse]:D[/noparse]EBUG DEC IN3:goto a
which should give you all ones under no-signal conditions. And the module's output pin should still measure 5V when hooked up to the Stamp.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
-Chris
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Jax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If a robot has a screw then it must be romoved and hacked into..
Thanks for the help however it still didn't work. All that happened is that the Boe-Bot got stuck in the loop which was supposed to turn the robot if irDetectLeft = 0.... but since it always = 0 for some reason, it had no way of escaping. In other words, its acting like an object is sensed when its not... any other ideas?
Oh yeah the DEBUG showed that an object was sensed- again it shouldn't of because an object wasn't sensed....
-Chris
Are you sure your resistor is 220 ohm (red red brown)?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
-Chris
BTW, if you have two IR sensors, you should try them both on a few different pins, in case one is damaged. You said you fried one, so lightning could strike twice: either the input pin or new modules could be zapped and/or hooked up incorrectly. Not all modules are 100% interchangeable. Did you verify the pinouts on your new sensors are the same as your original recipe, deep-fried units?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
-chris
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Suggest you use the BoeBot Book for every step, it has excellent illustrations, even shows how to assemble the sensors & breadboard. It's a free download at http://www.parallax.com/Portals/0/Downloads/docs/books/edu/Roboticsv2_2.pdf
There's a very good·chance·your sensors are (or were) fine, but hooked up wrong. In that case, the 10K pullup resistor won't make any difference. Remove everything from your prototyping area, and hook up one sensor per the text above. Don't go any further until your Stamp·starts reading ones out of the sensor. Point a remote control at it and you should see a mixture of ones & zeroes. If you can't get that going with any of your sensors, then they are all damaged and you need new ones. You'll get it, this is how everybody starts. You're nobody until you fry a few components!
Come back·after·you get that working properly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
@ erco, Good advise about staying clear of the Vin. There are many people that are new to the Stamp that just don't understand completely on what this pin really does. Thanks for pointing this out for Chris and others that are new to the Basic Stamps and this applies to any MCU that one should have.
Jax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If a robot has a screw then it must be romoved and hacked into..
I know which is the ouput pin - always did I was just confused for a second about what you were talking about. It's okay.... and don't worry I know not to use Vin. I am not 100 % "new" to the stamp.
-chris
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
Bad news. It goes terrible... I think my circuit board fried...... it suddenly won't detect my STAMP and I tried two Bs2 chips... one of which I know works.... any ideas? how can I test the board quickly? can I use a multimeter? I borrowed one lol
-Chris
Again, the Parallax robotics book has pictorials which provide excellent visual reference. They show exactly which pins plug into which holes on the breadboard socket. Literally thousands of people have used it successfully without trouble. I know you are in a rush to get results, but IMHO you may benefit from slowing down, starting at the beginning, and working methodically through the entire book. Hope this helps get you going.
Eric
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."