Silicon ChipAn incredibly sensitive Magnetometer to build - December 2018 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Love or hate Google, the massive EU fine is a joke
  4. Feature: "The Grand Tour": the incredible Voyager missions by Dr David Maddison
  5. Project: An incredibly sensitive Magnetometer to build by Rev. Thomas Scarborough
  6. Project: Amazing light display from our LED Christmas tree... by Tim Blythman
  7. Feature: The Arduino Uno’s cousins: the Nano and Mega by Jim Rowe
  8. Subscriptions
  9. Serviceman's Log: Travelling makes me go cuckoo by Dave Thompson
  10. Christmas Showcase
  11. Project: A Useless Box by Les Kerr & Ross Tester
  12. Feature: El cheapo modules, part 21: stamp-sized audio player by Jim Rowe
  13. PartShop
  14. Project: Low voltage DC Motor and Pump Controller (Part 2) by Nicholas Vinen
  15. Vintage Radio: 1948 AWA compact portable Model 450P by Associate Professor Graham Parslow
  16. Market Centre
  17. Advertising Index
  18. Notes & Errata: Tinnitus & Insomnia Killer, November 2018; LED Tachometer, October-November 2006
  19. Outer Back Cover: Hare & Forbes Machineryhouse

This is only a preview of the December 2018 issue of Silicon Chip.

You can view 37 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 "An incredibly sensitive Magnetometer to build":
  • Extremely Sensitive Magnetometer PCB [04101011] (AUD $12.50)
  • Extremely Sensitive Magnetometer PCB pattern (PDF download) [04101011] (Free)
  • Drilling template for the High-Sensitivity Magnetometer (PDF download) (Panel Artwork, Free)
Items relevant to "Amazing light display from our LED Christmas tree...":
  • Software for Amazing Light Patterns for the LED Christmas Tree (Free)
Articles in this series:
  • Oh Christmas tree, oh Christmas tree... (November 2018)
  • Oh Christmas tree, oh Christmas tree... (November 2018)
  • Amazing light display from our LED Christmas tree... (December 2018)
  • Amazing light display from our LED Christmas tree... (December 2018)
Items relevant to "A Useless Box":
  • Useless Box PCB [08111181] (AUD $7.50)
  • Pair of programmed micros for the Useless Box [0811118A/B.HEX] (Programmed Microcontroller, AUD $20.00)
  • Software for the Useless Box (Free)
  • Useless Box PCB pattern (PDF download) [08111181] (Free)
  • Useless Box panel label (Panel Artwork, Free)
Items relevant to "El cheapo modules, part 21: stamp-sized audio player":
  • DFPlayer Mini audio player module (Component, AUD $6.00)
  • Sample BASIC source code for interfacing a Micromite with the DFPlayer Mini module (Software, Free)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
Items relevant to "Low voltage DC Motor and Pump Controller (Part 2)":
  • Four-channel High-current DC Fan and Pump Controller PCB [05108181] (AUD $5.00)
  • PIC16F1459-I/SO programmed for the Four-channel High-current DC Fan & Pump Controller (0510818A.HEX) (Programmed Microcontroller, AUD $10.00)
  • Firmware for the Four-channel High-current DC Fan & Pump Controller (0510818A.HEX) (Software, Free)
  • Four-channel High-current DC Fan and Pump Controller PCB pattern (PDF download) [05108181] (Free)
Articles in this series:
  • Low-voltage, high-current DC Motor Speed Controller (October 2018)
  • Low-voltage, high-current DC Motor Speed Controller (October 2018)
  • Low voltage DC Motor and Pump Controller (Part 2) (December 2018)
  • Low voltage DC Motor and Pump Controller (Part 2) (December 2018)

Purchase a printed copy of this issue for $10.00.

