We will be turning the activation pin HIGH during battery measurement so that the voltage divider will be disconnected most of the time: If you have an unused pin on your Arduino it will be easy to limit this additional current consumption to be drawn only when needed: during battery measurement. Not a huge amount, but definitely not desirable. Higher than 5V, activated on demandīatteries are a precious resource and you want to prolong their life as much as you can so, deplete your battery to determine its capacity is not desirable.Īs a consequence of connecting the battery terminals through two resistors we are drawing some energy out of the battery: for a 9V battery and 1k Ohm for R1 and R2, you will be adding a constant 4.5mA current consumption to your circuit. The values of R1 and R2 determine the voltage ratio parameter for this library: for information about this value refer to the section below. Once again, to measure such batteries we need to hook our sense pin before it gets regulated, between the battery positive terminal and the voltage regulator positive input VIN or RAW and, as before, we require two resistors to reduce the voltage to acceptable values: Whenever your battery maximum voltage exceeds the onboard regulator (if there is any) an external voltage regulator is required. Higher than 5V, with external voltage regulator On the other end, going too high on the resistor values will impede the library from getting accurate readings. The values of R1 and R2 determine the voltage ratio parameter for this library: for information about this value refer to the section below.īecause the resistors in this configuration will constantly draw power out of your battery, you shouldn't pick values under 1k Ohm, or you'll deplete your batteries much faster than normal. What does that mean when it comes to measuring your battery level? We need to measure the battery voltage before it gets boosted, which means your sense pin must be connected between the battery positive terminal and the booster positive input and we don't need any additional components as the voltage is already in the acceptable range: Voltage sources made of single cell LiPo or LiIon, along with some single or multi-cell NiCd configurations (like up to 3 AA or AAA), are not able to provide the suggested 5.0 volts input to your board and a voltage booster can solve your problem. The sense pin wiring can vary depending on your battery configuration, but here are a few examples based on the assumption you are using a 5V board: in case of a 3.3V board you should be performing the necessary adjustments. To improve this we suggest using the VoltageReference library to obtain a better calibration value for all analog readings. If you want your readings to be more accurate we strongly suggest to calibrate the library by providing your board reference voltage: most of the times you assume your board has exactly 5V between Vcc and GND, but this is rarely the case. The library requires at least 1 analog pin (we will call this the sense pin) and no less than 2 pieces of info on your battery: the voltage you will consider the minimum acceptable level, below which your project/product becomes unreliable and should be shut down, and the maximum voltage you can expect when the battery is fully charged.Īdditionally, you can provide a second pin (either analog or digital) to activate the battery measurement circuit (we call it the activation pin), useful in all those situations where you can sacrifice a pin to further increase your battery duration.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |