Thursday, June 13, 2024

12V 7.2AH SLA battery (9): UC2906 testing and design problems

This post will be a long post that reviews the following points:
  •  the charging parameters of the selected SLA battery
  • the operation of the UC2906 charger IC
  • the design of the associated UC2906 charger circuit
  • circuit testing and design problems

1. Review of Maxim ML7-12 SLA GMAT Battery Specs


The Maxim ML7-12 battery that the charger circuit is being designed for is a 12 volt, 7.2 AH, AGM (absorbed glass mat) battery.  The data sheet, downloaded from Amazon.com is in two pages shown below: 

click a page to enlarge

According to the datasheet, the battery has an internal resistance of 25 milliohms.  In the data sheet the max charging current is given at 0.25 C where C is the capacity in amp-hour at max charge voltage of 13.8 volts.  For 7.2 AH  this calculates out to 1.8A.  The charge characteristic, given in the upper left graph on Page 2 of the data sheet, is difficult to read because of poor digitization. See below.  


The charge characterization curve is given for a totally discharged battery charging at the "float charge" voltage, Vf, of 13.8 volts.  Imax, the maximum allow charge current used for this graph is 0.25C, (1.8A for this battery).  The time required for a full charge is about 14 hours.  

2. UC2906 State Operation


From reading the ARRL Handbook and the Power-Sonic  SLA Technical Manual,  a good method for SLA charging is "Dual Level" charging. This method first charges the discharged battery at a constant current, then when the battery voltage Vb approaches Voc, the overcharge voltage, the charger switches to a constant voltage charge at Voc.  In overcharge state, the battery current Ib will decrease as the battery absorbs further charge.  When Ib goes below some small value, the charger switches the constant charge voltage to Vf, a level that maintains battery charge at some small current.  In practical use the UC2906 controller implements a safety "Trickle Charge" state to prevent the charger from charging batteries with shorted cells or abnormally low Vb battery voltage.

The UC2906 Dual Level operation can be understood by expressing the it as a state diagram, as shown below. States correspond to circles, with the state name in black and the state action in red. Conditions that generate state transitions are denoted by arrow and from one state to the next, with the transition conditions given in text next to the arrow. 

  • Start State.  Upon powerup, the charger enters the Start state. In this state the charger uses a constant trickle current It. The charger remains in this state until the battery voltage Vb exceeds a threshold Vt.  For this design, It = 75 uA, and Vt = 10V.   Unless the battery has a shorted cell or the battery is in very bad shape and totally discharged the battery voltage Vb will initially be above Vt and the charger immediately passes through to State 1, Constant Current.
  • Constant Current State. Entering State 1, Constant Current, Vb will be low enough that the battery will tend to draw high current and so will go into current limiting.  The battery current Ib will be limited to Imax, and the battery voltage will increase over time.   In this design Imax = 0.72A, which is C/10, as recommended by the ARRL Handbook and the PowerSonic manual as well.  Eventually, the battery voltage will approach Voc, the battery overcharge voltage, which for this design is 14.8V.  When Vb exceeds 0.95•Voc, defined as V12, then the charger moves to overcharge state. In design V12 = 14.06V.  
  • Overcharge State. Entering the Overcharge State, the controller will limit  Vb, the battery voltage to no more than Voc, the overcharge voltage. So Vb will start at V12 and approach Voc, but go no higher.  At the same time the battery current Ib will decrease toward a small value over time.  When Ib falls below Imax/10, the charger goes into State 3 to reduce the charge voltage to a low maintenance level.  
  • Float Charge State.  Entering the Float Charge State, the controller lowers the maximum battery voltage to Vf the float charge voltage. In this design the float charge is 13.8V.  This voltage will draw enough voltage to make up for standby losses of the battery.  Generally,  the charger is left connected, this state will be the normal, long term state of the charger.  If the battery is used or for some other reason the battery voltage Vb falls below V31, defined as 0.9•Vf, then the charger will return to State 1,  to charge and return to floating charge through another State1-State2-State3 cycle.  
