Silicon ChipHigh-Current, High-Voltage Battery Capacity Meter, Pt.1 - June 2009 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Let's have no more of this carbon pollution nonsense
  4. Feature: Mal’s Electric Vehicle Conversion by Leo Simpson
  5. Project: High-Current, High-Voltage Battery Capacity Meter, Pt.1 by Mauro Grassi
  6. Project: GPS Driver Module For The 6-Digit Clock, Pt.2 by Jim Rowe
  7. Feature: Digital Radio Is Coming, Pt.4 by Alan Hughes
  8. Project: Build A Beam-Break Flash Trigger by Jim Rowe
  9. Project: Hand-Held Digital Audio Oscillator by Darian Lovett & Mauro Grassi
  10. Project: PICAXE Humidity Measuring Using The HopeRF HH10D by Wayne Geary & Stan Swan
  11. Salvage It: Gather up those discarded monitors before it’s too late by Leo Simpson
  12. Feature: VoiceMe: A Voice-Activated Remote Control by Rick Walters
  13. Vintage Radio: The AWA 693P 3-Band 8-Transistor Portable by Rodney Champness
  14. Feature: Tech Support: The View From The Other Side by Barrie Smith
  15. Back Issues
  16. Book Store
  17. Advertising Index
  18. Outer Back Cover

This is only a preview of the June 2009 issue of Silicon Chip.

You can view 31 of the 104 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 "High-Current, High-Voltage Battery Capacity Meter, Pt.1":
  • PIC18F2550-I/SP programmed for the Battery Capacity Meter [0420609A.HEX] (Programmed Microcontroller, AUD $20.00)
  • PIC18F2550 firmware and source code for the High-Current, High-Voltage Battery Capacity Meter (Software, Free)
  • High-Current, High-Voltage Battery Capacity Meter PCB pattern (PDF download) [04206091] (Free)
  • High-Current, High-Voltage Battery Capacity Meter front panel artwork (PDF download) to suit Altronics LCD (Free)
  • High-Current, High-Voltage Battery Capacity Meter front panel artwork (PDF download) to suit Jaycar LCD (Free)
Articles in this series:
  • High-Current, High-Voltage Battery Capacity Meter, Pt.1 (June 2009)
  • High-Current, High-Voltage Battery Capacity Meter, Pt.1 (June 2009)
  • High-Current, High-Voltage Battery Capacity Meter, Pt.2 (July 2009)
  • High-Current, High-Voltage Battery Capacity Meter, Pt.2 (July 2009)
Items relevant to "GPS Driver Module For The 6-Digit Clock, Pt.2":
  • 6-Digit GPS Clock Autodim Add-On PCB [04208091] (AUD $5.00)
  • 6-Digit GPS Clock Driver PCB [07106091] (AUD $15.00)
  • 6-Digit GPS Clock Main PCB [04105091] (AUD $25.00)
  • PIC16F877A-I/P programmed for the 6-Digit GPS Clock [0410509E.HEX] (Programmed Microcontroller, AUD $20.00)
  • VK2828U7G5LF TTL GPS/GLONASS/GALILEO module with antenna and cable (Component, AUD $25.00)
  • PIC16F877A firmware and source code for the 6-digit GPS Clock [0410509E.HEX] (Software, Free)
  • 6-Digit GPS Clock Autodim Add-On PCB pattern (PDF download) [04208091] (Free)
  • 6-Digit Clock GPS Driver PCB pattern (PDF download) [07106091] (Free)
  • 6-Digit GPS Clock main PCB pattern (PDF download) [04105091] (Free)
Articles in this series:
  • Dead-Accurate 6-Digit GPS-Locked Clock, Pt.1 (May 2009)
  • Dead-Accurate 6-Digit GPS-Locked Clock, Pt.1 (May 2009)
  • GPS Driver Module For The 6-Digit Clock, Pt.2 (June 2009)
  • GPS Driver Module For The 6-Digit Clock, Pt.2 (June 2009)
Articles in this series:
  • Digital Radio Is Coming, Pt.1 (February 2009)
  • Digital Radio Is Coming, Pt.1 (February 2009)
  • Digital Radio Is Coming, Pt.2 (March 2009)
  • Digital Radio Is Coming, Pt.2 (March 2009)
  • Digital Radio Is Coming, Pt.3 (April 2009)
  • Digital Radio Is Coming, Pt.3 (April 2009)
  • Digital Radio Is Coming, Pt.4 (June 2009)
  • Digital Radio Is Coming, Pt.4 (June 2009)
  • Digital Radio Is Coming, Pt.5 (August 2009)
  • Digital Radio Is Coming, Pt.5 (August 2009)
Items relevant to "Build A Beam-Break Flash Trigger":
  • Beam-Break Flash Trigger PCBs [13106091-2] (AUD $12.50)
  • Beam-Break Flash Trigger PCB patterns (PDF download) [13106091/2] (Free)
  • Beam-Break Flash Trigger front panel artwork (PDF download) (Free)
Items relevant to "PICAXE Humidity Measuring Using The HopeRF HH10D":
  • PICAXE-08M BASIC source code for the PICAXE Humidity Sensor (Software, Free)
Articles in this series:
  • Tech Support: Terror Tales From The Front Line (May 2009)
  • Tech Support: Terror Tales From The Front Line (May 2009)
  • Tech Support: The View From The Other Side (June 2009)
  • Tech Support: The View From The Other Side (June 2009)

Purchase a printed copy of this issue for $10.00.

High Current, High Voltage, Smart Battery Capacity Meter Ideal for solar power battery monitoring but also perfect for a wide variety of rechargeable battery applications, this smart battery meter monitors the charge and discharge of lead-acid, Nicad and NiMH batteries with an operating voltage range of 9-60V and currents up to 80A. It has settable overload and under-voltage protection and it can be connected to a PC for logging of battery condition. 20  Silicon Chip siliconchip.com.au R ECHARGEABLE BATTERIES are expensive, regardless of what type they are or where they are used. To obtain absolute maximum life from them, it is very important to charge and discharge them properly – and that requires very careful monitoring. Because you can’t be there continuously watching meters, it is essential that you have the equipment that can. And that’s where this very smart battery capacity meter comes in. Just take a look at the features panel below and you’ll have to agree: it is very smart! It uses a heavy-duty shunt to monitor charge and discharge currents. All the readings are shown on a backlit 2-line LCD panel and the various modes – and there are many to choose from – are simply selected by pressing a button on an alphanumeric keyboard. A USB connection allows you to log the battery voltage, battery capacity, charge current and many other readings. We show you how data can be imported into a spreadsheet and graphed on your PC. An audible alarm warns you when the remaining battery capacity drops below a preset percentage. You can then disconnect the load to protect the battery, either manually or automatically via an optional heavy-duty relay. The latter will then reconnect the load after the battery voltage rises to a preset safe level. It can be used with all types of lead acid batteries, including SLA (Sealed Lead Acid), deep discharge, etc, or with virtually any type of nickelmetal-hydride (NiMH) and nickelcadmium (Nicad) batteries, as long as they are 9V or more. Circuit Operation The circuit of the Battery Capacity Meter is shown in Fig.1 and is based around a PIC18F2550 microcontroller (IC1) which incorporates a USB inter- By MAURO GRASSI face. The micro drives the 2-line LCD panel and polls the alphanumeric keypad to respond to buttons being pressed. The circuit runs from a 5V rail, derived from an LM2574HV-5 highvoltage step-down regulator, REG1. REG1 is a buck switch-mode regulator that produces 5V from an input voltage range of around 7-60V. The HV suffix in the part number refers to the 60V version of the regulator. The regulator works with a minimum of external components: a 220μH inductor (L1), a Schottky diode (D8) and a large electrolytic bypass capacitor on the output of the regulator at pin 1 (the 5V rail). REG1 also incorporates a nice feature, the ON/OFF input at pin 3. When this pin is low, the regulator is enabled; when high, it is disabled. This pin is pulled up by a 10kΩ resistor meaning that the regulator is off by default, providing no power to the rest of the circuit. There are two ways that the regulator can be turned on or kept on by Main Features • • • • • • • • • • • • • • • • • • High Voltage (9-60V) and High Current (~80A) range Display Up to 12 different readings: Battery Voltage (V), Battery Capacity in Amp.hours (AH), watt-hours (WH) or percentage (%), Load Current (A), Charge Current (A), Net Current (A), Circuit Current (mA), Time Remaining (D:H:M), Charge/Discharge Cycles, Load (W), Relay Current (mA) Backlit LCD Display with variable brightness and timeout period (to stop backlighting) USB 2.0 for Data Logging Data Logging with RLE Compression can log up to four readings at any one time, transfer to PC and import into spreadsheet, create graphs Uses Peukert’s Law for discharging Lead Acid batteries, with customisable constant and charging efficiency setting Suitable for all Lead Acid (including deep cycle) and NiMH & Nicad batteries Automatically detects top of charge (Lead Acid) or bottom & top of charge (Nicad/NiMH): Lead Acid: determines top of charge by detecting trickle current and cell voltage Nicad & NiMH: detects discharge end-point by detecting falling voltage and low cell voltage Audible Capacity Alarm Fail-safe shut down on under-voltage Overload protection with soft fuse (requires external relay) Under-voltage protection (with optional relay) Keeps track of number of charge/discharge cycles Persistent settings and hierarchical menu system One-time software calibration using only a DMM Customisable averaging for all readings Standby mode when small load or charge current to save power Housed in a rugged plastic case • • siliconchip.com.au June 2009  21 22  Silicon Chip siliconchip.com.au 6 BATT HI 2009 SC  GND LOAD + BATT + Rshunt 10 8 1 8 1 10k RS– RS+ RS– RS+ 4 E C 3 B A A 100nF MMC 1 7 GND 4 IC3 5 MAX4080 Vout SASA 2 Vcc GND 4 IC2 5 MAX4080 Vout SASA 2 2 Vcc 120k 120k Q2 BC337A 2 REG1 LM2574HV-5 D2 D1 BATTERY CAPACITY METER 1 2 3 4 CON3 5 3 2 4 1 BATT LO +3.3V GND RELAY K +5V CON4 470 F 63V 5 1k 1k 10k 15pF B 1k K A K D7- D8: 1N5819 A 10 F 16V 470 S1 100nF MMC AN2 AN3 VUSB RA4 RA5 MCLR 3 10 ANI OSC2 2 AN0 9 OSC1 4 5 14 6 7 1 470 F 16V E B C BC337A, BC556 15pF X1 20MHz D1–D6: 1N4148 4.7nF 4.7nF 100nF 100nF C E D8 1N5819 Q1 BC556 470 10k 1k K K 1k A K L1 220 H 20 Vdd D G S RC1 15 18 17 13 21 22 23 24 28 27 26 25 11 12 D+ 16 D– RC7 RC6 CCP1 RB0 RB1 RB2 RB3 RB7 RB6 RB5 RB4 RC0 2N7000 8,19 Vss IC1 PIC 18F2550 -I/P +5V 110k 5 6 7 8 D3 4 470 * 7 4 1 A K 3 D+ 1k 470 0 8 5 2 A K 2 # 9 6 3 A K 1 D C B D– A A K R/W 5 G 3 G GND V+ A K D7 1N5819 S S Q3 2N7000 D 470 PIEZO BUZZER +5V VR1 5k USB TYPE B CON2 – + Q4 2N7000 D KBL 16 4x4 KEYPAD D6 ABL CONTRAST * : JAYCAR MODULE GND 1(2* ) 16x2 LCD MODULE D7 D6 D5 D4 D3 D2 D1 D0 14 13 12 11 10 9 8 7 EN RS Fig.1: the circuit diagram of the battery capacity meter shows it is based around a PIC (IC1), a regulator IC (REG1) and a pair of SMD high-side differential amplifiers (IC2 & 3). A 4x4 keypad provides the user interface and a 2-line LCD module tells you what’s happening. 1k 6 4 2(1* ) Vdd 10 the circuit. Diodes D1 and D2 form a wired AND gate connected to pins 1 & 7 of IC1 and the pushbutton switch S1. So the regulator can be turned on by pressing switch S1 on the front panel or turned on by the microcontroller using the digital output at pin 7 (RA5). So to turn on the circuit, you press S1 and the microcontroller starts running its software, after a power-on reset (POR). One of the first things the microcontroller does is bring pin 7 low, to keep REG1 on. Note that S1 is also used for bringing the meter out of standby or to reset the software fuse after an overload condition. The 16-key alphanumeric keypad has its rows and columns scanned by the micro. Diodes D3 to D6 prevent the associated column lines from being shorted if two keys from the same row are pressed simultaneously. This is important because the four lines are also used to write data to the LCD panel (in 4-bit mode) and we don’t want this data scrambled inadvertently. Transistors Q1 & Q2 are connected as inverting buffers to drive an external relay and they are controlled by pin 6 of the microcontroller. Q2 is a B337A NPN transistor rated at 80V and 800mA. Note that if you are driving the relay from more than 12V you will need a dropping resistor. The optional relay can switch off the load if an over-current or under-voltage condition occurs. We will say more on this later. A 2N7000 FET, Q3, is used to drive a piezo buzzer to give audible feed- 8888888888888888 8888888888888888 SILICON CHIP 1 2 3 A 4 5 6 B 7 8 9 C * 0 # D UP GND . DOWN DEL ENTER Smart Battery Capacity Meter SHUNT – NO + COM (OPTIONAL RELAY) NC BATTERY – CHARGER MIGHTY QUICK BATTERY CHARGER + 0 1 2 3 4 5 – + LOAD Fig.2:demonstrating the broad operation of the Smart Battery Capacity Meter. It is essentially a very low resistance (1mΩ!) between the battery charger and the battery, with the ability to cut off power if certain parameters are not met. back on key presses and other system events. The backlight of the LCD is controlled by a pulse width modulation (PWM) output of the micro via a second 2N7000 FET, Q4, to vary the brightness. It is dimmed up and down as required by the firmware. USB interface The USB data lines are connected straight through to the type B connector. When connected to a USB port on a computer, the USB power connection passes through a voltage divider consisting of the 1kΩ and 110kΩ resistors into pin 18 of IC1. This is used to sense when a USB cable is attached or disconnected. The Schottky diode (D7) also allows the circuit to be powered directly from the USB port. Shunt resistor The charge and discharge currents to the battery (or battery bank) are monitored by a one milliohm (1mΩ) Edge-on, you can not only see in detail the 1mΩ shunt, used by the meter to monitor voltage and current but also the method of mounting the PC board to the underside of the case lid. siliconchip.com.au June 2009  23 L1 RETE M YTI CAPA C YRETTA B 2 LK11 (CON1) 10 CONTRAST 10k B 15pF 7 9 8 C LK5 10 F IC2 (UNDER) * LK1 IC3 (UNDER) 0 470 # CON3 LOAD+ 100nF D7 5819 1k D 2N7000 Q4 Q3 LK12 2N7000 CON2 USB TYPE B 19060240 4 x 4 KEYPAD BATT+ Fig.3: the component overlay for the meter– everything except S1 is on board, including the two SMD ICs on the reverse side (shown at left). IC3 IC2 24  Silicon Chip 4148 9002 GM (CON3) 100A shunt resistor in series with the positive lead to the battery (see the diagram of Fig.2). The voltage developed across the shunt is fed to two MAX4080 high-side differential amplifiers which both a have a gain of 60. These feed two analog to digital inputs on the micro, pins 2 & 3. Note that the two high-side amplifiers have their inputs cross-connected across the shunt resistor. This means that IC2 senses load current from the battery while IC3 senses charge current. The outputs of both IC2 & IC3 range from 0V to 5V, for a current of 83A through the 1mΩ shunt. For higher currents, say up to the 100A rating of the shunt or even higher in an overload condition, the output of the high-side amplifier will go proportionally higher and will exceed the 5V input limit for the micro. 4148 D4 110k LK13 LK3 GND D3 LK6 + + PIEZO BUZZER 6 5 X1 4 10 15pF 470 Q2 BC337A 1k 4.7nF 120k + 470 1k A 120k 1k 10k 4148 4148 3 470 VB2 CON4 D1 D2 2 1k LK4 VB1 470 3.3V RLY 1 S1 LK10 4.7nF LK8 LK7 470F 63V Q1 BC556 VR1 10k 1k 0V + 5V LK2 REG1 LM2574 LK9 IC1 PIC 18F2550–I/P D8 100nF * 1 5819 470 F 16V D6 100nF * * UNDER LCD 100nF D5 JAYCAR LCD ALTRONICS LCD MODULE 4148 (CON1) 1k CABLE TIE 4148 13 For this reason we have included a low-pass filter consisting of a 1kΩ resistor and 4.7nF capacitor in the output of each amplifier. The 1kΩ resistors will protect the internal pro- Here’s another view inside the case, this time showing the connections to the 1mΩ shunt and the multi-way connector on the case end. siliconchip.com.au This photograph of the completed PC board is the same size as Fig.3 opposite, while the two SMDs on the underside are inset at right. Obviously there are several resistors and links underneath the keypad which must be soldered in before the keypad is fitted. The photo below shows the completed meter PC board sitting inside the plastic case – it roughly occupies this position but is held in place by four Nylon screws through the lid into Nylon spacers. tection diodes of the micro. A 20MHz quartz crystal (X1) is used to derive the system clock for the microcontroller as well as the USB clock using an internal PLL stage. The two ceramic 15pF capacitors provide the correct loading for the crystal. Finally, a 10Ω resistor is used to sense the current drawn by the circuit itself. Two voltage dividers, 120kΩ and 10kΩ together with 100nF filter capacitors are connected to pins 4 & 5 of IC1 and read the battery voltage and the current drawn by the circuit. Construction The Battery Capacity Meter is built on a single-sided, 177mm x 109mm PC board coded 04206091. Begin by installing the wire links. There are 13 of these and they are of varying lengths. In each case, you use tinned copper wire bent to the correct length using pliers. You can straighten the wire by pulling it using a vyse and pliers. Once the links are in, continue with the resistors. These are of different values and you should check them with a DMM siliconchip.com.au June 2009  25 S1 4148 D5 4148 RETE M YTI CAPA C YRETTA B D6 5819 + +5V GND 5V 3.3V 3 A 4 5 6 B 7 8 9 C * 0 # D 4148 4148 VB1 VB2 5819 CON4 RELAY –VE + TO BATTERY –VE 2 + RLY BATT LO (V) BATT HI (V) 4148 4148 0V +3.3V 1 CON2 USB SOCKET LK3 19060240 CON3 GND LOAD+ 9002 GM BATT+ TO CHARGER +VE OPTIONAL RELAY WITH 1N4004 DIODE ACROSS COIL (SHUNT) TO LOAD +VE TO BATTERY +VE Fig.4: wiring diagram for the completed project. The (optional) relay shown bottom left is not shown on the circuit diagram but will disconnect power if battery voltage falls below a preset value – a “must have” feature if you want to protect valuable batteries! before soldering or refer to the resistor colour code table – or both! The next thing to do is to solder in the eight diodes. These are of two different types – there are six 1N4148 signal diodes and two 1N5819 Schottky types. The part numbers are marked on the body. Make sure that they are installed with the correct orientation by referring to the component overlay of Fig.3 (a stripe indicates the cathode). You have two options when it comes to the LCD module. You can use the Altronics Z-7013 or the Jaycar QP-5515. We recommend using the Altronics LCD because it has a backlight which can be turned off. None of the Jaycar backlit modules allow you to turn off the backlight so the Jaycar unit we have specified does not have a backlight. Suitable LCD module connectors need to be made, by cutting a 40-pin IC socket to size. A single 16-pin connector is required for the Altronics LCD module, while the Jaycar LCD module needs two 7-pin connectors, which mount parallel to (and touching) each other. While you’re about it, you should also cut an 8-pin connector for the keypad to go into. Solder in both the appropriate LCD and keypad sockets. Now that the sockets are soldered in, you can solder the corresponding pin strips to the keypad and the LCD module. These will plug in later. Refer to the photos for guidance. The 8-pin socket for REG1 and the 28-pin socket for IC1 can be soldered in next, making sure that they are correctly oriented. The next thing to do is to solder in the three 2-way terminal blocks. They should face outwards from the PC board to allow cable connection. The 6-way right-angled header (used for calibration) can also be installed now. Solder in the two transistors and the two FETs. With their pins oriented in the triangular pattern, these can only go in one way. Then solder in the capacitors, mak- M3 x 25mm NYLON SCREWS 9mm LONG M3 TAPPED NYLON SPACERS 9mm LONG M3 TAPPED NYLON SPACERS CASE LID MAIN PC BOARD Fig.5: here’s how the PC board “hangs” under the case lid. 26  Silicon Chip siliconchip.com.au ing sure the polarised electrolytics are correctly oriented. The large 63V electrolytic mounts with its body parallel to the PC board surface, with its leads bent down 90° to allow lid clearance – see photo. You can solder the crystal next, as well as the inductor. The inductor mounts horizontally and is secured to the PC board using a cable tie. Don’t rely on the solder joins to hold it in place. The variable resistor, which is used to set the contrast of the LCD screen, can go in next. Continue by soldering in the type B USB socket and the piezo buzzer. Both must be oriented correctly. The keypad plugs in to the 8 pin socket and is secured to the PC board using eight M3 Nylon 5mm screws and four 9mm M3 Nylon spacers. Because it is rather difficult to buy 5mm Nylon screws, you’ll probably need to do what we did: cut them down from 12mm types. The four mounting holes on the keypad may need to be enlarged to fit the screws, using either a drill or a tapered reamer. Once that is done, you can install the LCD module. The Altronics module is secured using four Nylon 12mm M3 screws and two 9mm M3 Nylon spacers. The Jaycar module uses four mounting screws and spacers instead. You should now insert REG1 into its socket but leave IC1 (the microcontroller) out for the moment. Surface mount devices Now flip the PC board to the copper side. The two differential amplifiers (IC2 and IC3) are soldered directly to the copper side of the PC board. They are surface-mount devices so you will need a fine tipped soldering iron and some solder wick (for removing any solder bridges). In each case, you should orient the IC over its pads – refer to the component overlay and photos to determine the correct orientation – then one-at-atime, secure each IC with a clothes peg and solder pins 1 and 2 first to anchor the IC. Remove the peg, then proceed to solder pin 5 followed by the rest of the pins – refer to photo. Repeat for the other IC. With the exception of installing IC1, that completes the construction of the PC board. Before installing the PC board in the siliconchip.com.au Parts List – Battery Capacity Meter 1 PC board, code 04206091, 177 x 109mm 1 Sealed polycarbonate case, 222 x 146 x 55mm (Jaycar HB-6220) 1 LCD 16 x 2 module (Altronics Z-7013 (preferred), Jaycar QP-5515) 1 220μH inductor (Jaycar LF-1276, Altronics L-6625) 1 20MHz crystal (Jaycar RQ-5299) 1 mini PCB piezo buzzer, 7.6mm pin spacing (Jaycar AB-3459, Altronics S-6104) 1 1mΩ 100A Current Shunt (Jaycar QP-5414) 1 40-pin IC socket (to be cut for IC1 and LCD mounting) 1 28-pin IC socket (0.3mm) 1 8-pin IC socket 3 2-way mini PCB terminal blocks – 5mm spacing (Jaycar HM-3173, Altronics P-2032A) 1 0.1” 6-way right-angled header pin (Jaycar HM-3426, Altronics P-5516) 1 0.1” 6-way header plug (Jaycar HM-3406, Altronics P-5476) 1 16-key alphanumeric keypad (Jaycar SP-0772, Altronics S-5383) 1 dome pushbutton switch or equiv. (Jaycar SP-0656, Altronics S-1084) (S1) 1 6 way terminal barrier, panel mount (Jaycar HM-3168, Altronics P-2206) 1 USB Type B vertical socket (Farnell 1076666) 4 Nylon screws M3 25mm 12 Nylon screws M3 12mm 14 tapped Nylon spacers 3mm x 9mm (Jaycar HP-0926, Altronics H-1333) 2 M3 12mm screws with washers and nuts (for terminal barrier mounting) 5 cable ties (1 for L1, remainder for cable dressing) 1 gold-plated metal body banana socket [black ring] – for GND terminal (Jaycar PT-0431) 1 1m length tinned copper wire (for the links) 1 10cm length 24 x 0.2mm insulated hookup wire (for PC board connection) 1 1m length of hookup wire or 200mm rainbow cable (for connecting CON4) Heavy-duty cable to suit charger current with suitable eyelets for shunt Semiconductors 1 PIC18F2550-I/SP microcontroller programmed with 0420609A.hex (IC1) (Farnell: 9321250) 1 LM2574HVN-5.0 5V voltage regulator (REG1) (Farnell 9489916) 2 MAX4080-SASA+ high side current sense amplifiers (IC2, IC3) (Farnell 1379747) 1 BC556 PNP transistor (Q1) 1 BC337A NPN transistor (Q2) 2 2N7000 FETs (Q3, Q4) 6 1N4148 diodes (D1-D6) 2 1N5819 Schottky diodes ­(D7, D8) Capacitors 1 470μF 16V electrolytic 1 470μF 63V electrolytic 1 10μF 16V electrolytic 2 100nF monolithic 2 100nF MKT 2 4.7nF MKT 2 15pF ceramic Resistors (0.25W, 1%) 2 120kΩ 1 110kΩ 3 10kΩ 1 5kΩ trimpot (VR1) 6 1kΩ 5 470Ω 2 10Ω Optional Parts for external relay 1 horn relay 150A 12VDC SPDT (Jaycar SY-4073) 1 1N4004 diode 1 gold-plated metal body banana socket (red stripe) – for load terminal (Jaycar PT-0430) June 2009  27 45 25 A A ALL DIMENSIONS IN MILLIMETRES HOLES A: 3.0mm DIAMETER 32 60 76 51 60 x 58 58 KEYPAD CUTOUT 60 x 23 23 LCD CUTOUT 14 52 16 12 B 18 HOLE B: 10mm DIAMETER 12 A A 45 76 31 24 32 18 24 Fig.6: drilling/cutting detail for the case lid, to which attaches the PC board. The cutout dimensions for the LCD readout suit the recommended Altronics module. If you use the alternate Jaycar module, the cutout will need to be amended to suit. Use the PC board overlay as a guide, as it has the Jaycar module position indicated and is also accurately located by the four mounting screws. Incidentally, the front panel artwork can be downloaded from www.siliconchip.com.au, along with the PC board pattern. 28  Silicon Chip siliconchip.com.au (LEFT SIDE) C 26 HOLE C: 4.0mm DIAMETER Installing in the case A 26 A 9.5 A A 9.5 A 9.5 58 B 20 26 A 9.5 A ALL DIMENSIONS IN MILLIMETRES A 64 9.5 A 9.5 (FRONT SIDE) HOLES A: 3.0mm DIAMETER 18 A 20 9.5 B HOLES B: 10mm DIAMETER 58 case, you should connect a 9-60V battery to CON3 (to the “BATT+” and “GND” terminals with correct polarity). Hold S1 down and check the +5V rail (pin 1 of REG1) is close to 5V. If it is, you can disconnect power and install IC1 in its socket. If it is not, there is something wrong and you should disconnect power immediately and recheck your soldering and component placement. Fig.7: drilling detail for the case body – the front side at left, with the holes for the 1mΩ shunt and the left side of the case above, with the holes for the multi-way terminal block and the ground terminal. Exact position isn’t as important as the relative positions of the holes to each other. You can see how the PC board is installed in its case by referring to the photographs. It is actually mounted in the lid, with three connectors that mate with terminals (or the current shunt) installed on the sides of the case. In the top right hand corner of the PC board there is a 2-way terminal block that connects to S1 mounted on the lid of the case. The pair of 2-way terminal blocks on the bottom left corner of the PC board accept power and connect to the current shunt (note that one of the GND connections is not used), as shown in Fig.4. Finally, the 6-way right angled header forming CON4 is for calibration and connects to the panel mount 6-way terminal barrier on the left side of the case, as shown in the photograph. The connecting cable can be made from a 20cm length of rainbow cable or similar lengths of individual hookup wire. The external GND connection, a gold-plated, metalbody banana socket with black polarity ring, is on the left side of the case. Exact position is unimportant. Follow the drilling guide in Fig.6 to make the required holes on the left and bottom sides of the case. The current shunt mounts on the bottom side of the case and the holes shown are appropriate for the specified 1mΩ current shunt (Jaycar QP-5414). If you use another current shunt, you may need to modify the hole positions. The two terminals of the current shunt then connect to the right-hand 2-way terminal block in the bottom left corner of the PC board (CON3). Make sure you connect them the right way around as shown in Fig.4. If you don’t, you will get strange readings for the load and charge currents. Important Note: you should use a 10cm length of 24 x 0.2mm multi-strand hookup wire to connect the BATT+ terminal to the shunt. The software takes into account the resistance of this 10cm length. Once the PC board is installed in the case you can screw on the lid. That completes construction of the Smart Battery Capacity Meter. Next month we’ll run through the rather extensive setup and calibration procedure. But don’t let that scare SC you – it only has to be done once! Resistor Colour Codes o o o o o o siliconchip.com.au No. Value  2  120kΩ   1 110kΩ  3  10kΩ  7  1kΩ   5 470Ω   2 10Ω 4-Band Code (1%) brown red orange brown brown brown orange brown brown black orange brown brown black red brown yellow violet brown brown brown black black brown 5-Band Code (1%) brown red black red brown brown brown black red brown brown black black red brown brown black black brown brown yellow violet black black brown brown black black gold brown June 2009  29