Are there any "tried and true" methods of doing this with a Boe-Boat? Or perhaps a link to somewhere that gives some pointers? Having my robot let off a beep when its running low on juice would be extremely helpful.
I would be interested in the answer to your question too.· That would be EXTREMELY nice to have.· That way the bot can go park itself somewhere safe before it runs out of power.
Well the BASIC Stamp already has a Brownout Detector/Reset Supervisor (13811) which will assert the RESET line LOW if the voltage drops below ~4.7V.· When this happens the program will usually restart since as the BASIC Stamp resets the servos are usually disabled allowing the voltage back up.· This starts a cycle.· In the BOE-Bot manual the FREQOUT command used at the beginning helps you detect this condition.· You know if you keep hearing the tone over and over again that the BASIC Stamp is resetting.· This is a simple method of detection, however something more elaborate could be done.· To actually shut the power down would require disconnection of the power supply, or you could simply go into sleep mode so you could reactivate when power was brough back up.· You should look at the Octabot (sp?) as an example of a robot which detects low batteries and seeks a charging station then recharges and roams some more.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Chris Savage Parallax Tech Support csavage@parallax.com
Thanks all of you for pointing us in the right direction.· I have tried searching on this forum and the net but was not finding answers because I was not using proper search terms such as 'brownout'.· I'm a newbie at this.
My intent is to find a way to detect marginal battery levels before it gets to the point of brownouts so the bot can park somewhere besides the middle of a hallway when it runs out of power.·
Beau Schwabe THANK YOU!!! The article "Checking Battery Condition and Multiplexing I/O Lines" looks like my best bet. I am getting worried that I'm getting in over my head knowledge-wise but I'm going to keep trying.
Hold up now, Isn't there a way that you can get it to detect the power level without buying extra stuff?· Like Chris said, the BS2 checks it's power and resets if it drops below 4.7 volts.· If it can do that,·couldn't it display the voltage it detects?·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is always an answer.
There is always a way.
There is always a reason.··· -SciTech02.
No, the BS2 doesn't know the condition...the 13811 simply holds the BASIC Stamp in a reset state when the voltage drops below its trip point.· But, you can use the fact that the BASIC Stamp did reset as a means of detecting that if you're careful.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Chris Savage Parallax Tech Support csavage@parallax.com
Take a look at Tracy Allen's note about using RCtime for battery voltage measurement. This is the cheapest way measure the voltage. http://www.emesystems.com/BS2rct.htm#B_voltage (The N&V article using the photocell and led is neat too)
If you just need to know when the voltage drops below a certain level you can use a voltage divider which passes through the BS2 input pin high/low threshold of about 1.4 volts at the proper input voltage. For example in the ascii schematic below where the BS2 pin in tied to point P, if the threshold is 1.4 (V2) volts and you want to detect 5.2 (V1) volts
battery(V1)----\/\/\(resistor R1)
P
\/\/\(resistor R2)----Vss
V1/V2 = 5.2/1.4 = 3.7 = (R1+R2)/R2
Let's use 10K for R2, then R1+R2 must be 37K so R1 = 27K
It would be a good idea to put a resistor between point P and the BS2 pin (1K or so) just to protect the input. Also, make sure the center of the divider (point P) doesn't go above 5V when the battery is fully charged. You'll probably have to tweak the resistor values because the threshold voltage isn't precisly know for a particular BS2 and changes with temperature, etc. A potentiometer to replace R2 would make setting the value more convenient along with a fixed resistor in the R1 position just so the voltage can't go too high at the BS2 input pin.
Post Edited (Russ Miller) : 4/27/2006 10:21:14 PM GMT
Thank you Russ, this is what I'm looking for.· Now on the battery part of the schematic, is that the positve or negative wire that goes there?· Also is that the same capacitor that comes with the Boe Bot?·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is always an answer.
There is always a way.
There is always a reason.··· -SciTech02.
[noparse][[/noparse]quote] Now on the battery part of the schematic, is that the positve or negative wire that goes there?The positive wire - use the Vin terminal on your BOE. Vin is the voltage from the battery before it goes to the regulator.
[noparse][[/noparse]quote] Also is that the same capacitor that comes with the Boe Bot?
Tracy's note uses a 0.01uF capacitor which you should have in the Boe-Bot kit. You will need a large resistor that isn't in the kit - Tracy used 681K Ohms, Radio Shack or any electronic parts shop should have 470k or 1Meg Ohm resistors. The resistor should be value isn't critical but will affect the numbers you get at different voltages so testing will be required to find out exactly how your particular system responds.
Okay.· I'm using a 7.4 volt battery right now, and this was made for a 6 volt one.··Could I still use this schematic or would I have to get stronger resistors?· I really don't want to fry my BS2.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is always an answer.
There is always a way.
There is always a reason.··· -SciTech02.
Never mind that last post, it should work if I use a 7.4 volt battery and if I use the schematic on the link.· I'll keep you guys updated on how it's working.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is always an answer.
There is always a way.
There is always a reason.··· -SciTech02.
2: Also, use the program in that link too.· Substitute 38576 for 48576.
3:·This uses parts from the "Robotics with the Boe-Bot" text. ·The only part that's not included in your kit is the 680 kohm resistor that you can buy.
And that's it.· So for anyone who wants to check power on there robot, you can use this.· Remember, you have to somtimes play with the values to get it right.·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is always an answer.
There is always a way.
There is always a reason.··· -SciTech02.
Post Edited (SciTech02) : 4/30/2006 11:44:37 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is always an answer.
There is always a way.
There is always a reason.··· -SciTech02.
http://www.parallax.com/dl/docs/cols/nv/vol1/code/nv4.zip
http://www.parallax.com/dl/docs/cols/nv/vol1/code/nv5.zip
http://www.parallax.com/dl/docs/cols/nv/vol1/code/nv25.zip
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1+1=10
My intent is to find a way to detect marginal battery levels before it gets to the point of brownouts so the bot can park somewhere besides the middle of a hallway when it runs out of power.·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is always an answer.
There is always a way.
There is always a reason.··· -SciTech02.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Take a look at Tracy Allen's note about using RCtime for battery voltage measurement. This is the cheapest way measure the voltage.
http://www.emesystems.com/BS2rct.htm#B_voltage (The N&V article using the photocell and led is neat too)
If you just need to know when the voltage drops below a certain level you can use a voltage divider which passes through the BS2 input pin high/low threshold of about 1.4 volts at the proper input voltage. For example in the ascii schematic below where the BS2 pin in tied to point P, if the threshold is 1.4 (V2) volts and you want to detect 5.2 (V1) volts
battery(V1)----\/\/\(resistor R1)
P
\/\/\(resistor R2)----Vss
V1/V2 = 5.2/1.4 = 3.7 = (R1+R2)/R2
Let's use 10K for R2, then R1+R2 must be 37K so R1 = 27K
It would be a good idea to put a resistor between point P and the BS2 pin (1K or so) just to protect the input. Also, make sure the center of the divider (point P) doesn't go above 5V when the battery is fully charged. You'll probably have to tweak the resistor values because the threshold voltage isn't precisly know for a particular BS2 and changes with temperature, etc. A potentiometer to replace R2 would make setting the value more convenient along with a fixed resistor in the R1 position just so the voltage can't go too high at the BS2 input pin.
Post Edited (Russ Miller) : 4/27/2006 10:21:14 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is always an answer.
There is always a way.
There is always a reason.··· -SciTech02.
[noparse][[/noparse]quote] Also is that the same capacitor that comes with the Boe Bot?
Tracy's note uses a 0.01uF capacitor which you should have in the Boe-Bot kit. You will need a large resistor that isn't in the kit - Tracy used 681K Ohms, Radio Shack or any electronic parts shop should have 470k or 1Meg Ohm resistors. The resistor should be value isn't critical but will affect the numbers you get at different voltages so testing will be required to find out exactly how your particular system responds.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is always an answer.
There is always a way.
There is always a reason.··· -SciTech02.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is always an answer.
There is always a way.
There is always a reason.··· -SciTech02.
So far, if you want your robot to check it's power, follow these steps:
1: Use the schematic on this link that Russ provided: http://www.emesystems.com/BS2rct.htm#B_voltage· Vx = Vin.
2: Also, use the program in that link too.· Substitute 38576 for 48576.
3:·This uses parts from the "Robotics with the Boe-Bot" text. ·The only part that's not included in your kit is the 680 kohm resistor that you can buy.
And that's it.· So for anyone who wants to check power on there robot, you can use this.· Remember, you have to somtimes play with the values to get it right.·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is always an answer.
There is always a way.
There is always a reason.··· -SciTech02.
Post Edited (SciTech02) : 4/30/2006 11:44:37 PM GMT