Silicon ChipDigital Megohm & Leakage Current Meter - October 2009 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Oscilloscope probes are a vital link in looking at signals / Rational climate change debate has yet to take hold
  4. Review: The FLIR i5 Infrared Camera by Leo Simpson
  5. Feature: The Secret World Of Oscilloscope Probes by Doug Ford
  6. Project: A Universal I/O Board With USB Interface by Dr Pj Radcliffe
  7. Project: High-Quality Stereo Digital-To-Analog Converter, Pt.2 by Nicholas Vinen
  8. Feature: How To Hand-Solder Very Small SMD ICs by Nicholas Vinen
  9. Project: Digital Megohm & Leakage Current Meter by Jim Rowe
  10. Project: Using A Wideband O₂ Sensor In Your Car, Pt.2 by John Clarke
  11. Vintage Radio: The development of AC mains power supplies, Pt.1 by Rodney Champness
  12. Book Store
  13. Advertising Index
  14. Outer Back Cover

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

You can view 32 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-Quality Stereo Digital-To-Analog Converter, Pt.2":
  • 4-Output Universal Regulator PCB [18105151] (AUD $5.00)
  • High-Quality Stereo DAC Input PCB [01109091] (AUD $10.00)
  • High-Quality Stereo DAC main PCB [01109092] (AUD $10.00)
  • High-Quality Stereo DAC front panel PCB [01109093] (AUD $7.50)
  • ATmega48 programmed for the Stereo DAC [0110909A.HEX] (Programmed Microcontroller, AUD $15.00)
  • ATmega48 firmware and C source code for the Stereo DAC [0110909A.HEX] (Software, Free)
  • Stereo DAC Digital/Control board PCB pattern (PDF download) [01109091] (Free)
  • Stereo DAC Analog board PCB pattern (PDF download) [01109092] (Free)
  • Stereo DAC Switch board PCB pattern (PDF download) [01109093] (Free)
Articles in this series:
  • High-Quality Stereo Digital-To-Analog Converter, Pt.1 (September 2009)
  • High-Quality Stereo Digital-To-Analog Converter, Pt.1 (September 2009)
  • High-Quality Stereo Digital-To-Analog Converter, Pt.2 (October 2009)
  • High-Quality Stereo Digital-To-Analog Converter, Pt.2 (October 2009)
  • High-Quality Stereo Digital-To-Analog Converter, Pt.3 (November 2009)
  • High-Quality Stereo Digital-To-Analog Converter, Pt.3 (November 2009)
  • A Balanced Output Board for the Stereo DAC (January 2010)
  • A Balanced Output Board for the Stereo DAC (January 2010)
Items relevant to "Digital Megohm & Leakage Current Meter":
  • Digital Megohm & Leakage Current Meter PCB [04110091] (AUD $10.00)
  • PIC16F88-I/P programmed for the Digital Megohm and Leakage Current Meter [0411009A.HEX] (Programmed Microcontroller, AUD $15.00)
  • PIC16F88 firmware and source code for the Digital Megohm & Leakage Current Meter [0411009A.HEX] (Software, Free)
  • Digital Megohm and Leakage Current Meter PCB pattern (PDF download) [04110091] (Free)
  • Digital Megohm and Leakage Current Meter front panel artwork (PDF download) (Free)
Items relevant to "Using A Wideband O₂ Sensor In Your Car, Pt.2":
  • PIC16F88-I/P programmed for the Wideband Oxygen Sensor Controller [0511009A.HEX] (Programmed Microcontroller, AUD $15.00)
  • PIC16F88 firmware and source code for the Wideband Oxygen Sensor Controller [0511009A.HEX] (Software, Free)
  • Wideband Oxygen Sensor Controller PCB pattern (PDF download) [05110091] (Free)
Articles in this series:
  • Using A Wideband O₂ Sensor In Your Car, Pt.1 (September 2009)
  • Using A Wideband O₂ Sensor In Your Car, Pt.1 (September 2009)
  • Using A Wideband O₂ Sensor In Your Car, Pt.2 (October 2009)
  • Using A Wideband O₂ Sensor In Your Car, Pt.2 (October 2009)
Articles in this series:
  • The development of AC mains power supplies, Pt.1 (October 2009)
  • The development of AC mains power supplies, Pt.1 (October 2009)
  • The development of AC mains power supplies, Pt.2 (November 2009)
  • The development of AC mains power supplies, Pt.2 (November 2009)