Extremely Sensitive Magnetometer It might not look much like your traditional metal detector. It’s not! But for ferrous metals, its sensitivity is on a par with – or better than – some of the best commercial designs. We’ve found this magnetometerbased design can find ferrous metallic objects smaller than the head of a pin! by Rev. Thomas Scarborough     Features Features • Highly sensitive – will detect magnetic field strength changes of around three nanoTeslas! • Fast start-up (about ten seconds) • Complete immunity to stationary magnetic fields • Differential (two-channel) design for a high degree of immunity to magnetic “noise” • 12V battery powered . . . or 12V DC plugpack • Uses common components • Easy initial set-up (takes about ten minutes) • Easy to use (mostly controlled by a single knob) 24 Silicon iliconCChip hip Australia’selectronics electronics magazine magazine Australia’s siliconchip.com.au siliconchip.com.au Measuring its sensitivity It’s difficult to measure the sensitivity of a device like this without specialised equipment. But using some clever techniques, it is possible. For example, it is possible to generate a weak magnetic field of any desired strength by placing a magnet with a known field strength some dis- Magnet thickness (inches) T his design is a major revision of an earlier detector which was published in Europe more than a decade ago. (Elektor, May 2007) That was described as an “incredibly sensitive” design . . . but this one is significantly more sensitive! Three significant improvements have been made compared to that older design: • A second channel has been added, to cancel out spurious signals • It has triple the number of amplification stages • It adds a relay switch, where the earlier design only had a LED readout The advantage of two channels is that magnetic pulses picked up by two channels will cancel each other out, while those detected by only one channel – or predominantly one channel – will trigger the relay. Also, temperature and power supply variations will have much less effect. This dramatically increases stability and sensitivity, especially in the presence of magnetic “noise”. The advantage of a relay switch is that the magnetometer may be put to good use by switching things. This device is not merely for making your fortune . . . for example, it could sound a remote alarm when a vehicle approaches. Having said all that, this magnetometer uses common components and is easy to set up and use. But it is a serious machine. When carefully adjusted, it will detect changes in magnetic fields down to about 3nT (nanotesla) or 30 microgauss. That puts it on a par with some of the best commercial designs. It will, for example, detect metallic objects which are smaller than the head of a pin. 1/16 1/8 ¼ 3/8 ½ 5/8 ¾ 1 1¼ 1½ 2 3 4 1/32 0.3 0.6 0.9 1.2 1.4 1.6 1.8 2.2 2.5 2.9 3.4 4.5 5.3 1/16 0.4 0.7 1.1 1.4 1.8 2.0 2.3 2.8 3.2 3.6 4.4 5.7 6.9 1/8 0.5 0.8 1.4 1.8 2.2 2.6 2.9 3.5 4.1 4.6 5.6 7.3 8.8 ¼ 0.7 1.0 1.7 2.2 2.7 3.2 3/6 4.4 5.1 5.8 7.0 9.2 11 3/8 0.7 1.1 1.9 2.5 3.1 3.6 4.1 5.0 5.8 6.6 8.0 10 13 ½ 0.7 1.2 2.0 2.7 3.4 3.9 4.5 5.4 6.3 7.2 8.8 12 14 5/8 0.7 1.3 2.2 2.9 3.6 4.2 4.8 5.8 6.8 7.7 9.4 12 15 ¾ 0.7 1.4 2.3 3.0 3.8 4.4 5.0 6.2 7.2 8.2 9.9 13 16 1 0.8 1.4 2.4 3.3 4.1 4.8 5.5 6.7 7.8 8.9 11 14 17 1¼ 0.8 1.4 2.5 3.5 4.3 5.1 5.8 7.1 8.4 9.5 12 15 19 1½ 0.8 1.5 2.6 3.6 4.5 5.3 6.1 7.5 8.8 10 12 16 20 Magnet diameter (inches) 2 0.8 1.5 2.8 3.8 4.8 5.7 6.6 8.1 9.6 11 13 18 22 3 0.8 1.6 3.0 4.2 5.3 6.3 7.2 9.0 11 12 15 20 25 Table 1: this chart from the USA (so it’s in inches!) shows the distance from the magnet where you’d expect to find a 5 gauss field strength. (Courtesy K&J Magnetics, Pennsylvania, USA). tance away from the device. The field for measuring or quantifying magnetic strength of common types of magnets fields. In fact, it totally excludes all stacan be determined based on the ma- tionary magnetic fields. It is designed terial and size. for maximum sensitivity. Table 1 shows a chart of standard neNote that environmental conditions Distance (in inches) a single neodymium magnet in free odymium magnets fromfrom K&J Magnethave a major influence on the magspace where the field strength drops to 5 gauss. ics, Inc of Pennsylvania. This shows netometer, so that it may work very the?distance from variously sized nemuch better, or very much worse than Diameter ? Thickness ? odymium magnets at which the field a typical metal detector. strength can be expected to be around It also has applications: five gauss, or 500 microTeslas. • As a metal detector: Any nearby ferThe inverse cube law (intensity = 1 rous objects will distort the magnet÷ distance3) can then be used to figic field in their vicinity. Move the ure out the field strength at greater disMagnetometer through that field and tances from the magnet. it will pick up the variation and alert For example, according to the chart, you to their proximity. a neodymium magnet of 3/8-inch di- • As a magnet sensor: It reacts to small ameter and 1/8-inch thickness regisneodymium magnets at two to three ters 5 gauss (500µT) at a distance of metres’ distance, and large magnets 1.1 inches (28mm). Our Magnetometer much further. It reacts to many magcan detect a similar magnet moving at netised objects as well; for instance, a distance of 2.7 metres. it will pick up a moving magnetised This is 96 times (2700mm ÷ 28mm) pin about 20-30cm away. the specified distance for 5 gauss. So • As a vehicle detector: It will pick up we can calculate the field strength as a standard car alternator at several 500µT÷963 = 555pT. metres’ distance and it will pick up However, we also have to compensome trucks a block away (eg, in my sate for the fact that the actual dimenhome city, municipal trucks). sions of the magnet are 9mm diameter • As a pet flap sensor: Attach a neoand 2.5mm thickness (apparently, this dymium magnet to the animal’s colis a metric magnet). That gives about lar and the Magnetometer could be 70% of the volume of the specified used to open the flap automatically magnet. as the animal approaches. Foreign So we can determine that the apanimals will not be able to enter or proximate sensitivity of this Magexit through the flap. netometer is around 380pT (555 x • As a tsunami alarm: If mounted 70%). And that is in a magnetically close to the water’s edge, it will ‘noisy’ environment. pick up the magnetic field of the ocean (see below). The ocean will What it’s useful for recede just before a tsunami, so if This Magnetometer works best as a you connect the output to a timer magnetic field detector. It is less suited which will trigger an alarm in the The prototype Magnetometer, mounted inside a concrete pipe. While keeping the circuitry very rigid, we are not recommending you copy our method! siliconchip.com.au Australia’s electronics magazine December 2018  25 L1 MIXER AMPLIFIER L2 AUTO BIAS MULTI-STAGE AMPLIFIERS BLANKING TIMER OUTPUT SC 20 1 8 Fig.1: block diagram of the Highly Sensitive Magnetometer. The voltages developed across coils L1 and L2 are amplified greatly and then fed into a differential amplifier which triggers a timer if the difference in voltages exceeds a certain threshold. The blanking is provided to prevent the magnetic field from the relay from re-triggering itself endlessly. • • • • • case of the magnetic field not being detected for several seconds, it will give you some warning before the huge wave hits. As an anti-thief alarm: It will easily detect someone picking up magnetised keys (or a phone or camera) through a tabletop. As a security alarm: If a magnet is suitably mounted on a door, window or gate, the magnetometer will detect the magnet moving when these are opened or closed. Since the magnet needs no careful mounting, this is very easy to set up. As a game: Mount a neodymium magnet inside a ball and it will detect whether the ball approaches a target, say, or falls in a hole. Since it reacts to the rate of change of magnetic fields, it could react to the velocity of a ball. As a vibration sensor: If a magnet is suspended just above one of the magnetometer’s coils by a string from the ceiling, or on the end of a long ruler, the magnetometer will detect heavy vehicles at great distances. For example, a freight train at a few kilometres’ distance. As a strobe light: If one omits the power section of the circuit (see below) and places one coil near a speaker, blue LED3 acts as a strobe light. Since the magnetometer filters out frequencies above about 20Hz, the pulses follow the beat. Use as a metal detector To be used as a metal detector, the Dual Channel Magnetometer needs some slight modifications. In theory, one would simply move coils L1 and L2 over earth or sand and while the magnetometer is moving in relation to magnetised objects, it would detect them. But the Magnetometer is far too sensitive for searching soil or sand. The Earth is littered with things which are just slightly magnetised, but sufficiently magnetised to confound all search efforts at any setting—and perhaps surprisingly, the beach is dominated by moving magnetic fields in the ocean. The solution to both problems is to reduce the sensitivity as required. When we first tested the magnetometer on the beach, it was utterly overwhelmed by moving magnetic fields of unknown origin. By inserting 470k resistors between the primary and sec- The Magnetometer had no problem detecting these three iron nails inside a length of driftwood even from quite a distance away AND hidden in a whole lot of flotsam. 26 Silicon Chip Australia’s electronics magazine ondary windings of each sense transformer the magnetometer was brought back within range. This will not be the ideal value for all transformers but will give you an idea. With this simple modification, it was possible to identify the ocean as the problem: the sensitivity needed to be turned up or down, depending on how far the unit was from the shore. We then desired to find out how strong the ocean’s magnetic fields were. Again using the standard neodymium magnet for comparison, we measured 47.9nT two metres from the water’s edge and 40.6nT at 12 metres. This clearly swamps smaller magnetic fields under the sand. For example, at 12 metres from the water’s edge, a magnetised hairpin could be found at only 38mm distance, not 800mm as would otherwise be possible. Search sensitivity is therefore reduced by 95%. Things would be better, however, on a very wide beach, far from the water’s edge. So what is the origin of these oceanic fields? In 2003, “New Scientist” reported that induced magnetic fields had been found in the ocean, from space. Then, on 11 April 2018, the European Space Administration revealed that changing magnetic fields in the ocean measured 2.0-2.5nT at satellite altitude and provided a video of their activity on a planetary scale (see Fig.2). This article may represent the first publication of provisional results on the ground and suggests that various further experiments may be worthwhile. Basic design Fig.1 shows the block diagram for the Magnetometer, which reveals its basic design. The detector coils, which produce virtually no current when at rest, are wired to two self-adjusting amplifiers. The output of each amplifier is fed through a pair of six gain stages. The amplified signals are then fed to a mixer amplifier. Finally, a timer IC with a blanking circuit (which momentarily blanks out instability) switches a reed relay when the output of the mixer amplifier exceeds a certain threshold. To save time and effort, for coils L1 and L2 we are actually using the primary and secondary windings of openframe mains transformers (ie, EI-core siliconchip.com.au Fig.2: satellite-based measurements showing the magnitude and polarity of the magnetic fields generated by the Earth’s oceans on one particular occasion. These fields are small but this Magnetometer can easily pick them up when you are near the ocean; you need to reduce the device’s sensitivity when looking for metal objects on the beach because of this! or the less common C-core type). We wouldn’t want to use toroidal transformers since these are designed to have a minimal external magnetic field. Note that by using transformers as search coils, the search area is small. These coils may react to iron and steel, zinc, nickel, and various alloys and minerals, depending on whether these are magnetised or not. They will not react to other metals such as gold, silver, and copper. The transformers are mounted around one metre apart, with the circuit board, battery and controls in between. As this assembly is quite large, it can be fitted with a carry strap or handle. A small hand-held controller is connected via a length of cable, with a sensitivity adjustment knob and one blue LED which varies in brightness to indicate the detected magnetic field strength. The idea is that you can carry the main unit in one hand (perhaps aided with a strap over the shoulder) and this small external control unit in the other hand, which you can hold in a visible location, to observe the brightness of the blue LED. Circuit description The circuit is shown in Fig.3. A changing magnetic field near the windsiliconchip.com.au ings within T1 or T2 will produce a voltage across those coils. These coils are the primary and secondary winding pairs of unshielded 10A mains transformers (230VAC to 12VAC/10A). The primary and secondary windings are connected in series and in phase to increase the sensitivity. You may wonder how a transformer can sense external magnetic fields since, in theory, its magnetic field is limited to being within or around its core. In fact, C-core and EI-core transformers have significant leakage flux, which means they radiate moderate magnetic fields when powered but they will also pick up external magnetic fields. As we mentioned earlier, toroidal transformers have much less leakage flux due to their construction so would be a poor choice in this role. Conversely, a high-value crossover inductor might be an even better choice than a conventional transformer as they do not have a contained magnetic field at all. A crossover inductor with an iron core might make for the most sensitive choice. Regardless, the voltage from T2’s windings is applied directly between the inputs of IC3, an LM380N audio amplifier chip, while the voltage from T1’s windings first passes through switches S2 and S3 before being apAustralia’s electronics magazine plied to the inputs of IC1, another LM380N. S2 allows T1 to be disconnected while S3 allows its connections to be reversed. As a result, the unit can be used in three modes. The first is single-ended mode, with T1 out of circuit. This allows for detection of the Earth’s magnetic field, where T2 is turned on its own axis. In the second mode, T1 and T2 are both connected to IC1/IC3 and with the same phase, which provides magnetic noise cancellation. In the third mode, T1 and T2 are connected to IC1/IC3 out of phase, which gives maximum sensitivity but less stability and no magnetic noise cancellation. The LM380N audio amplifiers have a fixed gain of 50 times and the output automatically settles to half the supply voltage without the need for separate bias resistors at the inputs. The output of the LM380N ICs, from pin 8, is then AC-coupled to a series of further amplification stages via 1uF electrolytic capacitors. These amplifiers have been carefully designed so that they are stable, despite the high total gain provided by all the amplifiers connected in series. For a start, 1N4148 diodes are used to isolate the supply rails of each amplifier IC, so that ripple from one does not feed into another. Also, each pair of IC supply pins is fitted with multiple bypass capacitors, including some very high-value electrolytics. These components are vital. Output currents are kept very low, also to reduce ripple. Using inverters as amplifiers IC2a-f and IC4a-f are the stages within two unbuffered hex inverters (4069UB). Each stage just consists of two Mosfets, one P-channel and one N-channel, arranged in a totem pole arrangement, as shown in Fig.4. The gate and source terminals are connected together while the drains connect to the supply rails. The result is that if the input voltage A is high, the upper P-channel Mosfet is switched off and the lower N-channel Mosfet is switched on, pulling the output (Y) down. And if input voltage A is low, the P-channel Mosfet is on and the N-channel Mosfet is off, pulling the output up. The term “unbuffered” refers to the fact that this is a single stage; a conventional inverter would consist of three such circuits in series, to give a December 2018  27 D1 1N4148 K CON1 S2a REVERSE 100 F 470nF S3a T1 12V/10A +12V SWITCHED A 4700 F 470k PRIMARY 7 LINK 2 470k IC1: LM380N-8 IC1 3 10k 10k 100k 6 5 IC2b 3 330k 4 IC2a 100k 1 2 NP 5 4 SECONDARY 1 F 6 VR1a 1M IC2c 470nF 470nF IC2: 4069UB S3b S2b CONNECT D2 1N4148 47k K THRESHOLD 220k 10k IC2d 100k 9 8 1000 F 470nF VR2 10k 10 F 14 11 NP K 10 330k A 7 470nF 47k 13 12 A CENTRE DETECT IC2: 4069UB VR3 100k 4700 F 100 F 470nF ZD1 3.9V 100k IC2e +12V SWITCHED A IC2f 1 F  LED1 47k K D3 1N4148 K CON2 100 F 470nF +12V SWITCHED A 4700 F T2 12V/10A 470k PRIMARY 7 LINK 2 470k 3 IC3: LM380N-8 IC3 6 5 10k 100k IC4b 3 330k 100k 4 IC4a 1 2 NP 5 4 SECONDARY 10k 1 F 6 VR1b 1M IC4c 470nF 470nF IC4: 4069UB CON4 DIN SOCKET 5 2 4 3 D4 1N4148 47k K 1 470nF 220k CON6 DIN PLUG 5 4 3 A THRESHOLD 9 8 10 F 1  LED3 2 K 100k 10k IC4d IC4e 11 NP VR4 10k VR5 100k 10T 10 100 F 470nF ZD2 3.9V K 47k 13 12 A IC4: 4069UB 4700 F 330k A 7 CENTRE 470nF 14 1000 F 100k +12V SWITCHED A DETECT  LED2 47k IC4f 1 F K HANDHELD CONTROL BOX SC 2018 DUAL CHANNEL MAGNETOMETER much higher gain, which is beneficial when the gate is being used in a digital circuit. But the unbuffered type is far more suitable for use in a linear manner, as it is used here. With an input voltage somewhere between the supply rails, the two Mosfets will both be in partial conduction and passing roughly the same current, so the output voltage will also be be28 Silicon Chip tween the supply rails. Therefore, by applying negative feedback from the output to the input via a resistive divider, we can use these unbuffered inverters as crude amplifiers with relatively high gain. The transfer characteristic of each stage is shown in Fig.4 (from the device data sheet). As you can see, the response is non-linear but the gain is Australia’s electronics magazine quite high when the input voltage is very close to half supply. Using the inverter in closed loop mode will mean that in the quiescent condition, the open loop gain is at maximum and the response will be slightly more linear. The first inverter-based gain stage, built around IC2c/IC4c, has adjustable gain via dual gang potentiometer VR1, which changes the feedback resiliconchip.com.au S1 POWER K K K PERIOD 470nF 1000 F CON3 +12V 0V A ZD3 A A VR6 100k 470nF D9 1N5404 10k 470nF D6 1N4148 D5 1N4148 1000 F K A A F1 1A 8.2V 1W POWER  LED5 K 1k D Q1 2N7000 100k 100k D7 1N4148 K S A G 1M 7 6 7 2 IC5 3 1 F CA3140E 1 1M 10k 1 F 4 6 100k 8 3 IC6 7555 RLY1 5 2 5 10k 4 10k 1 10 F 1M 1000 F K A 1,14 2 7,8 CON5 D8 1N4148 A RELAY  LED4 100 F 1M 6 K 2N7000 LEDS K A 1N4148 D G S 1N5404 ZD1–ZD3 A A A K K K Fig.3: the complete circuit diagram of the Magnetometer, omitting only the battery which powers it (connected via CON3). Threshold adjustment potentiometer VR4 and magnetic field indicator LED3, both shown at lower left, are mounted offboard, in a small handheld unit. The two similar sensor/ amplifier channels are shown above these, while the differential amplifier and timer are to the right. CON6 is on the handheld control box, connecting to its mating socket on the unit. Also note the wiring of T1 and T2 – their starts are indicated by the black dot. sistance. The other part of the divider is actually formed by the impedance of the 1µF coupling capacitor along with the output impedance of amplifier IC1/IC3. Therefore, this first stage has very high gain with VR1 fully clockwise, with the gain somewhat frequency-dependent due to the reactance of the coupling capacitor. siliconchip.com.au The next three stages have lower, fixed gains of 4.7 times, 3.3 times and 2.2 times respectively. They also incorporate low-pass RC filters with a -3dB point of around 3.3Hz each, giving an overall -3dB point of about 1.6Hz. The signals are then AC-coupled by 10uF electrolytic capacitors and subject to adjustable DC bias, set using trimpots VR2-VR5. The following Australia’s electronics magazine gain stages, IC2e and IC4e, are operated in open-loop mode. The adjustable DC bias allows the gain and quiescent output voltage of these stages to be tweaked. The resulting signal then passes through another low-pass RC filter (47k/1µF), again with a -3dB point of around 3.3Hz. The output voltage of IC2e/IC4e is also fed to a December 2018  29 pending on the potentiometer settings and frequency, and partly because we don’t know the exact gain of the stages operating in open loop mode. But if we assume that the open loop gain of the inverters is around 20 times and that the gain of IC2a/IC4a is set to around 10 times, the overall gain applied to the signals from T1/T2 is in the order of 25 million times (50 x 10 x 4.7 x 3.3 x 2.2 x 10 x 7 x 21). No wonder this instrument is capable of such sensitivity! Note that there are several different compatible chips for IC2 and IC4 but you should stick to the specified HCF4069UBE type since these provide the most gain. Fig.4: internal structure and transfer characteristics of each of the six the unbuffered hex inverters inside a single HEF4096UB IC. They consist of a pair of Mosfets which can be used either as a digital inverter or as a high-gain inverting amplifier, although the transfer characteristic is non-linear. Reproduced from the NXP data sheet. 100kresistor, with a 3.9V zener diode and red LED in series. This LED will therefore light if the output voltage in that half of the circuit is above around 6V (ie, above half supply). The signal then passes through another gain stage (number seven, if you’re counting), built around IC2f/IC4f, with a fixed gain of seven times, before being fed to the inverting and non-inverting inputs of op amp IC5 via another pair of RC low-pass filters, with the same 3.3Hz -3dB point. The overall filtering thus far has the effect of severely attenuating or even cutting out signals above about 1Hz. This virtually eliminates false triggering from 50Hz or 60Hz magnetic fields induced by mains currents, which are pervasive in urban areas. IC5 is configured as a differential amplifier with a gain of 21 times. This means that if the two input signals swing in the same direction simultaneously, the output of IC5 will not change. But if they swing in opposite directions, or if one stays constant and the other changes, a signal will appear at its output, with the difference in voltages amplified by the gain factor of 21 times. It’s hard to calculate the exact amount of gain applied to the signals from T1 and T2, partly because it varies de- Triggering the timer When a sufficiently large magnetic signal is detected, resulting in a swing of several volts at the output of differential amplifier IC5, that pulse then triggers timer IC6. Its job is to stretch that (possibly very short) pulse into something longer that you will notice, as it lights up LED3, and also to drive the coil of RLY1, to trigger any external circuitry which may be connected via CON5. CMOS timer IC6 is triggered when its pin 2 trigger input is pulled below 1/3 VCC, which in this case, equates to a threshold of around 3.7V. Note that this means that the timer will only be triggered if the output of IC5 swings low. But if the output of IC5 swings high due to a magnetic field of the opposite polarity, it will almost certainly swing positive and negative a few times before settling down, so timer IC6 will be triggered regardless of the initial polarity of the pulse. Before pin 2 goes low, the 1000µF capacitor connected between pins 6/7 and ground is charged up close to +12V, via trimpot VR6 and its 1kseries resistor. Once the IC is triggered, pin 6 (discharge) immediately goes low, discharging that capacitor. At the same time, the pin 3 output goes high, energising the coil of RLY1 and closing its contacts. Since VR6 changes the time that it takes for the 1000µF capacitor to recharge once the discharge pin is no longer being actively driven, it controls the on-time for both RLY1 and LED4. The minimum time will be around one second while the maximum time is around 90 seconds. The two resistors and capacitor connected to its reset pin Slightly undersize photo of the PCB shown at right (actual board is 224mm wide). Use this in conjunction with the component overlay (Fig.5) when assembling the PCB. 30 Silicon Chip Australia’s electronics magazine siliconchip.com.au (pin 4) prevent the output from switching on when power is first applied, allowing the Magnetometer time to settle before IC6 becomes active, avoiding false triggering of RLY1. Once the timer is triggered, since output pin 3 goes high, the gate of Mosfet Q1 is charged up close to VCC. This causes Q1’s drain-source channel to conduct, pulling up the trigger input (pin 3), regardless of the state of the output pin of op amp IC5. The 100k series resistor from that output pin prevents the op amp from “fighting” this condition. This means that IC6 cannot be re-triggered for some time. The 10µF capacitor and 1M resistor from the gate of Q1 to ground sets this blanking time to around ten seconds. This is important since the magnetic field around RLY1’s coil will be picked up by the Magnetometer as soon as it is triggered and without the blanking, RLY1 would continuously be switching on and off as the unit re-triggers itself via magnetic feedback. Variations For use as a metal detector, you may wish to omit or remove all components following IC5 in the circuit. LED3 will still light to indicate changing magnetic fields. LED3 may also be directly replaced with a 1mA meter, bearing in mind that the magnet inside the meter should not come close to a sensor coil. If the relay is not omitted, the blanking circuit will be disruptive when searching. Construction We have designed a PCB for this project, which is coded good reasons to use Switchmode – the repair specialists to industry and defence one Specialised service Benefit from our purpose-built facilities, efficient and effect service. Since 1984 we have specialised solely in the repair and calibration of all types of power supplies and battery chargers up to 50kVA two Turn around time We provide three levels of service: standard (10 days), standard plus (4 days), emergency (24 hours) three four Access to Technicians and Engineers Talk directly to our highy skilled Technicians and Engineers for immediate technical and personal assistance. Quality Assurance Accredited to ISO 9001 with SAI Global and ISO 17025 with NATA. Documented, externally audited management systems deliver a repeatable, reliable service five Convenience and certainty We provide fixed price quoes after assessment of goods and cost-effective maintenance, tailored to meet your individual needs Take advantage of our resources. Fig.5: the Magnetometer PCB overlay diagram, showing where to mount each component on the board. All controls and most LEDs are along one edge so that they can protrude through holes in the enclosure, including DIN socket CON4, which connects to the handheld controls via a shielded cable. siliconchip.com.au REPAIR SPECIALISTS TO INDUSTRY AND DEFENCE Switchmode Power Supplies Pty Ltd ACCREDITED FOR TECHNICAL COMPETENCE Unit 1/37 Leighton Place, Hornsby NSW 2077 Australia Tel 61 2 9476 0300 Email: service<at>switchmode.com.au Website: www.switchmode.com.au Australia’s electronics magazine December 2018  31 Parts list – Extremely Sensitive Magnetometer 1 1 1 2 5 1 1 1 1 2 1 1 4 4 4 3 double-sided PCB, code 04101011; 70 x 224mm 12V coil SPST DIL reed relay (RLY1) [Altronics S4101A, Jaycar SY-4032] SPDT right-angle PCB-mount toggle switch (S1) [Altronics S1325] DPDT right-angle PCB-mount toggle switches (S2,S3) [Altronics S1360] 2-way PCB-mount terminal blocks, 5.08mm pin spacing (CON1-CON3) right-angle PCB-mount 5-pin DIN socket (CON4) [Altronics P1188] 5-pin DIN line plug to suit CON4 [Altronics P1151] horizontal 2-way pluggable terminal block (CON5) [Jaycar HM-3102] 2-way pluggable screw terminal for CON5 [Jaycar HM-3122] M205 PCB-mount fuse clips (F1) 1A M205 fast blow fuse (F1) 100mm length of 0.7mm diameter tinned copper wire M3 x 6.3mm tapped Nylon spacers M3 x 25mm machine screws M3 hex nuts knobs to suit VR1, VR4 & VR5 Semiconductors 2 LM380N-8 2.5W audio power amplifiers (IC1,IC3) 2 HCF4069UBE unbuffered hex inverters (IC2,IC4) 1 CA3140E BiMOS op amp (IC5) 1 TLC555CN CMOS timer (IC6) 1 2N7000 small signal N-channel Mosfet (Q1) 4 ultra-bright 3mm red LEDs (LED1,LED2,LED4,LED5) 1 ultra-bright 5mm blue LED (LED3) 2 3.9V 1W zener diodes (ZD1,ZD2) 1 8.2V 1W zener diode (ZD3) 8 1N4148 signal diodes (D1-D8) 1 1N5404 3A diode (D9) Capacitors 4 4700µF 16V radial electrolytic 5 1000µF 16V radial electrolytic 5 100µF 16V radial electrolytic 1 10µF 16V radial electrolytic 2 10µF 16V non-polarised/bipolar (NP/BP) radial electrolytic 4 1µF 16V radial electrolytic 2 1µF 16V non-polarised/bipolar (NP/BP) radial electrolytic 15 470nF multi-layer ceramic or MKT (code 470n or 474) 04101011 and measures 70 x 224mm. Use the PCB overlay diagram, Fig.5, and matching photo as a guide during assembly. Start by fitting the resistors where shown on the overlay diagram. Even though we show their colour codes in a table, it’s a good idea to double-check their resistance with a DMM before installing them, since the coloured bands can often be hard to read accurately. Follow with the diodes. There are two types, eight signal diodes (D1-D8), one larger power diode (D9) and three zener diodes (ZD1-ZD3) of two different types, so don’t get them mixed up. Each one must be orientated with the cathode stripe as shown in Fig.5. The six ICs should be installed next. You can either solder them directly to the board or solder sockets to the board, then plug the ICs in later. Sockets make it easier to replace a damaged IC but they also are prone to long-term failure due to oxidisation, so we prefer to avoid them. The ICs are also polarised, so ensure that each pin 1 dot is positioned as shown on the overlay diagram. Be especially careful with IC2 and IC4 since they are extremely sensitive to static discharges. That is why there are 10kresistors at pins 5 and 6 of IC2c/IC4c and at pin 11 of IC2e/IC4e. These points connect to potentiometers which you touch during operation, and any static discharge which jumps to those pots could destroy the ICs without the series resistors for protection. Now is also a good time to solder Resistors (all 0.25W, 1%) 4 1MW 4 470kW 4 330k 2 220k 11 100k 6 47k 10 10kW 1 1k 1 1MW 16mm dual gang linear potentiometer (VR1) 1 10kW multi-turn vertical trimpot (3296W style) (VR2) 2 100kW multi-turn vertical trimpots (3296W style)(VR3,VR6) 1 10kW multi-turn wirewound potentiometer (VR4) 1 100kW 16mm linear potentiometer (VR5) Miscellaneous 1 timber enclosure (9mm MDF box, 70x70mm inner dimensions) 1 2m length of four-core shielded microphone cable 1 2m length of single-core shielded microphone cable 1 1m length medium-duty figure-8 wire 2 unshielded transformers with 12V, 10A secondaries (T1,T2) (RS 504-127) 1 small enclosure for LED3 and VR4 1 12V battery (small SLA or eight D cells with battery holder) various lengths and colours of hookup wire heatshrink tubing Epoxy glue 32 Silicon Chip Australia’s electronics magazine We used 8x Alkaline cells for power but bear in mind that with a 100150mA drain they won’t last long! Ten rechargeable NiMH or NiCd cells might be a better bet . . . or even a 12V SLA or LiPo battery. With 20:20 hindsight, though, we’d think seriously about a 4 x 18650 rechargeable Li-ion cell pack (14.8V). siliconchip.com.au NOTE: SHIELD BRAID OF CABLE CONNECTS TO PIN 2 OF DIN PLUG, CATHODE (K) PIN OF LED3 REAR OF 5-PIN DIN PLUG (CONNECTS TO CON4 ON MAGNETOMETER) LED3 K A 2 4 5 1 3 VR4 3 CW 1 CCW 2 2m LENGTH OF 4-CORE SHIELDED MICROPHONE CABLE UB5 BOX OR SIMILAR SC 20 1 8 Fig.6: this diagram shows how to wire the DIN plug at one end of the four-core cable, and the components mounted in the handheld case at the other end of that cable the reed relay, RLY1. It’s in an IC-type package and again, it is polarised. Make sure its pin 1 is orientated as shown in Fig.5. Next, fit the MKT or ceramic capacitors (whichever you have chosen to use). These are not polarised, so you don’t need to worry about the orientation. Follow with Mosfet Q1 and trimpots VR2, VR3 and VR6. Make sure the trimpots are fitted with the adjustment screw in the locations shown on Fig.5. Solder LED1 and LED2 in place, pushed down fully onto the PCB, with the longer anode leads through the holes marked “A” on the board. Follow with the electrolytic capacitors, starting with the smallest and working your way up to the tallest. These must all be orientated correctly, with the longer positive leads soldered to the side marked “+”. The stripe on the can indicates the negative side. Don’t get the different values mixed up; the PCB overlay diagram shows where each one goes. Now dovetail two pairs of 2-way terminal blocks together to form two 4-way terminal blocks and fit these to the top of the board, with the wire en- try holes facing towards the edge of the board. Check they are pushed entirely down before soldering them in place. Also fit the fifth 2-way terminal block at the bottom of the board, with its wire entry holes facing towards the two large holes in the PCB. Having done that, you can also fit the socket for the pluggable terminal block (CON5) where shown in Fig.5. Then solder the fuse holder clips for F1, ensuring that the fuse retaining tabs go towards the outside and that the clips are pushed down flat onto the PCB before soldering. Simple l Economical I Great Performance Shockline 1-Port Vector Network Analyzer TM Simplify your testing while capitalizing on performance with a 1-Port USB VNA. The MS46121B Shockline VNA from Anritsu provides price, performance and space saving advantages when testing passive devices up to 6GHz. NOW AVAILABLE from $3,995 + GST# (laptop not included) # Exclusive special price for SILICON CHIP readers. Valid to Feb 28, 2019 Web: www.anritsu.com/en-AU/ Email: AU-sales<at>anritsu.com siliconchip.com.au Australia’s electronics magazine December 2018  33 Next, fit PCB-mounting switches S1S3, again pushing them down as far as they will go before soldering the leads. Now bend the leads of LED4 and LED5 by 90° 8mm from the base of the lens, ensuring that the longer anode lead (“A”) is orientated as shown in Fig.5, then solder them to the PCB with the lens at the same height above the board to the actuators for switches S1-S3. Before fitting potentiometers VR1 and VR5 to the board, scrape off some of the passivation layer from the top of the pot bodies using a file. Be careful to avoid breathing in the resulting dust. Solder the two potentiometers in place, then cut 50mm lengths of tinned copper wire and solder one end into the ground hole next to the pots, then bend the wires over and solder them to the exposed metal on the pot body. Finally, solder the DIN socket (CON4) where shown in Fig.5 and the PCB assembly is complete. Testing and calibration It’s tough to make adjustments once the unit has been fully assembled, so it’s best to check that it’s working and make the required adjustments first. But you will need to be very careful where you do this and how you lay the parts out since stray magnetic fields will make calibration impossible, as will any movement in the components during the set-up procedure. We recommend that you place the two coils one metre apart on a sturdy timber desk – keep them away from metal in case it is magnetised. Place the remaining circuitry nearby and wire it up but make sure that nothing will move while you are making adjustments. It’s a good idea to screw the PCB onto a heavy piece of timber at this stage, so it won’t move as you work on it. Use clip leads to short out the two 470k resistors next to CON1 and CON2 initially, to give maximum sensitivity. Alternatively, you can use a component lead off-cut to short out the middle two terminals of CON1 and CON2, to achieve the same result. Switch S2 on (down) so that T1 is in-circuit and switch S3 off (up) so that it is in phase with T2. You can ensure this by orientating the two coils/transformers identically and making sure that the same end of each winding goes to pin 2 of IC1 and IC3. Set gain adjustment potentiometer VR1 and trimpots VR2 and VR3 to their minimum. Fit 1A fuse F1, then apply power and adjust the presets for channel 1, first VR3 (coarse adjustment) and then VR2 (fine adjustment), so that red LED1 only just begins to flicker. Move a magnet past T1 and check that LED1 flickers in response. Now adjust Channel 2 using the same procedure by adjusting VR5 and then VR4, but this time, keep an eye on blue LED3. Turn up VR5 until LED3 just lights up, then turn it back slightly until it goes out. Use a similar procedure to adjust VR4. In an urban environment, depending on the time of day, blue LED3 may pulsate regularly, indicating that the unit is overloaded by magnetic flux. In an environment free from magnetic noise, it may never indicate overload. Note that overloading cannot harm the Magnetometer. In the unlikely event that you cannot adjust the unit to avoid overloading, you need to reduce the gain of both channels. The easiest way to do this is to remove the clip leads from the 470k resistors next to CON1 and CON2 (or remove the short across the middle two terminals, if you used that approach instead). You can also replace those 470kresistors with different values; higher values reduce the sensitivity while lower values increase it. As some components in this design may vary between batches, precise values cannot be offered. Try changing these resistor values in increments of around 100k until you find the value which gives maximum sensitivity without overloading. Preparing the “case” As shown in the photos, the prototype was built into a length of concrete pipe, with sensor transformers T1 and T2 potted in plastic boxes which were glued onto the ends. While this worked well, we don’t recommend that you use the same assembly technique for several reasons. Concrete pipes are heavy, relatively difficult to get and may contain asbestos. Also, you would have to mount most of the controls off-board and wire them up with flying leads; a tedious process. They’re also quite hard to cut and drill; you need masonry bits for drilling and a hacksaw with a carborundum rod for cutting the pipe to length. In short, while it works, we don’t recommend it. The main reason a concrete pipe was used is that the enclosure has to be absolutely rigid as any movement of the transformers will result in false triggering of the unit. A metal enclosure is not suitable as it would interfere too badly with the small magnetic fields we are trying to detect. And a plastic (PVC) pipe (even a heavy-duty one such as a sewer pipe – would flex too much. But rather than using a pipe, we suggest that you build a rectangular box from 9mm MDF, around 1m long, with inside dimensions of at least 70x70mm. If you want to incorporate a sealed Resistor Colour Codes     Qty. Value  4 1MΩ  4 470kΩ  4 330kΩ  2 220kΩ  11 100kΩ  6 47kΩ  10 10kΩ  1 1.0kΩ 34 4-Band Code (1%) brown black green brown yellow violet yellow brown orange orange yellow brown red red yellow brown brown black yellow brown yellow violet orange brown brown black orange brown brown black red brown Silicon Chip 5-Band Code (1%) brown black black yellow brown yellow violet black orange brown orange orange black orange brown red red black orange brown brown black black orange brown yellow violet black red brown brown black black red brown brown black black brown brown Australia’s electronics magazine The handheld control unit has a sensitivity adjustment potentionmeter (VR4) and an indicator (LED3). This one is built into a length of PVC pipe. siliconchip.com.au This arrangement worked well for our Magnetometer but we have gone off recommending a concrete pipe – not only because it was really heavy (oh, my shoulders!) but also because these types of pipes (particularly older ones) may contain asbestos. And that’s a BIG no-no, especially when cutting or drilling holes! The prototype combined S2 and S3 into one DPDT switch (S2) but separate switches may be more convenient (as shown on the circuit diagram). lead-acid (SLA) battery to power the unit, it may need to be larger than this. Having cut suitable pieces of MDF, mark out and drill holes in one side for the switch actuators, pot shafts, LEDs, DIN socket and relay contacts (via CON5). We’ve produced a drilling template which you can download from our website that will help you out. Position this so that when the PCB is attached to the panel, it will hover just above the bottom piece of timber forming the case. You will then need to attach the PCB to the back of this panel before proceeding, using the potentiometer nuts. If attaching a panel label (a good idea, so you know what control does what), stick it on first and then screw the nuts on top. Now sit the timber base up against the side panel and mark out the locations for the four 3mm mounting holes, then drill these in the base and attach the PCB using tapped spacers. Our drilling template is designed to locate the front panel holes so that 6.3mm tapped spacers are suitable. We suggest that you feed 25mm long machine screws up through the base, thread the spacers on, then the PCB on top and hold it in place using hex nuts. You can now fit the knobs for VR1 and VR5. Next, figure out how long the leads going from CON1 and CON2 to T1 and T2 will need to be. One pair will likely be longer than the other since that end of the PCB will be closer to one transformer. Cut appropriate lengths of shielded cable and screw them tightly into CON1 and CON2, with the shield going to one terminal and the inner conductor to another (make a note of which goes to which). Similarly, figure out how long the battery leads to CON3 need to be, cut the twin core lead to length and screw the conductors into CON5. Feed this cable through the provided relief holes, from the top of the PCB to the underside and then back to the top again. Note that you should double check all these connections since terminals CON1-CON3 may be difficult to reach once the unit has been fully assembled. Now would be a good time to attach a carry strap or handle to the top of the enclosure if you want it to be portable. You can use rope for this purpose but you might prefer a fixed handle, or you could even fit the unit with wheels. During operation, the unit should be kept parallel to the ground. Bear in mind that if you use rope, it will probably stretch a little due to the weight of the finished unit. You can now join the MDF pieces together using wood glue and plenty of small nails or screws, to keep it nice and rigid. These will have a slight effect on magnetic fields but siliconchip.com.au there are metallic components on the PCB anyway; as long as everything is held rigidly in place relative to the transformers, they should not cause any false triggering or reduced sensitivity. Mounting the transformers While you could build boxes for the transformers from MDF and mount them on the ends of your main enclosure, it’s easier to purchase suitably sized plastic cases. You can then glue the transformers into the cases. It isn’t necessary to pot them, as was done for the prototype, but you certainly could if you wanted to. You need to be careful when gluing the transformers since their windings should be perfectly aligned with one another, not a fraction of a millimetre out of place. This is easier than it sounds. A flat floor is all that is required, and a means of ensuring that the coils are perfectly parallel to one another (say, lining them up carefully with floorboards). When mounted, the windings of the transformer should be horizontal, not vertical, like rings stacked on the ground. The lengths of the core’s laminations should be perpendicular to the long axis of the enclosure. The prototype’s sensor transformers were potted to eliminate any possibility of moisture ingress with the connections brought out to screw terminals. Australia’s electronics magazine December 2018  35 “I’d upgrade to the Facett in a heartbeat!” Ross Tester, Silicon Chip Facett is the first ever Aussie-made modular hearing aid. Usage tips • Rechargeable • User adjustable • Award winning Find out if Facett is right for you by taking the hearing test at blameysaunders.com.au. It may be helpful to keep wires to the transformer windings exposed and accessible, in case you need to change the wiring later. Attach the transformer primary and secondary wires to the wiring that you ran earlier from CON1 & CON2 and if soldering them, use heat shrink tubing to insulate the joints. You will also need to connect your battery/battery holder up to the wires you ran earlier, insert it into the enclosure and glue it in place. We suggest you use silicone sealant to do this. Remember that you may have to replace the battery later. You can then attach the transformer cases to the ends of the main enclosure. We don’t suggest you do this using silicone as it could flex, so use a good epoxy instead (eg, JB Weld). While you are waiting for that to cure, you can build the remote control box. Remote control box The remote control box contains sensitivity adjustment potentiometer VR4 and detection indicator LED3 and not much else. A small Jiffy box (eg, UB3) makes a suitable enclosure. As you can see from the photos, these components were housed in a small section of PVC pipe for the prototype; you could do the same. Make holes to mount VR4 and LED3 and another sized to suit the microphone cable. Attach VR4 using its supplied nut and glue LED3 and the microphone cable in place using clear neutral-cure silicone sealant. It’s then just a matter of wiring up LED3 and VR4 to the cable, as shown in Fig.6. That same figure also shows 36 Silicon Chip how the 5-pin DIN plug should be wired to the cable at the other end. Be sure to secure the strain relief clamp inside the plug housing around the cable’s outer insulation, to ensure your solder joints won’t fail if there is any tension on the cable. Once you’ve wired up both ends, check for the correct continuity from each pin on the DIN plug to the components in your control box using a DMM set on continuity mode, then seal up the enclosure and plug the cable into the socket on the main unit. You are then ready to test the finished magnetometer and start using it. It is recommended that you first ‘play’ a bit with the device to find out how sensitive it is, what it reacts to, and the best settings for controls VR1, VR4 and VR5. While experimenting, you should have as few metal or magnetic materials as possible near the circuit, since these interfere with its operation. Experiment, too, with switches S2 and S3, which disconnect T1 or reverse it. A reversed coil pushes the circuit to the limits of sensitivity and is better for long-range measurements, yet there will no longer be compensation for magnetic ‘noise’. Switching one coil out of circuit is useful for experimentation and for detecting the Earth’s magnetic field, by rotating the unit on its own axis. Power supply Power for the Magnetometer comes from a 12V battery or 12V DC regulated power supply (it must be regulated since any ripple on the supply line would swamp the small signals being amplified). It draws about 150mA during operation. A good-quality 8-cell alkaline battery pack should last a whole day but note that cheap batteries can fail very quickly with such a high current drain. If the magnetometer is to be used often, rechargeable cells are a good idea. For example, you could use ten NiMH or NiCd cells (10 x 1.2V = 12V) rather than eight alkaline cells (8 x 1.5V = 12V). Or you could use a 12V SLA battery – it should handle this load with no problems and larger SLAs will last for several days of use. The downside of an SLA battery would be its weight. An attractive, and lighter weight, alternative would be a rechargeable pack made from 4 x 18650 Li-ion cells (3.7V each). This would give 14.8V – easily within the circuit’s capability. Holders for 1, 2, 4 or more 18650s are readily available and quite cheap – and they give you the option of having a set of cells in the magnetometer and another on charge. However, beware of fake or mislabelled 18650 cells – it has been said that up to 90% of those being sold on ebay, for example, are fakes. Even some with well-known brands actually contain dodgy cells with false labels. If the price looks to good to be true, chances are it is! Beware of any 18650 which claims more than 4000mAh (we’ve seen claims of 10,000mAh and more!) – there is no such cell made. Realistically, 3700mAh is about the highest you’ll find in legitimate cells. SC Australia’s electronics magazine siliconchip.com.au