Need help in BOE-BOT Robot
Hi there! This is YQ&RAZ here.
We need help in the Basic Stamp Editor!! :frown:
Currently we're doing our Final Year Project using Boe-Bot. And we are suppose to fix the "PhotoResistor" & "In-fared - Headlight " in our boe-bot's bread board.
How ever we have no idea how we should suppose to place the components. And how are we suppose to program the robot. Hope you guys can help us ):
We need help in the Basic Stamp Editor!! :frown:
Currently we're doing our Final Year Project using Boe-Bot. And we are suppose to fix the "PhotoResistor" & "In-fared - Headlight " in our boe-bot's bread board.
How ever we have no idea how we should suppose to place the components. And how are we suppose to program the robot. Hope you guys can help us ):
Comments
I have attached one of the picture in here. Maybe you can guide me if place my components wrongly.
Hi Botak,
I strongly recommend to have a look at the book of Andy Lindsay's Robotics with the Boe-Bot text Robotics with the Boe-Bot Text v2.2 (.pdf)
Focus on Pages 193-234 & 235-263
Pay attention in the follow image (It is a screen shoot from the book above)
If you need more help send me the first lines of your code the "I/O Definitions" to see the pins you have put in your programe so I can tell you if you have any mistake.
Thanks for your help! Can you take a lot at our connection & program? I've attached it in here.
It would be great if you can point out any error we have make )=
Botak
Hi botac,
I was confusing at first but I think that your circuit is corect
In your code I think you have a mistake
You haven't given values the photoDetectLeft and photoDetectRight .
before you use these variables in your code you should write (acording your circuit) the follow:
photoDetectLeft =IN6 ' (because you have connected the left photoresistor in Pin 6)
photoDetectRight = IN3 ' (because you have connected the left photoresistor in Pin 3)
Try this and tell me if it works!
I'll try the code you gave me later on when my partner is here. Thanks for your help. And hope this really works.
Thank you (:
Hi there, i've try the code you gave me. However it still can't work. Now both the photoresistor and IR is not working. :frown: I suppose i gave you the wrong coding?
I've attach another code in here. For this code, the IR is functioning well. But nothing seems to work on the photoresistor. Hope you can help me again. Thanks alot
( Purpose of my project: My project is to combine both the photoresistor& IR to work. Afterwhich, i'll need to connect a solar panel& the charge control circuit in the Boe-Bot. So the aim of this project is to have this boe-bot working, able to seek for sunlight and charge the battery once it's low batt. Sorry if my language is not strong enoug. Hope you understand)
Don't worry I can understand you. I' ll try to help you. From a quiqkly look in your new code I've noticed a first mistake:
The formula: average = timeRight + timeLeft / 2 is wrong! The corect is: average = (timeRight + timeLeft) / 2.
I 'll give you an example 8 + 4 /2 = 10 But (8 + 4) /2 = 6 Can you understand why? The use of "(" parentesis is very important on mathematics formulas.
Try also to increase the PAUSE period before each RCTIME command. From my experience PAUSE 300 is good.
Put some DEBUG comands in your code to see the result on your screen e.g.
DEBUG DEC ? timeLeft, ?timeRight, CR
(keep your boe bot conected with your computer and the bebug screen open and use a flashlight to change the lightness).
I didn't see whole your code. But try the suggestion above. Especially the Debug command will give a feedback to reach your goal.
Your project sounds great I have in mind some useful links. I'll try to find and send you.
Meanwhile keep trying!!!
Nikos.
Hi Nikos,
Thanks for you help. I have did some changes to the error you pointed out. However if i were to change the PAUSE 300, my boe bot will move very slowly.
I'm sorry but i don't understand the put some " DEBUG " Sorry but i'm a noob in programming. ):
Hope you can explain to me slight clearer abit. But i really wish my boe bot will work at the end of the day. And I checked my photoresistor coding, and there is nothing wrong in it. But is still not working. Sorry if i'm too irritating. ): Really hope you can help me.!
Thanks nikos :thumb:
Botak
Try this : DEBUG "Hello world" . It will display the phrase "Hello world" on your compuer screen. (Obviusly you must have conected the basic stamp board and your PC)
This command can also display the value of variables you use. Just copy the follow comand in your code:
DEBUG DEC "left=", DEC timeLeft ," Right=", DEC timeRight
It will display on your screen what exactly each photoresistor see (the lightness is proportional to the numeric value you see on your screen).
P.s. Althought your formoula average = timeRight + timeLeft / 2 is wrong mathematically it works properly on basic stamp because the stamp axecute calculations from left to the right.
Hi there
Thanks alot alot for your help! My boebot is functioning well with photoresistors& infrared headlight. Is working now. However, the speed was pretty slow. And it also tend to jerk when it actually sense the light. Is there any ways i can change it? (:
Really thanks alot for the help. Thank you.
(I've attached my program in here. Hope to hear from you soon.)
A very useful file that analyzes the way you connect a solar panel & the charge control circuit in the Boe-Bot is the: "Experiments with Renewable Energy" v1.0 (310 pp.). You can download this file here. It is the second file from the bottom of this link page.
Hi Nikos G,
Thanks for all the help these days. Now i've 2 robot functioning well. 1st is the Photoresistor& IR-infrared Headlight. 2nd is the Photoresistor& Whisker.
However, now my supervisor would want me to use Solar Panel to activate my Boe Bot instead of battery. Do you think we're able to do so?
Anyway this is our solar panel >> http://www.robotshop.ca/home/products/robot-parts/power-systems/solar-cells/MPT6-75-powerfilm-solar-cell.html
Hope to hear from you soon.
And, wishing you a happy new year. May you have a great 2011 (:
Botak
I also have in mind to use a mini solar panel fon my BoeBot but I haven't done it yet. Personally in my experiments I use small PV 6V like this
Although I have successfully achieved to track the solar path with a Solar Panel I don't know enough issues about how to charge batteries with them.
However Parallax give us extremely useful information about this topic in file: "Experiments with Renewable Energy" v1.0 (310 pp.). Look at thread #18!. I have already given you the link to get the file!
A user also has made an amazing Solar Boe-bot. Look at the Youtube video with title" My Solar Boe-bot". It gives some information.
Keep Trying
You are in a good way!
Happy New Year!!!