The diagram below shows the charger states on a current-voltage plane.  The charger stays within the gray areas on the plane.  
  • Start State. Starting at low voltage and low trickle current It at the lower left corner of the plane,  Vb will increase until it becomes greater than Vt,  then the charger transitions to State 1.
  • Constant Current State.  In State 1 the charger increases voltage until the battery charge current Ib reaches Imax. The charger regulates the current at Imax until the battery voltage Vb reaches V12, then charger switches State2.
  • Overcharge State. The charger regulates the battery voltage  at Voc maximum and the battery current decreases until it becomes less than Ioct  (Imax/10), then moves to State3
  • Float Charge State.   In this state the charger drops the regulated voltage to Vf and the current drops to some small value.  If the battery voltage drops below V31 the charger will cycle back to State 1. 

Note in the diagram above the design equations for the circuit are given.  These equations are used to derive the required resistor values of the circuit given the design parameters, 

The diagram below shows a time domain explanation of the state operation of the charger.  Refer to the explanation included with the diagram for further information.

click to enlarge

3. Design parameters.  


Referring to the Design Procedure diagram above, the design parameters are: 
  • Id:   75 uA based on the datasheet recommendation
  • Vf:   13.7V based on battery manufacturer's specs
  • Voc:  14.8V based on battery manufacturer's specs
  • Vt:   10V,  based on example designs
  • Imax: 0.72A based on ARRL  recommendation of C/10 for Imax
  • It:   0.07A probably too high, but the trickle current feature is considered not, and will be revised later
  • Vin:  19V   this parameter is needed for setting trickle current resistor value. The charger voltage source is a discarded 19V 1.6A laptop computer charger


4. Derivation of circuit resistances and discussion of  the design spreadsheet 


The design spreadsheet automates the design procedure, chooses actual resistance values for the circuit and checks the performance parameters for the circuit based on actual resistor values chosen.  A flowchart of spreadsheet tasks is given below. 



  • In the first tasks, the design parameters are taken from the battery manufacturer, the UC2906 data sheet and recommendations from other handbooks.  
  • The second task uses design equations from the UC2902 datasheet to calculate circuit resistor values.   
  • For the third task, look up actual resistor values, a table was created of all available values in my 5% (E24) resistor assortment.  Given a calculated resistor value, a custom Excel function searches the table for the nearest E24 resistor value. 
  • The last task uses the actual E24 resistor values to derive the actual operating parameters of the circuit.  


The diagram above shows the spreadsheet and and its results.   

  • The input parameter section is shaded yellow on on the left.  The most important parameters are Vf, Voc, and Imax
  • Upon actual operation of the circuit, it was found the Imax was in error.  Imax is determined by $Imax=VRREF/Rs$, where VRREF is given as 0.25V in the datasheet.  Using known Rs, VRREF was found to be 0.223V, which is about 11% error.   It's possible I damaged the UC2906 when I soldered it in.   VRREF is entered as a parameter to compare actual operating parameters to design parameters. 
  • The calculated resistances are shown in the orange shaded area at center left of the spreadsheet.  
    1. Rc is determined by parameter Id, $Rc=\frac{Vref}{Id}$, where $Vref=2.3V$
    2. Rsum, defined as Ra+Rb,  is determined by solving voltage divider $Vref=Vf\frac{Rc}{Rc+Rsum}$
    3. Rd is determined by the difference between parameters Voc and Vf: Using superposition we can write two equations:
      $Vf=  Vref + Id\cdot Rsum$
      $Voc=Vref + Id\cdot Rsum+Vref\frac{Rsum}{Rd}$
      solving  these two equations for Rd yields: 
      $Rd=Vref\frac{Rsum}{Voc-Vf}$
    4. Ra is determined from previously found resistances and Vt, the trickle current state voltage threshold.  See the datasheet for details.
    5. Finally, $Rb=Rsum-Ra$

5. Problem with resistor assortment 


When I initially tested the UC2906 charger on my 7.2AH SLA battery, I discovered a problem in my assortment of 1% 0603 surface mount resistors.   I bought the resistor assortment back in March of 2022, (Amazon ASIN B013B5587K) and assumed that I had bought a full E96 (96 values per decade) assortment of 1%  0.1W resistors going from 0 ohms to 10 megaohms.  As it turns out, the assortment I bought contains 1% resistors but they only correspond to the 5% (E24) values.  There are a few extra values thrown in to fill in some wide gaps.  The E24 spacing turned out to be a problem.

As shown in the spreadsheet above the value of 130000 ohms for actual Ra was 6.4% lower than the calculated value of 138575 ohms.  This reduced the actual Vf to be 13.25V rather than designed value of 13.7 volts.  Actual value of Voc was 14.26V compared to design value of 14.8V.   

To compensate, the Ra trace on the PCB was cut, allowing for a 4300 ohm resistor to be added in series with Ra. This raised  actual Vf and Voc to 13.6V and 14.62V respectively.  

Another problem,  which needs further investigation, is that after a deep discharge the charger pulls more current than it normally would during charging.  Because of this the charger may fail to transition from overcharging state to float charge state.  This suggests that a timer needs to be implemented to force the circuit to a float charge state after a set number of hours.  For example, a timer could be implemented to drive the charger into float state after 24 hours of starting a charge cycle. 






Friday, May 24, 2024

12V 7.2AH SLA battery (8): UC2906 charger PCB constructed

 I have received the UC2906 board back from PCBWAY in China.  I've populated the board and am now ready to start testing.  I bought a strip of 1 inch wide by 1 inch thick aluminum from Lowe's and constructed a heat sink for the pass transistor, as can be seen in the photo.

click to enlarge


The circuit itself is a little bit of a challenge to test, since it requires using a SLA battery in various states of charge and discharge to test the various modes of the circuit.  I'm going to stop and design an active load to test the charger with.  I can also make the  active load so I can test other power supply circuit, such as all my Philmore 12V power supplies.  I'll start with a basic circuit as shown from Page 7.52 of the 2023 ARRL Handbook:









Monday, May 13, 2024

12V 7.2AH SLA battery (7): UC2906 charger PCB version 2

 I have revised the board layout from the previous post in this series (6) to use surface mount parts and use a 2 sided board. I also added a small prototype area consisting of a grid of 2.54mm spaced holes.   This will aid in bringing up the board.  I've ordered the board from PBCWAY.   See the diagrams below. 

I bought a bottle of ferric chloride etchant and I've been studying how to make two sided boards on Youtube videos.  I will try to make my own two sided PC Board.

click to enlarge


click to enlarge




Wednesday, May 8, 2024

12V 7.2AH SLA battery (6): UC2906 charger design

 Here is my third try at an SLA charger circuit.  It uses the UC2906/UC3906 smart charger IC as the charger controller.  The schematic of the test board is shown below.  The charger is going to be powered by an old discarded 19V laptop power supply.  Circuit description follows under the schematic.

click to enlarge
  • The input power enters at J1 on the left. 
  • Jumpers JP1 to JP3 and resistors R1 to R7 allow setting the current limit up to 1.75A in 0.125A increments. 
  • LED1 to LED3 are used to display the state of the charger:  1) constant current state ,   2) overvoltage state, 3) float voltage state, or 4) trickle current state
  • RA1, RB1, RC1, RD1, and RT3 are used to set the charge parameters according to the data sheet instructions:  overvoltage level, float voltage level, and trickle current.
  • The power element is a TIP32C PNP transistor Q1
  • The battery is connected at J2 on the right.
The diagram below is the layout for the test board: 
click to enlarge

The diagram below show a 3D rendering of the test board. 

click to enlarge



I am going to try etching a board using the toner method.  I've ordered some ferric chloride etchant and expect it to arrive on Friday.












Tuesday, April 30, 2024

