motorcycles, etc.Package includes.1) 1 x Battery Capacity & Volt Tester.2) 1 x Cable. burn if connect reversely.7) For checking the remain capacity of batteries. Split the selected curve in three section and approximate the curve with some functions. MACHSWON 12/24/48V Battery Status Charge LCD Digital Indicator Monitor Meter Gauge W/B New Car LCD Lead-Acid Battery Status Voltage Voltmeter Monitor Meter.Guess the average discharging current and calculate C.I have to get the characteristic of the battery.I think for more accurate calculation the following steps are required: Regarding point b) : This is a major obstacle and the note is absolutely correct. So row#2 to be modified to: const unsigned long BatVref = 2465 //mV This is giving on MEGA AREF's pin with DMM 2.465 V, instead of 2.560 V. Value = analogRead(0) //The effect of analogReference() call doesn't take place till the next call to analogRead() I modified for reference measurement this code as well: int value Serial.print("Battery level : ") Serial.println(percentage) // with regression func. Serial.print("Batery voltage: : ") Serial.println(batVoltage) īyte percentage = 100 * (batVoltage - BatVoltMin) / (BatVoltMax - BatVoltMin) //to be replaced Unsigned int batVoltage = adcValue * BatRatio / BatResolution Unsigned int adcValue = analogRead(BatVoltPin) // read the divided battery voltage on analog pin # 0ĪnalogReference(DEFAULT) // set back the reference voltage level to normal 5Vįor (int i=0 i<8 i++) analogRead(BatVoltPin) // so later in the main/full program no trouble after initiating 'analogReference(INTERNAL2V56) ' and change here.Ĭonst unsigned long BatResolution = 1024 Ĭonst unsigned long BatRatio = ((BatRs + BatRs) * BatVref) / BatRs ĪnalogReference(INTERNAL2V56) // set the reference voltage level from 5V to 2.56Vįor (int i=0 i<8 i++) analogRead(BatVoltPin) // just burn some ADC readings after reference change This 12 V lead acid meter has a maximum working current of 5mA and can be easily change between two models. New Listing Car Cigarette Battery Volt Voltage Gauge Voltmeter Plug 12-24V LED Cradle Parts. void loop() // as long as they have the same unitĬonst unsigned long BatVref = 2560 //mV this must be measured on the AREF pin accurately with DMM Goal: measure the battery charged state in % as accurate as possible.įor this purpose I'm planning a voltage divider and use the internal reference voltage for accurate measuring. 12.8 V charging voltage and 10.7 V cut-off, connected to MEGA Vin pin. So I have a 4 cell LiFePO4 battery with max. Low Battery Voltage LED Indicator - Red indicator flashes warning and stays on when charging is required. I was searching for hours for proper solution and finally decided to make my version and post here.īefore blowing up my board, I would highly appreciate, if somebody can spend some time and check the goodness of the below code and schematic:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |