Silicon ChipA Charger For Deep-Cycle 12V Batteries, Pt.1 - November 2004 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Fixed line phones no longer a necessity
  4. Feature: Look Mum: No Wires by Ross Tester
  5. Feature: The New Era In Car Electrical Systems by Julian Edgar
  6. Project: USB-Controlled Power Switch by Jim Rowe
  7. Project: A Charger For Deep-Cycle 12V Batteries, Pt.1 by John Clarke
  8. Project: The Driveway Sentry by Jim Rowe
  9. Project: SMS Controller, Pt.2 by Peter Smith
  10. Project: Picaxe Infrared Remote Control by Clive Seager
  11. Feature: Emergency Power When All Else Fails by Stan Swan
  12. Vintage Radio: Those troublesome capacitors, Pt.2 by Rodney Champness
  13. Back Issues
  14. Book Store
  15. Advertising Index
  16. Outer Back Cover

This is only a preview of the November 2004 issue of Silicon Chip.

You can view 23 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "USB-Controlled Power Switch":
  • USB-controlled Power Switch PCB pattern (PDF download) [10111041] (Free)
  • USB-Controlled Power Switch label artwork (PDF download) (Panel Artwork, Free)
Items relevant to "A Charger For Deep-Cycle 12V Batteries, Pt.1":
  • PIC16F628A-I/P programmed for the Deep-cycle 12V Battery Charger [battchrg.hex] (Programmed Microcontroller, AUD $10.00)
  • PIC16F628A firmware and source code for the Deep-cycle 12V Battery Charger [battchrg.hex] (Software, Free)
  • Deep-Cycle 12V Battery Charger PCB patterns (PDF download) [14111041/2/3] (Free)
  • Deep-cycle 12V Battery Charger front panel artwork (PDF download) (Free)
Articles in this series:
  • A Charger For Deep-Cycle 12V Batteries, Pt.1 (November 2004)
  • A Charger For Deep-Cycle 12V Batteries, Pt.1 (November 2004)
  • A Charger For Deep-Cycle 12V Batteries, Pt.2 (December 2004)
  • A Charger For Deep-Cycle 12V Batteries, Pt.2 (December 2004)
Items relevant to "The Driveway Sentry":
  • Driveway Sentry PCB pattern (PDF download) [DRIVSENT] (Free)
  • Driveway Sentry front panel artwork (PDF download) (Free)
Items relevant to "SMS Controller, Pt.2":
  • ATmega8515 programmed for the SMS Controller (Programmed Microcontroller, AUD $15.00)
  • ATmega8515 firmware and source code for the SMS Controller (Software, Free)
  • SMS Controller PCB pattern (PDF download) [12110041] (Free)
Articles in this series:
  • SMS Controller, Pt.1 (October 2004)
  • SMS Controller, Pt.1 (October 2004)
  • SMS Controller, Pt.2 (November 2004)
  • SMS Controller, Pt.2 (November 2004)
Items relevant to "Picaxe Infrared Remote Control":
  • PICAXE-08M BASIC source code for the PICAXE Infrared Remote Control (Software, Free)
Articles in this series:
  • Those troublesome capacitors, Pt.1 (October 2004)
  • Those troublesome capacitors, Pt.1 (October 2004)
  • Those troublesome capacitors, Pt.2 (November 2004)
  • Those troublesome capacitors, Pt.2 (November 2004)

Purchase a printed copy of this issue for $10.00.

