Battery Tester w/ BS2
Boris
Posts: 81
I have a device based on BS2 (BS2, buttons, LCD). The device is powered by 2 x 9v batteries in parallel (so batteries dont need to be replaced as often). My goal is to add a function for the user to check battery status. I understand BS2sx does not have an a/d converter, so i'll have to add one. Do you see any possible problems with BS testing voltage on a battery, while its being powered from the same battery?
Comments
You need to power the AtoD converter (ADC8032?) -- but I believe you can power that from the BS2 Vdd line.
You need to produce some 0 to 5-volt signal for the ADC from the 0 to 9 volt battery voltage. Typically you would do this with a voltage divider -- but that will require some additional current from the battery.
Question: Can you have one of the BS2 pins supply the ground, so the resistor divider is 'normally' disconnected?
I'm sure you can use some transistor/mosfet/Darlington to provide a 'ground' for a resistor divider periodically, then read the voltage from the divider, then turn off the transistor -- no?
You won't necessarily need to add an ADC chip to your BS2sx in order to monitor the battery voltage. The RCtime command can be used for that purpose, with a resistor and a capacitor.
There is a diagram and BS2 code at this link:
owlogic.com/BS2rct.htm#B_voltage
The current that flows from the battery into the resistor is less than 6 microamps, and that current is not lost, as it contributes to the Vdd supply.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I definately like this idea Simple, yet efficient.
I suggest you use capacitor discharge/RC time command approach outlined by Tracy, it is quite efficient. If you want more accuracy on the ability of the battery to deliver its charge, I suggest working with and ADC such as the LTC1298 or ADC0831, both of which are detailed in Parallax application notes.
For the ADC version, it would enable you to charge and monitor batteries. A 8-12 bit ADC will work fine, and code is fairly simple. Below is a link to battery management source code I have designed and used over the past several years, and the core functions have been used in NASA since the early 1990's. It can easily be modified for SLA, multiple Li or Ni packs.
Please review the kit listed here, vir-inc.com/software.html, for circuits and source code which can be downloaded with the IPMCharge code - PBASIC SDK.
This type of simple circuit could just snap on to the BSII Carrier Board, and you have a complete solution for rechargeable batteries.
I caution you to not look at battery voltage alone to determine low or high battery levels, as this does not provide any data on the efficiency of the cells to power the system. This applies to wireless phones, RC vehicles or SLA batteries.
Regards,
Steve Halla
On a side note, one cool thing I saw was a instuctor at college hook a "D" battery up to a analog meter and draw 6 Amps.