DIY Electric Car Forums banner

1 - 6 of 6 Posts

·
Registered
Joined
·
3,141 Posts
Discussion Starter #1
I have designed and built a flexible and efficient battery charge monitor, in this case for a 12V lead-acid battery, but the same basic design can be used for multiple batteries or lithium cells. The basic circuit consists of a Microchip PIC16F1825, which reads the battery voltage using a 100k/10k divider which draws about 12 uA, and an internal 2.048V reference. The power supply uses a 100k resistor to two white LEDs, for a 5.0V reference while drawing only about 7 uA (at which the LEDs are quite visible). This drives the base of an MPSA06 which provides 4.3 VDC to the PIC for input voltages from about 8 VDC to 56 VDC. The processor draws about 1 mA operating at 4 MHz.

Battery voltage is indicated by flashing a green or red LED, related to SOC by the following:

100% 12.70 5G
90% 12.50 4G

80% 12.42 3G
70% 12.32 2G
60% 12.20 1G
50% 12.06 1R
40% 11.90 2R
30% 11.75 3R
20% 11.58 4R
10% 11.31 5R
0% 10.50 5R

The total current draw is about 1.8 mA and about 4 mA when LEDs are flashing. So about 2 mA average, at which a 12 A-h SLA battery will be depleted to 50% SOC in 3000 hours, or about 4 months. The design could easily be optimized to draw an average of 500 uA.

There is also a provision for connecting an I2C character LCD display, and/or a Bluetooth module, to monitor battery voltage. However, these take between 5 and 25 mA. I have added a second PCB which contains an efficient buck converter made with an MC34063D which produces 5 VDC from the raw battery voltage with an efficiency of about 80%, up to 40V, and I added a linear pre-regulator which allows up to 60V.

This circuit is turned on by pressing a pushbutton, which drives an opto-MOS SSR TLP175 using about 2 mA. This provides power to the Bluetooth module as well as the I2C display, and also an I2C EEPROM for optional data recording. During operation, current draw is about 10 mA at 12V but this drops to less than 5 mA above 24V.

Here are images of the device, which I installed in a small 3.5" x 2" x 1.5" plastic enclosure.







Here is a short video of the operation:
http://enginuitysystems.com/pix/electronics/Battery_Monitor_4053.AVI

I will supply more technical details in a subsequent post. :)
 

·
Registered
Joined
·
774 Posts
Cool project! But. . .

Actual voltage at a given SoC fluctuates wildly depending on current loads when the bank has not been at rest for many hours.

If you want voltage, just install a super cheap volt meter on a momentary switch.

If you want SoC, best accuracy is Merlin (Balmar) SmartGauge, but for lead only. Or a Victron 702-BMV, or Bogart Trimetric many other coulomb counters will get pretty close.
 

·
Registered
Joined
·
3,141 Posts
Discussion Starter #3
This is primarily for monitoring SOC on a battery that has been sitting for a while, and not so much for an active "fuel gauge". It should be cheap enough to be able to mount one on each 12V battery in a pack. Parts should be less than $5, and could be provided in kit form for DIY usage. The Bluetooth option would add about $5. Multiple modules could be chained together using a simple protocol with opto-isolators, and connected to a master module for a more complete BMS.

Thanks for the input. :)
 

·
Registered
Joined
·
774 Posts
I would never let a lead bank drop that much while in storage, if not sitting always on floatV from a quality charge source, would top up manually at least every 2-3 weeks.

But that's me, looks like an interesting project!
 

·
Registered
Joined
·
3,141 Posts
Discussion Starter #5
Here is a representative schematic, not exactly what I have for the prototype, but as I may make the PCB:



The battery voltage is applied to the terminal block TB1, and R4, R5, and C4 form an 11:1 voltage divider, so 12V will be 1.09V to the ADC. With an internal 2.048V reference, it can read up to 22.5V. The current draw is about 110 uA at 12V. Diode D5 protects against reverse connection. 200k resistor R1 provides 35 uA to two white LEDs which are about 5 volts. MOSFET Q1 provides about 3.5 VDC to the PIC16F1825 and other components. Q1 could also be a BJT to provide about 4.3 VDC as in the prototype.

When switch S1 is pressed, the PIC pulls RA2 low, turning on the optocoupler U2 with about 2mA. This provides battery voltage to the buck switching regulator U3, an MC34063A, which has an operating current of about 2 mA. It can handle input up to 40V, and provides 5 VDC to the optional external Bluetooth and I2C display, which draw 5-25 mA each. For higher pack voltage, a MAX5033 can handle up to 76V with quiescent current of 270uA, but it costs $3.50 compared to about $0.63 for the MC34063A and similar devices. These switching regulators can supply 500mA or more.

For visual display of SOC, two LEDs are used. Above 50%, the green LED flashes 1 to 5 times, and below 50% the red LED flashes. The PIC can sleep for 3-5 seconds between measurements, reducing current draw to less than 1mA. I added an I2C serial EEPROM 24AA128 with 16k x 8 storage for datalogging. At 5 seconds per sample, this will hold 22 hours of data. Under static storage conditions, probably 1 sample every 10 minutes would suffice, giving 2600 hours or 3.5 months.

The Bluetooth interface allows for retrieval of stored data or commands for other functions.
 
1 - 6 of 6 Posts
Top