Pt.1: By JOHN CLARKE A charger for deep-cycle 12V batteries If deep cycle batteries are not properly charged, they will never be able to deliver their full capacity and their life will be greatly reduced. You can’t use a generalpurpose 12V car battery charger. This 3-step charger is specially designed for deep cycle batteries and will charge at up to 16.6A. D EEP CYCLE BATTERIES are expensive and are designed for a long life. If properly charged and looked after, they should last 10 years or more. Their chemistry is quite different from that of car batteries and if you use a charger intended for car batteries, you will definitely not get their maximum capacity. 34  Silicon Chip Furthermore, if deep cycle batteries are consistently under-charged, they will have a short life. By compari­ son, car batteries are seldom charged above 70% of their capacity but they are designed for “shallow” discharge. If they are subjected to frequent deep discharge, they will have a very short life. Deep cycle battery manufacturers specify that their batteries should be charged up to a fixed value called the “cyclic voltage”. Once the battery is charged to this level, the voltage must be reduced to the “float” voltage and then it can be left permanently connected to the charger. Continuous charging at the cyclic voltage will damage the battery. The cyclic voltage is usually different for each type of lead acid battery. For example, standard lead acid batteries should be charged to 14.2V and floated at 13.4V, while Gel-Cell (Sealed Lead Acid) batteries should be charged to 14.1V and 13.3V respectively. These voltages are for a battery temperature of 20°C. At higher temperatures, the voltages must be reduced and the amount of compensation is also dependent on siliconchip.com.au battery chemistry. Typically, lead acid batteries require a temperature compensation of -20mV/°C while Gel-Cell batteries require -25mV/°C compensation. Clearly, a low-cost charger has no means for setting the required cyclic voltage and nor can it provide the float voltage setting or temperature compensation for these voltages. Our new charger provides a 3-step charge cycle comprising an initial bulk charge, an absorption phase and then a float charge. A separate equalisation charge mode is available after the absorption phase, if required. Equalisation is important for deep-cycle batteries and should be run three to four times a year. Our charger includes an LCD that shows charging mode and temperature plus battery voltage and charging current. The display can be set to show the battery amp-hour (Ah) setting, battery type and whether equalisation has been selected. Fig.1: this graph shows the battery voltage during charging. There are three steps to the charging cycle: an initial bulk charge, an absorption phase and then a float charge. An optional equalisation charge phase is also available for deep-cycle batteries. Battery capacity A charger must not supply too much charging current to the battery. The optimal charging current is related to the capacity of the battery and its internal chemistry. Our charger sets the initial charge to 25% of the battery’s amp-hour (Ah) capacity. For example, for a 40Ah battery, the initial charging current will be 10A. For higher capacity batteries, the charging current will be limited to 16.6A, the maximum that the charger can deliver. During the initial charging phase, the display shows BULK on the top line, while the second line shows the temperature, voltage and current. For example, the display might show 26 Deg C, 14.2V and 15.0A. The °C reading is measured by an external temperature probe, normally placed on the battery case. The voltage and current readings are the battery terminal voltage and the charging current, respectively. During bulk charge, battery voltage will gradually rise from an initial 12V (or whatever the initial no-load voltage is) towards the cyclic voltage. The battery voltage is continuously monitored and the charger detects when it reaches the cyclic voltage threshold. The cyclic voltage is the value selected for the particular battery type and is compensated with respect to temperature. siliconchip.com.au Fig.2: the battery current during charging. The charging current is maintained at 25% of Ah during the bulk charge and then tapers off during the absorption phase. It is then fixed at 5% of Ah during the (optional) equalisation process. When the battery reaches the float voltage, a small charging current maintains it at this level. When the battery reaches the cyclic voltage, the charger switches over to the absorption phase. This is shown as ABSORPTION on the display, while the second line continues to show temperature, voltage and current. During this phase, the cyclic voltage is maintained by adjusting the current. The initial stages of the absorption phase maintain the charging current at a similar value to that during the bulk charge. However, as time goes on, the current will be reduced so as to maintain the constant cyclic voltage across the battery. This reduction in current is an indication of battery charge so that when the current falls to around 2% of charge, the battery can be considered to be around 90% charged. At this point, the charger switches to float or equalisation. Equalisation sets the current to 5% of the battery Ah and charges for an- other three hours. Equalisation breaks down sulphation on the plates and thus extends the life of the battery. It also makes sure that each cell within the battery is fully charged, to equalise the cells. During this phase, the display shows EQUALISATION and also shows the temperature, voltage and current. The battery voltage is likely to rise above 16V during this phase and this will cause the display to show --.-V. The maximum battery voltage is restricted to the setting of the over-voltage limit. Equalisation should be run only a few times per year since it will reduce battery capacity if used too often. Finally, the charger switches to float and the display shows FLOAT. This takes place at a lower voltage to that of the absorption phase and is temperature compensated. The battery is then left connected to the charger to further November 2004  35 Main Features • Suitable for 12V lead acid bat• • • • • • • • • • • teries LCD shows charging phase and settings Temperature, voltage and current metering 3-step charging Optional equalisation phase Battery temperature compensation 16.6A charge capacity Initial trickle charge when battery voltage is low 4 preset battery chemistry settings 2 adjustable specific battery settings (can be set for 6V batteries) Correction for voltage drop across battery leads Wide battery capacity range (4-250Ah) in 18 steps increase the charge by a few percent and also to prevent self-discharge. The entire charging process is shown in the accompanying graphs (Fig.1 & Fig.2). Fig.1 shows the battery voltage during charging while Fig.2 shows the battery current. As shown in Fig.2, the charging current is maintained at 25% of Ah during the bulk charge and then tapers off during the absorption phase. It is then fixed at 5% of Ah during the (optional) equalisation process. The current subsequently normally drops to near zero immediately after absorption (or equalisation) and then the battery drops to its float voltage level. This may take some considerable time. When the battery reaches the float voltage, a small charging current maintains it at this level. Note that Gel-Cell (SLA) and AGM batteries can accept a higher charge rate than the 25% of Ah delivered by the charger. To achieve this, the Ah setting on the charger can be increased to a value that is about 1.6 times the actual Ah of the battery. For example, for a 40Ah battery you can use the 60Ah setting. This will increase the current to about 40% of Ah during bulk charge. In addition, the point at which the charger switches from the absorption phase to 36  Silicon Chip float charge will increase by the same proportion – ie, from 2% to about 3% – but should be of no consequence. The equalisation current will also be increased by a factor of 1.6. As a result, if equalisation is selected, the Ah reading should be set to the correct value. Note that there is no point in increasing the Ah setting for batteries that are above 40Ah in capacity because the charger can only deliver a maximum of 16.6A, as noted above. Safeguards There are various safeguards incorporated into the charger to prevent possible damage to the battery. First, at the beginning of bulk charge, the battery voltage is checked to see if it is above 10.5V. If it is below 10.5V, the charging current is limited to 2% of the selected Ah value, until it rises to a level where it is safe to apply 25% of Ah current. Note that there is a facility to charge a 6V battery and the equivalent safety threshold is then 5.2V. Second, the duration of the absorption phase is not just set by a timer, as in some commercial designs. A timer on its own would not prevent the absorption phase re-running for the duration again should the battery be recharged before it has been discharged. Excessive recharging at the cyclic voltage will cause grid corrosion in the battery, leading to reduced battery life. So as well as timeout, our charger incorporates a low current detection set at 2% of the battery Ah, at which point float charge is initiated. This feature means that if the battery is recharged before it is discharged, the bulk charge and absorption phase will be short and float charge will happen almost immediately. In addition, equalisation will not occur unless it is selected manually. As a further precaution, if the battery temperature rises above 40°C, equalisation will not occur after the absorption phase, even if it is selected. Similarly, if the battery temperature rises above 40°C during equalisation, the charger will switch over to float mode. Finally, if the battery voltage rises above the over-voltage setting, the charger will switch off and show BATTERY ? on the display. User settings When the charger is switched on, the display prompts the user to select the battery settings: Ah, battery type and whether equalisation is required. Selecting Ah (battery capacity) sets the correct charge rate. The display shows BATTERY AMP HOUR on the first line and <200Ah>, for example, on the second line. At this stage, the charger is not delivering current and the desired battery Ah is set using the “<” and “>” switches. The second battery setting is the battery type and should also be selected or checked by pressing the set switch again. The display now shows BATTERY TYPE on the first line and <LEAD ACID>, for example, on the second line. The battery type can be selected using the “<” and “>” switches to change the settings. For example, the Gel-Cell, AGM, Calcium/ Lead, Specific #1 or Specific #2 batteries could also be selected. The third battery setting is for equalisation. Pressing the set switch will have the display show EQUALISATION on the first line and <OFF> on the second line. Pressing either the “<” or “>” switch will change this to <ON>. Equalisation will then occur after the absorption phase. Charging will not begin until the start switch is pressed. If the battery is not connected, the charger will not place any voltage on the battery clips. This prevents any sparking at the terminals when connecting the battery while the charger is switched on. Note that after charging has started, the switches become locked so that the settings cannot be changed. This feature will prevent any tampering with the settings during charging. The set switch will only operate if it is pressed before 25% of Ah current is reached. If the switch is pressed during this time, charging will cease. Charging can then be restarted with the start switch. A jumper can be removed from within the charger for automatic starting when power is applied. Automatic starting is a useful feature in the event that the charger is only ever used on one particular battery. Should the battery settings require changing, the set switch can be pressed as soon as power is applied to bring up the battery settings on the display. Again, this will prevent charging until the start switch is pressed. Another jumper must be removed from within the charger in order make changes to the Specific #1 and Specific siliconchip.com.au Fig.3: the block diagram of the charger. The power transformer feeds 18VAC to bridge rectifier BR1 and the resulting unfiltered DC is fed via a power controller circuit to the battery via fuse F2. The power controller is controlled by a PIC microcontroller (IC5), in conjunction with IC3, IC4 and IC1b. #2 battery parameters. This prevents tampering with the parameters. Should the battery clips be removed from the battery terminals during bulk charging, the charger will either go to the absorption phase or charging will stop and the display will show BATTERY ?. The charger will then need to be switched off and on again using the mains switch to initiate the original charging phase. Fail-safe protection has been incorporated for battery temperature compensation. If the temperature probe is not connected or has gone open circuit, then the battery temperature is assumed to be 40°C. This reduces the cyclic and float voltages to prevent damage to the battery, even in high ambient temperatures. The display also shows two dashes (--) in place of the temperature reading, to indicate a fault in the temperature reading. Finally, the circuit is protected against reverse battery connection by a 20A fuse. Charger protection A 3A slow-blow fuse protects against failures in the mains transformer and the charger circuit, while the abovementioned 20A fuse protects against output short circuits. Fan cooling for the heatsink is provided, with siliconchip.com.au a thermostat cutting in and switching the fan on when the temperature rises above 50°C. If this cooling system fails, a second thermal cutout set at 70°C shuts down the charger. Over-voltage and over-current limiting are also provided, via the circuit itself and via software control. The software is arranged to switch off the charger if the output goes above 16V during normal charging (except during equalisation) or the charging current rises above 20A. An over-current fault will cause the display to show <OFF>. The over-voltage and over-current thresholds are set using trimpots, to 17V and 18A respectively. Voltage sensing When charging a battery, it can be difficult to obtain an accurate reading of the voltage right at the battery terminals. This is because there will be a voltage drop along the leads due to the current flow. Some battery chargers overcome this problem with separate voltage sensing leads but unless the leads are moulded together, they can be a nuisance and become tangled. Reserve Capacity Some battery manufacturers use the term reserve capacity (RC) to specify battery capacity and this is distinct from the more readily understood amp-hour (Ah) rating of the battery. The two specifications are not directly interchangeable. The Ah capacity refers to the current that can be supplied over time (in hours) and is usually specified over a 20-hour period. So a 100Ah battery should supply 5A for 20 hours, by which time the battery voltage will be down to 10.5V. At higher currents, the capacity will be less than 100Ah due to increased losses within the battery. Reserve capacity (RC) is specified in minutes. It specifies how many minutes the fully-charged battery can deliver 25A before the voltage drops to 10.5V. For example, a battery with an RC of 90 will supply 25A for 90 minutes (1.5 hours). This can be converted to Ah by multiplying RC (in this case 90) by the current (25A) and then dividing by 60 to convert from minutes to hours. Thus a battery with an RC of 90 has a capacity of 37.5Ah. In practice, the Ah capacity would be considerably higher if measured at the 20-hour rate. November 2004  37 38  Silicon Chip siliconchip.com.au Fig.4: the power section of the 3-Step Battery Charger. The output from the bridge rectifier (BR1) supplies the power controller which consists of transistors Q1-Q5. This circuit is controlled by op amp IC1b, in turn controlled by IC2a, IC2b and microcontroller IC5 (see Fig.5). For our battery charger, we use a pseudo remote sensing technique to do away with the need to have separate sensing leads. This method calculates the voltage drop produced by the charging current and subtracts this from the voltage measured inside the charger (it assumes a certain resistance in the battery leads and the current sensing resistor). The result is a very close approximation of the true voltage at the battery terminals. Specific battery parameters As mentioned, the Specific #1 and Specific #2 battery selections can be adjusted to suit particular battery types. The parameters that can be altered are the cyclic voltage, the float voltage and the temperature compensation. The cyclic voltage and float voltages can be obtained from the manufacturer and must be specified at 20°C (68°F). In order to change these parameters, jumper JP2 must be removed from inside the charger. When this is done and power is applied, the charger function will be off and the display will show SPECIFIC #1 on the first line and then 14.3V CYCLIC 20 Deg C on the second line. This is the initial cyclic voltage set for the Specific #1 battery at 20°C. You can then change the cyclic voltage using the “<” and “>” switches in 100mV steps over a range from 0.0V to 15.7V. Note that this range also allows charging a 6V battery. Pressing the set switch will cause the display to show the float voltage for the Specific #1 battery type. This will initially be 13.3V and can be set in 100mV steps over a range of 0.0V to 15.7V. Pressing the set switch again will show the temperature compensation value for the Specific #1 battery. Initially, the display will show -36mV/ Deg C. This can be changed in 1mV steps from 0mV/°C to -63mV/°C using the “<” and “>” switches. Pressing the set switch again will show the cyclic and float voltages and the temperature compensation value for the Specific #2 battery. Adjusting these is the same as changing the Specific #1 settings. When adjustments are complete, JP2 can be replaced inside the charger for normal operation. Block diagram Fig.3 shows the block diagram of the charger. The power transformer feeds siliconchip.com.au Temperature Compensation The temperature compensation required by manufacturers is usually shown as a graph of voltage versus temperature. You need to convert this to mV/°C. To do this, take the difference between the voltages at two different temperatures and divide by the temperature difference. For example, a battery graph may show the cyclic voltage at -10°C to be 15V and at 40°C it may 14.2V. So (14.2 - 15)/50 is -16mV/°C. Some graphs of batteries show the 18VAC to bridge rectifier BR1 and the resulting unfiltered DC is fed via a power controller to the battery via fuse F2. Should the battery be connected the wrong way around (reverse polarity), bridge rectifier BR2 will conduct and blow the 20A fuse (F2). The power controller section is itself controlled by a PIC microcontroller (IC5), in conjunction with IC3, IC4 and IC1. Circuit description The circuit for the 3-Step Battery Charger is split into two sections – Fig.4 (Power) and Fig.5 (Control). This is a linear design rather than switchmode. We opted for this approach in order to use more readily available components and to simplify construction, without the need for specialised high-frequency transformer assemblies, coils and high-frequency capacitors. A linear circuit is not as efficient as a switchmode design but it is easier to build and is more rugged. Also, much of the heat generated by the charger is due to losses in the main bridge rectifier and this would be much the same, regardless of whether we had used a switchmode or a linear design. Looking at Fig.4 (Power) first, the power transformer is a 300VA toroidal type feeding 18VAC to the bridge rectifier which then supplies the power controller which comprises transistors Q1-Q5, connected as a compound emitter follower. Q1 is a power Darlington and it drives the commoned bases of four TIP3055 NPN power transistors (Q2-Q5). These power transistors each have 0.1Ω emitter resistors to help equalise the load current. float temperature compensation to be slightly different to the cyclic compensation. In this case, the compensation will need to be a compromise between the two values. Note that it may be possible to obtain a better value, that is closer to the requirements for both voltages, if the graph is interpreted over a smaller temperature range, consistent with the temperature conditions under which you would expect to be using the charger. In operation, the emitters of transistors Q2-Q5 “follow” the voltage applied to the base of Q1 (hence the term “compound emitter follower”). Adjusting the base voltage on Q1 controls charging so that the higher the voltage on Q1’s base, the more the power transistors conduct and the greater the current into the battery. The 220nF capacitor between the base and collector of Q1 prevents bursts of oscillation that would otherwise occur as the transistors begin to conduct on each cycle of the pulsed DC voltage from the bridge rectifier. Op amp IC1b supplies the base current to Q1 via a 3.3kΩ limiting resistor. This amplifier has a gain of 6.6 to multiply the control voltage range at pin 5 from 0-5V to 0-33V. The 30V supply to IC1b and its limited output swing does restrict the range to more like 0-28V but this is more than enough to fully drive the output transistors. The 1µF capacitor across the 5.6kΩ feedback resistor provides rolloff above 28Hz to prevent op amp IC1b from oscillating. A 70°C thermostatic switch, TH2, provides over-temperature protection. This is mounted on the main heatsink and when it closes (when the temperature exceeds 70°C), it shunts base drive from IC1b to ground and this stops the charger from supplying current to the battery. Note that IC1b’s output is prevented from being directly shorted by a 3.3kΩ current limiting resistor. Current monitoring The charging current flow is measured by amplifying the voltage produced across a 0.005Ω resistor (R1) November 2004  39 40  Silicon Chip siliconchip.com.au Fig.5: the control section is based on PIC microcontroller IC5. It works in conjunction with IC3, a 4051 analog 1-of-8 selector which monitors the battery voltage, current and temperature (via Sensor 1). IC4 converts the selected analog data from IC3 into 8-bit serial data which is then processed by the microcontroller. The microcontroller produces the control signal for IC1b, drives the LCD module and processes the inputs from switches S1-S4. using IC1a which has a gain of 44. Filtering is included at the input and across the feedback path for IC1a, to convert the pulsating charge current to an average value. Hence, the 10μF capacitor at pin 3 filters the current by rolling off signal above 16Hz, while the 10μF capacitor across the 43kΩ feedback resistor rolls off frequencies above 0.37Hz. IC1a’s output is applied to pin 2 of the over-current comparator, IC2a, via a voltage divider comprising two 22kΩ resistors and a 100µF filter capacitor. The non-inverting input, pin 3, is connected to trimpot VR2. VR2 is adjusted so that IC2a’s output goes low when the charge current goes above 18A. When IC2a’s output goes low, it pulls pin 5 of IC1b low. This causes pin 7 of IC1b to go low, removing the drive to Q1 and to the battery. Over-voltage protection The battery voltage is monitored at point A on the circuit – ie, at the junction of the four 0.1Ω resistors (for Q2-Q5) – and fed via a voltage divider to pin 6 of comparator IC2b. This is compared to a reference voltage on pin 5, from the wiper of trimpot VR1. This is set so that IC2b’s output goes low when the battery voltage goes above 17V. The low output of IC2b will shut down the drive to Q1, as before. Note that IC2a and IC2b are comparators with open-collector outputs. When their outputs are off, they do not affect the drive to pin 5 of IC1b. Note also that when the output of IC2a or IC2b goes low to stop the drive to Q1 (via IC1b), the over-current or over-voltage condition will cease. As a result, the relevant comparator output will go open circuit again to restore the drive to Q1’s base. If the fault still exists, drive will again be removed and so this cycle will continue – ie, the charger will cycle on and off at a slow rate. Zener diode ZD3 provides a 5.1V reference supply for trimpots VR1 and VR2 and this is further reduced by a 3.3kΩ resistor so that each trimpot has a nominal 0-3V range. DC supply rails The 25V supply for IC2 and the fan is derived from the rectified output of BR1 via diode D1. This rail is filtered using a 2200µF 50V capacitor. Diodes D2 and D3 form a voltage doubler which is fed from the AC input siliconchip.com.au Specifications Bulk Charge: constant current charge at 25% of Ah. Absorption Phase: constant voltage charge at cyclic voltage until current drops to 2% of Ah or timeout of 2.5 hours (which ever comes first). Float Charge: constant voltage charge at float voltage. Equalisation: optional after absorption phase. Constant current at 5% of Ah for three hours. Equalisation switched off if temperature rises above 40°C. Battery Ah Settings: 4, 8, 12, 16, 22, 24, 30, 40, 60, 80, 90, 100, 125, 150, 175, 200, 225 & 250Ah. Battery Type: Lead Acid, Gel-Cell (Sealed Lead Acid or SLA), AGM (Absorbed Glass Mat) and Calcium Lead, plus adjustable settings with Specific #1 and Specific #2 battery selection. Lead Acid Parameters <at> 20°C: cyclic 14.2V, float 13.4V, compensation -20mV/°C. Gel-Cell Parameters <at> 20°C: cyclic 14.1V, float 13.3V, compensation -25mV/°C. AGM Parameters <at> 20°C: cyclic 14.4V, float 13.3V, compensation -36mV °C. Calcium/Lead Parameters <at> 20°C: cyclic 15.0V, float 13.8V, compensation -20mV/°C. Adjustable parameters (Specific #1 and #2): cyclic 0.0V to 15.7V in 100mV steps, float 0.0V to 15.7V in 100mV steps, compensation 0mV/°C to -63mV/°C in 1mV steps (changed with JP2 out). Low Battery Voltage Detection: 10.5V for 12V battery (5.2V for 6V battery). Low Battery Charge Current: 2% of Ah. Temperature Compensation: operates from -10°C to 99°C (voltage fixed at -10°C setting for temperatures below this). Open Circuit Temperature Probe Default: compensates assuming 40°C. Display shows (--). Temperature Measurement: display shows from –9°C to 99°C in 2°C steps. Temperatures below –9°C show as a LO. Temperatures above 99°C shown as (--). Display refreshes reading every 0.2 seconds. Voltage Measurement: from 0-16.0V with 100mV resolution. Display shows --.-V above 16V. Display refreshed every 0.2 seconds. Current Measurement: from 0-25.5A with 100mA resolution. Display readings refreshed approximately every 1 second. Fan Cut In Temperature: 50°C. Fan Cut Out Temperature: ~40°C. Over-Temperature Cutout: 70°C. Hardware Over-Voltage Limit: adjustable. Hardware Over-Current Limit: adjustable. Software Monitored Over Voltage Limit: 16V at charger output (not operational during equalisation). Software Monitored Over Current Limit: 20A. November 2004  41 This is the view inside the prototype. Most of the parts are mounted on three PC boards: a power board, a control board and a display board which mounts vertically behind the front panel. The assembly details are in Pt.2, next month. of the bridge rectifier via a 22µF capacitor. The voltage across the following 220µF capacitor is then limited to 30V by series-connected zener diodes ZD1 & ZD2 and a 10Ω resistor. Note that the two zener diodes are rated at 5W because the peak current through them is too high for 1W devices. The 10Ω resistor in series with the zener diodes is included to reduce the peak current. Why use a zener diode shunt rather than an adjustable 3-terminal regulator (such as an LM317) to obtain the 30V rail? Because the wide range of transformer loading means that an LM317 could not do the job. By the way, the reason we need a 30V supply for IC1 is so that IC1b can drive the base of Q1 above the 25V peak voltage of the unfiltered DC supplying the power transistors. The heatsink cooling fan is powered 42  Silicon Chip from the 25V supply rail via a 56Ω 5W resistor when ever the 50°C thermostat switch is closed. The 56Ω resistor reduces the fan supply to around 12V when the fan is running. Control circuit Fig.5 shows the control circuit which comprises IC3, IC4, PIC microcontroller IC5, the LCD module and associated components. IC3 is a 4051 one-of-eight analog switch. In our circuit, we use only three of the eight inputs. One selects the battery voltage at pin 2, the second selects the current signal at pin 1 and the third takes the temperature signal at pin 13. The voltage input comes from the positive battery terminal via 22kΩ and 10kΩ resistors which divide by a factor of 0.31. Voltages above 5V at pin 2 are clamped using D4, while voltages below 0V are clamped using D5. The latter is required to protect IC3 against reverse battery connection. The current signal comes directly from the output of IC1a (see Fig.4) via a 10kΩ series resistor. Battery temperature is measured using an LM335 (Sensor 1). This provides an output that is a nominal 10mV/°C. The offset voltage at 0°C is typically 2.73V. Trimpot VR3 divides the Sensor 1 output so the voltage can be set to vary by 9.8mV/°C. This adjustment is required to cater for individual variations in the output of these devices. The temperature, voltage and current signals to IC3 are selected by using the B and C inputs at pins 10 and 9, respectively. When the B and C inputs are set to 0V, the temperature signal (pin 13) is selected. When B is low and C is high, the current signal (pin 1) is selected and when B and C are both high, the voltage signal (pin 2) is selected. The selected signal is fed to IC4, an 8-bit analog-to-digital (A/D) converter. IC4 produces serial data at its pin 6 siliconchip.com.au output and this is fed to the RA4 input (pin 3) of PIC microcontroller IC5. The RA2 and RA3 lines from IC5 drive the clock and chip select inputs on IC4. IC5’s internal oscillator runs at 4MHz. This gives a timebase accuracy of about 2%, which is more than adequate for this application. LCD & pushbuttons The LCD module is driven from the RB4-RB7 outputs of IC5, while control over the display is provided by driving the Register Select (RS) and Enable (E) inputs at pins 4 and 6 respectively. The RB4-RB7 data lines also connect to switches S1-S4. When a switch is closed and its data line is high, it can pull the RA6 input (pin 15) high. Diodes D7-D9 are included to prevent the data lines from being shorted should more than one switch be pressed at a time. The RB0 and RB2 inputs provide the jumper options (JP1 and JP2). Normally, these inputs are pulled high via internal pullup resistors and pulled low if the relevant jumper is installed. JP1 is removed for auto start and JP2 is removed for the parameter change. In response to its stored software, IC5 produces a pulse-width modulation (PWM) output at pin 9. This swings between 0V and 5V at about 4kHz, with a duty cycle ranging from 100% (fully high at 5V) through to zero (fully low at 0V). By filtering this waveform, the resulting output will be a DC voltage which can be varied in steps of around 5mV (ie, 10-bit resolution). The filtering is provided by a 10kΩ resistor and 1µF capacitor and this becomes the control voltage fed to IC1b on the power circuit of Fig.4. The control circuit runs from a 5V supply derived from an LM317 adjustable regulator (REG1). It is fed from the +25V rail via a 330Ω resistor which reduces power dissipation in the regulator. Trimpot VR4 is set so that the output voltage is as close to 5V as possible. This calibrates the voltage and current readings measured by IC3. The chassis and circuit ground are connected together via a 470nF capacitor, included to shunt any noise signals present on the supply. Next month, we will give the full parts list, assembly details and set-up SC procedure. Looking For More Info? For more information on battery charging, readers can refer to “Motorhome Electrics – And Caravans Too!” by Collyn Rivers. We reviewed this in the February 2003 issue of SILICON CHIP. In this book, Collyn spells out the desirable charging methods for lead-acid batteries. Specifically, he makes note of the requirement to compensate charging with respect to temperature and with respect to battery chemistry. In Australia, temperature compensation is a mandatory requirement for a quality charger. This is because we have a wide range of temperatures across the continent and into Tasmania. Typically, temperatures can extend from the minus figures through to well above 40°C in the shade. The book is available from the Caravan & Motorhome Books, PO Box 3634, Broome, WA 6725. Stunning new Lumiled indoor/outdoor LED light fitting range D HIGH BRIGHTNESS D LONG LIFE D FULLY DIMMABLE D ENERGY EFFICIENT The range of LUMILED downlight fittings shown here have been designed for domestic, display, marine, mobile home and caravan applications. All fittings use Lumileds, which are: - Long life (typical 100,000 hours) - High efficiency, low power, low voltage - Vibration proof ARE BOTH ROOF, P R E H T WEA ERSIBLE! M SUB The OPLLBL series Black powder coated. The OPLLBR series Solid Brass. Both the OPLLBL and OPLLBR series are stand-alone types, for use either indoors or outdoors, are fully weatherproof and able to be fully submerged for pond application. The OPLLGW series White powder coated. This series is a ceiling type gimballed fitting and require a 57mm diameter cutout (MR11 size). Visit us at: www.prime-electronics.com.au PRIME ELECTRONICS siliconchip.com.au The OPLLFG series Gold outer rim with chrome inner finish. This series is a ceiling type fixed fitting and require a 51mm diameter cutout (MR11 size). The OPLLGC series Brushed Stainless Steel finish. This series is a ceiling type gimballed fitting and require a 57mm diameter cutout (MR11 size). The OPLLGG series Brushed Gold Finish This series is a ceiling type gimballed fitting and require a 57mm diameter cutout (MR11 size). Email us: sales<at>prime-electronics.com.au BRISBANE 22 Campbell Street Bowen Hills QLD 4006 Telephone: (07) 3252 7466 Facsimile: (07) 3252 2862 SOUTHPORT 11 Brickworks Cntr, Warehouse Rd Southport QLD 4215 Telephone: (07) 5531 2599 Facsimile: (07) 5571 0543 SYDNEY 185 Parramatta Road Homebush NSW 2140 Telephone: (02) 9704 9000 Facsimile: (02) 9746 1197 November 2004  43