Battery Chargers‎ > ‎

Advanced Charger

General description

The instrument is intended to overcome some limitations of the basic charger and offer more flexibility to the users.

The advanced charger is based on a hardware similar to the basic charger one. The main differences are in the charge/discharge profiles management that now can be entered in "local" and without the PC support.


Differences from the basic charger
  1. All the parameters for charge and discharge can be entered directly in the charger.
  2. The PC is useful only for PIC firmware patch and for output graphic plotting.
  3. A second P-channel mosfet is added for up to 10A charge current or for no self-powering diode.
  4. Integrates a 16x2 lines LCD display
  5. Integrates up to 7 different charge/discharge profiles
  6. The batteries can be charged,discharged or cycled (charge after discharge)
  7. Parameters for each battery profile:
    • Number of cells (from 1 o 7)
    • Cell capacity (useful for automatic timeout calculation)
    • Cut-off voltage per cell
    • Delta peak per cell
    • Charge current (up to 10A or 5A plus the diode)
    • Discharge current (up to 30A)
    • Peak control inhibition
    • Timeout in function of the cell capacity.
  8. Support for costant voltage supply (motor test) with adjustable output
  9. Fast current control (200Hz) and low noise values (1mV resolution for batteries)
  10. Display during charge of current,voltage,peak voltage,delta peak, capacity, time
  11. Display during discharge of current,voltage,peak voltage,cut-off, capacity, time
  12. Acoustic buzzer for end of operation signaling
  13. Automatic recovery in case of power supply failure

Future development

1. Possibility to have a costant voltage charge with current limiting (Pb and Li-Poly batteries)
2. Possibility to function as wattmeter


Photos

The first photo is the discharge at 20A of a 2400mAh NiCd battery pack. Please note the battery connection with double wire, one for the high current path, the other for the voltage sense. The keys on the panel are green for up/down parameters adjust, yellow for parameter enter and red for action break.









The second photo shows the charger content. We can see the small PCB and the fan cooler (CPU cooler) with the power transistors attached. The metallic box is larger than the PCB because in the prototype we decided to fit also a switching power supply inside.










The third photo shows the charger rear side with the fan for transistor cooling, the plugs for power supply in (or out, if the power supply is put inside) and the DEM 9S connector for RS232 serial interface.













Schematic description

The schematics for Advanced Charger is completely based on the PIC 16F876 device. All the other components are for basic I/O functions that the charger performs during normal operations. The PIC microprocessor has a crystal of 20MHz in order to have a true calculation power of 5 MIPS. The PIC interfaces the PC serial port using a MAX232 that translate the TTL levels to true RS232 levels. The version of the MAX232 used allow the usage of 100N capacitors for charge pumps.

The power supply for PIC is a linear regulator LM7805, capable to source 1A at 5V.
The fan cooler is commanded directly from the PIC using a small power npn transistor, in order to switch on the fan only during the charge or discharge operations.
The buzzer is wired directly to the PIC open collector output pin and the key switches uses an input port with internal pull-ups.

The "BREAK" key is directly connected to the reset pin of the PIC microcontroller for "break and restart" fast operation.

The charge/discharge block is built with a double P-channel mosfet (in parallel) for the charge and the double N-channel (in parallel) for the discharge. The selected components mounted on a Pentium-style cooler (with fan) reaches 30A for discharge and 10A for charge without problems. The mosfets are directly driven by a low pass filtered PWM signal coming from the PIC. This signal is referenced to GND for N-channel driving and to power supply for P-channels driving. The voltage sense wires are differents from the power wires in order to avoid the problem of the variable offset depending from the charge/discharge current.
The feedback for current and voltage are directly taken from a current to voltage (hall sensor based) converter and from a simple resistive partitor. This partitor has a relatively high output resistance and the value must be taken into account in the settling time of battery signal conversion inside the PIC processor. The current to voltage converter has a zero-current output of about 2.5V and swings 0.6V around this point for currents flowing inside the sensor in the two opposite directions.


Differences with respect to the BASIC CHARGER

The hardware modifications between the BASIC and ADVANCED charger are very minimal. The schematic baseline and the concepts are always the same, it changes only a few particulars.
  1. Double P channel mosfet for charge current increase and blocking diode introdction.
  2. New P channel mosfet drive for operational amplifier no rail-to-rail functionning.
  3. 16x2 lines LCD display with HD44780 controller.


PIC firmware description

The PIC microcontroller program is written in assembler using the Parallax-like macro (included in the package). The program structure is quite simple because it is based on a periodic interrupt with 5msec period. This basic tic allow the processor to sample the two analog inputs (voltage and current) that are read in a 16-bit format at each tic.

Interrupt routine

Charge section: The charge section of the interrupt program controls at 200Hz the charge current (via pwm signal) with a reference feedback of the signal coming from the current to voltage converter. The program passes to the routine only the target current and the zero current reading.
Discharge section: The discharge section of the interrupt program controls at 200Hz the discharge current (via pwm signal) with a reference feedback of the signal coming from the current to voltage converter. The program passes to the routine only the target current and the zero current reading.
Power supply: The power supply section of the interrupt program controls at 200Hz the source current (via pwm signal, in practice is a cherge current) with a reference feedback of the voltage reading on the load. The pwm signal is also decreased if the maximum current (5A) threshold has been reached. The program passes to the routine the target load voltage and the zero current reading .

The processor, with substantial difference with respect to the basic charge, works on a asynchronous cycle for charge/discharge processes: the actions performed in the single routine are below detailed:

Charge routine

The charge routine starts sampling the zero current reading and initializing all the charge-related parameters recalling the correct profile from eeprom. During the charge process the PIC display the charge current, the battery pack voltage, the mAh charged, the time and the delta peak. The charge end is checked at each iteration and when the delta peak is reached or the timeout has expired or the user remove the battery, the charge ends.

Discharge routine

The charge routine starts sampling the zero current reading and initializing all the discharge-related parameters recalling the correct profile from eeprom. During the discharge process the PIC display the discharge current, the battery pack voltage, the mAh discharged, the time and the cut off. The discharge end is checked at each iteration and when the cut off is reached or the user remove the battery, the discharge ends.

Power supply routine

The power supply routine performs the checks on pressed keys for voltage adjust. The loop stabilization is checked in the interrupt routine.

Parameters setting

The parameters settings allows the user to enter, change and re-store all the parameters for a battery pack usage.

PC management

The PC serial management is useful to get the data coming from the charger in real time (archiving, waveform displaying) or to change easily all the parameters.

Power supply fail

If the power supply fail or the user press the break key, the charger restarts with the hello message and waits 10 seconds or a key strike. If the 10 seconds expires and the user has pressed no key the charger will restart the interrupted action, if one.

Profiles management

The choice of battery profile is very simple and is performed via two keys.

Battery cycle

The battery cycle is a simple discharge-then-charge cycle for battery safe and easy charging.



Building notes

The Advanced charger building has been simplyfied because the user display and keys are mounted on a separated PCB linked to the main via a standard flat cable for very easy wiring. Please refer to the total charger building diagram for correct operations.

For wiring we recommend a silicon wire of at least 6sqmm. The preferred panel connectors are the 4 mm red/black plugs.

The polarized component orientation is the following:
  1. The power mosfets and the power diode have the tab to the board external.
  2. The LM7805 has the tab to the board external.
  3. The dual in line ICs have the pin 1 with a square pad.
  4. The panel connector has the pin 1 with a squre pad (an arrow on the connector).
  5. The fan connector has the pin 1 square, the center pin GND and the last pin +12V.
  6. The polarized capacitors are marked on the assembly (+ sign for positive).
  7. In the panel, the connector from main board is mounted on the bottom layer.
  8. In the panel the buzzer is mounted on the bottom layer.
  9. The display face, the DEM9P connector base and the keys should stay at the same level (box front panel).
  10. The wiring for PCB and connectors is presented in the below figure. Please note the connection from the battery force minus and power supply minus in order to minimize the current flowing in the battery sense minus wire during the charge process.



BUGS in previous PCB version

The known bugs for the previous versions are the following:
  1. The diode D11 has the two pins swapped. In the actual version of the files this problem has been corrected. Cut and rewire for the old users
  2. During the charge process the return current from battery flows in the battery sense minus wire. We recommend to make an hard connection between the battery force minus connector and the power supply minus connector.
  3. In the panel PCB the keys are scrambled. In the actual version of the files this problem has been corrected.

All these problems are fixed in the files currently on the web site.



Firmware release 1.1

The improvements introduced in the new firmware release, directly imported from the HV version, are the following:
  1. In the previous firmware revision the voltage parameters was erroneous because in my charger the resistor R5, nominally 47KOhm was 55KOhm. For this reason if the schematic is strictly followed the voltage readout and all the relevant parameters should be erroneous. In this version the resistor values are correct and are moved in an assembler code separated section named "USER CUSTOMIZATION" for easier editing.The assembler file must be recompiled and the PIC reprogrammed in order to make effective the change of this parameter.
  2. Another improvement possible is the setting of the maximum current when in "power supply" mode. This parameter is present in the "USER CUSTOMIZATION" section and is an integer representing the max amperes delivered to the load. The assembler file must be recompiled and the PIC reprogrammed in order to make effective the change of this parameter.
  3. The buzzer tone frequency is another customizable constant. This parameter is present in the "USER CUSTOMIZATION" section and is useful when the charger must drive a buzzer with a "resonant" frequency different from 2KHz. The assembler file must be recompiled and the PIC reprogrammed in order to make effective the change of this parameter.
  4. The buzzer tone at the end of the charge or discharge process has a fixed duration of about 20 seconds.
  5. The firmware has a unique change in the setting of the cell number: This number can be from 1 to 19: see the Advanced Charger HV section to understand the limitation on the management of more than 7 cells.
This new version can be found on the "Files" area of this section, under the name "ADV_pic_hv.zip".




Ċ
Oloap,
Nov 5, 2013, 1:00 PM
Ċ
Oloap,
Nov 5, 2013, 1:00 PM
Ċ
Oloap,
Nov 5, 2013, 1:00 PM
Ċ
Oloap,
Nov 5, 2013, 1:00 PM
ċ
ADV_material_list.txt
(4k)
Oloap,
Nov 5, 2013, 1:00 PM
Ċ
Oloap,
Nov 5, 2013, 1:00 PM
Ċ
Oloap,
Nov 5, 2013, 1:01 PM
Ċ
Oloap,
Nov 5, 2013, 1:01 PM
Ċ
Oloap,
Nov 5, 2013, 1:01 PM
ċ
ADV_pic.zip
(38k)
Oloap,
Nov 5, 2013, 1:01 PM
Ċ
Oloap,
Nov 5, 2013, 1:01 PM
Ċ
Oloap,
Nov 5, 2013, 1:01 PM
Comments