Purchase a printed copy of this issue for $10.00.

Digital Megohm and Leakage Current Meter Looking for an electronic megohm and leakage current meter, for quick and easy testing of insulation in wiring and equipment? Here’s a new design which allows testing at either 500V or 1000V. It can measure insulation resistances up to 999M and leakage currents to below 1A. It uses a PIC microcontroller and displays the results on a 2-line LCD panel. By JIM ROWE D omestic and industrial equipment operating from the 230V or 400V AC power mains needs to have its insulation checked regularly, so that users can be assured that it doesn’t pose a shock hazard. After all, exposure to voltages of this magnitude can be fatal! But what sort of test gear do you need to carry out this type of safety check? You’ll get a fair idea by reading the text in the Insulation Testing panel on the opposite page. In a nutshell, you need a portable and isolated meter that is capable of providing a nominal test voltage of 500V or 1000V DC and able to measure leakage current or insulation resistance or both. Our new Megohm and Leakage Current meter design is intended to meet these requirements. It is compact, portable and isolated and provides a choice of either 500V or 1000V DC as the test voltage. It also allows you to measure insulation resistances from below 1M up to 62  Silicon Chip virtually 999M, as well as leakage currents from below 1A to over 100A (103A, to be precise). We should point out that because it can only measure leakage currents up to 103A, it will indicate that Class I equipment (with earthed external metalwork) is effectively unsafe if it has a leakage current of more than 100A – even though, strictly speaking, this kind of equipment is still regarded as ‘safe’ providing its leakage current is below 5mA. So the test performed by this meter is more rigorous than the official safety standards – but where safety is involved it’s better to be too tough than not tough enough, surely? The new meter is easy to build, with most of the major components mounted on a small PC board. This fits inside a compact UB1 size jiffy box, along with a small power transformer used in the test voltage generation circuit and the 4-AA battery holder used to supply the meter’s power. It can be built up in a couple of hours and for a much siliconchip.com.au lower outlay than commercially available megohm meters. 1000V, switch S1 is used to connect RD3 in parallel with RD2, doubling the division ratio of the divider and hence doubling the output voltage maintained by the feedback loop. Note that the inverter only operates to generate the 500V or 1000V test voltage when TEST button switch S2 is pressed and held down. As soon as the button is released, the inverter stops and the high voltage leaks away via RD1 and RD2/RD3. This is a safety feature and also a simple way to achieve maximum battery life. Referring back to Fig.1, the meter section is at lower right. It uses a 10k resistor as a ‘shunt’, to sense any leakage current (IL) which may flow between the test terminals. Since the shunt has a value of 10k, this means that a leakage current of 100A produces a voltage drop of 1.00V. It is the voltage across this resistor which we measure, to determine the leakage current. First the voltage is fed through a DC amplifier (IC2a), where it is given a voltage gain A of 3.1 times. Then it is passed to IC3, a PIC16F88 microcontroller which is used here as a ‘smart’ digital voltmeter. The amplified voltage from IC2a is fed to one input of the ADC (analog to digital converter) inside the micro (IC3), where it is compared with a reference voltage of 3.2V. The digital output of the ADC is then mathematically scaled, to calculate the level of the leakage current in microamps (A). The micro is then also able to use this calculated current level to work out the insulation resistance, because it can sense the position of How it works The block diagram, Fig.1, shows what is inside the new meter. It’s split into two distinct sections: that on the left-hand side generates the test voltage of 500V or 1000V, while the metering section on the right-hand side is used to measure any leakage current which flows between the test terminals and from this calculate the external resistance connected between them. In more detail, the test voltage generation section has a DC-AC inverter which converts 6V DC from the battery into AC, so it can be stepped up to a few hundred volts AC. This is fed to a voltage-multiplying rectifier circuit to produce the 500V or 1000V DC test voltage. We use a negative feedback loop to control the inverter’s operation and maintain its output voltage to the correct level. This works by using a high-ratio voltage divider (RD1 and RD2) to feed a small proportion of the high voltage DC output back to one input of comparator IC2b, where it is compared with a 2.50V voltage reference. The comparator is then used to turn off the DC/AC inverter when the high voltage reaches the correct level and to turn the inverter on again when the voltage is below the correct level. The basic voltage divider using RD1 and RD2 alone is used to set the high voltage level to 500V, with multi-turn trimpot VR1 allowing the voltage to be set very closely to this level. To change the test voltage level to DC/AC INVERTER (IC1, Q1, Q2, T1) VOLTAGE MULTIPLYING RECTIFIER (D3-D6) 500V OR 1000V 10M  6V BATTERY TEST (S2) RD1 COMPARATOR (IC2b) 2.50V REFERENCE – ADJUST TEST VOLTAGE (VR1) RD3 1000V + RD2 TEST TERMINALS IL AMPLIFIER A = 3.1 (IC2a) 10k  LCD MODULE 'SMART' DIGITAL VOLTMETER (IC3) 500V SELECT TEST VOLTAGE (S1) Fig.1: block diagram of the Digital Megohm and Insulation Leakage meter. siliconchip.com.au Insulation Testing Testing the insulation of mains powered cables & equipment is an important step in ensuring that they are safe to use and don’t pose a shock hazard. According to the Australian and New Zealand standards for safety inspection and testing of electrical equipment (AS/NZS 3760:2003), tests on the insulation of ‘domestic’ cables and equipment operating from 230VAC should be carried out with a testing voltage of 500V DC. Similarly the recommended testing voltage for insulation tests on ‘industrial’ equipment like ovens, motors and power converters operating from 3-phase 400VAC is 1000V DC. Insulation tests on domestic 230VAC equipment can be performed by measuring either the leakage current or the insulation resistance. For Class I equipment with accessible earthed metal parts, the leakage current should be no greater than 5mA, except for portable RCDs (residual current devices) where it should not be greater than 2.5mA. The insulation resistance for these devices should be not less than 1M, or not less than 100k for a portable RCD. For Class II (double insulated) equipment, the insulation resistance with the power switch ‘on’ measured between the live supply conductors (connected together) and external unearthed metal parts should again be not less than 1M. The same insulation resistance figure of 1M applies to extension cables and power boards (between the live conductors and the earth conductor), to power packs (between the live input pins and both output connections) and also to portable isolation transformers (between the primary winding and external earthed or unearthed metal parts, between primary and secondary windings, and also between the secondary winding and external earthed or unearthed metal parts). October 2009  63 switch S1 and hence ‘knows’ whether the test voltage being used is 500V or 1000V. So all it has to do is calculate the total resistance which will draw that level of leakage current from the known test voltage, and then subtract the ‘internal’ 10M and 10k resistors from this total value to find the external resistance between the test terminals. The calculated leakage current and insulation resistance values are then displayed on the LCD panel, along with the test voltage of 500V or 1000V. The 10M resistor connected between the high voltage generation circuit and the positive test terminal (ie, inside the meter), is included mainly to limit the maximum current that can be drawn from the HV generator – even in the event of a short circuit between the test terminals. In fact it’s the 10Mresistor which POWER limits the maximum current to 100A with the 1000V test voltage, or 50A at 500V. Another function of the 10M resistor is to make the meter safer to use; if you accidentally become connected between the test terminals yourself, you will get a shock but it won’t kill you. Mind you, that shouldn’t happen, because you would have to be simultaneously holding down the TEST button to get a shock. As you can see from the above explanation of the way the meter’s smart voltmeter works, there is no problem having the 10M current limiting resistor in series with the test terminals, just as there’s no problem using a 10k current measuring ‘shunt’. The program inside the PIC knows that both of these resistors are in series with the external resistance being measured and simply subtracts 10.01M from the total resist- IN 6V BATTERY Fig.2 shows the full circuit. The DC/AC inverter section of the circuit uses IC1, a quad Schmitt NAND gate, to drive switching transistors Q1 and Q2. When the inverter is operating the transistors switch about 5.6V DC alternately to either end of the low voltage winding of a standard mains transformer, T1. This is used as a step-up to produce a much higher AC voltage to feed the voltage-multiplying rectifier comprising diodes D3-D6 and their associated 47nF/630V capacitors. Oscillator IC1d runs continuously at about 6kHz and its output is inverted by IC1a & IC1c. IC1c drives inverter IC1b while IC1a and IC1b apply the alternating signals to the bases of transistors Q1 & Q2. But gates IC1a & IC1b OUT GND 470 F 16V Circuit details +6V REG1 LM2940T-5V S3 ance to find the external value. +500V OR +1000V 100nF +5V K 13 10k IC1d 11 1 12 2 22k 10nF 14 3 4.7k B 4.7nF IC1a Q1 BC327 IC1: 4093B 8 9 7 47nF 630V 4.5V 4.7nF 5 IC1b 4 Q2 BC327 4.7k B 6 10k 3.3M A 3.3M 47nF 630V T1 C K 0V IC1c 10 E D3 1N4007 230V 3.3M D4 1N4007 A 4.5V 3.3M C E K 47nF 630V +5V D5 1N4007 2.2M A 680k 1% 47nF 630V K D6 1N4007 2.2k A TEST S2 6 7 22k IC2b 4 5 SC VR1 1M (25T) +2.50V 82k + REF1 LM336Z-2.5 – 2009 SET 500V TP3 ADJ 100nF TPG SET TEST VOLTS 1000V 500V 82k S1 DIGITAL MEGOHM & INSULATION LEAKAGE METER Fig.2: the circuit is essentially two parts – the left side generating the high voltage needed to perform the tests and the right side using this voltage to perform the required measurements. 64  Silicon Chip siliconchip.com.au have their pins 2 & 6 pulled down by a common 22k resistor and so they are disabled until the TEST button (S2) is pressed. When that happens, comparator IC2b will pull IC1a’s pin 2 and IC1b’s pin 6 high and the inverter will run until the output of the voltage multiplying rectifier reaches the correct voltage level. As soon as the high voltage output reaches the correct level, the comparator’s output will switch low and gates IC1a and IC1b will be turned off, stopping the inverter even if S2 is still being held down. The feedback network will maintain this process as long as S2 is pressed. The collectors of Q1 & Q2 are supplied with the full battery voltage. All of the remaining circuitry in the meter operates from a regulated +5V supply line, derived from the battery via an LM2940 regulator, REG1. The metering side of the circuit is performed by the PIC16F88 micro, IC3. The voltage developed across the 10k ‘shunt’ resistor (in response to the current between the test terminals) is amplified by op amp IC2a which has a gain of 3.1. The amplified voltage is fed to pin 1 of IC3 (AN2) which is configured as an ADC input. The 3.2V reference voltage for the ADC is fed to pin 2 of IC3, being derived from the 5.0V supply line via the voltage divider using the 3.3k, 5.6k and 270 resistors. As noted before, the ADC inside IC3 measures the voltage applied to pin 1 by comparing it with the reference voltage fed to pin 2. The micro then calculates the leakage current through the test terminals. Because it is able to sense the position of test voltage selector switch S1 (high or low) via pin 3 (RA4), it is able to deduce the actual test voltage (500V or 1000V) and hence calculate the total resistance connected across it via the test terminals. Then finally it works out the external resistance between the terminals by subtracting the 10.01Minternal resistance. The calculated current and resistance values are then displayed on the LCD module, along with the test voltage being used. In this circuit IC3 is using its internal clock oscillator, running at very close to 8MHz. This gives an instruction cycle time of 2MHz, which may be monitored using a scope or frequency counter at test point TP2. The micro drives the LCD module in the standard ‘four bit nibble’ fashion, which involves a minimum of external components. Trimpot VR2 allows the LCD module’s contrast to be adjusted for opti- +5.0V 2.2k 100nF 220 F 3.3k 4 14 Vdd MCLR 18 10M 17 10k 16 13 12 Vref+ RA1 +3.2V 2 RA0 TP1 RA7 RB7 5.6k +5.0V TPG RB6 270 + 22 TEST TERMINALS K 100nF D1 – 1k A 3 2 IC3 PIC16F88 8 1 IC2a 1 RB5 AN2 K 100nF RB4 IC2: LM358 D2 A 11 4 10 6 180 A = 3.10 2 15 Vdd B-L A RS 16 x 2 LCD MODULE 3.6k 10k LCD CONTRAST VR2 10k 9 RB3 8 RB2 7 RB1 6 RB0 1.8k 3 CLKo RA4 15 Vss 5 CONTRAST 3 EN D7 D6 D5 D4 D3 D2 D1 D0 GND 1 14 13 12 11 10 9 8 7 R/W 5 B-L K 16 TP2 (2.0MHz) TPG LM2940T-5V BC327 LM336-2.5 D1,D2: 1N4148 A siliconchip.com.au K D3–D6: 1N4007 A K B – + ADJ E GND IN C GND OUT October 2009  65 mum visibility, while the 22resistor connected to pin 15 sets the current level for the module’s inbuilt LED back-lighting. This was chosen as a compromise between display brightness and battery life. Construction Most of the components are mounted directly on the PC board. This measures 84 x 102mm and is coded 04110091. The only components not mounted on the board are transformer T1 and the 6V battery holder, which are both mounted in the lower part of the case, the test terminals and switches S1-S3. The board assembly mounts behind the lid via four 25mm long tapped spacers. The diagram of Fig.3 shows all of the components mounted on the board, together with the wiring to the transformer. There are only two wire links to be fitted and these are best fitted first so they won’t be forgotten. One goes to the left of board centre, while the other goes just below the position for IC2. After both links are fitted you can fit the six terminal pins for test points TP1-3 and their reference grounds, followed by the sockets for IC1, IC2 and IC3, taking care with orientation. Next, fit all of the fixed resistors, taking particular care to fit each value in its correct position. Follow these with the two trimpots, making sure you fit VR1 with the correct orientation as At right is a samesize photo of the PC board, assembled and ready for mounting in the box. The two test terminals and the “TEST” pushbutton switch are not shown here as they mount on the front panel and connect by wires. Compare this photo to Fig.3, far right, which shows the complete component layout/ wiring (in this case with the test terminals and “TEST” switch). shown in Fig.3. The capacitors are next, starting with the lower value ceramic and metallised polyester caps and following these with the two polarised electrolytics – again matching their orientation to that shown in Fig.3. The 47nF 630V polyester caps can be fitted also at this stage. Next, fit diodes D1-D6, taking care C C A 17 19.5 9.25 11.25 13 to orientate them correctly. Make sure you fit 1N4007 diodes in positions D3-D6. Then install transistors Q1 & Q2, plus the LM336Z-2.5 voltage reference, REF1. Then fit the LM2940 regulator, REG1. This TO-220 package mounts flat against the top of the board, with its leads bent down by 90° about 6mm from the body, so they pass down HOLES A: 3mm DIA, CSK A 12.5 HOLES B: 3.5mm DIA 30 LCD CUTOUT 39 HOLES C: 9.0mm DIA HOLES D: 7.0mm DIA B 10.25 HOLE E: 12mm DIA E D CL 53 33 37 39 53 x 17mm 17 D 14 A B 66  Silicon Chip A ALL DIMENSIONS IN MILLIMETRES Fig.4: use a photocopy of this diagram as a template to mark out the front panel holes before drilling. siliconchip.com.au PARTS LIST Z-7013 (B/L) 16X2 LCD MODULE ALTRONICS & M H O GE M LATI GID RETE M E GAKAEL N OITALUS NI LCD CONT 10k 10k BC327 2.2k 680k 3.3M 100nF 47nF 630V D3 4007 10k D4 4007 – 47nF 630V 47nF 630V TEST TERMINALS (ON FRONT PANEL) 4.7nF 100nF 1 BC327 Q2 4.7k 4.7k Q1 4.7nF IC1 4093B 470 F D5 22k + – TO 4xAA CELLS (UNDER BOARD) TEST NOTE: HIGH VOLTAGE! 4007 S3 SEL VOLTS D6 LM2940T -5V S2 S1 4007 REG1 – 82k 10nF 10k 2.2k + 10M 1k 47nF 630V TP1 TPG LM336Z 82k 3.2V TPG 2.50V REF1 D2 4148 4148 D1 3.3M 3.3M 100nF 5.6k TP3 22k 270 1 220 F POWER + IC2 LM358 1.8k 3.3k TPG 6V BATTERY 180 3.3M VR1 1M ADJUST 500V 1 3.6k IC3 PIC16F88 2MHz 22 100nF 100nF TP2 9002 © 14 13 12 11 10 9 8 7 6 5 4 3 2 1 16 15 2.2M 19001140 VR2 10k T1 PRIM T1 SEC 4.5V 0V 4.5V 2840 230V (UNDER) through the board holes. The regulator is then attached to the board using a 6mm long M3 screw and nut, passing through the hole in its tab. The screw and nut should be tightened to secure the regulator in position before its leads are soldered to the pads underneath. The final component to be mounted directly on the board is the 16-way length of SIL (single in-line) socket strip, used as the ‘socket’ for the LCD module. Once this is fitted and soldered, you can fasten two 12mm long M3 tapped Nylon spacers to the board in the module mounting positions (one at each end) using a 6mm M3 screw passing up through the board from underneath. Then plug a 16-way length of SIL pin strip into the socket strip you have just fitted to the board. Make sure the longer ends of the pin strip pins are mating with the socket, leaving the siliconchip.com.au T1: 230V/9V CT 1.35VA TRANSFORMER MOUNTED IN BOTTOM OF BOX. (230V WINDING USED AS SECONDARY, 9V WINDING USED AS PRIMARY) shorter ends uppermost to mate with the holes in the LCD module. Next, remove the LCD module from its protective bag, taking care to hold it between the two ends so you don’t touch the board copper. Lower it carefully onto the main board so the holes along its lower front edge mate with the pins of the pin strip, allowing the module to rest on the tops of the two 12mm long Nylon spacers. Then you can fit another 6mm M3 screw to each end of the module, passing through the slots in the module and mating with the spacers. When the screws are tightened (not over tightened!) the module should be securely mounted in position. The final step is to use a fine-tipped soldering iron to solder each of the 16 pins of the pin strip to the pads on the module, to complete its interconnections. Check that there are no shorts between pads. After this is done, you can plug 1 UB1 size jiffy box, 157 x 95 x 53mm 1 PC board, code 04110091, 84 x 102mm 1 LCD module, 2 lines x 16 chars, with LED back-lighting (Altronics Z-7013 or equivalent) 1 power transformer, 9V CT secondary at 150mA or 1.35VA (eg 2840 type) 4 AA cell battery holder, flat type, with battery snap lead 2 mini SPDT toggle switch (S1, S3) 1 SPST pushbutton switch (S2) 2 binding post/banana jacks (1 red, 1 black) 2 4mm solder lugs 1 16-pin length of SIL socket strip 1 16-pin length of SIL pin strip 1 18-pin IC socket 1 14-pin IC socket 1 8-pin IC socket 4 25mm long M3 tapped metal spacers 2 12mm long M3 tapped Nylon spacers 9 6mm long M3 machine screws, pan head 4 6mm long M3 machine screws, countersunk head 2 10mm long M3 machine screws, countersunk head 3 M3 nuts with star lockwashers 6 1mm diameter PC board terminal pins Semiconductors 1 4093B quad Schmitt NAND gate (IC1) 1 LM358 dual op amp (IC2) 1 PIC16F88 microcontroller (IC3, programmed with 0411009a.hex) 1 LM2940T LDO +5V regulator (REG1) 1 LM336Z-2.5 +2.5V reference (REF1) 2 BC327 PNP transistors (Q1,Q2) 2 1N4148 signal diodes (D1,D2) 4 1N4007 1000V/1A diodes (D3-D6) Capacitors 1 470F 16V RB electrolytic 1 220F 16V RB electrolytic 2 100nF MKT metallised polyester 3 100nF multilayer monolithic ceramic 4 47nF 630V metallised polyester 1 10nF MKT metallised polyester 2 4.7nF MKT metallised polyester Resistors (0.25W 1% unless specified) 1 10M 1 680k 2 82k 2 22k 4 10k 1 5.6k 2 4.7k 1 3.6k 1 3.3k 2 2.2k 1 1.8k 1 1k 1 270 1 180 4 3.3M 5% carbon film 0.5W 1 2.2M 5% carbon film 0.5W 1 22 5% carbon film 0.5W 1 1M25-turn trimpot, top adj. (VR1) 1 10kmini horizontal trimpot (VR2) October 2009  67 The assembled PC board “hangs” from the front panel via four threaded spacers. Follow the text to ensure the right assembly order is achieved! the three ICs into their respective sockets, making sure to orientate them all as shown in Fig.3. Attach a 25mm long mounting spacer to the top of the board in each corner, using 6mm long M3 screws. Then the board assembly can be placed aside while you prepare the case and its lid. the lid (or covered with self-adhesive clear film) for protection against finger grease, etc. You might also like to attach a 60 x 30mm rectangle of 1-2mm thick clear plastic behind the LCD viewing window, to protect the LCD from dirt and physical damage. The ‘window pane’ can be attached to the rear of the lid using either adhesive tape or epoxy cement. Once your lid/front panel is finished, you can mount switches S1-S3 on it using the nuts and washers supplied with them. These can be followed by the binding post terminals. Tighten the binding post mounting nuts quite firmly, to make sure that they don’t come loose with use. Then use each post’s second nut to attach a 4mm solder lug to each, together with a 4mm lockwasher to make sure they don’t work loose either. Now you can turn the lid assembly over and solder ‘extension wires’ to the connection lugs of the three switches and to the solder lugs fitted to the rear of the binding posts. These wires should all be about 30mm long and cut from tinned copper wire (about 0.7mm diameter). Once all of the wires are attached, they should be dressed vertical to the lid/panel so they’ll mate with the corresponding holes in the PC board, when the two are combined. Next, mount transformer T1 at one end of the case, with its low voltage winding connections towards the top and the high voltage connections towards the bottom, as in Fig.5. Secure the transformer in position using two 10mm long M3 machine screws with flat washers, star lockwashers and M3 nuts, tightening both firmly to make sure the transformer cannot work loose. Preparing the case Two holes need to be drilled in the lower part of the case, to take the mounting screws for transformer T1. These should be 3mm in diameter, spaced 47mm apart and 20mm up from the end of the case which will become the meter’s lower end. The battery holder can be held securely in place using two strips of ‘industrial’ double-sided adhesive foam. The lid needs to have a larger number of holes drilled, plus a rectangular cut-out near the upper end for viewing the LCD. The location and dimensions of all these holes are shown in the diagram of Fig.4. You can use a photocopy of it as a drilling template. The 12mm hole for S2 and the 9mm holes for the test terminals are easily made by drilling then first with a 7mm twist drill and then enlarging them to size carefully using a tapered reamer. The easiest way to make the rectangular LCD viewing window is to drill a series of closely-spaced 3mm holes around just inside the hole outline, and then cut between the holes using a sharp chisel or hobby knife. Then the sides of the hole can be smoothed using a medium file. The artwork of Fig.6 can be used as the front panel label. This can be photocopied from the magazine or downloaded as a PDF file from our website and then printed out. The resulting copy can be laminated and attached to the front of POSITIVE TEST TERMINAL (NEGATIVE TERMINAL OMITTED FOR CLARITY) MAIN BOARD MOUNTED BEHIND LID USING 4 x 25mm M3 TAPPED SPACERS LCD MODULE Fig.5: the assembled project inside a UB1 Jiffy Box. Note that this does not show the negative test terminal (which would hide S2 and S3). 68  Silicon Chip T1 473K 630V 230V WINDING LEADS T1 MOUNTED IN BOTTOM OF BOX USING 2 x 10mm LONG M3 CSK HEAD SCREWS WITH NUTS & LOCKWASHERS S1 S3 9V WINDING LEADS S2 S1 16-WAY SIL PIN STRIP 16-WAY SIL SOCKET 4 x AA CELL HOLDER LCD MODULE MOUNTED ABOVE MAIN BOARD USING 2 x 12mm LONG M3 TAPPED NYLON SPACERS CELL HOLDER MOUNTED IN BOTTOM OF BOX USING DOUBLE-SIDED TAPE siliconchip.com.au ADVANCED BATTERY TESTER MBT-2LA Features Here’s how it all fits together inside a UB1 box. The power transformer and battery holder are the only components not mounted on the PC board. The 4-AA cell battery holder can also be mounted in the upper end of the case using double-sided adhesive foam, with its battery snap connections at the lower end. Next solder the bared ends of the battery clip lead wires to their connection pads on the PC board, just to the left of the position for power switch S3. The leads from transformer T1 can also be connected to the connection pads along the lower edge of the PC board, with the three low voltage winding leads connecting to the pads on the left and the two high voltage winding leads to the pads on the right, as shown in Fig.3. Now you can attach the PC board assembly to the rear of the lid/front panel. You have to line up all of the extension wires from switches S1-S3 and the two test terminals with their matching holes in the PC board, as you bring the lid and board together. Then you can secure the two together using four 6mm long countersink head machine screws. Then turn the complete assembly over and solder each of the switch and terminal extension wires to their board pads. Fit four AA alkaline cells into the battery holder and your new Megohm/Insulation Meter should be ready for its initial checkout. Initial checkout If you set switch S3 to its ON position, a reassuring glow should appear from the LCD display window -– from the LCD module’s back-lighting and should also see the Meter’s initial greeting ‘screen’. You may need to adjust contrast trimpot VR2, until you get a clear and easily visible display. (VR2 is adjusted through the small hole just to the left of the LCD window.) After a few seconds, the LCD should change to the Meter’s measurement ‘screen’, where it displays the current test siliconchip.com.au Computes State of Charge for lead acid battery types (SLA, AGM, Gel, Flooded) Test battery condition – quickly and easily identifies weak or failing batteries Patented high accuracy Pulse Load test – battery safe, non-invasive Test 2-volt, 4-volt, 6,volt, 8-volt, 12-volt Measures battery performance under load, not just voltage or internal resistance Ideal for battery management & cell matching – reduce costs and increase reliability Description The MBT-LA2 provides a comprehensive means of testing the state of charge and battery condition for 2-volt, 4-volt, 6,volt, 8-volt and 12-volt lead acid battery types (SLA, AGM, Gel, Wet). Lightweight, compact design make it an ideal tool for anyone working with lead acid batteries. The microprocessor-controlled instrument tests popular batteries using a patented, high-accuracy pulse load tests. After a fully automatic test cycle, percentage of remaining battery capacity is indicated on the LED bar display. Test results are easy to understand. An integrated cooling fan dissipates heat from testing, and the circuit is protected against over-voltage. Rugged NBR rubber sleeve protects against impact. Includes 48" removeable test leads with sold copper clamps. The accessory kit (K-MBTLA2) includes a hanging strap & magnet for hands-free operation, and a protective soft case. Requires 4AA batteries (not included). Applications ŸFire/security ŸUPS ŸMedical ŸIndustrial ŸLighting ŸTelecom ŸMobility ŸInspection ŸMilitary ŸSafety ŸService ŸIT ŸAccess control ŸAuto/marine/RV ŸManufacturing ŸUtilities For more information, contact SIOMAR BATTERY INDUSTRIES (08) 9302 5444 or mark<at>siomar.com October 2009  69 voltage setting together with the measured leakage current and resistance (as shown in the opening photograph). At this stage it will show a leakage current of 000A and a resistance of 999M, for two reasons: (1) because the test voltage isn’t actually generated until you press the TEST button and (2) you haven’t connected anything between the two test terminals at this stage, to draw any current. Just to make sure though, try switching voltage selector switch S1 to the other position. You should find that the test voltage setting displayed on the top line of the LCD screen changes to match. If so, it will show that your Megohm/ Insulation Meter is working correctly. This being the case, switch off the power and complete the final assembly by lowering the lid/PC board assembly into the case and securing the two together using the four small self-tapping screws supplied. Setting the test voltages LCD CONTRAST ADJUST TEST VOLTS + TEST VOLTAGE 500V 1000V CAUTION: HIGH VOLTAGE! POWER The test voltage levels are set with trimpot VR1. This is adjusted via a small screwdriver, through the small hole just below the LCD window. But how do we get the meter to measure the test voltages itself? Simply by connecting a short piece of wire between the two test terminals, as a short circuit. This temporarily changes the meter into a 0-1000V voltmeter, to read the test voltage on the leakage current range. So to set the test voltages, fit the shorting wire between the test terminals and then switch S1 to the ‘1000V’ position. Then switch the Meter on, and once it is displaying the measurements screen press and hold down the TEST button (S2). The LCD should show a ‘current’ of close to 100A, corresponding to a test voltage of 1000V. If it indicates a figure either higher or lower than this, all you have to do is adjust trimpot VR1 with a small screwdriver until the reading changes to 100A (=1000V). To make sure that you have made the setting correctly, try switching voltage selector switch S1 to the ‘500V’ position. You should find that the LCD reading changes to 50A(=500V). If so, your meter is now fully set up. Remove the short circuit between the test terminals and your meter is ready for use. SC – TEST DIGITAL MEGOHM AND INSULATION LEAKAGE METER SILICON CHIP Fig.6: same-size artwork for the front panel. This does not have the hole positions shown so all screws are hidden once it is glued in place. Resistor Colour Codes o o o o o o o o o o o o o o o o o No. 1 4 1 1 2 2 4 1 2 1 1 2 1 1 1 1 1 70  Silicon Chip Value 10M 3.3M (0.5W) 2.2M (0.5W) 680k 82k 22k 10k 5.6k 4.7k 3.6k 3.3k 2.2k 1.8k 1k 270 180 22 (0.5W) 4-Band Code (1%) brown black blue brown orange orange green brown red red green brown blue grey yellow brown grey red orange brown red red orange brown brown black orange brown green blue red brown yellow violet red brown orange blue red brown orange orange red brown red red red brown brown grey red brown brown black red brown red violet brown brown brown grey brown brown red red black brown 5-Band Code (1%) brown black black green brown orange orange black yellow brown red red black yellow brown blue grey black orange brown grey red black red brown red red black red brown brown black black red brown green blue black brown brown yellow violet black brown brown orange blue black brown brown orange orange black brown brown red red black brown brown brown grey black brown brown brown black black brown brown red violet black black brown brown grey black black brown red red black gold brown siliconchip.com.au