ESP-32 data logger (3): logger redesign

 I have redesigned the ESP32 logger: 

  • I have abandoned using the ESP32 ADCs entirely
  • The logger will use an ADC module with the 16 bit 4 channel ADS1115 ADC
  • Rather than use a current sense resistor, I have opted to use a ACS712 Hall effect module, which will feed a voltage proportional to current to the ADS1115
  • Battery voltage will be fed to the ADC  using a voltage divider, not shown on the schematic below. 
  • I've added an SSD1306 OLED display. 
  • I added a voltage divider breakout with a 0.2 voltage reduction for sampling the battery voltage
The schematic for the new logger design is below.  I have ordered the ADS1115 module and the ACS712 module from Amazon.com. Delivery is due Friday/  

click to enlarge









Monday, April 29, 2024

ESP-32 data logger (2) --- 12V 7.2AH SLA battery (5) -- partial failure (UPDATED)

 I conducted a test of the ESP32 data logger (link), and simultaneously testing the LM317 charger circuit (link). 

Details: 

  • The current limit on the LM317 circuit was set for 0.72 amps
  • The charge voltage was set to 13.8 volts
  • The battery was discharge to about 30% capacity 
  • Charging was done over a 10 hour interval
  • The logger was set for 1 measurement every 10 seconds
  • Voltage sense was through ESP32 ADC0 using a 1:0.128 voltage divider (6.8K-1K).
  • Current sense was through ESP32 ADC3 taken across the charger's 0.825 ohm, current sense resistor. 
  • The ESP32 ADC channels were set at 12 bits, 0 to 3.3V
  • Logged data was smoothed using Excel moving average filter, 20 samples wide. 
Logged charging curve is shown below: 


The charge current failed to reduce below 0.2 amps after 10 hours of charging.  I am not sure why.  I suspect the  battery has some leakage.  Will be checking this.

The  IR drop across the charger current sense resistor causes an error in the battery voltage measurement.  This is compensated in Excel by subtracting the voltage drop from the measured battery voltage. 

The measured current doesn't seem capable of going less than 0.17 amps.  I think this is a problem with the ESP32 ADC.  I'll need to investigate further.  It's a little disappointing. 

This task is to put the charger and logger circuit into separate enclosures. 

UPDATE:
1. For the logger circuit, it seems the ESP32 ADCs have a very evil reputation.  I am going to order  some ADS1115  4 channel 16 bit ADC modules, and try to improve the ADC accuracy.

2. For the charger, I am going to put away the LM317 charger for now and build a circuit around the UC3906 SLA battery charger chip.



Sunday, April 21, 2024

Husky 2 gallon compressor repair

 My compressor crapped out about a week ago.  After I took the cover off, I discovered a circuit board inside with a DC motor.  The fuse on the circuit board was blown.  After making a trip to Lowe's to get 3A 1-1/4 inch AGC fuses, I replaced the fuse. When I powered the compressor it blew the fuse again. 


I suspected a burned out motor, but didn't see any indication.  I made sure the compressor was unplugged and removed the cover again.  The small circuit board seemed simple enough, as it contained only a bridge rectifier and a capacitor and fuse. 


I removed the screws holding the circuit board to the chassis and turned the board over to look. 


I traced out the circuit, as shown below: 


The input ac power is fused, then run to the power switch. From there the AC line goes through a 100 psi pressure limiter switch.   After this the AC line and neutral are applied to a diode rectifier. The rectified DC is filtered by a small capacitor and then applied to the DC motor. 

The motor resistance was 13 ohms which seemed reasonable.  I clipped one of the wires to the motor to isolate the circuit from the motor.  Then I used my multimeter in diode voltage mode to check the diode bridge.  One of the arms of the diode bridge was shorted.  The bridge is a KBPC610, which I found I could order 10 pieces from Amazon for $8. 


When I received the replacement diode bridge, I soldered it in and tested the compressor, but it didn't work.  After some troubleshooting I found that one of the AC input connections to the board had broken off under the insulation.  After fixing this the compressor ran ok.  I carefully spliced and insulated the wire I had cut to the motor.  Then put everything back together, making sure that none of the wires was in danger of getting caught by the small axial fan that is under the cover. 

I hope the air compressor will keep running. I bought it about 15 years ago at Harbor Freight in Houston.