Silicon ChipAugust 2017 - Silicon Chip Online SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Australia’s energy outlook is dogged by political incompetence
  4. Feature: Radio Telescopes and Interferometry by Dr David Maddison
  5. Review: Rohde & Schwarz RTB2004 Mixed Signal Oscilloscope by Nicholas Vinen
  6. Project: An Arduino Data Logger with GPS by Nicholas Vinen
  7. Project: Mains Power Supply for Battery Valve Radio Sets by Ian Robertson
  8. Project: El Cheapo Modules: Li-ion & LiPo Chargers by Jim Rowe
  9. Serviceman's Log: Well-made 1980s amplifiers are worthwhile to repair by Dave Thompson
  10. Project: Deluxe Touchscreen eFuse, Part 2 by Nicholas Vinen
  11. PartShop
  12. Feature: LTspice Part 2: Simulating and Testing Circuits by Nicholas Vinen
  13. Project: Building and calibrating the RapidBrake by John Clarke
  14. Feature: Lithium-ion cells – What You Need to Know! by Jim Rowe
  15. Vintage Radio: STC’s 1946 model 512 5-valve radio by Associate Professor Graham Parslow
  16. Market Centre
  17. Notes & Errata: Arduino-based Digital Inductance/Capacitance Meter
  18. Advertising Index
  19. Outer Back Cover: Hare & Forbes Machineryhouse

This is only a preview of the August 2017 issue of Silicon Chip.

You can view 48 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 Arduino Data Logger with GPS":
  • Arduino Data Logger shield PCB with stackable headers [21107171] (AUD $5.00)
  • Arduino Data Logger shield PCB [21107171] (AUD $2.50)
  • VK2828U7G5LF TTL GPS/GLONASS/GALILEO module with antenna and cable (Component, AUD $25.00)
  • GY-68 Barometric Pressure/Altitude/Temperature I²C Sensor breakout board (Component, AUD $2.50)
  • Elecrow 1A/500mA Li-ion/LiPo charger board with USB power pass-through (Component, AUD $25.00)
  • Elecrow 1A Li-ion/LiPo charger board with USB pass-through (Component, AUD $35.00)
  • DS3231-based Real Time Clock & Calendar module with mounting hardware (Component, AUD $6.00)
  • Firmware (Arduino sketch) file for the Arduino Data Logger (Software, Free)
  • Arduino Data Logger shield PCB pattern (PDF download) [21107171] (Free)
Articles in this series:
  • An Arduino Data Logger with GPS (August 2017)
  • An Arduino Data Logger with GPS (August 2017)
  • Arduino Data Logger Part 2 (September 2017)
  • Arduino Data Logger Part 2 (September 2017)
Items relevant to "Mains Power Supply for Battery Valve Radio Sets":
  • Set of four PCBs for the Battery-operated Valve Radio Mains Power Supply [18108171-4] (AUD $25.00)
  • Battery-operated Valve Radio Mains Power Supply PCB patterns (PDF download) [18108171-4] (Free)
Items relevant to "El Cheapo Modules: Li-ion & LiPo Chargers":
  • Elecrow 1A/500mA Li-ion/LiPo charger board with USB power pass-through (Component, AUD $25.00)
  • Elecrow 1A Li-ion/LiPo charger board with USB pass-through (Component, AUD $35.00)
  • TP4056 1A Li-ion/LiPo charger with mini USB socket (Component, AUD $2.50)
  • TP4056 1A Li-ion/LiPo charger with micro USB socket (Component, AUD $2.50)
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 "Deluxe Touchscreen eFuse, Part 2":
  • Deluxe Touchscreen eFuse PCB [18106171] (AUD $12.50)
  • PIC32MX170F256B-50I/SP programmed for the Deluxe Touchscreen eFuse [1810617A.HEX] (Programmed Microcontroller, AUD $15.00)
  • 2.8-inch TFT Touchscreen LCD module with SD card socket (Component, AUD $25.00)
  • IPP80P03P4L-07 high-current P-channel Mosfet (Component, AUD $2.50)
  • LT1490ACN8 dual "Over-the-Top" rail-to-rail op amp (Component, AUD $10.00)
  • IPP80N06S4L-07 high-current N-channel Mosfet (TO-220) (Component, AUD $2.00)
  • Matte Black UB1 Lid for the Deluxe Touchscreen eFuse (PCB, AUD $7.50)
  • Software for the Deluxe Touchscreen eFuse (Free)
  • Deluxe Touchscreen eFuse PCB pattern (PDF download) [18106171] (Free)
Articles in this series:
  • Deluxe Touchscreen eFuse, Part 1 (July 2017)
  • Deluxe Touchscreen eFuse, Part 1 (July 2017)
  • Deluxe Touchscreen eFuse, Part 2 (August 2017)
  • Deluxe Touchscreen eFuse, Part 2 (August 2017)
  • Deluxe eFuse, Part 3: using it! (October 2017)
  • Deluxe eFuse, Part 3: using it! (October 2017)
Items relevant to "LTspice Part 2: Simulating and Testing Circuits":
  • Software for the LTspice Tutorial, Part 2 (Free)
Articles in this series:
  • LTspice – simulating and circuit testing, Part 1 (June 2017)
  • LTspice – simulating and circuit testing, Part 1 (June 2017)
  • LTspice Part 2: Simulating and Testing Circuits (August 2017)
  • LTspice Part 2: Simulating and Testing Circuits (August 2017)
  • LTspice Tutorial Part 3: Modelling an NTC Thermistor (September 2017)
  • LTspice Tutorial Part 3: Modelling an NTC Thermistor (September 2017)
  • LTspice Simulation: Analysing/Optimising Audio Circuits (May 2018)
  • LTspice Simulation: Analysing/Optimising Audio Circuits (May 2018)
Items relevant to "Building and calibrating the RapidBrake":
  • RapidBrake PCB [05105171] (AUD $10.00)
  • PIC16F88-I/P programmed for RapidBrake [0510517A.HEX] (Programmed Microcontroller, AUD $15.00)
  • Rapidbrake alignment jig pieces (PCB, AUD $5.00)
  • Firmware (ASM and HEX) files for RapidBrake [0510517A.HEX] (Software, Free)
  • RapidBrake PCB pattern (PDF download) [05105171] (Free)
  • RapidBrake lid panel artwork (PDF download) (Free)
Articles in this series:
  • RapidBrake - giving the guy behind extra stopping time (July 2017)
  • RapidBrake - giving the guy behind extra stopping time (July 2017)
  • Building and calibrating the RapidBrake (August 2017)
  • Building and calibrating the RapidBrake (August 2017)

Purchase a printed copy of this issue for $10.00.

PROJECT OF THE MONTH Our very own specialists are developing fun and challenging Arduino®-compatible projects for you to build every month, with special prices exclusive to Nerd Perks Club Members. YUN SHIELD DROPBOX WEBCAM Finished Project. Camera Kit Shown. The Yun Shield is effectively a small Linux based computer with Wi-Fi, Ethernet and USB. By connecting it to an Arduino® board like the Leonardo, we can get the Leonardo to tell it to take photos and upload them to Dropbox. Use it to keep an eye on your front door or bedroom for example. Of course, to do this, you’ll need to set up a Dropbox account at https://www.dropbox.com which is free to do, and of course, a webcam. SEE STEP-BY-STEP INSTRUCTIONS AT jaycar.com.au/yun-dropbox-webcam 1080P HD WEB CAMERA QC-3205 USB 2.0 4 PORT SLIMLINE HUB XC-4958 Extend the connectivity of your devices with this slimline hub. For example connect a USB thumb drive to record the images to. • 30Mbps $ COMPUTER ADAPTORS* Catalogue Sale 24 July - 23 August, 2017 SAVE $34.90 STANDARD KIT $ YUN SHIELD XC-4388 $79.95 LEONARDO BOARD XC-4430 $29.95 The unit has a built-in microphone with automatic noise reduction. • High quality 5MP lens • Multi-functional clip with 360° rotation • Snap shot button for image capture • Up to 12MP image capture 44 95 9995 NERD PERKS CLUB OFFER INCLUDE SOME EXTRA PORTS *Including D9, D15, D25 Gender Changes, USB A , USB B, Firewire, SCSI, DVI adaptors. $ YUN SHIELD XC-4388 $79.95 LEONARDO BOARD XC-4430 $29.95 720P WEBCAM QC-3203 $24.95 WANT HIGH-RES CAMERA? 20% OFF CAMERA KIT STANDARD KIT: VALUED AT $109.90 SEE OTHER PROJECTS AT www.jaycar.com.au/arduino NERD PERKS CLUB MEMBERS RECEIVE: NERD PERKS CLUB OFFER CAMERA KIT: VALUED AT $134.85 8995 SAVE $19.95 ADD A SENSOR ARDUINO® COMPATIBLE PIR MOTION DETECTOR MODULE XC-4444 Add motion detection to your Yun Shield Dropbox webcam with this PIR sensor. 19 95 5 $ $ 95 EARN A POINT FOR EVERY DOLLAR SPENT AT ANY JAYCAR COMPANY STORE* & BE REWARDED WITH A $25 JAYCOINS GIFT CARD ONCE YOU REACH 500 POINTS! Conditions apply. See website for T&Cs * REGISTER ONLINE TODAY BY VISITING: www.jaycar.com.au/nerdperks To order phone 1800 022 888 or visit www.jaycar.com.au Contents Vol.30, No.8; August 2017 SILICON CHIP www.siliconchip.com.au Features & Reviews 12 Radio Telescopes and Interferometry Radio astronomy wasn’t even thought of eighty years ago – now major advances in the field have scientists looking back billions of years for elusive electro-magnetic signals. Here’s how they do it – by Dr David Maddison 22 Review: Rohde & Schwarz RTB2004 Mixed Signal Oscilloscope It’s a four-channel MSO with 10-bit analog-to-digital converter, a large hi-res touch screen and a built-in four-channel pattern generator – by Nicholas Vinen 74 LTspice Part 2: Simulating and Testing Circuits We build a flexible and realistic relay simulation in LTspice and then incorporate it into a simulation of the SoftStarter circuit from last month – by Nicholas Vinen Want to know more about the fascinating field of radio astronomy? David Maddison explains – Page 12 88 Lithium-ion cells – What You Need to Know! Lithium-ion and lithium-ion-phosphate cells give you much more bang for your buck – as long as they don’t go bang! There are a lot of bogus claims out there, too – buying cheap cells is usually not the best option! – by Jim Rowe Constructional Projects 26 An Arduino Data Logger with GPS It’s based on an Arduino Uno (or equivalent) and can log just about any form of data from a variety of inputs, including GPS. With a mini solar cell and regulator it will stay alive almost indefinitely – by Nicholas Vinen 34 Mains Power Supply for Battery Valve Radio Sets Log just about any data from a variety of inputs, including GPS, with this Arduinobased data logger – Page 26 Even if you can buy them, batteries for valve radio sets are very expensive and don’t last long. Here’s a versatile supply to suit a wide range of sets – by Ian Robertson 44 El Cheapo Modules: Li-ion & LiPo Chargers If you try to charge Li-ion and LiPo batteries with the wrong charger (or none at all) they won’t last long at all. But these modules from China give them a perfect charge – by Jim Rowe 62 Deluxe Touchscreen eFuse, Part 2 We introduced the higher-rated eFuse last month – now we move on to building it, programming the BackPack it uses and setting the whole thing up so it does what YOU want it to – by Nicholas Vinen 82 Building and calibrating the RapidBrake Want to avoid the guy behind you running into you? The RapidBrake flashes your brake lights or hazard lights when it detects heavy braking, gaining their attention earlier and hopefully letting them stop that much earlier – by John Clarke Your Favourite Columns 40 Circuit Notebook (1) Raspberry Pi Elevator Display & Annunciator (2) Distributed temperature sensing using an ATmega8 and DS18B20 sensors 57 Serviceman’s Log Well-made 1980s hifi amplifiers are worth repairing – by Dave Thompson 94 Vintage Radio STC’s 1946 model 512 5-valve radio – by Assoc. Prof. Graham Parslow Everything Else!   2 Publisher’s Letter    4 Mailbag – Your Feedback siliconchip.com.au 69 SILICON CHIP Online Shop 99 Ask SILICON CHIP 103 Market Centre 104 Advertising Index 104 Notes and Errata One for vintage radio enthusiasts: a mains power supply for batteryoperated valve receivers. – Page 34 It’s vital to charge Li-ion & LiPo cells correctly – and you can do it very cheaply with these Chinese modules – Page 44 Lithium-ion cells are used in everything from toys to electric cars. Here’s the low-down! – Page 88 August 2017  1 www.facebook.com/siliconchipmagazine SILICON SILIC CHIP www.siliconchip.com.au Publisher & Editor-in-Chief Leo Simpson, B.Bus., FAICD Editor Nicholas Vinen Technical Editor John Clarke, B.E.(Elec.) Technical Staff Ross Tester Jim Rowe, B.A., B.Sc Bao Smith, B.Sc Photography Ross Tester Reader Services Ann Morris Advertising Enquiries Glyn Smith Phone (02) 9939 3295 Mobile 0431 792 293 glyn<at>siliconchip.com.au Regular Contributors Dave Thompson David Maddison B.App.Sc. (Hons 1), PhD, Grad.Dip.Entr.Innov. Geoff Graham Associate Professor Graham Parslow Ian Batty Cartoonist Brendan Akhurst SILICON CHIP is published 12 times a year by Silicon Chip Publications Pty Ltd. ACN 003 205 490. ABN 49 003 205 490. All material is copyright ©. No part of this publication may be reproduced without the written consent of the publisher. Subscription rates: $105.00 per year in Australia. For overseas rates, see our website or the subscriptions page in this issue. Editorial office: Unit 1 (up ramp), 234 Harbord Rd, Brookvale, NSW 2100. Postal address: PO Box 139, Collaroy Beach, NSW 2097. Phone (02) 9939 3295. E-mail: silicon<at>siliconchip.com.au Printing and Distribution: Derby Street, Silverwater, NSW 2148. ISSN 1030-2662 Recommended & maximum price only. 2  Silicon Chip Publisher’s Letter Australia’s energy outlook is dogged by political incompetence What a mess we are in. We are blessed with abundant energy resources, in the form of coal, natural gas and uranium and all three are dogged by the incompetence of our political system. With the notable exception of Western Australia, we are effectively selling off our natural gas far too cheaply, without quarantining enough to satisfy the local market. At the same time, several states have embargoes on coal seam gas development, which only exacerbates the potential gas shortage. At the same time, we are exporting huge quantities of steaming coal to drive the power stations in other countries, notably China and soon India, while we are in the process of closing older power stations, without planning for their replacement with new, much more efficient super-critical coal-fired power stations. These are being built in large numbers in China to cope with their burgeoning demand for electricity. The left side of politics is violently opposed to coal-fired power stations in Australia while seemingly happy to see enormous open-cut coal mines established in the Queensland Galilee Basin. They also don’t want any extension of coal seam gas projects which are surely far less environmentally damaging than open-cut coal mines. Nor is there any need for expensive landscape restoration after mining is finished. The Finkel Report does mention the possibility of a super-critical coal-fired power station but it also seems to have a requirement for carbon dioxide capture – I simply refuse to refer to it as “carbon capture”. Whatever it is called, carbon dioxide capture and storage (or sequestration) is a really silly idea since it requires so much more energy for it to be achieved. It is estimated to require at least 20% more energy, on top of that required by the power station itself. Where would that extra energy come from? More coal! Surely, even the Greens can see the silliness of that idea. On second thoughts, maybe not. Note that large-scale carbon dioxide capture (pumping it underground) is not yet being done anywhere around the world yet. So why should it be a requirement in Australia? And why should carbon dioxide capture be a requirement for coal-fired power stations and not for gas-fired stations? They both produce carbon dioxide, don’t they? Mind you, most people now realise that carbon dioxide is not a poison – it is essential for all plant growth on the planet. Plants grow better with more carbon dioxide. And guess what? Whisper it: it probably doesn’t even contribute that much to global warming! Even climate scientists have now acknowledged the 20-year “pause” in global warming (while carbon dioxide in the atmosphere has substantially increased) and that their climate models are all bunk. That admission is contained in a new paper published in Nature Geoscience, which says natural factors and unforeseen events were responsible for climate models overestimating the temperature rise in the troposphere. Authors on the paper included Benjamin Santer from the Lawrence Livermore National Laboratory in the US, Michael Mann from Penn State University and Matthew England from the University of NSW. So there is no reason for Australia to continue on this headlong path to increasingly more expensive energy for no environmental benefit. In any case, there seems to be little chance of any new large power stations being built in Australia within the next ten years, whether they be gas, coal or nuclear. That means we will have to ensure that all existing coal-fired power stations are kept going for the foreseeable future, whether they are run with black or brown coal. Any further closures will result in a much less reliable electrical grid and even higher electricity tariffs. Leo Simpson siliconchip.com.au siliconchip.com.au August 2017  3 MAILBAG – your feedback Letters and emails should contain complete name, address and daytime phone number. Letters to the Editor are submitted on the condition that Silicon Chip Publications Pty Ltd may edit and has the right to reproduce in electronic form and communicate these letters. This also applies to submissions to “Ask SILICON CHIP”, “Circuit Notebook” and “Serviceman”. Absence of new line at end of source code can cause problems I'm just reading the July 2017 issue of Silicon Chip. I must say that I always enjoy reading the Serviceman's Log; it is gratifying to know that there other are people out there besides myself who are willing to spend a disproportionate (and possibly uneconomic) amount of time and effort in trying to repair some items. My wife often comments about my repairs. I just replaced two worn bearings in a ceiling exhaust fan. The bearings were nearly as expensive as a brand new fan! Regarding the Ask Silicon Chip section, on pages 99 and 100 there is a letter titled "Quirks encountered with Micromite tutorial", regarding a "DO WITHOUT LOOP" error from the Micromite. I have written quite a lot of code using a range of programming languages, but not any embedded systems or microcontrollers. One thing that I have noticed is that the last line of some source code may or may not compile or interpret correctly depending on the presence or absence of a <CR><LF> pair at the end of the last line in the file. By this, I mean that if the source code's last line was: LOOP<CR><LF> or simply LOOP Usually, if there is a CR/LF pair at the end of the file, when you open it in a text editor, you can place the cursor on the line below the last line. Whereas if the CR/LF is absent, normally the cursor will refuse to move past the end of the last line. I have been bitten by this a number of times. It may result in some sort of syntax error but the reason for it is not obvious. The problem can be caused by the host operating system (Windows, Linux, OS X), the editor 4  Silicon Chip used and whatever digests the source code. Similarly, the process of copying source code (text files) from one operating system to another can cause problems because Windows/DOS uses <CR><LF> at the end of a line of text whereas Linux and OS X only use <LF>. There are ways around this problem. I do not know if this the problem but it would be interesting to test whether or not a terminating <CR><LF> was present or absent. Walter Hill, Mount Pleasant, WA. Editor's response: we did consider this at the time of writing the response; we made the sure file was terminated with a CR/LF before uploading it to the Micromite initially. But the error was still produced, so this does not seem to be the cause. However, as you suggest, it is a logical reason why this type of error might occur and it's possible we made a mistake in our testing. Basic electronics tutorials for beginners wanted I sent you my very first ever attempt at designing an electronic circuit a couple of weeks ago. In my email, I mentioned your magazine is lacking a genuine beginners' section. I know my design was wanting in many areas and I got hung up with trying to interpret data sheets. I would like to see Silicon Chip publish articles similar to the design tutorial I used to help me with my first circuit design. It can be found here: www.learnabout-electronics. org/Downloads/Amplifier_Design_ Record.pdf The reason I would like to see this sort of thing is because many of the projects that I see in the magazine basically just present a new design and explain how it works. That is fine if you know what you are doing but what were the design decisions that had to be made before you started? How did you actually work out the component values before testing? What compromises did you have to make? What did you measure when testing and how did you know it was right? These are the sort of things that beginners get bogged down on. We don't have enough experience to know the process of design or when and why certain decisions are made. Right now I am learning about amplifiers and my design was a Class-A amplifier. If you did a series on how to design simple amplifiers and started with Class-A, then Class-B, ClassAB in tutorial style, that would be a good start. Once the basics were out there, a follow-on tutorial about how to turn a basic design into a workable one with various types of feedback would be good (I am learning about that now but I can't find a good tutorial). A follow-on to simple radio transmitters and receivers would then be good. Just simple everyday stuff that a beginner can see how the design process works step by step. You could provide work sheets for download from your website and that should attract more beginners' traffic. One possible place to use this type of tutorial might be in the Circuit Notebook area of your magazine where you might dissect one of the circuit ideas in a tutorial. I found the article in the June 2017 issue about how to use LTspice very informative as I did try to use SPICE software before but got hopelessly lost when I did my design because I don't have any test equipment other than a multimeter. Thanks for your time and keep up the good work. Andrew Pullin, Wodonga, Vic. Editor's response: we occasionally get requests to publish introductory articles on basic electronics, however, it siliconchip.com.au Power of ten Get in touch with the new ¸RTB2000 series oscilloscopes. ¸RTB2000 oscilloscopes (70 MHz to 300 MHz) team top technology with top quality. They surpass all other oscilloscopes in their class, delivering more power plus intuitive usability at a convincing price. For more information visit www.scope-of-the-art.com sales.australia<at>rohde-schwarz.com Visit our stand number B30 at Electronex Melbourne siliconchip.com.au August 2017  5 Mailbag: continued Using excess solar power to heat water Further to your Publisher’s Letter in the May 2017 issue, you could have mentioned the use of PV panels to produce hot water, which is one of the biggest consumers of energy in the home. Your proposed project could be extended to do this. There are two main approaches, utilising AC or DC. As bigger solar installations seem to be growing in number, excess AC power from such installations can be intelligently diverted using products such as: www. catchpower.com.au This seems to closely follow the concepts you outlined, even going so far as using an internet connection to gather weather forecast data to maximise water heating. Unfortunately, these devices are quite expensive, so it would be good if a Silicon Chip project could be developed to produce a similar device at an affordable price. The use of DC power from a PV array to directly feed a hot water would be a lot of extra work to prepare such articles and we wonder if many readers would bother reading it. It is hard to decide what level to aim at; if it was too basic then most readers would simply find it boring whereas if it wasn't basic enough, those who would benefit from it might fail to understand and skip over it in frustration. There are a number of different approaches you can take to learning about circuit design. While the worksheet you have used as an example has its merit, we wonder just how useful it is given that Class-A transistor amplifiers like that are seldom used these days; in most cases, an op amp would give superior results for a similar cost and less complexity. Have you considered analysing and understanding some of the less complex circuits that we publish? Maybe even experimenting by making changes to them? One of the reasons we describe our circuits in a fair amount of detail is 6  Silicon Chip tank has been raised in Silicon Chip before (eg, see page 9 of the November 2014 issue). There is at least one MPPT tracker available in Australia that provides this, as seen at http://techluck.com and www.commodoreaustralia. com.au/product/solar-hot-waterbooster/ This appears to be a relatively simple device but again, it is quite expensive. It also does not address the potential corrosion problem that you have mentioned before. Again, it might be a good idea if Silicon Chip could develop such a device at reasonable cost. Second-hand solar panels are readily available and if used in this off-grid application, their installation wouldn’t require Electrical Wholesaler approval, nor would their output power be added to that from any grid connected PV system, keeping you under any maximum connected power limit (10kW in the case of Ausgrid). Roger Woodward, Blakehurst, NSW. to help beginners understand how we arrived at them. As you say, there are numerous design decisions to make and we often do explain why we chose a particular part, how we arrived at various component values and so on. Even just building sample circuits out of data sheets can be a boon to a beginner (although keep in mind that just because a data sheet says to do something a certain way doesn't make it gospel!). We will give further thought to producing some articles along the lines of what you are requesting but it would be helpful to get feedback from other readers so we can gauge the level of interest and also get an idea of just how basic a tutorial is desired. Power board circuit breaker failures My nephew has a stall selling drinks and so on at one of the Brisbane markets and over a period of time, he has had several power boards fail. After one of the units died, I asked for it both out of curiosity and because there was the feeling that it must be badly made. This particular power board carried an Australian brand and had cost around $150. It was an orange unit with four switched outlets, a residual current device and a circuit breaker to protect it from over-current conditions. A quick inspection of the sockets and the switches revealed that they were well-made and in good condition. Also, the RCD tested OK. However, when I inspected the circuit breaker, it tested as open circuit but the button was still recessed. Obviously it was faulty. I opened the unit and saw that half of one of the leaves of the switch was missing and it was very obvious that the switch had suffered a sustained arc which had vaporised the missing part of the leaf. The plastic case had also partially melted. This suggested that a substantial inductive load had been connected which was confirmed when I spoke to my nephew. He had connected two "slush" machines to the power board. Each machine had a name plate load of 1000W and each machine had an agitator motor and a refrigeration unit. In other words, the load was almost totally inductive. These small thermal circuit breakers are simply too slow for inductive loads. Also, the open-state gap is not large. The switch must open fast enough and wide enough that an arc cannot be maintained. This one did not. I thought your readers should be aware of this issue. George Ramsay, Holland Park, Qld. Editor's comment: most power boards are rated at 10A (ie, 2300W) so you might think they could handle two nominally 1000W loads. But if you are switching power to the whole board at once, it would be carrying the initial surge current of both slush machines at once and as you suggest, that could destroy the circuit breaker. When connecting motorised devices to a power board, it's good practice to switch each one on in turn, using their own power switch (which presumably is rated to handle the switch-on surge) and leave at least a few seconds between each to give the circuit breaker time to cool down. siliconchip.com.au GREAT WEBSHOP OFFERS THIS FATHER’S DAY WHEN YOU USE THE CODE DAD2017 ONLINE Happy Father's Day TECSUN S8800 RADIO $380.00 BONUS OFFER ► ◄ TECSUN DAB+ RADIO $150.00 FREE SHIPPING ► ◄ TECSUN R909 TECSUN R909 Latest desktop model has all portables. the features of high end ology for LW,MW,FM SW • DSP reception techn reception in all modes. • 100-29999 Khz coverage reception • Remote control for armchair USB charger for • 2 Lithium Ion batteries with extended playing time. TECSUN PL880 RADIO $249.00 FREE SHIPPING ver Third generation DAB+ recei features: TFT display • 61mm colour high contrast • FM and DAB+ reception connectivity • Aux input and Bluetooth • External antenna socket and Equaliser • Dynamic Range Control memory functions. • Clock, Snooze, Alarm and ded. • 9V DC power supply inclu TECSUN DE13 RADIO $32.50 DSP circuitry. Latest high performance h. costing 4 times as muc Performance rivalling units s. • DSP on shortwave band ery. • Long life Lithium-Ion Batt width. • User selectable IF band • Continuous coverage 100-29999 kHz. 08 MHz. • Extended FM range 64-1 TECSUN AUSTRALIA www.tecsunradios.com.au siliconchip.com.au wave receiver with Ultra portable LW, AM, FM, short 0 (Si4735). SSB. Same processor as PL88 for receiver, with provision Mains powered Desktop s. band all on nnas ante external AM • External antenna socket for s. broadcast and shortwave band age • 150 kHz to 29999 kHz cover FM. 76-108 MHz on • Operates from 3 x AA cells. display. • dBu level and dB signal to noise TECSUN PL310ET RADIO $80.00 storage (ATS). • 1000 memories with auto Airband. • LW/AM/FM/SW and VHF on LW • Radio direction finder and AM bands. er. • Battery or AC pow TECSUN LONGWIRE ANTENNA $129.00 FREE SHIPPING FREE SHIPPING FREE SHIPPING io AM/FM Receiver RADIOS TECSUN S2000 RADIO $425.00 BONUS OFFER TECSUN PL365 RADIO $88.00 FREE SHIPPING Emergency Dynamo Rad 16 Mhz) coverage • MW,FM and SW (3.2er for emergency • Dynamo cranking pow • Solar charging • Hi intensity flashlight al locator beacon • Personal alarm and visu phone charging • USB socket for mobile Tecsun Radios Australia 24/9 Powells Road Brookvale NSW 2100 Australia Email: hello<at>tecsunradios.com.au Phone Number: 02 8078 2241 W travellers radio, DSP Fully featured AM/FM/S ption. circuitry for improved rece width. • User selectable IF band ector. • External antenna conn • 500 memories. antenna with Weather proof 10m external oves reception matching transformer. Impr dramatically. er. • 10:1 matching transform • Covers 0.5-30 MHz. inated • 7m RG174 coax feed term . with a 3.5mm mono plug Prices are in Australian Dollars and include 10% GST. Free Shipping Promotion valid for Australian customers only between 28 July and 10 September 2017 using the voucher code DAD2017 for online purchases. August 2017  7 Mailbag: continued Helping to put you in Control Bidirectional DC current transducer Split core hall effect current transducer presents a 4 to 20 mA DC signal representing the DC current flowing through a primary conductor. -25 to 25 A primary DC current range. SKU: WES-080 Price: $75.00 ea + GST RTD Temperature probe RTD probe with magnet fixing for surface temperature measurement. -50 to 200 ºC. Fitted with 3m silicon cable SKU: CMS-007 Price: $89.95 ea + GST Easy Servo Driver, 80V, 8.2A ES-D808 fully digital microstepping stepper motor driver with encoder feedback input. When paired with an easy servo motor it combines features of both loop steppers and brushless servo. SKU: SMC-182 Price: $229.95 ea + GST NEMA 34 Easy Servo Motor 8.0 N·m (1,133 Oz·In) 3 Phase NEMA 34 hybrid stepper motor with 1,000 line encoder for feedback. SKU: MOT-184 Price: $289.00 ea + GST Pressure Transducer 0 to 4 Bar IP67 pressure transmitter with two-wire, 4 to 20 mA output and ¼” NPT process connection. ±0.3% F.S. accuracy. 0 to 4 Bar Absolute. SKU: FSS-1503 Price: $159.00 ea + GST 22mm Rotary Potentiometer 10k Screw terminals. 1/2 watt rated. Linear taper. Suits standard 22mm diameter mounting hole. SKU: HER-300 Price: $34.95 ea + GST 4-20mA Loop Powered Calibrator With a source of power and a potentiometer this card will generate 4 to 20 mA for testing meters and inputs on PLCs and DAQs. Includes DIN Rail Mount housing. SKU: KTD-266 Price: $89.00 ea + GST For Wholesale prices Contact Ocean Controls Ph: (03) 9782 5882 oceancontrols.com.au Prices are subjected to change without notice. 8  Silicon Chip Another option would be to use a "portable power block" with RCD. These tend to have distribution-board style circuit breakers which we would expect to be more sturdy. They are available under $100 and can be had with a 10 or 15A plug. The 15A version would likely be more sturdy overall but requires access to a 15A outlet. Why we don't use HTML5 for online issues (yet) I have been using Google Chrome as my preferred internet browser for several years. Just lately, I find I'm not able to view the online Silicon Chip magazine in anything but Non-Flash mode, which appears to be inferior in quality. If I use Internet Explorer, I can use the full resolution range successfully. Having discussed this with my son who is an IT systems manager, he tells me that Google Chrome no longer supports Flash, as it is considered to be an insecure program. He believes that Silicon Chip would be better off using HTML5 format instead of Flash. In the meantime, I have discovered that I can re-enable Flash support in Chrome via this URL: chrome://settings/content/flash Terry Ives, Penguin Tas. Webmaster's response: This is something we have looked into periodically over the last several years but it still seems impractical. Adobe Flash does have security problems, which is why they keep claiming that it's obsolete, yet the latest version of their InDesign desktop publishing software (which we use to lay out the magazine) still has an "Export to Flash" option but no similar option to export to HTML5 format. If we were to switch to using HTML5, our only real option would be to export to Flash and then use another piece of software to convert this to HTML5 format. However, our research indicates that this typically results in the file size growing by a factor of 50% or more; in some cases, it more than doubles. That means an online issue that's currently 40MB in Flash (typical) could end up approaching 100MB. We don't think that's acceptable, especially because most browsers will not cache a file of that size, resulting in the browser having to re-download it each time it's viewed. And given the size, depending on the reader's internet connection speed, that could become rather tedious! Adobe keep insisting that Flash is obsolete yet they continue to support it (via updates etc) which we think is their way of recognising that Flash is still widely used and HTML5 isn't ready to replace it just yet. Consider that as a small company, we have invested hundreds of hours of work into getting our Flash-based website running. We would need to spend a similar amount of time re-designing the website and converting the hundreds of online issues we have already produced to switch to HTML5. This would take away resources which we need to produce a monthly magazine. So before switching, we'd need to be very confident that HTML5 is a viable solution, yet our research to date indicates that it certainly is not. We would like to see an HTML5 export function for InDesign; if they could provide that, we would re-consider switching (or supporting both). Lurking behind the Incat ferry... Is the square rigger in the background of your July 2017 cover the Endeavour replica? On another subject, I am about to build the PortaPAL-D (Silicon Chip, December 2013, January & February 2014, www.siliconchip.com.au/ Article/5601) and have been looking at what I need. There are kits for the amplifier module and the speaker protector, but not for the DC-DC Converter, as far as I can discover. Where you know there will be a kit at time of printing you seem to mention it. What if a kit becomes available sometime later? What I am getting around to is, could you put a table on your website listing the current availability of kits? Geoff Champion, Mount Dandenong, Vic. Publisher's response: We're pretty sure it is. Compare it to the photos at: siliconchip.com.au silicon-chip--order-with-confidence-relax.pdf 1 6/29/17 2:24 PM C M Y CM MY CY CMY K siliconchip.com.au August 2017  9 Mailbag: continued www.anmm.gov.au/whats-on/vessels/hmb-endeavour If you want to build the DC-DC Converter, the PCB is available from our online shop. See www.siliconchip.com. au/Shop/?article=3774 On the question of kit listings, the easiest solution is to use the Article Search facility on our website. If there is an associated kit, the details, including any links to products on the Jaycar/Altronics websites, should appear. We try to keep this up to date, adding kits as they are produced and marking them as unavailable once stock runs out. IC-7610 RF Direct Sampling Evolution ICOM5014 Can changes in Earth's orbit and rotation affect climate? Coming Soon Introducing the IC-7610 SDR HF/50MHz All Mode Transceiver Building on the success of the IC-7300, the IC-7610 features RMDR (Reciprocal Mixing Dynamic Range) of 110dB (at 2kHz), independent dual receivers, DIGI-SEL Preselectors on both Main and Sub Bands and a High Speed, High-Resolution Real-Time Spectrum Scope. All these features are easily controlled through the large 7 inch colour TFT LCD Touch Screen Interface. To find out more about Icom’s products email sales<at>icom.net.au WWW.ICOM.NET.AU 10  Silicon Chip For quite some time now, global warming has been presented as fact or fiction, with adherents ardently presenting their viewpoints. To me, it has become apparent that populist politicians and scientists seeking government funding (or the continuance of existing funding) have muddied the waters. The cynic in me suspects that there are a lot of different agendas floating in and around the issue. It was refreshing to read Graeme Burgin's comments in the June 2017 issue (in Mailbag, page 5) for a different approach which led me to trawl the net for information. I found the following regarding changes in the Earth's orbit and rotation over time and how this can affecting climate: http://siliconchip.com.au/l/aaec http://siliconchip.com.au/l/aaed Then there's this, which certainly gives one food for thought: http://siliconchip.com.au/l/aaee It's something we do not seem to hear much about in the media. Robert Malone, Greenbank, Qld. Editor's comments: changes in the Earth's climate due to its movements are known as Milankovitch cycles and are well-known, even if they are rarely discussed by the media. There is still significant debate over the magnitude of climate changes due to these cycles. There is some suggestion that they may drive ice ages and interglacial periods but little agreement over just how they do that. Milankovitch cycles can be due to axial precession, axial tilt, apsidal precession and orbital inclination. There is also the issue of gravitational effects on the sun itself due to the orbit of the planets. Recent controversial theories have raised the possibility of changes in the solar wind affecting cloud formation, which could be a larger effect from the Sun on Earth's climate than actual changes in solar output (which are quite small over short timescales). There are also theories that dust accretion at times when the Earth passes through the solar system's orbital plane could affect climate. The science is far from settled and until we understand the magnitude and cause of natural climate changes, how can we disentangle these from climate change due to humans? See: https://en.wikipedia.org/wiki/Milankovitch_cycles SC siliconchip.com.au Contact: Australia’s only dedicated trade event for the electronics industry returns to Melbourne in September. Electronex – The Electronics Design and Assembly Expo is being held between the 6-7th September at Melbourne Park Function Centre. With over 90 exhibitors and a technical conference plus free seminars featuring leading international and local industry experts, this is a must see event for decision makers, enthusiasts and engineers designing or working with electronics. Attendees can pre-register for free at www.electronex.com.au. This year’s event will feature a host of new product releases and continues to reflect the move towards niche and specialised manufacturing applications in the electronics sector as well as the increased demand for contract manufacturing solutions. A series of free seminars with overviews on key industry topics will also be held on the show floor throughout the two day event and the program can be viewed on the show web site. This year’s conferAndrew Pollock ence program comTel: 03 9571 2200 prises six main workWebsite: www.smcba.asn.au/conference shops to be conducted by internationally renowned speakers Vern Solberg and Phil Zarrow, and a series of training and certification courses. The Conference includes the following topics: ➝ Best Practices for Improving Manufacturing Productivity – Phil Zarrow ➝ Flexible and Rigid Flex Circuits - Design, Assembly and Quality Assessment – Vern Solberg ➝ The “Deadly Sins” of SMT Assembly – Phil Zarrow ➝ Embedding Passive and Active Components: PCB Design and Assembly Process Fundamentals – Vern Solberg ➝ Implementing Advanced “Leading Edge” and “Bleeding Edge” SMT Component Technology – Phil Zarrow ➝ Design and Assembly Process Implementation for Flip-Chip, Wafer Level and 3D Semiconductor Package Technologies – Vern Solberg. People involved in electronics manufacturing can enrol to be trained and certified in a range of IPC programs by two of the SMCBA Master IPC Trainers Ken Galvin and Mike Ross – “ESD Control for Electronics Assembly”, “Handling Moisture Sensitive Devices”, “Foreign Object Debris (FOD) Prevention in Electronics Assembly” and “Stockroom Materials - Storage and Distribution”. FLAT BATTERY? WE HAVE THE PERFECT SOLUTION Don’t wait for a new expensive battery! The jump start battery is light, small and will start your car where ever you are. • NO WAITING • EASY TO USE • POWERFUL • STORE IN GLOVE BOX • CLIP ON AND START Lithium ion Lithium ion Phosphate Features Features • Light with the highest energy density gives you long duration with small size • Light less than half the weight of lead acid 3.7 volts per cell • Long Lasting cycle life of 500cycles RGES A H C ALSO PHONE! YOUR • Protection circuits to prevent overvoltage or under voltage or short circuits • Custom made packs to suit your application • Long Lasting cycle life of over 2000cycles • Deep cycle can be deep cycled without loss of performance • Protection circuits to prevent overvoltage or under voltage • Custom made packs to suit your application PREMIER BATTERIES Unit 9, 15 Childs Road Chipping Norton NSW 2170 Email: info<at>premierbatteries.com.au Web: www.premierbatteries.com.au Tel: 02 9755 1845 High quality batteries for all professional applications SUPPLIERS OF QUALITY BATTERIES FOR OVER 30 YEARS siliconchip.com.au 3.2 volts per cell August 2017  11 RADIO TELESCOPES and INTERFEROMETRY ARRAYS by Dr David Maddison Astronomers and radio astronomers are searching deeper into the cosmos than ever before, discovering many of its long-hidden secrets in the process. Perhaps one day this may lead to the answer to that most fundamental of all questions: “Where did we come from?” A stronomers use two main types of telescopes to observe the universe. First and most familiar is the optical telescope, which uses lenses or mirrors to focus light. The universe is normally observed at optical (visible) frequencies but in some cases in the infrared and ultraviolet spectrum. Second is the radio telescope, which allows observations at radio frequencies. Typically, they use parabolic dishes or other types of tuned antennas to collect incoming radio signals. Other types of radio telescopes allow observations in the gamma ray spectrum, the X-ray spectrum, and the microwave spectrum. Table 1 shows typical wavelengths and frequencies for different types of telescopic observations. Observations at lower radio frequencies, from 10-100MHz, typically use directional antennas somewhat similar to TV antennas, or large stationary reflectors made of wire mesh, 12  Silicon Chip with moveable focal points. Beyond 100MHz, they normally use parabolic dishes. Some common observing frequencies in radio astronomy are 13.36-13.41MHz, 25.55-25.67MHz, 73.00 -74.60MHz, 150.05-153.00MHz, 406.10-410.00MHz, 608.00614.00MHz, 1.400-1.427GHz, 1.6106 -1.6138GHz, 1.660-1.670GHz, 2.655 -2.700 GHz, 4.800-5.000GHz, 10.600 -10.700GHz and 18.280-18.360GHz. This is by no means a complete list but gives an idea of the ranges used. The two lowest frequency bands are used for solar and Jupiter observations; 73, 150 and 406MHz segments are used to observe pulsars and the 1.4GHz segment is used to observe hydrogen. Not all radio wavelengths penetrate the Earth’s atmosphere. Indeed, early radio astronomers thought no radio TYPE OF OBSERVATION WAVELENGTH FREQUENCY Gamma ray X-Ray Ultraviolet Visible light Infra-red Microwave Radio <0.01nm 0.01 to 10nm 10 to 400nm 390 to 750nm 750nm to 1mm 1mm to 1m 1mm to 1km >10EHz 30EHz to 30PHz 30PHz to 790THz 790 to 405THz 405THz to 300GHz 300GHz to 300MHz 300GHz to 3Hz (Frequency prefixes are E for exa (1018), P for peta (1015), T for tera (1012), G for giga (109); note the overlap between radio and microwave.) Table 1: typical wavelengths and frequencies for different types of telescopic observations. siliconchip.com.au The transmittance of different wavelengths through the atmosphere. waves at all would reach Earth from space as they would be reflected by the ionosphere. (For more information see SILICON CHIP article May 2016 “Atmospheric Electricity: Nature’s Spectacular Fireworks” siliconchip.com.au/l/aad5). Fortunately, however, radio wavelengths do get through. Competition for spectrum between astronomers and other users is an ongoing problem. Frequencies between 327MHz and 809GHz, used to observe the spectra of various molecules, are partially protected from other use (see siliconchip. com.au/l/aad6). Other parts of the spectrum are fully protected by international convention. See siliconchip.com.au/l/aad7 for a comprehensive list. Lower frequencies require a larger dish size than higher frequencies. A common size of radio dish is 25m in diameter. The largest fully steerable radio telescope is the 100m diameter Green Bank Telescope in West Virginia, USA with a collecting area of nearly 1 hectare. In comparison, the radio telescope at Parkes, NSW, also one of the largest in the world, is 64 metres in diameter but there is also a larger steerable dish in Australia, the 70m diameter DSS-43 antenna at the Canberra Deep Space Communication Complex. The one time record holder for the largest radio telescope in the world is the Arecibo telescope in Puerto Rico, run by the US National Science Foundation. Big dish good; huge dish better The reception of radio signals is naturally limited by the size of the dish antenna and where it is pointing. And unlike optical telescopes which are constrained by weather conditions such as cloud and only able to be used at night, radio telescopes can be used continuously. As can be seen from Table 1, they also operate at many times the wavelength used by optical telescopes and do not need to be made to the precision tolerances of optical equipment. However, to obtain a resolution (the ability to separate close objects or distinguish small details) similar to that of optical telescopes, they have to be a great deal larger, due to the longer wavelengths of radio waves. siliconchip.com.au Galaxy Centaurus A composite image with individual views in the X-ray, radio and optical wavelengths. The radio emissions from the hot spots are due to synchrotron radiation (radiation that results when a charged particle is accelerated in a curved path) and were imaged with the Jansky VLA telescope. It is one of the most powerful radio sources in the universe and was discovered in 1939. It is notable for the two enormous jets (purple in the radio image) being emitted from the core of the galaxy. Image credit: X-ray – NASA, CXC, R.Kraft (CfA), et al.; Radio - NSF, VLA, M.Hardcastle (U Hertfordshire) et al.; Optical - ESO, M.Rejkuba (ESO-Garching) et al.; CC-BY-SA-4.0 August 2017  13 (Above): the Atacama Large Millimeter Array (ALMA) built at an altitude of 5000m on the high dry desert plain near Cerro Chajnator in Chile which has an observing capability up to 1THz. Image courtesy of NRAO/AUI. At right is a remarkable radio image obtained by ALMA showing what is thought to be a protoplanetary disk around star HL Tauri which is 450 light years away. The resolution of this radio image is higher than that normally obtained by the Hubble Space Telescope. Image credit: ALMA (ESO/NAOJ/NRAO). Suspended over a natural crater, it is not steerable and has a diameter of 305m. However, some tracking is possible by moving the suspended focus platform via a series of cables. The Arecibo telescope has now been surpassed by the similar Chinese Fivehundred-metre Aperture Spherical radio Telescope (FAST). While it has a diameter of 500m, only a 300m diameter part of the surface is used at any given time (see SILICON CHIP, October 2016 www. siliconchip.com.au/Article/10327). Simulating a larger diameter radio telescope Due to the impracticality of building a fully steerable radio telescope beyond about 100m in diameter or even a partially steerable suspended type of telescope such as Arecibo or the Chinese FAST, it is necessary to find a way of simulating Composite image of radio galaxy CWAT-01 (centre) and its environment. Bremsstrahlung (breaking) radiation at X-ray wavelengths is shown as the grey to red colour gradients in several surrounding galaxies as well as CWAT-01. A 1.4GHz image is shown in white and was obtained from the VLA telescope. Image courtesy of NRAO/AUI and Vernesa Smolcic, MPIA. 14  Silicon Chip larger diameter instruments. This can be done with a technique called “interferometry”. In effect, interferometry superimposes the signals from two dishes and then uses the phenomenon of constructive and destructive interference in order to extract information. However, while this greatly increases the resolution of the simulated telescope, the signal collecting ability is not the same as a single large telescope of equivalent size. Interferometry is applicable to both radio and optical telescopes. In both cases, sophisticated mathematical transforms are used to combine the individual telescope outputs into a single image. The particular mathematical signal processing technique to produce the final image is known as “aperture synthesis”. In aperture synthesis for radio telescope arrays it is necessary to electronically record both the amplitude and phase of the signals from each telescope for later reconstruction into a single image. The process of doing this in an optical telescope array is much more difficult due to the high level of optical and mechanical precision required and explains why aperture synthesis has been done with radio telescopes since the 1950s but only since the 1990s with optical telescopes. For a description of optical interferometry at the Very Large Telescope run by the European Southern Observatory in Chile, see the video “Interferometers siliconchip.com.au and Extreme Interferometry: the VLT Interferometer” siliconchip.com.au/l/ aad8 Aperture synthesis and other sophisticated interferometric techniques requires the use of fast computers to do the appropriate mathematical transformations. The fundamental mathematical technique involved in aperture synthesis is the Fourier transform, which decomposes a complex signal into a series of sine waves that represent that signal. It is based upon the idea that any time-varying signal, even a square wave, can be represented by a sufficient number of individual sine waves of different frequency, phase and amplitude added together. In order to obtain high quality images in a reasonable time there needs to be many different possible distances between a number of pairs of telescopes. The separation distance between any given pair of telescopes in an array is known as the baseline. The number of baselines that can be generated for a given number of fixed position telescopes “n” is (n2-n)÷2 and the number of samples that can be obtained at once is n2-n . For example, the Australia Telescope Compact Array with six telescopes would have 15 possible baselines and 30 simultaneous signal samples. More than 15 baselines are possible, however, the telescopes are moveable and so a large number of baselines can be generated and in addition, the rotation of the Earth can be used to add more baselines by taking measure- Comparison of optical image and radio image to same scale showing the large amount of hydrogen gas surrounding galaxy NGC 6964 imaged in the 21cm hydrogen line. The origin of this gas is not yet fully understood, the possibilities being that it was blown out of the young galaxy, it is left over material from a young universe or it represents starless satellite galaxies. Image courtesy of Prof. Tom Oosterloo. siliconchip.com.au/l/aada ments at different points in the Earth’s rotation. In addition to multiple baselines, multiple frequencies can be observed to obtain greater detail about an object of interest. In modern equipment, an extremely large number of frequencies can be simultaneously observed which also makes for a huge data processing exercise requiring the fastest computers. In fact, some telescope facilities have even been built before there were sufficiently fast computers to process the data that they generated. For aperture synthesis, in configurations when antennas are close together, a large region of sky is visible at low resolution. When far apart, a small region of sky is visible at high resolution. The effect of moving antennas closer The origin of the 21cm 1420MHz signal from a neutral hydrogen atom is the electron spin flipping, resulting in the emission of a radio signal. This frequency can easily pass through interstellar dust clouds that would otherwise block light and it also passes through the Earth’s atmosphere with ease. siliconchip.com.au or further apart is somewhat like the zoom lens on a camera. You can experiment with an online simulator at siliconchip.com. au/l/aad9 Aperture synthesis telescope arrays The Allen Telescope Array (ATA) is a radio telescope array conceived for the purpose of simultaneous astronomical observations as well as SETI (Search for Extraterrestrial Intelligence). Located 470km from San Francisco, it has 42 6.1m dish antennas but 350 are planned for the future. Its operational frequency range is 500MHz to 11.2GHz. It has had various funding difficulties and the SETI Institute that runs it is always in search of donations toward the project, the biggest donor being the Paul Allen Family Foundation. (Paul Allen was a co-founder of Microsoft). The ATA is recognised as an important technological milestone towards the building of the Square Kilometre Array (SKA). The ATA has been used to produce numerous scientific papers in the area of conventional radio astronomy which is a great outcome, since the discovery of any extraterrestrial civilisations is unlikely. The operational status of the telescope can be seen live at siliconchip. com.au/l/aadb ALMA (Atacama Large Millimetre Array) is a 66-telescope array built in the Atacama Desert of Chile at an August 2017  15 Comparison of images taken at different wavelengths showing different features. In particular, note the difference between images taken at radio wavelengths and visible light. altitude of over 5,000m. It is designed to operate at submillimetre and millimetre wavelengths from 0.3mm to 9.6mm (or 999GHz to 31GHz). The dishes are either 7m or 12m in diameter and their surfaces are made to an astonishing accuracy of 25 microns or around one quarter of the thickness of a sheet of paper. The individual 115 tonne telescopes can be moved around the site and set at baselines of between 150m and 16km by a special 130-tonne transporter; there are no railway tracks to move the dishes as at some other sites. ALMA is the most expensive radio telescope project on Earth, costing US$1.4 billion and it has been fully operational since early 2013. It is run by an international partnership between Europe, the United States, Canada, Japan, South Korea, Taiwan, and Chile. When in operation, the telescope produces an incredible 120Gbits of data per second per antenna or 8 Terabits per second for the whole facility. This data is fed into a special dedicated supercomputer called a correlator which has 134 million CPUs and can perform 17 quadrillion calculations per second while consuming 140kW of electricity. Despite its enormous power, it is 16  Silicon Chip designed to perform processing of telescope data only; it can do nothing else. The high altitude of the site makes work difficult so the control centre is set at a lower altitude. There is a talk about ALMA by Australian, Anthony (Tony) Beasley who is Director of the National Radio Astronomy Observatory (NRAO) in the US at “Earth’s largest radio telescope -- ALMA | Tony Beasley | TEDxChar- Radio image at 1.3mm wavelength (231GHz) from ALMA facility showing edge-on view of the dust disc around the star AU Mic (32 light years from Earth) suggesting the early stages of planetary formation. The scale bar represents 10 astronomical units (au). One au is the average earth-sun distance. Image courtesy of NRAO/AUI. siliconchip.com.au Getting into radio astronomy on the cheap! You don’t necessarily need multi million dollar equipment to get into radio astronomy. Amateur radio astronomy is well within the reach of individuals these days. Take a look at siliconchip.com.au/l/aadv Examples of things that an amateur can monitor are the upper atmosphere, emissions from Jupiter, the Sun and our galaxy siliconchip.com.au/l/aadw Some samples of signals you can expect are at siliconchip.com.au/l/aadx Other things you can do is detect meteors as they enter the atmosphere and monitor the 21cm hydrogen spectrum line (siliconchip.com.au/l/aady) using a domestic satellite dish antenna. See the Radio Jupiter article at siliconchip.com.au/l/ aadz Also see siliconchip.com.au/l/aae0 and siliconchip. com.au/l/aae1 There is a commercially available amateur radio telelottesville” siliconchip.com.au/l/aadc Also see “ALMA | Atacama Large Millimeter/Submillimeter Array [HD Timelapse]” siliconchip.com.au/l/ aadd for a time lapse video of the telescope in action. Another excellent video is “ALMA Deep Sky Videos” at siliconchip.com. au/l/aade Also see “The history of ALMA (the Atacama Large Millimeter/submillimeter Array)” siliconchip.com.au/l/aadf The Australia Telescope Compact Array (ATCA) is located outside of Narrabri, NSW, 500km NW of Sydney. It comprises one fixed and five moveable telescope dishes of 22m diameter, each weighing 270 tonnes. The telescopes are moved along a straight 3km section of railway track. Operated by the CSIRO, it is part of the Australia Telescope National Facility. It can also be operated in conjunction with other telescopes such as the single 64m dish at Parkes, NSW and a 22m dish near Coonabarabran, NSW to The US Arecibo Observatory in Puerto Rico. In addition to radio astronomy, this telescope is also used for radar astronomy (creating radar images of solar system objects) and in atmospheric observations. It sits in a natural depression. For its radar work it has four transmitters, one of which has an effective radiated power of 20TW at 2.38GHz. Limited beam steering is achieved by moving the receiver, suspended from three towers. siliconchip.com.au scope, the Spider230, which is described at siliconchip. com.au/l/aae2 Also have a look at “Amateur Radio Astronomy - Filippo Bradaschia ” siliconchip.com.au/l/aae3 Interferometric techniques are discussed in the video. Making radio observations of the Sun can be done with a software-defined radio (see the first of a series of project articles on this topic at siliconchip.com.au/l/aae4) and a domestic satellite dish is described at “Amateur Radio Telescope using SDR” siliconchip.com.au/l/aae5 An amateur shows equipment at his observatory at “BAA Radio Astronomy Group ” siliconchip.com.au/l/aae6 Radio telescope interferometry is also possible for amateurs. See videos at “140MHz wide band interferometer ” siliconchip.com.au/l/aae7 and “140MHz wide band interferometer 2” siliconchip.com.au/l/aae8 and also some other videos on that author’s YouTube channel. form a very long baseline array. The ATCA welcomes visitors, see siliconchip.com.au/l/aadg and you can see its operational status at siliconchip.com.au/l/aadh It was featured in the TV series Sky Trackers. There is a video showing the telescopes being repositioned called “Driving Radio Telescopes at the Compact Array” siliconchip.com. au/l/aadi Also, see a time-lapse video of the telescope in action at “Australia telescope compact array time-lapse” Impression of what the night sky looks like in radio wavelengths, superimposed over an optical image of the land area. The radio image is at 4.85GHz and is what would be seen with a 100m telescope from Green Bank, West Virginia. Image courtesy of NRAO/AUI. August 2017  17 Artist’s conception of the Allen Telescope Array in its eventual completed form. The longest baseline will be 900m in its final form; it is 300m with the present 42 antennas. Image credit: Jcolbyk, CC-BY-SA-3.0 siliconchip.com.au/l/aadj The Karl G. Jansky Very Large Array (VLA), located in New Mexico, USA, consists of 27 25-metre, 209-tonne telescopes, in a Y-shaped array. Each arm of the Y is 21km long and telescopes can be parked at a number of stations, giving a total of 351 independent baselines. The frequency coverage is 74MHz to 50GHz or 400cm to 7mm. It was built from 1973 to 1980 but received a major upgrade in 2011 and was renamed in 2012. It has been featured in a number of movies. See video “Beyond the Visible: The Story of the Very Large Array ” siliconchip.com.au/l/aadk The One Mile Telescope near Cambridge (UK) was the first to use Earth rotation aperture synthesis. Now decommissioned, it was built in 1964 and Decommissioned antennas at the Mullard Radio Astronomy Observatory near Cambridge, UK, include the single-trackmounted “One Mile Antenna” (1964) in the foreground and the two “Half Mile Telescope” (1968) dishes in the background. The remains of the 4C Array (1958) are on the right. Image credit: Cmglee, CC-BY-SA-3.0. comprised two fixed parabolic dishes and one moveable dish on one half mile (800m) of railway track. The total baseline was one mile or 1600 metres. The moveable dish could be parked at 60 different stations along the track to generate different baselines. The track was straight to within 9mm and the track was gradually raised from one end to the other by a total of 5cm, to allow for the curvature of the earth. The dishes each weighed 120 tonnes and were 18 metres in diameter. The operating frequencies were 408MHz and 1407MHz. The telescope was the first to produce radio maps with a resolution greater than the human eye. As aperture synthesis requires extensive computing power, it used the At- las computer at Cambridge University with up to 128kB of 48-bit word ferrite core main memory to compute the necessary inverse Fourier Transforms. The original 1966 paper describing this telescope can be seen at siliconchip.com.au/l/aadl A 1965 video describing the telescope can be seen at “Superscope Probes Space (1965)” siliconchip.com. au/l/aadm (first minute only). Also see “Watching the Skies HD 720p” siliconchip.com.au/l/aadn for a drone fly-over of the site. The Square Kilometre Array (SKA) will have a collecting area of one square kilometre and be 50 times more sensitive than any other radio telescope. It is being built in South Africa and Australia. See previous SILICON CHIP articles in December 2011 (siliconchip.com.au/Article/1232) and The Karl G. Jansky Very Large Array with telescopes in close configuration. Image credit: Photo by Dave Finley, Courtesy NRAO/AUI 18  Silicon Chip siliconchip.com.au Sample image from ATCA showing the evolution with time (decimal years) of supernova 1987A which many SILICON CHIP readers may remember happening. The remnant is changing and getting brighter as the hot gases continue to expand and generate a shockwave. The gas from the explosion is colliding with gases previously ejected from the dying star. July 2012 (siliconchip.com.au/Article/599). The Very Long Baseline Array (VLBA) is a radio interferometer array consisting of ten 25m, 218 tonne antennas spread across the far reaches of the United States from Hawaii to the Virgin Islands giving an 8611km baseline. It makes observations from 90cm to 3mm or 0.3GHz to The Westerbork Synthesis Radio Telescope (WSRT) as seen from the air. Like the ATCA, it has a linear configuration. siliconchip.com.au Comparison of images taken from the VLA and the VLBA telescopes of galaxy M87 located 50 million light years away. The much higher resolution VLBA image shows a detail near the black hole at the centre of the galaxy with a gas jet formed into a beam by powerful magnetic fields. Image credit: NASA, National Radio Astronomy Observatory/National Science Foundation, John Biretta (STScI/JHU), and Associated Universities, Inc. 96GHz in eight different bands and two sub bands. It can be used, if necessary, with other telescopes such as at Arecibo and the Very Large Array (VLA). The Westerbork Synthesis Radio Telescope (WSRT) is located in the Netherlands and consists of fourteen 25m dish antennas in a linear arrangement 2.7km long. Ten dishes are fixed and four are moveable on tracks. The telescope was completed in 1970 but was upgraded from 1995-2000 and further upgraded recently. Frequency of operation is 120MHz to 8.3GHz. The telescope is often used with others for very long baseline interferometry. APERTIF or APERture Tile In Focus is the latest upgrade in which the detectors have been replaced with focal plane array types. This means the instrument will have a 40 times greater field of view than the old detectors which had a field of view about the size of the moon and it will be used for surveys of the Hydrogen line and searches for pulsars and more. The greater field of view enables sky surveys at a much faster rate than previously possible. See video “Westerbork Synthesis Radio Telescope (WSRT) and APERTIF” siliconchip.com.au/l/aadq August 2017  19 A brief history of radio astronomy – and some of the people who     Radio emissions from space were first observed by Karl Jansky at Bell Telephone Laboratories in 1932 who was investigating sources of static that might interfere with a 10 to 20 metre transatlantic radio service. military radar. During WWII there was a great development of radar and other radio equipment and this technology was vital for later developments in radio astronomy. The first radar reflections from the moon were made in 1946. After WWII a radiophysics group was established at Cambridge University, developing radio interferometric techniques along with the technique of earth rotation aperture synthesis. In 1974 Sir Martin Ryle won the Nobel Prize in Physics for this work. In the 1940s Australian scientist J.G. Bolton was the first to associate a radio source with an optical image, in Grote Reber’s home-built 9m dish antenna built in his back yard in Wheaton, Illinois. Karl Jansky – the first person to detect radio emissions from space in 1932. He identified three sources of static – close thunderstorms, distant thunderstorms and a source of unknown origin which was determined to be from space – the centre of the galaxy in particular, which we now know to contain a supermassive black hole. Grote Reber was a radio amateur and amateur astronomer who combined his interests to become a pioneer radio astronomer. (He was in fact the world’s only radio astronomer for from 1937 to 1946). He extended the work of Jansky and in 1937, as an amateur, built his own 9-metre dish radio telescope. His first attempts to find signals at 3.3GHz and 900MHz failed but in American Grote Reber, at one time the world’s only radio astronomer – and Tasmania’s adopted son. 20  Silicon Chip 1938 he was finally successful in finding signals at 160MHz, confirmingJansky’s finding. He went on to make the first “radio map” of the sky in 1941. His telescope still exists today in Green Bank, West Virginia. In the 1950s, Reber found he could not compete with large and expensive instruments being built then so he moved his focus to radio signals in the 500kHz to 3MHz range. These signals from space are however reflected by the ionosphere. In 1954 he moved to Tasmania where he found it to be a quiet radio environment and ideal for observations of this nature. He made observations late at night after the night side of the ionosphere deionised. He died in Tasmania in 2002. Grote Reber speaks about his telescope in this video recorded in 1987, a fascinating talk and highly recommended: “Grote Reber (NRC) :: The Wheaton 31.5 ft Paraboloid: Construction and First Measurements” siliconchip.com.au/l/aadr Grote Reber reminisces about his work in radio astronomy in an article entitled “A Play Entitled the Beginning of Radio Astronomy” at siliconchip. com.au/l/aads There is a Grote Reber Museum at the University of Tasmania: siliconchip.com.au/l/aadt In 1942, radio waves from the sun were first discovered by Stanley Hey who was investigating interference to New York Times of 5th May 1933 announcing the discovery of radio waves from space. The article notes that “its intensity is low”, an ongoing problem for radio astronomers. siliconchip.com.au     pioneered it this case the Crab Nebula. After an earlier 1944 prediction by Hendrik van de Hulst of an emission from hydrogen at 1420MHz, Harold Ewan and Edward Purcell at Harvard University detected hydrogen emission in 1951. They published the work after it was corroborated by Dutch and Australian astronomers. This lead to hydrogen maps being made of our galaxy which revealed its spiral structure. A team lead by Australian J. Paul Wild in the mid 1950s led to the discovery and explanation of solar radio bursts from the sun. In 1955, Bernard Burke and Kenneth Franklin discovered radio emissions from Jupiter. In 1961-63 unusual quasi-stellar objects were discovered at Cambridge University, with accurate position determination by the newly-commissioned radio telescope at Parkes, NSW. The discovery of the first interstellar molecule 1963 was made by observations of spectral frequencies. Many other molecules have since been discovered and an Australian group at Monash University was very active in this area. In 1964 the cosmic microwave background radiation was discovered by accident by Arno Penzias and Robert Wilson at Bell Labs. They found a persistent background noise in a horn A 12-element Yagi array on the cliffs at Dover Heights (Sydney), used in sea interferometry, which was operated at 100MHz and used to identify 104 radio sources. Three of the most important discoveries made were radio waves from the Crab Nebula (due to a supernova explosion observed by the Chinese in the year 1054) and the galaxies Centaurus A and Virgo A. (Courtesy CSIRO) siliconchip.com.au Tg VRF Robert Wilson and Arno Penzias, awarded the 1978 Nobel Prize for Physics after “accidentally” discovering evidence of the “big bang”. antenna which they could not remove, even after taking all possible precautions to minimise electronic noise in the antenna such as cooling the receiver to liquid helium temperatures. The noise was eventually determined to come from all areas of the sky and was considered to be evidence of the Big Bang. For this finding they won the Nobel Prize in Physics in 1978. In 1978 Jocelyn Bell Burnell and Antony Hewish, working at the University of Cambridge, discovered pulsars. Australia had a leading role in the discovery of many more pulsars. Many people may not be aware of the existence or importance of radio astronomy that once occurred in suburban Sydney’s Dover Heights in the eastern suburbs, Rodney Reserve in particular. During WWII it was a military radar site but was taken over by the CSIRO Division of Radiophysics, who were there from 1946 to 1954. Many major LOCAL OSC PHASE DIFF VLO 0LO VIF VRF PATH COMPENS Tpc VIF CORRELATOR Scheme for combining signals from two radio telescopes in astronomical interferometry. The geometric delay in signal arrival time Tg is corrected in the path compensator delay Tpc. In an array of telescopes all signals are obtained for all baselines and all orientations, different orientations in respect of the radio source being obtained as the earth rotates. discoveries were made there establishing Australia as a leader in radio astronomy. One technique developed there was sea interferometry, whereby a direct signal and a reflected signal were received at an antenna and combined to make an interference pattern from which the strength and size of a radio source could be determined. In 1946 Ruby Payne Scott used the interferometer to discover that radio waves from the sun come from sunspots. You can read more about radio astronomy at Dover Heights at siliconchip.com.au/l/aadu SC The Holmdel Horn Antenna, a large microwave horn antenna that was used as a radio telescope during the 1960s at Bell Telephone Laboratories in Holmdel Township, New Jersey, USA. It was designated a National Historic Landmark in 1988 because of its association with the research work of two radio astronomers, Arno Penzias and Robert Wilson. August 2017  21 Review by Nicholas Vinen Rohde & Schwarz RTB2004 Mixed Signal Oscilloscope The key features of this four-channel mixed signal oscilloscope (MSO) are a 10-bit analog-to-digital converter (ADC) giving high vertical (voltage) resolution, a large high-resolution touch screen and a built-in four-channel pattern generator which is capable of producing various different kinds of serial test signals. This is in addition to the features you’d expect such as cursors, many different measurements, acquisition modes, trigger modes, logic decoding and so on. 22  Silicon Chip siliconchip.com.au T he RTB2004 is a four-channel digital oscilloscope with bandwidth options of 70MHz, 100MHz, 200MHz and 300MHz and a sampling rate of 1.25GSa/s per channel (2.5GSa/s maximum). It comes standard with a large 10 megasample (MSa) memory. Perhaps the most immediately striking feature is the 10.1-inch (25cm) glossy capacitive touchscreen which has a resolution of 1280 x 800 pixels. It allows for a clear trace and a lot of menus and read-outs on screen at once, plus a 12-grid horizontal graticule (compared to 10 for many other scopes). Buttons and knobs control the most common functions such as changing timebase, vertical scale and offset and accessing various menus. But digging through the menus and changing options is generally done via the touchscreen. This is good because it makes the interface much more intuitive and easy to learn compared to other scopes. Normally this would mean that you would need to clean the screen regularly to keep it smudge-free but having said that, its surface seems to be treated in such a way that it doesn’t build up finger grease nearly as fast as some other touchscreens. By the way, as well as having a high resolution (for an oscilloscope), it also has excellent colour saturation and contrast. Fig.1: the orange trace shows the output of the built-in arbitrary waveform generator when set to produce a 10MHz square wave, while the mauve trace shows the noise present in an unterminated input with no bandwidth limiting (at 1mV/div). This is very low for a 300MHz scope. Quick boot-up and quiet operation The time from switching on to being able to use the scope is a very quick six seconds; some modern digital scopes take 30 seconds or longer to boot up. It’s also very quiet when operating, with very little fan noise. But funnily there is a quite an annoying faint switchmode whine when it is switched off but powered (ie, in standby). We would be inclined to switch it off at the wall for that reason alone. After switching on, it is immediately apparent that the 10-bit ADC, combined with very quiet front-end amplifiers, provide this scope with an extremely low amount of residual noise. So low that, with 1:1 probes, signals under 1mV peak-to-peak should be observable. Even the best analog scopes could not do this. The screen grab of Fig.1 shows the output of the inbuilt waveform generator at top when set to produce a 10MHz square wave (a bit rounded at this frequency), along with an unterminated input channel below, with its full 300MHz of bandwidth in effect. This is in “sampling” mode, ie, without any extra noise reduction and as you can see, the residual noise is around 400µV peak-to-peak. Limiting the bandwidth on that channel to 20MHz (still unterminated) gives the result shown in the screen grab of Fig.2, with the noise reduced to around 200µV peak-topeak. You can reduce it further with averaging if you have a repetitive signal and a reliable trigger source. Note that the high resolution of the screen means there’s room to label the graticule grid on both axes, as you can see in both screen grabs; a very handy feature. Also, in Fig.2, you can see the input configuration menu near the right side of the screen. This is typical of the type of menu used to set up various aspects of the scope. Entries marked with a circular arrow can be changed by touching on that item, then rotating the knob located in the lower-right hand corner of the front panel (or in many cases, using the alternative on-screen keyboard). Before moving on, we should note the light weight of the siliconchip.com.au Fig.2: the same traces as shown in Fig.1 but this time with 20MHz bandwidth limiting enabled for the unterminated input. As you can see, this reduces the noise level even further. The input set-up menu is visible towards the righthand edge of the display. Fig.3: the measurement set-up menu shows you both the name and an illustration of each available measurement, which can be applied to any given channel. Up to four custom measurements can be shown at once. Note that this is one of four menus (see the tabs at top). A August ugust 2017  23 2017  23 Fig.4: the second custom measurement menu, this time showing vertical (voltage)-related measurements. Take a look at the menu to the right of the measurements, which allows you to choose which of the four “places” the measurement goes into and which channel is used. Fig.5: now we are showing the menu of horizontal (timebase) related measurements. To use the Phase and Delay measurements, you must select two channels. You can also enable “statistics” to track minimum/ maximum/average values for each measurement. Fig.6: alternatively, you can simply enable “quick measurements” for one channel in which case you’ll get a display like this. You immediately get the nine most commonly used measurements all shown at once for a single channel, along with some crosshair-type cursors. 24  Silicon Chip RTB2004 at 2.5kg which, combined with its compact size (especially accounting for the large screen) of 390 x 220 x 152mm, makes it easy to move around and set up. The compact size does lead to one fairly significant tradeoff which is that there is only one set of vertical knobs (scale and offset) for all four channels. However, cleverly, the knobs are backlit by coloured LEDs and these change to the same colour as the trace of the channel that they are currently controlling. This makes it much easier to use, compared to other scopes with shared knobs. The knob backlight colour even changes to suit the “math” or reference traces, if those are currently in use. Regarding those backlighting LEDs, which you can clearly see in the lead shot and appear on many of the other on/off buttons too; they are informative and look pretty but they are too bright and if you work in a dim environment, you might grow weary of them; in a well-lit room they are fine. Other great features The list of measurements available is comprehensive and well-organised, making picking among the available measurements easy. Figs.3, 4 & 5 show most (but not all) of the measurement type selection menus, along with the measurement configuration menu down the right-hand side. One particularly handy feature is “quick measurement” mode which is activated by a dedicated front-panel button and the results are shown in Fig.6. The average, +peak and -peak voltages are shown next to the trace, along with rise and fall times, with RMS voltage, period, frequency and peak-to-peak measurements shown below (alongside the pre-existing measurements which have been moved to the left). Pressing the quick measurement button a second time goes back to the normal trace display. We also really liked the four-channel built-in pattern generator. Fig.7 shows the set-up dialog which gives you the choice of a number of different serial buses and other patterns, lets you select the transmission speed and shows you which signal is available on each of the four front-panel connection points (P0-P3). Behind this, you can see that we’ve set up an I2C signal and hooked up the two relevant outputs to input channels 1 & 2. We’ve then set up I2C serial decoding on these channels. The decoded data is shown in mauve between the two traces (showing SCL [clock] in yellow and SDA [data] in green). The RTB2004 can decode two different serial buses at once, the same or different types. Fig.8 shows a different example. This time the pattern generator is set up to produce data in CANbus format. We’ve set up both protocol decoders as the same data is broadcast in non-inverted and inverted form simultaneously, and we are able to decode both using the two separate protocol decoders. You can see the protocol decoder set-up menu at the right side of the screen. Other outstanding features of the RTB2004 include an update rate of 50,000 waveforms per second, optional 16-channel 1.25GSa/s logic analyser, optional built-in 20MHz arbitrary waveform generator, 128kpoint FFT (see the photo on page 23), a 160MSa segmented memory option and standard 3-year warranty. It also has USB device and host ports, an Ethernet LAN port and a built-in web server for remote control. Our test unit was a mixed-signal type (MSO) so it includsiliconchip.com.au ed two 8-channel logic heads along with the four standard probe kits and power cord. Some niggles While we’ve had a lot of good things to say about this scope, it does have a couple of aspects which could possibly be improved. The most noticeable of these is in regards to the responsiveness of the user interface, and the scope overall. At times it responds instantly to button presses or knob rotation while at other times, it seems to pause before updating the screen. This means that it takes a little longer to perform some tasks and it can be a bit frustrating. The most annoying aspect is when it stops updating the trace periodically. Perhaps it needs a faster processor. We would like to see more trigger options. There don’t seem to be runt or pulse-width trigger option but it does have video and serial triggering options. The “math” modes seem a little limited too, comprising addition, subtraction, multiplication, division and the separate FFT mode (sometimes lumped in under “math” on other scopes). Finally, you can only view four normal measurements at a time; with a screen this size, it should be possible to fit more (and some scopes allow for at least five). And the interface for setting up the measurements is a little clunky and this ends up being a relatively time-consuming task, especially considering it’s a feature that is in constant use (in our experience, anyway). Fig.7: here we have set up the scope’s pattern generator to produce a 400kbit I2C serial signal and are monitoring the two outputs using scope channels 1 & 2. We have also enabled the protocol decoder and the decoded hexadecimal values are shown between the two traces. Conclusion Overall, this is a very capable scope and the best midrange unit we have used for looking at low-level signals. It’s also among the easiest scopes to learn how to use, especially given the fairly large range of powerful features. While many of the features are options, many features which would be options on other scopes are standard; for example, the large standard 20 or 10MSample memory. The optional software features are higher bandwidth (>70MHz), mixed signal mode, arbitrary waveform generator, serial decoding and triggering (three types), history and segmented memory. These features can be added during or after purchase. But while have noted some criticisms above, given the unit’s overall performance compared to its price, we consider the RTB2000 series to be good value and definitely worth looking at if you are in the market for a mid-range scope. For more information, visit the Rohde & Schwarz Australia website via siliconchip.com.au/l/aad3 or email Sales.australia<at>rohdeschwarz.com Alternatively, you can make a telephone enquiry by calling SC (02) 8874 5100. Fig.8: a similar set-up to Fig.7 but this time we have set the pattern generator to produce a CANbus (controller area network) serial signal, as used in many automobiles. This is also being decoded using the protocol decoder, along with the inverted signal which encodes the same data. There’s not much to the rear panel: a 230V fused IEC socket and switch plus a LAN and USB socket. All other controls, inputs, etc are on the front. siliconchip.com.au A August ugust 2017  25 2017  25 Build An Arduino Data Logger with GPS This cheap and easy-to-build data logger has four analog and four digital logging channels and can log at intervals from one second to one minute. It runs off a lithium rechargeable cell for an operating time of up to one week (depending upon capacity) and this can be recharged by a small solar cell, so maximum logging time is virtually unlimited. It can also log coordinates from a GPS unit and interface with many different types of sensor. by Nicholas Vinen P erhaps its best feature is that it’s based on an Arduino with a few low-cost modules attached, so it’s easily customisable. Out of the box, it provides support for logging voltages, digital logic states, switch or relay states, temperature, latitude/longitude and frequency (eg, for a flow meter). If you want to log humidity, barometric pressure, light levels, RF signal strength or just about anything else, you just need to hook up a suitable sensor to the Arduino board and modify the software to read the data off that sensor. Our software will then 26  Silicon Chip do the background tasks of power management, saving data to the microSD card and so on. If you do build this data logger and expand its capability, we hope that you send us the circuit details and revised software so that we can publish it in the Circuit Notebook section of the magazine. That way, others who want to log similar data can do so easily. Our last data logger project was published in the December 2010, January 2011 & February 2011 issues. That design is now obsolete and we no longer recommend it. Our new design is much easier to set up and we are able to support it with bug fixes, should the need occur. Constructors can easily install updated software using the Arduino IDE and a USB cable. The old design was also notoriously difficult to interface to a PC, especially if you’re using a newer version of Windows than was available at the time (it was designed for Windows 7). The Arduino IDE and drivers are kept up to date for recent operating systems and in fact, since they run on Mac and Linux too, that means this data logger is suitable for a wider audience. siliconchip.com.au Data logger design We could have used an Arduino shield specifically intended for data logging which would include an SD card socket, real-time clock and a prototyping area. Instead, we decided to use separate microSD card and realtime clock modules. We had several reasons for this approach. First, the combination of individual modules costs less, even if you take into account the separate PCB and headers. Second, we are using the DS3231 realtime clock module which is more accurate than the DS1307 often installed on Arduino data logger shields. And we have used a higher capacity backup battery that’s more readily available (CR2032). Third, we may decide to produce a Micromite-based version of this data logger as well, which would be easier to do with individual modules that aren’t specifically tied to the Arduino format. With that in mind, it wouldn’t be hard to modify the software for this project to work with Jaycar's XC4536 data logging shield. For example, should you wish to build it using Jaycar's shield, the pins used by the realtime clock and SD card socket on the Jaycar XC4536 are identical to those we’re using here. So all you’d really have to change would be to swap the DS3231 library for the DS1307; a pretty simple change, but one we’ll leave up to the reader. The DS3231 module we’re using for timekeeping was described in detail in a separate article in the El Cheapo Module series, in the October 2016 issue, starting on page 33. You can view that article at www.siliconchip.com. au/Article/10296 Similarly, the microSD card interface module we’re using was described on pages 74 and 75 of the January 2017 issue and you can view that article at www.siliconchip.com.au/ Article/10510 Having decided to use those two modules, we then decided to use two more modules to round out the design. For the power supply, we’re using the Elecrow Mini Solar LiPo Charger module which is described in detail in a separate article in this issue, starting on page 44. A single-cell Li-ion or LiPo cell is hooked up to this board and provides power to the Arduino via a 5V boost regulator, ensuring it has a steady voltage supply even as the cell discharges. siliconchip.com.au This cell can be charged either from a 5V USB source, such as a computer or mains charger or via a small optional solar panel. That means the data logger can be used in a remote location and left for months at a time; as long as it gets enough sun, it will operate continuously. The other module we’re using is an optional GPS receiver. We’re recommending the VK2828U7G5LF which we’ve used on several occasions previously as it is inexpensive but works well. This is used both to ensure the real-time clock is kept accurate and to log the unit’s position. You could use a different GPS receiver but then you will have to figure out how to modify the connections. Or you can leave it off entirely if you don’t need the features it provides; the real-time clock will typically gain or lose less than one second per month without it. Features and Specifications Power supply: single Li-ion/LiPo cell with solar charging or 4.5-5.5V USB source (eg, computer or mains charger) Supply current: average ~30mA; peak ~100mA (with GPS fitted), ~50mA (without GPS) Battery life: around four days with recommended cell (3Ah); larger capacities can be used Analog inputs: 4 x 0-15V; protected up to ±60V (maximum voltage can be increased up to 60V) Circuit description The full circuit of the data logger is shown in Fig.1. For our prototype, most of the components are mounted on a prototyping shield which simply plugs into the Arduino (MOD1). The four analog inputs are available on CON1, along with a ground pin, and connect to the Arduino’s A0-A3 analog input pins via 100kW/47kW resistive voltage dividers. These allow the Arduino to sense voltages up to 15V and protect it from damage from even higher voltages, up to about 60V or -60V. These set the analog input impedance to around 147kW. The digital inputs are on a similar header, CON2 and again, a ground pin is provided. These feed through to digital input pins D2-D5 via 1kW series resistors. These are to protect the Arduino from voltage spikes, or voltages outside the range of 0-5V (up to approximately ±15V). Each of these inputs has an internal pull-up current so they will be high if unterminated. As a result, the digital inputs can be used to sense the presence of a voltage (as long as it is at least 3V) or the state of a switch or relay contact, by connecting one end to the input and the other end to ground. They can also be used to count pulses, for example, from a flow meter, up to about 10kHz. Digital inputs D0 and D1 of 1 are not used because these are also used as the serial transmit and receive pins for the console. The serial console can Digital inputs: four, compatible with 3.3V/5V logic or contact closure; protected up to ±15V Other inputs: optional GPS lat/lon logging plus 10kHz frequency counter and/or digital temperature sensor. Other sensors (I2C etc) can be used with software changes Accuracy: analog inputs ±1% typical with supply voltage calibration; frequency input ±2% typical Logging interval: defaults to six seconds between entries; 1-60 seconds range is possible Logging medium: CSV (comma separated value) format text files written to microSD card, up to at least 32GB Timekeeping: DS3231 real-time clock with battery backup, giving less than one second drift per month Other features: RAM buffering to reduce power draw; automatic time updates from GPS; logged data can be downloaded via USB serial interface August 2017  27 Fig.1: complete circuit for the Arduino Data Logger, including the optional GPS unit and DS18B20 digital temperature sensor. The rest of the circuit is comprised mainly of modules, such as the Arduino Uno, DS3231 real-time clock module, microSD card interface module and Mini Solar LiPo Charger board. be used to load data from the unit, via the USB port of a PC, avoiding the need to physically remove the microSD card. Digital pin D6 is set as an output and drives blue LED1 via a 47kW current-limiting resistor. This prevents it from drawing very much current (only about 0.1mA) but it’s only lit for a very brief period anyway, so the actual drain on the battery from driving it is almost nothing. GPS receiver interface Digital pins D7 and D8 are used to interface with the optional GPS receiver. We’re recommending the VK2828U7G5LF as it’s a good performer for the price. Keep in mind, that it has an inbuilt ceramic patch antenna so if you are operating indoors, you might get better results using a comparable unit with an external antenna. Having said that, the VK2828 works fine in typical indoor locations. 28  Silicon Chip D7 is used to drive the module’s enable (EN) pin; it’s held actively low to keep the unit in standby most of the time, resulting in a microamp-level current drain on the battery. Periodically, at a programmable interval that defaults to one hour, the Arduino will bring this pin high to switch on the GPS unit until it gets a lock (usually after about 30 seconds) or if there’s insufficient signal, until a timeout occurs (by default, after five minutes). The GPS module draws around 30mA during the time it’s powered up; if we assume the average time will be 45 seconds every hour, that works out to 30mA × 45 ÷ 3600 = 375µA average. That’s just 0.375 × 24 = 9mAh per day. Data from the GPS module appears at its TX pin (pin 3) and this is fed to digital input D8. It needs to go to this pin; we explain why below, when describing the operation of the software. The GPS module’s RX pin is left unterminated (it has an internal pull-up) as there’s no need to send any data to the module. We simply decode its "GPGGA" and "GPRMS" NMEA messages which are sent out by default once per second, at 9600 baud. The micro can detect whether a GPS module is present based on activity on the D8 pin, or lack of it. D8 has an internal pull-up enabled so that if there is no GPS module connected, it will simply sit high and so the unit will not log GPS co-ordinates. If a GPS module is detected and is giving sensible output, the latitude, longitude and number of satellites visible will be logged with each entry, along with the number of seconds since a good lock was achieved. If the GPS module fails to achieve a lock during its power-on period (ie, it times out), the last valid set of readings will continue to be logged and the number of seconds since lock will continue to increase, indicating how “fresh” or “stale” the data is. siliconchip.com.au The VK2828U7G5LF GPS module shown is an optional extra, if you want to log the unit’s location or for greater accuracy in timekeeping, as without it there will be about ±1s of drift in the clock per month. Digital pin D9 is set as an input, again with an internal pull-up, and connected to external switch S1, which is used to enable or disable logging. This is useful if you want to remove the microSD card to off-load some data; you can simply flick S1 to the off position (where it pulls D9 down to 0V) and the unit will flush any data in its RAM buffer to the SD card and then flash LED1. You can then remove the card, offload the data, plug it back in and switch S1 back on to re-enable logging. Or you can simply swap the microSD card for another card to minimise the time without logging. D9 can also be used where you have a situation where you may only want to log data some of the time. You just need to have it to be pulled low when you don’t want to log data, and pulled high or left floating when you do. This can be done with an external relay, switch, microswitch, discrete logic, another microcontroller etc. hardware in master mode so we could have used any pin. But it’s conveniently next to the other three so we connect this to the CS/SS (Chip Select/Slave Select) pin on the microSD card module. The only other two connections on that module are to 5V and ground. It has an onboard 3.3V regulator and level shifting circuitry. The DS3231 real-time clock and calendar module (MOD3) allows the Arduino to keep accurate track of time for time-stamping the log entries, even if power is lost. That module has an onboard battery backup that will last several years and its timekeeping accuracy is very good, at around ±1ppm or about one second per month. This module has 32kHz and square wave (SQW) outputs which we are not using. We’re just connecting the module to a source of 5V power and the Arduino’s I2C serial interface which is hard-coded to analog pins A4 and A5 (unfortunately, limiting us to four analog inputs if we want to use I2C). These two pins are enough to allow us to set and query the time and date from the real-time clock module. That just leaves the battery-backed power supply which is provided by the off-board Elecrow Mini LiPo Charger module. This connects to the Arduino via a standard USB cable, terminated in whatever connector your Arduino module requires; in the case of an Uno, it’s a full-size Type B (square) plug, but some Arduino clones use a mini or micro Type B connector instead. The Charger module can connect to your PC, or a USB charger, via a standard microUSB cable. When connected, it will pass through power to the Arduino but it will also charge the connected Li-ion or LiPo cell from the USB supply. Then, when USB power is removed for whatever reason (whether it’s unplugged, or a blackout etc), it will run the Arduino from that cell. SD card interface Digital pins D10-D13 are wired to the microSD card module and used to read data from and write data to the card. Pins D11, D12 and D13 are hard-wired to the SPI (serial peripheral interface) communication pins MOSI, MISO and SCK on the Arduino respectively. MOSI stands for “Master Out, Slave In”, MISO for “Master In, Slave Out” and SCK for “Serial Clock”. While D10 is designated as SS, the hardware Slave Select pin for the SPI bus, in actual fact it is not used by siliconchip.com.au The charger module that can be used with the Data Logger lets a small 5V solar panel be connected in conjunction with a Li-ion/LiPo cell, powering the module and charging the cell. The charger module will favour power coming from the micro-USB port over a cell, meaning you can also have it hooked up to a computer to act as the primary power source, with the cell being a backup. August 2017  29 Note that a Li-ion/LiPo cell has a voltage usually in the range of 3V (flat) to 4.2V (fully charged), while the Arduino expects a steady 4.5-5.5V input. The Elecrow module has an onboard switch-mode step-up regulator to provide this regulated supply. For more details, see our article on LiPo chargers, including that module, elsewhere in this issue. The Solar Charger naturally also has provision for a solar cell which can run the Arduino and charge the cell in the absence of DC or mains power. We tested our unit with a small 5V, 0.5W solar cell from Oatley Electronics which worked fine. However, we are recommending that you use a 0.8W cell which we can supply (see Parts List) as it costs about the same and will charge the battery faster, which may be important when the weather is poor. Software The software makes use of various Arduino libraries to do all the heavy lifting but even so is quite complex, partly due to the power saving features employed. We won’t fully describe how to utilise and customise the software; but we do detail how to install and run it in the panel “Software Installation”. Instead, next month we will have a detailed description of how the software operates. In the meantime, you can download and examine the source code if you already understand C++ software. Construction As you will notice from the earlier photos, our unit was built on a protoboard shield and you certainly can do the same. If you’re experienced, it will only take you a couple of hours to solder the components onto the shield and complete the point-topoint wiring on the underside to get it all working. However, it’s quite easy to make a mistake when assembling a board this way. So to make it easier and quicker, we’ve designed a double-sided, shield PCB which you can purchase from our online shop. This comes with a set of stacking headers and costs less than many suppliers charge for a protoboard. If you do decide to build the unit on a protoshield, note that it’s easier if you use 0.25W resistors with thinner leads, since then it’s possible to Fig.2: while the Data Logger can be built on a protoshield, it’s much easier to use our customdesigned shield PCB. The two main modules, connectors, LED and resistors are fitted to this shield which then plugs into the Arduino board. Refer to the text for our notes about the importance of good connections for MOD2. When using an Arduino prototyping shield, some of the connections shown in Fig.1 are made by soldering jumper wire between the solder joints on the underside of the shield. 30  Silicon Chip feed two leads into a single hole on the board when wiring up the analog input dividers. Assuming you’re going to take the easier approach and use our custom board, all you really have to do is following the PCB overlay diagram, Fig.2, and the PCB silkscreen to solder each component in place. Start with the resistors, then the rightangle headers, then LED1 (ensuring it’s orientated correctly), CON3 and then the two modules. The DS3231 module normally comes fitted with a right-angle 6-pin header and empty pads at the opposite end. You will therefore need to straighten the right-angle header pins using a pair of pliers and solder a vertical 4-pin header to the other end before soldering the module onto the shield board. This leaves the backup cell on the top, so you can change it easily if necessary. Note that if you’re using the DS3231 with a primary (non-rechargeable) CR2032 cell, you will need to de-solder the small surface mount diode on the board, in a red-tinted glass package. This prevents the module from trying to recharge the non-rechargeable cell. Having said that, the unit that we recommend you purchase from our website comes with a lithium-ion rechargeable cell so this modification is not required. We used a 6-pin female header socket with long pins, bent at right angles, to mount our microSD card module on the board. However, we found that this created intermittent problems due to the high-speed nature of the signals carried through these pins. If using this type of socket, at the very least, you should use some M2 machine screws, nuts and spacers to attach the module rigidly to the shield PCB. However, we feel that a more reliable approach would be to physically mount the module on the shield PCB using either screws and spacers or double-sided tape, then solder rigid wires (eg, from resistor lead off-cuts) between the six pads and the six pins of the module. It won’t be removable but, assuming you’ve made good solder joints, it should operate reliably. Once all the components have been fitted to the board, it’s simply a matter of soldering the four stacking headers in place and then plugging it into the Arduino board. Insert the headers from the top side of the board. siliconchip.com.au Note that soldering these headers is a little tricky since you need to make the solder joint around the long, protruding pins without getting too much solder on those pins, since they need to plug into the sockets on the Arduino board. When you do plug the shield in, be careful that the pins go into the right locations on sockets – check the markings on the board. Some Arduino boards have an extra two pins on the lower-left header which can lead to confusion. If using a GPS receiver, you will need to wire it up to a 5-way polarised header plug to mate with CON3. For the recommended VK2828U7G5LF module, first cut the white (1pps) wire on the supplied cable short, or insulate it (eg, with heatshrink tubing) like we did. You can then crimp and solder the five remaining wires to the polarised header pins. The colour coding for the wires is shown in the labelling for CON3 in Fig.2. If in doubt, refer to the VK2828U7G5LF data sheet. When finished, push each pin into the polarised block in the correct location using a very small jeweller’s screwdriver or similar implement. Troubleshooting The first thing to do if the data logger isn’t working is to plug it into your Parts List 1 Arduino Uno or equivalent, with suitable USB cable (MOD1) (eg, Jaycar XC4410, Altronics Z6240) 1 double-sided shield PCB, 68.5 x 53.5mm, coded 21107171 (supplied with set of four long pin headers) OR 1 Arduino prototyping shield (eg, Jaycar XC4482) 1 DS3231-based real-time clock module with backup battery (MOD3) (eg, Silicon Chip online shop Cat SC3519) 1 microSD card module (MOD2) (eg, Silicon Chip online shop Cat SC4019) 1 Elecrow Mini Solar Lipo Charger module with two 2-wire JST 2.0 leads (MOD4) (Silicon Chip online shop Cat SC4308) 1 Li-ion or LiPo cell with built-in protection, capacity around 3Ah (eg, from an old mobile phone or https://hobbyking.com/en_us/ turnigy-icr-18650-10c-2000mah-3-7.html or similar) 1 microSD card, capacity to suit application 1 5V solar panel of around 0.8W (optional; eg, Silicon Chip online shop Cat SC4339) 1 VK2828U7G5LF GPS module (optional; Silicon Chip online shop Cat SC3362) 1 USB charger with microUSB output (optional, for mains-powered use) 2 5-way right-angle polarised headers (CON1,CON2) 1 6-pin header socket with long pins, 2.54mm pitch (for MOD2) 1 6-pin header, 2.54mm pitch (for MOD3) 1 5-pin polarised header with matching socket (optional; CON3, for GPS module) 1 3mm blue LED 1 SPST or SPDT toggle or slide switch (S1) 1 single male-male jumper lead (for S1) various length of Kynar (wire wrap wire), ribbon cable strands, light-duty hookup wire or resistor lead off-cuts (if using a protoshield) Resistors 4 100kW 5 47kW 4 1kW The finished project with optional GPS module attached. The switch shown at centre allows you to enable/disable data logging, which lets you hot swap the microSD card or off-load data if it runs out of storage. siliconchip.com.au August 2017  31 Software Installation Once you’ve finished assembling the unit, download and install the latest Arduino IDE (if you don’t have it already). Plug the Arduino main board into your PC and launch the IDE. Before you can upload the sketch, you need to select the port on which the main board is connected. Click on the Tools menu, then Ports and select the right port from the list. It’s typically the one at the bottom. If you haven’t already, download the sketch from our website. In the ZIP package, you should find a number of libraries, each of which is also in a ZIP file. Open the Sketch menu in the Arduino IDE, then Include Library and select “Add .ZIP Library”. Navigate to the location where you saved the supplied libraries and select the first one. Repeat this process for all the libraries. You can then open our sketch (using either File→Open or by launching it from your file manager) and select the “Upload” option in the Sketch menu. You should see a progress bar in the lower right corner of the IDE fill from left the right. This will take around 15-30 seconds, depending on the speed of your computer, as it involves compiling the sketch and then uploading it to the Arduino board. If there are any errors, they will appear in the small window at the bottom of the IDE. The sketch as supplied should compile the first time. If it doesn’t, the most likely reason is that you forgot to install one of the libraries, or you already had an incompatible version installed. More likely errors are communications problems, which may suggest that you had wrong port selected. If everything seems OK but it still won’t upload, try unplugging and re-plugging the Arduino board and restarting the IDE. Assuming the upload was successful, you can check the operation of the logger using the Serial Monitor, available under the Tools menu. If you don’t see anything in the Serial Monitor, try pressing the reset button on the Arduino board. You should get an output similar to the following: SILICON CHIP Arduino Datalogger powering up RTC time updated Calibrating counter Counter calibration complete (999.30) Initialising SD card SILICON CHIP Arduino Datalogger ready GPS module might be present, checking... GPS module detected Opening log file ArduinoLog_2017-06-29_112624.csv ArduinoLog_2017-06-29_112624.csv 29/06/2017,11:26:24,0.00,0.00,0.00,0.00,1,1,1,0,20.4,1.004,,,, … Here’s a 3D render of the finished project using the shield PCB that we will supply at a later date. 32  Silicon Chip computer and use the Arduino Serial Monitor to look at the debugging messages that it’s producing. Press reset and you should get messages similar to that shown in the adjacent panel. If you get nothing, check that the port setting is correct and try re-uploading the firmware. Normally, if the firmware gets “stuck”, you can tell where based on the last message displayed on the console. If you find it’s re-starting repeatedly, or randomly rebooting, the most likely problem is in the connections between the Arduino and the microSD card. Note that the unit will refuse to start up at all if there is no microSD card inserted. If LED1 is flashing rapidly, this indicates a problem with the RTC module (2Hz) or the microSD card (4Hz). Note that, because of the buffering, you may not get any logged data output over the serial monitor or written to the microSD card for some time after start-up. If unsure, try changing the state of S1 as this will normally force the unit to flush out any logged data which is buffered. By default, you will need to wait 36 seconds (6 seconds x 6 buffer entries) after the “Datalogger ready” message to see any logged data. What happens if the battery goes flat? If you’re powering the unit from a mains USB charger and using the rechargeable cell as a back-up, you shouldn’t have to worry about this (unless your area is prone to weeklong blackouts!). But if you’re using the solar cell, it is possible that a long period of bad weather could result in the cell going flat. The power supply module does not appear to have a low-battery cut-out feature, which is why we’ve specified a cell with built-in protection. This will normally prevent it from being over-discharged. Eventually, the protection circuitry will simply cut power and the logger will shut down, leaving a slightly truncated log file. When power is restored, the cell should begin to charge and the logger should resume operation, opening a new log file. Fully discharging a lithium-ion/ LiPo cell repeatedly can shorten its life but if this happens occasionally, it should not cause any serious probSC lems. siliconchip.com.au Here’s one for the vintage radio enthusiasts . . . A power supply for battery-operated valve radios By Ian Robertson Over the years our Vintage Radio columns have featured many battery-operated valve radios with 1.5V or 2V heaters. The most recent examples were featured in July & August 2016. But batteries for these radios can be hard to get and expensive. This power supply is a neat solution. A part from some portable models, most battery-operated valve radios were intended for use on farms and in remote regions where mains power was not available. Those sets are quite collectible today but most Vintage Radio enthusiasts power them from a variety of jury-rigged power supplies, some of which are of doubtful safety. This universal power supply is easy to build and could be installed inside the battery compartment of some radios. If there is not enough space, it could be connected with two cables; one for the 1.5V or 2V filaments and one for the 90V or 135V B+ supply. Of course, quite a few battery-powered radios used vibrators to produce 34  Silicon Chip the B+ supply and if you have one of these radios with a defective vibrator section, this power supply could also provide a work-around, either temporary or permanent. The supply uses three PCBs con- nected together and is designed to fit in a standard plastic instrument case. One of the PCBs doubles as the front panel while an additional (fourth) PCB is unconnected but functions as the rear panel. There is no wiring between the three PCBs. Instead, they are butted at rightangles and soldered together, as shown in the photos. Circuit details The full circuit is shown in Fig.1. It employs two 240VAC transformers and is a straightforward analog design, avoiding the RF interference normally associated with more efficient switchmode power supplies. The top section of the circuit is for the low voltage supplies and employs an LM338 or LM317T adjustable regulator. siliconchip.com.au The circuit consists of two independent power supplies, with various voltages available to suit a wide range of batteryoperated valve receivers. Provision is made on the PCB for either a TO-3 or a TO-220-case regulator. The example shown in the photos is fitted with the LM338 regulator which comes in a TO-3 metal case. The lower section of the circuit is for the high voltage B+ supplies. Let’s describe the lower section first. It employs a mains transformer with two 15V windings connected in series to provide 30VAC. This is connected to diodes D1 & D2 and the two associated 220µF capacitors which function as a conventional full-wave voltage multiplier. In effect, diodes D1 & D2 can be regarded as two half-wave rectifiers stacked together to provide an output voltage equal to twice the peak voltage from the transformer winding. For a sinewave of 35V RMS, the siliconchip.com.au peak voltage will be peak voltage will be VAC x 1.414 and so the voltage doubler output will be about 85V, neglecting the voltage drop across diodes D1 & D2. However, in this circuit the transformer is likely to be quite lightly loaded and so the peak voltage will probably be around 48V or so, and so the output will be more than 90V DC. The actual voltage will depend on the incoming mains voltage and the load presented by the radio’s circuit. So that accounts for the voltage between the B+90V and B- terminals of CON2. Diodes D3 & D4, together with their two associated 220µF capacitors function as a halfwave diode pump rectifier. Their output is stacked on that of the full-wave voltage doubler (D1 & D2), to give a higher total output at the B+135V and B- terminals of CON1. August 2017  35 This is likely to be between 130V and 145V, depending on mains voltage and circuit loading, as before. The 330Ω resistor and three stacked 220µF capacitors provide extra hum filtering for the output while the parallel 150kΩ resistors across each 220µF capacitor are there to equalise the voltage across them. So each 220µF capacitor should have one-third of the output voltage across it. Low voltage regulator circuit While the high voltage outputs are unregulated, the low voltage circuit is a combination of regulated and unregulated supplies. It uses a second mains transformer with two 6V secondary windings connected in parallel to feed diodes D4 to D7 connected as a bridge rectifier feeding a 4700µF 16V capacitor. This provides a filtered DC output of about 8.5V (depending on loading). This is fed to the adjustable 3-terminal regulator which has three resistors connected to its ADJ terminal set to give a regulated output of 1.5V. If you want a regulated output of 2V, the shorting link must be installed across JP1. Extra filtering of the regulator’s output is provided by the 470µF capacitor connected across terminals A+ and A- of CON1. Negative outputs Battery-operated valve radios also often had C batteries to provide a negative grid voltage for the valves and this could be -3V, -4.5V or -6V. These negative rails are provided by the diode pump circuit comprising diodes D11 & D12, in conjunction with two 470µF 16V capacitors. The resulting filtered DC is fed to zener diode ZD1 via a 470Ω resistor and bypassed by an additional 470µF capacitor. A voltage divider comprising two 1kΩ resistors then provides outputs of 3V and 6V at the C-3V and C-6V terminals of CON1. If you require a C- rail of 4.5V, then ZD1 should be a 4.7V zener diode. Construction The power supply is primarily constructed on one main PCB measuring 55 x 110mm. There are also three “supplementary” PCBs, one of which mounts the 36  Silicon Chip Here’s how the four PCBs fit together, before mounting them in their case. Note this is before any insulation was fitted to the exposed mains. two power transformers and the “figure-8” mains input socket. They are 110 x 33mm. Two other PCBs, 122 x 33mm, form the front and rear panels of the project. (The set of four PCBs is available from the SILICON CHIP Online Shop for $25.00). The front PCB has holes for the power LED and also a number of holes to suit connectors commonly used in battery-powered units. The power transformer board is soldered at right angles to one edge of the main PCB via the use of the secondary windings pins (eight in all), which pass through the transformer board and solder to large pads provided on the edge of the main board. Similarly, the front panel board solders at right angles to the main board along its front edge. The photos will explain this a little more clearly! The rear panel board isn’t actually attached to the main PCB. It can actually move around a little to allow for some flexibility when fitting the project in a case. However, and this is most impor- tant, the three and four-pin DC output sockets must be passed through this panel before they are soldered in place – we’ll get back to this a little later. One other point which we’ll also cover later but should be pointed out right up front is that the 230VAC mains connections to the transformers, along with the mains input socket, all have their pins exposed ready to trap the unwary. After completion, we covered ours with liberal coating of silicone sealant for absolute safety. Begin construction by soldering in the 12 resistors – see the colour code table for identification. You should also double check their value with a DMM – especially if your eyes aren’t as young as they used to be! Some bands on resistors are also quite easy to mistake for other colours so a second check is always worthwhile. After the resistors, solder in the nine 1N4004 diodes, taking care with their polarity. The original project used 1N4148 diodes in two places but we’d prefer siliconchip.com.au Parts List – Battery Valve Power Supply 1 main PCB, 55 x 110mm (SILICON CHIP code 18108171*) 1 transformer PCB, 110 x 33mm SILICON CHIP code 18108172*) 1 front panel PCB, 122 x 33mm (SILICON CHIP code 18108173*) 1 rear panel PCB, 122 x 33mm (SILICON CHIP code 18108174*) 1 2-part plastic case, 125 x 130 x 40mm (see text) 1 15V + 15V mains transformer (T1) (Altronics Powertran M7070A) 1 6V + 6V mains transformer (T1) (Altronics Powertran M7052A) 1 PCB-mount figure-8 mains socket (CON3; element14 Cat 9248161) 1 mains lead with figure-8 plug 1 2-pin header base, PCB-mounting 1 2-pin header 1 4-pin screw terminal block, PCBmounting (CON1) 1 3-pin screw terminal block, PCBmounting (CON2) 2 M3 x 6mm screws, nuts and washers 2 M3 washers Semiconductors 1 LM338K TO-3 regulator (or LM317T – see text) 8 1N4004 silicon diodes 2 1N4148 silicon diodes (see text) 1 6.2V 400mW zener diode 1 5mm red LED Capacitors 7 220µF 63V PCB electrolytics 5 470µF 63V PCB electrolytics 1 4700µF 16V PCB electrolytic Resistors 1 100Ω 1 150Ω 2 470Ω 3 1kΩ The component overlay also shows the transformer board and the front and rear panels. Output can be taken from the screw terminals on the rear panel or from suitable sockets on the front panel, which match typical connectors used in battery valve radios. Do not neglect to insulate all the “bitey bits” on the PCB. to see 1N4004 used instead, if only to give a higher margin for inrush current. However, the PCB pattern may not allow for the slightly longer 1N4004s so if you elect to use these, they may need to be mounted vertically (obviously maintaining the correct polarity). The only other diode is zener diode ZD1 – again, of course, it is polarised. All other components are also posiliconchip.com.au 2 330Ω 3 150kΩ * A set of the four PCBs (including the two panels) is available from the SILICON CHIP Online Shop (siliconchip.com.au/shop) for $25.00. All other parts are readily obtainable from your normal parts suppliers. Resistor Colour Codes       No. 3 3 2 2 1 1 Value 150kΩ 1kΩ 470Ω 330Ω 150Ω 100Ω 4-Band Code (1%) brown green yellow brown brown black red brown yellow purple brown brown orange orange brown brown brown green brown brown brown black brown brown 5-Band Code (1%) brown green black red brown brown black black red brown yellow purple black black brown orange orange black black brown brown green black black brown brown black black black brown August 2017  37 you use an LM317T, a small “U” heatsink will also need to be inserted under the regulator. Place the LED in its holes (anode, the longer lead, closer to the edge of the board) but don’t solder it in yet. Also, don’t fit the DC output terminals (CON1 and CON2) yet – these have to be passed through the rear panel first. Transformer board The underside of the PCB assembly showing how the main board, transformer board and front panel are soldered to each other. The rear panel (right) is not secured at all but is held loosely in place by the two output sockets. The main board is soldered 2mm down from the edges of the transformer board and panel. The two mains transformers, along with the 2-pin mains socket, mount on the transformer board. T1, the 2 x 15VAC transformer, is closest to the mains socket. Solder the mains socket in first, then solder the primaries of both transformers in place but leave the secondaries for the moment – they’re used to solder the transformer board to the main board. Only after soldering the two boards together should you trim the primary pins (eliminating the possibility of trimming the wrong ones!) Soldering the vertical boards larised – the 220µF and 470µF vertical capacitors (don’t mix ‘em up!) and the main 4700µF filter capacitor which, as you will note from our photos, is a vertical type which lies horizontal on the board. As well as soldering it in place, a dob of silicone sealant underneath will help stop any movement. 2-pin header JP1 is the last small component to solder in (fairly obviously, it’s not polarised!). All that’s left is the LED and the TO-3 regulator. Leave the LED for the moment but solder in the regulator, which can only go in one way. Note that it is spaced above the board by a Alternative mounting for a TO-220 regulator instead of a TO-3. SILICON CHIP PCBs will have a hole for the OUT pin, rather than the method shown here. 38  Silicon Chip washer at each end, held in place by its mounting screws/nuts. This allows a little air circulation under the case, assisting cooling and also avoids metal-to-glass stressing which might otherwise occur. Incidentally, it is possible to use an LM317T TO-220 regulator instead of the now-harder-to-get LM338 TO-3 device shown in our photographs. The TO-220 “ADJ” and “IN” pins mount to the same two holes as the TO-3. A hole has been provided on the PCB for the “OUT” pin as well. If As we mentioned earlier, two of the three smaller boards are soldered at right angles to the main board. Because it’s lighter, solder the front panel board on first by lining up the rectangular pads on it with the matching rectangular pads on the main board, with the front panel about 2mm down from the main board (see photo). Tack one pad first to ensure the panel is straight with respect to the main board, then solder all four pads so the panel is secured. Repeat for the transformer board. It On the top side, the main board and front panel sit flush together so they can slip into the guides in the case. Here you can clearly see the silicone sealant we applied to the exposed mains terminals after testing. Mains voltages can bite you! siliconchip.com.au “Surgery” required on the case halves to allow the transformers and the assembly to fit inside the case. The lighter grey area is where we ground out about half the case thickness with a Dremel for the transformer clearance; other areas are where the mounting pillars were removed (none of these are used). is soldered to the main board in the same manner as the front panel (ie, 2mm down from the underside of the main board); the difference, of course, is that it is along the side of the main board. The bottom edges of both the front panel and the transformer board should line up. There is one more solder joint to be made, that is to join the transformer board and the front panel via the long pads on each which, if you’ve done everything correctly, should line up. You’ll need a pretty fine iron bit to get in between T2 and the board. Construction is now almost finished. All that remains is to poke LED1 through the front panel and solder it to the main board, then to fit CON1 and CON2 and the rear panel. Pass both of these terminal blocks through the panel (they’re a loose fit) then into the main board. The fourway socket goes to the edge of the main board. Solder both blocks in place. At the same time, slip the rear panel over the mains socket and you’re all done. Mounting in its box Because there are relatively high DC voltages present (not to mention 230VAC mains) we would always pre- fer to see the assembled boards mounted in their case. The PacTec CM6-150 box we used (use this instead siliconchip.com.au/l/ aaef) is almost perfect – but that “almost” bit causes a few problems. The dilemma is that the box is not quite deep enough to fit the transformers. It’s about 2mm too shallow. There are also a few mounting pillars which we don’t use and, in fact, interfere with the mounting. In our prototype, this was overcome by grinding off the mounting points with a Dremel grinder (or similar) – easy – and then removing about 2mm thickness from the inside of the case above where the transformers sit – same tool, not quite so easy! The photos show how we achieved this. When completed it’s a tight fit, but it’s a fit! The board assembly can be mounted so the front panel is flush with the front of the case, which puts the rear panel inset about 13mm (that’s the way the mounting guides are moulded in the case) or vice-versa; ie, inset the front panel 13mm and have the rear panel flush. It’s your choice. Testing First of all, beware the mains-carrying pads on the transformer board You can choose whether to have the front panel flush with the case and the rear panel inset (as shown here) or the opposite. siliconchip.com.au – you should only coat these after testing (just in case!). 1. Connect a meter to the B+ (135V) and B- connections using the 3-way pluggable screw terminals. 2. Connect power. The LED should light. 3. You should measure close to 145V. If not, switch off immediately and check your work. 4. If all is well, check the A+ and A/ C+ terminals. You should see very close to 1.5V with JP1 not shunted. Shorting JP1 should change the A voltage to 2V. 5. The A (filament) voltages will measure the same irrespective of load. 6. Check the C voltages – you should see close to 6V and 3V. If all this checks out, you can disconnect AC power and only then apply the silicone sealant to the exposed mains points on the transformer PCB, then fit the top cover and your power supply is ready for use! Modifications Here are some simple modifications you can make to adapt the power supply for less common radios. 45V tap: 1. Add a 470Ω resistor between the anode of D3 and adjacent end of R13 (labelled on the PCB overlay). 2. Connect wire to junction of C10 and C11 and bring it out the rear. This will be your +45V connection. 4V output for A+ filament supply: 1. Replace R1 with 330Ω. 2. Fit jumper to JP1. 3. Replace the LM338K regulator with an LM1085IT-ADJ. Install it on a small heatsink as per picture earlier in these instructions. This regulator has a lower dropout voltage than the LM317 or LM338. This should allow up to about 700mA current draw before hum appears on the output. Different bias voltages If you remove ZD1, the bias voltages will become (approximately) -7V and -3.5V. Changing R6 and R7 (or replacing them with a pot of about 2.2kΩ) will allow you to vary the bias to whatever your radio needs. Note though, that the bias voltage is now not regulated and will change a little if the load on the filament circuit changes. Consider this if your radio has filament rheostats. SC August 2017  39 CIRCUIT NOTEBOOK Interesting circuit ideas which we have checked but not built and tested. Contributions will be paid for at standard rates. All submissions should include full name, address & phone number. Raspberry Pi Elevator Display & Annunciator The maintenance crew at my workplace got sick of replacing the incandescent globes which indicate the current floor in our lifts. These are special 24V bulbs which are now becoming quite difficult to obtain and expensive. Rather than persevere with the old floor level indicators, I decided 40  Silicon Chip to completely replace the display with a 16x4 backlit alphanumeric LCD driven by a Raspberry Pi. In addition to displaying the current floor, the LCD also shows the time, date and the current temperature. As well, with the addition of a speaker, it can announce the floor numbers. The circuit can be used in any ap- plication which requires the detection of changing voltages and the software can be easily modified to make different kinds of announcements. The circuit makes use of two input/output (I/O) expander ICs in order to interface with a standard 16x4 alphanumeric LCD and switches in the lift cage which indicate the current floor. The Raspberry Pi’s I/O siliconchip.com.au pins can only tolerate 3.3V, hence the use of the 5V I/O expander IC1 to communicate with the 5V LCD. IC2 could run off either 3.3V or 5V as it’s primarily intended to detect contacts closing to ground. IC1’s GP0-GP5 pins are configured as outputs and these connect to the reset (RS), enable (EN) and data (D4-D7) pins of the LCD respectively. The Raspberry Pi controls IC1 over a 2-wire I2C bus, connected in parallel to the SDA (data) and SCL (clock) pins of both IC1 and IC2 and to GPI/O pins 3 and 5 on the RPi. IC1 and IC2 have different I2C addresses, due to the differing configuration of their A0-A2 address inputs, hence the RPi can address them one at a time. Since A0-A2 of IC1 are connected to ground, its address is 20 (hexadecimal) while A0 of IC2 is tied to +5V, giving it an address of 21 (hexadecimal). The MCP23008 (8-bit) and MCP23017 (16-bit) I/O expanders, like many micros, have internal configurable weak pull-up currents which can be enabled or disabled for each I/O pin. These are utilised to sense when the lift cage switches pull those pins to ground. Most lifts will close contacts to ground, and nine inputs of IC2 are shown connected directly to these switches. However, some lifts may have switches which connect the pin to a +24V bus instead. Transistor Q1 is configured to invert this and pull pin GPB4 (pin 5) of IC2 low when that input goes high. In some applications, you may need a similarly connected transistor for each I/O pin. Besides the speaker connected to its audio jack (to make voice announcements) and the 5V regulated power supply (not shown), the only other hardware attached to the Raspberry Pi is a 1-wire digital temperature sensor (IC3) so that the LCD can show the ambient temperature in the lift. Editor’s note: we’ve explained how this sensor can be attached to a Raspberry Pi in past articles; see the March 2016 issue on pages 34-37; www.siliconchip. com.au/Issue/2016/May/4-Input+ Temperature+Sensor+PCB+For+ The+Raspberry+Pi Note that you could use a passive high-sensitivity speaker for this project, such as the types fitted with 3.5mm jacks and intended for use with computers and tablets. If you want to use a regular speaker, you will need a small amplifier and suitable power supply. The software The software that runs on the Raspberry Pi is written in Python. There are two different versions of the software. One plays an MP3 file each time the lift moves to another floor. The other uses speech synthesis to provide the announcements. The former will provide a more natural sound while the latter avoids the requirement to record a series of MP3 files and may prove more flexible if adapted for other applications, where more complex announcements may be required. The main Python script is launched from the /etc/rc.local script so that it runs at boot time. It constantly monitors the inputs of IC2 and if the states change, it either launches mpg321 to play an MP3 file (first version) or espeak to produce the synthesised voice (second version). The software requires the free libraries from Adafruit called “Adafruit_I2C.py”, “lcd23008.py” and “Adafruit_MCP230xx.py” to drive the LCD and the I/O expander ICs. These are included in the download package and should be placed in the same directory as the main script (“lift_light.py” or “lift-lightwith-espeak.py”), both of which are available from the Silicon Chip website. The following steps are required to set up the software: run sudo apt-get update run sudo apt-get upgrade to bring your Raspberry Pi software up to the latest version 3. run sudo apt-get install alsa-utils to install the sound utilities. 4. run sudo ‘echo snd_bcm2835>> /etc/modules’ to load the sound module, then reboot the RPi (sudo reboot) to enable sound 5. run sudo apt-get install mplayer espeak espeak-gui to install the MP3 player and voice synthesiser software 6a. if using the MP3-based version, record an MP3 for each floor named “01.mp3”, “02.mp3”, “03.mp3”, etc and copy them to the RPi. Edit the script “lift_ light.py” and change the paths after each invocation of mpg321 to refer to these files (sample MP3 files are included in the download package) 7b. if using the voice synthesised version, run espeak-gui and choose the required language (eg, English). Once finished, you can test it from the command line by running the following commands (a=male voice, b=female voice): a. espeak “Hello from Silicon Chip” b. espeak -ven+f3 “Hello from Silicon Chip” 7. if you are using a version 2 Raspberry Pi, edit the script and change this line: lcd = Adafruit_CharLCDPlate( busnum = 0) to use: busnum = 1 8. set up the software to start at boot, using commands similar to the following by changing where the scripts are stored (if not in /root): sudo ‘echo sudo python /root/ lift_lights.py>>/etc/rc.local’ sudo ‘echo sudo python /root/ lift-lights-with-espeak.py>> /etc/rc.local’ Bera Somnath, Vindhyanagar, India. ($95) 1. 2. Circuit Ideas Wanted Got an interesting original circuit that you have cleverly devised? We need it and will pay good money to feature it in the Circuit Notebook pages. We can pay you by electronic funds transfer, cheque (what are they?) or direct to your PayPal account. Or you can use the funds to purchase anything from the SILICON CHIP on-line shop, including PCBs and components, back issues, subscriptions or whatever. Email your circuit and descriptive text to editor<at>siliconchip.com.au siliconchip.com.au August 2017  41 Circuit Notebook – Continued Distributed temperature sensing using an ATmega8 and DS18B20 sensors This circuit allows you to place digital temperature sensors in up to four different locations and display their readings in Celsius or Fahrenheit. It is also equipped with an independent alarm system for each sensor. The unit is built around four DS18B20 digital temperature sensors, an Atmel AVR ATmega8A microcontroller and a 16x2 Alphanumeric LCD module. The DS18B20 comes in a plastic TO-92 or waterproof package and provides a direct digital read-out of its own temperature, from -55°C to 42  Silicon Chip +125°C with ±0.5°C accuracy over the range of -10°C to +85°C. Each DS18B20 has a unique 64-bit serial code and its 1-wire interface requires only one port pin for communication. The micro identifies and addresses devices on the bus using each device’s unique 64-bit code. This allows multiple sensors to function on the same 1-wire bus. Thus, distributed temperature-sensing is simple as one micro can be used to control several DS18B20s distributed over a large area, using either a single cable or a number of cables wired in parallel. As shown in the circuit, the data lines of all sensors are connected together and on to PD0 (pin 2) of microcontroller IC1. A 4.7kW pull-up resistor is connected between that pin and the 5V supply. All four sensors, plus microcontroller IC1 are powered from the same 5V rail. IC1 reads out the temperature from each sensor and displays the readings across both lines of the LCD. The screen switches to showing the alarm temperature values if one of the alarm setting pushbuttons (S3-S6) is pressed and held. To view the alarm temperature siliconchip.com.au sensor 1, press and hold A1 (switch S6). While holding S6, press the up or down buttons (S7 and S8) to change the alarm threshold. When S6 is released, the LCD will return to displaying the temperature readings. The same procedure can be used to view or change the thresholds for the other sensors, holding switch S5, S4 or S3 down instead. When the respective button is released, the alarm settings are saved into the EEPROM of the micro and will be retained even if power is lost. Alarm LEDs1-4 are off when each sensor temperature is below the alarm threshold. When the temperature of a sensor rises above that threshold, the respective LED flashes and piezo sounder PB1 produces a tone since output PD6 (pin 12) is driven high. To reset all the four alarm settings concurrently, to 0°C, press and hold both key A1 and key A2 (S5 & S6) simultaneously for one second. It is also possible to set all the alarms to 25˚C or to 50˚C by pressing and holding keys A2 and A3 (S4 & S5) or A3 and A4 (S3 & S4) together, respectively. Switch S9 turns all the alarms on or off. It can be switched to the off position (pulling input PD7, pin 13, low) the first time the circuit is powered up since all the alarm thresholds are initialised to 0°C and otherwise they would immediately go off. Once the thresholds have been set, S9 can be switched to the “on” position. The selector switch for Celsius and Fahrenheit, S2, is connected to input pin PD1 (pin 3) of the micro and pulls this pin low when set for Fahrenheit display. Power comes from a 9V battery, via power switch S1 and reverse polarity protection diode D1. It is then regulated to 5V for the micro and temperature sensors using a standard 7805 linear regulator, REG1. The software, named “distributed temperature sensing.bas”, is written in BASCOM and the source code siliconchip.com.au can be downloaded from the Silicon Chip website. It is compiled into a HEX file using the free BASCOM trial compiler, before being uploaded to the ATmega8 chip. The BASCOM compiler is available at the following URL: www.mcselec.com/index.php? option=com_docman&task=doc_ download&gid=139 At power up, the software identifies the unique code for all the sensors on the bus. It does this by using an initialization sequence that consists of a reset pulse from the micro, followed by a presence pulse from each sensor on the bus. In the next stage, the micro issues a “skip ROM” command (CC hex) which allows the micro to access the memory of each sensor. To initiate a temperature measurement and A-toD conversion, the micro must issue a “Convert T” (44 hex) command. Following the conversion, the resulting thermal data is stored in the 2-byte temperature register in the sensor’s scratchpad memory and the DS18B20 returns to its idle state. In the main loop of the software, the micro issues five commands for each sensor in turn: 1. A reset pulse to start communications. 2. A “Match ROM” command (55 hex) to allow the micro to address a specific sensor on the bus. 3. A “Verify” command to verify if a sensor with the expected ID is available on the 1-wire bus. 4. A “Scratchpad” command (BE hex) to allow the micro to read the contents of the scratchpad (temperature information). 5. A “Read” command to read data from the 1-wire bus into a variable. Each time the temperature of a sensor is successfully read, the LCD is updated to show its value and the code then compares the temperature reading against the alarm threshold in order to determine whether it needs to trigger the alarm. Mahmood Alimohammadi, Tehran, Iran. ($50) Silicon Chip Binders REAL VALUE AT $16.95 * PLUS P & P Are your copies of SILICON CHIP getting damaged or dog-eared just lying around in a cupboard or on a shelf? Can you quickly find a particular issue that you need to refer to? Keep your copies safe, secure and always available with these handy binders These binders will protect your copies of SILICON CHIP. They feature heavy-board covers, hold 12 issues & will look great on your bookshelf. H 80mm internal width H SILICON CHIP logo printed in gold-coloured lettering on spine & cover Silicon Chip Publications PO Box 139 Collaroy Beach 2097 Order online from www. siliconchip.com.au/Shop/4 or call (02) 9939 3295 and quote your credit card number. *See website for overseas prices. August 2017  43 eap h C g U sinA sian nic o r t El e c d ul e s Mo im J y b 8 t r P a Row e Li-Ion and LiPo Charger Modules These modules are designed to charge Lithium-ion and Lithium-ion polymer cells. One is low-cost and has a simple design, while the other sports an inbuilt DC-DC boost converter to provide a regulated output voltage from the Li-ion/LiPo cell, since its voltage varies as it charges and discharges. A s noted in the feature article on page 88 of this issue, lithiumion (Li-ion) and lithium-ion polymer (LiPo) cells and batteries are rapidly overtaking all earlier kinds of rechargeable energy storage. They're now being used in just about all mobile and cordless phones, in the USB Power Bank devices used to recharge them, in laptop and tablet PCs and in many portable power tools. Not only that, but it now looks like Li-ion/LiPo batteries are the preferred power source in the most successful current generation electric cars, as well as providing some small scale grid storage. So it's not surprising that Li-ion/ LiPo charging modules have now become readily available on popular internet venues like eBay and AliExpress and we will be looking at three examples in this article. From here on, we’re assuming that you are already familiar with the operation of Li-ion/LiPo cells. If not please read the primer article on page 88. Basic charger modules Probably the most common charger modules you'll find on the web are those based on the TP4056 charge controller chip, like the one shown in the photo at lower right. These modules are quite tiny, measuring 44  Silicon Chip only 26 x 20mm and they're currently available for just a few dollars each, even in small quantities. There are a few minor variations but most are very similar to the one pictured; and they are all slight variations of the circuit shown in Fig.1. Some are fitted with a micro-USB type B socket on the input side, while others have the slightly larger and more rugged mini-USB type B socket. You might choose this type since microB sockets can be a bit fragile and can even part from the module PCB when you're removing the USB cable. Having said that, micro-B cables are very common and cheap as they are used to charge most modern smartphones so that’s a fairly strong reason to prefer the micro version, even if it’s a bit more fragile. As shown in Fig.1, there's little in one of these modules apart from the TP4056 controller chip itself. Made by Chinese firm Nanjing Top Power ASIC Corp, the TP4056 comes in a compact SOIC-8 package and provides all of the functions of a single-cell Li-ion/LiPo battery charger, powered from a 5V USB-compatible supply. It follows the standard CC-CV charging protocol, with a maximum current of 1000mA (1A) in CC (constant current) mode and a maximum voltage of 4.2V (±1.5%) in CV (constant volt- age) mode. Charging is automatically terminated when the charge current falls to 10% of the programmed value. The charging current in CC mode can be programmed by changing the value of the Rprog resistor connected between pin 2 of the IC and ground. As supplied, the module has a 1.2kW resistor fitted, corresponding to a charging current of 1000mA. If you want a lower charging current, you can select a higher value resistor – as shown by the table at lower right in the diagram. For example, if you replace the resistor with one of 2.0kW, the charging current in CC mode will drop to around 580mA. However, that should only be necessary if the cell you’re charging has a capacity of less than 1Ah which would make it quite small, and even some cells under 1Ah would be OK being charged at 1A; if in doubt, check the manufacturer’s ratings for that cell. As well as performing all of the charge control functions, the TP4056 also controls two indicator LEDs to signal the charger's current state. Red LED1 glows brightly during both charging modes (CC and CV) and ceases glowing when charging is terminated. Green LED2 only lights when charging is terminated. Both LEDs remain off if the USB input voltage is too low (<4.0V) or there is no cell or battery connected. siliconchip.com.au Note that if you want to power the charger from the USB port of your PC or laptop, it would be a good idea to change the value of Rprog to 2.4kW so that the charging current is reduced to around 500mA; this is the maximum that should be drawn from the USB port of a PC (even though many ports will allow you to draw 1A if you try, at least for a short period). But if you are powering the charger from one of the 5V/1A USB plug packs, Rprog can be left at its default value of 1.2kW. That's about it for the basic versions of the USB powered Li-ion/LiPo charger. They're cheap as chips but they actually do quite a good job of charging single cells and parallel-cell batteries. Do keep in mind though that the TP4056 is a linear device, utilising an internal P-channel Mosfet to reduce the incoming supply voltage of say 5.5V down to the charging voltage of the cell, which could be as low as 3V when fully discharged. At a 1A charge current, that’s a dissipation of (5.5V - 3V) × 1A = 2.5W which is quite substantial for an SOIC-8 package and it’s likely to get quite hot under this condition (even more so if you run the chip at its maximum input supply rating of 8V). This won’t cook the chip since it has thermal regulation, which essentially means that it reduces the charging current if it gets too hot. But it does mean that it will take longer to charge the cell if you run into thermal limiting and the charging process won’t be terribly efficient. Considering the size and cost of these modules, that really isn’t a problem. Fancier versions In addition to the basic charger modules, there are more elaborate versions available as well. One of the most popular of these is shown on the next page. It's made by the firm Elecrow, based in Shenzen, China, and is about four times the size of the basic modules, measuring 68 x 49mm. The circuit is shown in Fig.2. The actual Li-ion charger section is based around IC2 at the top. This is a Consonance CN3065 chip, which functions in much the same way as the TP4056 device used in the basic modules. As before, the CC mode current level is set via the resistor Rprog connected between pin 2 (Iset) and ground, and the default value of 2.0kW for this resistor gives a charging current of 900mA. The CN3065 again follows the siliconchip.com.au Fig.1: circuit diagram for the basic TP4056 module. Note that many modules of this type will differ slightly from this circuit diagram. standard CC-CV protocol, with mode switching at 4.2V±1% and charging terminated when the current in CV mode drops to 10% of the programmed CC level. An interesting extra feature is that the cell voltage level at which the device switches from CC mode to CV mode can be raised above 4.2V by adding an external resistor between pin 5 (BAT) and pin 8 (FB). This will result in it reaching full charge sooner. As with the TP4056, the CN3065 provides outputs to drive two LEDs. LED1 lights during charging, while LED2 lights when charging has terminated. Incidentally, the CN3065 is in a very tiny (3 x 3mm) DFN-8 leadless SMD package. Another nice feature of the Elecrow PSB01012B charger is that it provides a choice of two DC inputs. One is via CON2, the mini USB input socket, while the other is via CON1, a JST 2.0mm socket designated as the input from a solar photovoltaic panel. (A second JST 2.0 socket [CON3] is used for the Li-ion cell connection.) Schottky diodes D1 & D2 are used to feed the two inputs to IC2, so no input switching is required. Note that the D- and D+ USB data lines of CON2 are taken through to USB output socket CON4, a standard USB type A socket. That's because the PSB01012B is not just a charger but in effect a USB Li-ion power pack as well. It's also the reason for on-off switch S1, in series with battery connector CON3. But note that S1 will need to be in the ON position for charging to take place. The other half of the Elecrow PS- B01012B module provides a regulated +5V supply from the varying output of the Li-ion cell. This is the function of the circuitry around IC1, REG1 and IC3, in the lower half of Fig.2. IC1 is the actual output voltage regulator. This is an Intersil ISL97516 device, described as a high frequency, high efficiency step-up (boost) voltage regulator which operates in a constant frequency PWM mode. It's in a very small MSOP-8 package. The ISL97516 operates at a nominal frequency of 620kHz or 1250kHz, selected by connecting pin 7 (Fsel) to ground or pin 6 (Vdd). As you can see from Fig.2, in the Elecrow module it's programmed for 620kHz. The switching FET inside the device has a max- This TP4056 module shown uses a micro-USB[2] connector, but there are some that instead use mini-USB[1]. August 2017  45 Fig.2: circuit diagram for the Elecrow PSB01012B charger module which utilises a CN3065 instead of the TP4056 detailed earlier (the CN3065 is functionally identical to the TP4056). imum current limit of 2.0A and an on-resistance of 200mW. As a result, it's claimed to deliver over 90% conversion efficiency – quite impressive. The input voltage range of the ISL97516 is rated at 2.3-5.5V, which is well suited to its application here. The output voltage range is specified as 5-25V. The actual output voltage is determined by the proportion of the output voltage fed back to pin 2 (FB) of the device, via a resistive divider. In the Elecrow module, the divider formed from the 43kW and 15kW resistors programs it to give an output of 5V. Other attractive features of the ISL97516 include sensing of the current in the switching FET for thermal overload protection and a soft start feature which allows slowing down of the internal oscillator's startup by connecting a capacitor from pin 8 (SS) and ground. As you can see in the Elecrow module, a 27nF capacitor is used for this. The regulated 5V output from IC1 appears across the 47µF capacitor at the cathode of diode D3 and is then filtered before being fed to pin 1 of the USB output connector CON4. 46  Silicon Chip So that's the boost converter/regulator section. But what about the rest of the module's circuit, involving REG1 and two op amps in IC3? This additional circuitry is basically to monitor the Li-ion/LiPo cell voltage, and signal if it drops below a safe level. REG1 is a Micrel MIC5205-2.5 low noise LDO regulator, used to derive a 2.5V±1% reference from the cell voltage. This is fed to op amps IC3a and IC3b which are used as comparators. The second input of each “comparator” is fed with a proportion (0.6875) of the cell voltage, derived by the resistive divider formed by 150kW and 330kW resistors. This voltage is fed to the positive input of the IC3a comparator and the negative input of the IC3b comparator. As a result, when ever the divided-down cell voltage is above +2.5V, IC3a turns on LED3 to indicate that the cell voltage is OK. By contrast, if the divided-down cell voltage falls below +2.5V, IC3a turns off LED3 and IC3b turns on LED4 to indicate that the cell is nearing the limit of safe discharging. This occurs at 2.5V ÷ 0.6875 = 3.64V, a little above the minimum recommended discharge voltage to achieve the best cell lifespan. So the Elecrow charger module with its inbuilt +5V output regulator provides significantly more capabilities than the basic modules. It actually provides all of the functions needed for making your own USB Power Bank, using a Li-ion or LiPo cell/battery of your own choosing. Plus it has the ability to charge your Li-ion/LiPo cell from a solar panel. So although it will cost you significantly more than one of the basic modules, it's still good value for money. Trying them out I tried a couple of the basic TP4056based charger modules with both a single 18650 Li-ion cell and a battery of two parallel-connected 18650 cells. The chargers did everything that could be expected from them, charging the cells repeatedly with no problems – apart from the micro-B USB input socket breaking away from one of the modules when I tried to unplug the siliconchip.com.au track to pin 3 of IC1 and soldering it to output pin 1 of IC3a instead. However, note that this would cut off the output at the aforementioned cell voltage of 3.64V, which is a little high; ideally, alarm LED4 should light before the cell is discharged to the point where the output switches off. A second threshold in the range of 3.0-3.3V would do the trick, but that would require a number of extra components. Smaller Elecrow module The Elecrow charger module is a more advanced version of the smaller module, and provides a 5V regulated supply from the Li-ion cell.[3] cable from the USB plug pack. Hence my suggestion to prefer the mini-USB socket version. I also tried out one of the fancier Elecrow PSB01012B modules, although this did involve getting hold of some cables with the very small JST 2.0 connectors (for the Li-ion cell cables, to connect to CON3). As a charger, this one worked just as well as the basic modules. But where it really shone was on the output side, being able to provide a regulated +5V output (or reasonably close to it; about 4.85V) for the USB device connected to CON4's output, even for a load drawing 500mA and with a partly discharged Li-ion cell with a terminal voltage down to about 3.8V. In fact, it kept providing this regulated output voltage even when the Li-ion cell dropped down below 3.0V, after about 40 minutes. Quite impressive! (But not recommended if you want your cell to last a long time.) It might seem to be nit-picking, but I'd like to have seen the Elecrow module's regulated USB output closer to the nominal +5V under load than 4.85V. If you calculate the expected output voltage for IC1, you get 1.294V x (43kW ÷ 15kW + 1) = 5.0V, so this is likely a component tolerance issue, requiring trimming. This could be achieved by measuring the actual output voltage and then paralleling the 15kW resistor with a higher value SMD resistor, by soldering it on top. For example, in my case, the output needs to be raised by (5.0V siliconchip.com.au 4.85V) ÷ 4.85V = 3.1%, so a resistor of 15kW ÷ 0.031 = 483,870W or say 470kW should do the trick. I also think that ALARM LED4 should ideally be a red one, not another green one as it is at present. It's right next to green LED3, making it difficult to see when LED4 has lit up. You could fix this by de-soldering LED4 and fitting a red LED in its place. My only other complaint about the Elecrow module was that the very small slider switch used for power switch S1 was very flimsy. Perhaps it had been damaged in transit, but at one point the tiny actuator almost came out of the switch body – not a good sign. I also think that it would be a good idea if the unit could be set up to automatically switch off the output if the cell voltage drops too low, to prevent damage from over-discharge. Some Li-ion and LiPo cells have internal over-discharge protection circuitry but many do not. It would be possible to modify the module to provide this function, by cutting the It was only after I had checked out the Elecrow PSB01012B module that I learned about their other “mini” module. Luckily I was able to get a hold of one of these quickly, in order check it out as well. As you’d expect from the circuit (Fig.3), its performance as a Li-ion cell charger is very close to that of its bigger brother – it just takes a little longer to charge, because of the lower default charging current level. It functions in a very similar manner but is significantly smaller (46 x 32mm), costs less and they have made some tweaks to the design. It uses the same CN3065 chip for charging as the larger module. Unlike the larger module, it does not have a power switch, so the load is always powered. But I was particularly interested in measuring the performance of its DC-DC boost converter, because of its greater simplicity. And here I was pleasantly surprised, because the converter in the mini module was just as good as the one in its big brother. Even though its output voltage under 250mA of loading was slightly lower at 4.80V with a cell voltage of 3.84V, it only dropped to 4.78V when the cell voltage fell to the recommended minimum of 3.0V. So it might be a lot simpler, but it’s just as impressive in terms of conversion efficiency. There isn’t much going on underneath the Elecrow module, except for a few tracks and the eight through-hole pads provided for D+ and Dbiasing resistors.[3] August 2017  47 Fig.3: circuit diagram for the smaller Elecrow charger module. The DC-DC boost converter is much simpler than the larger Elecrow module and is based around an ETA1036-50 synchronous converter chip (IC2; SOT23-5). This allows for a drastic simplification of the boost converter to a 2.2µH inductor, four SMD capacitors plus the IC. Q1 allows the incoming 5V from USB or the solar cell to power IC2 directly, bypassing the cell. The other differences are as follows. Firstly, the input power socket is a micro type-B, rather than mini. Secondly, the output current capability is lower, at 500mA compared to 1A. They have also added a JST 2.0 2-pin output connector in parallel with the USB output, and added a pass-through function, which feeds the input voltage directly through to the output when it is present, to reduce the load on the cell. There are a couple of drawbacks to this module, though. Note that the USB and Solar inputs are wired in parallel so there’s a possibility of current being fed back into the USB source, which would be bad. Also, if the USB sup- The mini Elecrow module is a decent bit smaller (46 x 32mm) than the larger variant (68 x 49mm).[4] 48  Silicon Chip ply voltage is high enough, Q1’s body diode could allow current to pass into the cell, bypassing IC1 and possibly leading to over-charging. This is likely a design oversight and will probably be fixed in future revisions, but could be solved by placing a diode in series with Q1; a notable omission from the design. The bottom line Overall then, all of these modules seem to work quite well. The basic charger modules are fine if you just want to charge a Li-ion/LiPo cell (or two in parallel), although I would recommend the version with a mini-B USB input socket rather than a microB socket, for the greater robustness. With the enhanced Elecrow PSB01012B and mini variant, the main reason to go for the larger PSB01012B module is for its “through path” for the USB signal lines between input and output and for its use of the more reliable mini-B USB input connector. One final note: if you want to use either a basic charger module or one of the fancier modules to charge one of the flat pack LiPo cells, you’ll probably need to get a matching charging cradle to make reliable connections to the contacts on the end of the cell. These cradles are available at a quite low cost from sites like eBay or AliExpress, although some of them come with their own inbuilt chargers. Finding the charging modules You can purchase the modules featured in this article from the Silicon Chip online shop, at the following links. Postage within Australia is a flat rate of $10 per order. [1] TP4056 1A Li-ion/LiPo charger with mini USB socket – $2.50 each; www. siliconchip.com.au/Shop/7/4305 [2] TP4056 1A Li-ion/LiPo charger with micro USB socket – $2.50 each; www. siliconchip.com.au/Shop/7/4306 [3] Elecrow CN3065-based 1A Li-ion/ LiPo charger with 1A step-up circuit, USB pass-through and power switch; 68 x 49mm, mini type-B USB input, full-size type-A USB output, two JST cables included – $35.00 each; www. siliconchip.com.au/Shop/7/4307 [4] Elecrow CN3065-based 1A Liion/LiPo charger with 500mA stepup circuit; 46 x 32mm, micro typeB USB input, full-size type-A USB output, three JST cables included – $15.00 each; www.siliconchip.com. SC au/Shop/7/4308 siliconchip.com.au IT, COMMS & TECH LEARN ABOUT ...POWE R OVER ETHERNET PLAY YOUR MUSIC WIRELESSLY Thanks to Bluetooth® and Wi-Fi technology you can now stream your favourite music on your smartphone, computer or tablet to a sound system, without the need to plug in the 3.5mm audio cable. The 10m Bluetooth range gives you the convenience to have your phone in your pocket or plugged into your charger on the other side of the room. Wi-Fi models allow you to stream music to Wi-Fi speakers across your house, connected to your wireless network. 5 PORT POE SWITCH YN-8074 WALLPLATE 119 $ Reduces the need for mains power at each IP camera location, for instance, powering them from a central supply. 100m range. • 4 x PoE (RJ45), 1 x Uplink (RJ45) • 65W total (30W per port max. or 15.4W per port across 4 ports) WITH BUILT-IN AMPLIFER AND BLUETOOTH® CONNECTIVITY AA-0519 Replace that bulky amplifier powering your ceiling speakers with this clever wallplate. There is power and AUX connections on both sides of the plate, and Bluetooth technology to stream music from your Smartphone. Includes 12V mains adaptor. • 2 x 15WRMS (4Ω) Class-D amplifier PoE (Power Ov er allows you to po Ethernet) w cameras, teleph er IP ones and other netw orking equipment via a Cat 5 cable without th e have a separate need to power source availabl e. The technology allo ws transfer of electrical po wer, along with data, over twisted pair cables. JUST $ 99 IN-CEILING WI-FI SPEAKERS CS-2468 WAS $149 14 95 19 95 $ Pipe music throughout the house over your wireless network. Multi room functionality - play different songs in different rooms. Sold as a pair. • 6.5” 2-Way • 2 x 50WRMS amplifer $ $ 59 95 PASSIVE POE SPLITTER FOR GIGABIT POE INJECTOR YN-8040 ADAPTOR KIT YN-8410 SURVEILLANCE YN-8414 This device adds power inline to a single NOW Power wireless access points via a Cat5 cable without the need to have a separate power source. 99pr SAVE $50 Limited stock. Company owned stores only. Not available online. $ Splits the PoE into a regular ethernet and 12VDC plug to power IP cameras. 100m range. network cable. Mains powered. ETHERNET OVER POWER ACTIVE PA SPEAKERS WITH BLUETOOTH® EXTEND YOUR NETWORK OVER MAINS POWER YN-8355 A great way to add music to your rumpus room, outdoor dining area, garage, etc. Sold as a pair. 5.25” 30WRMS CS-2470 WAS $249 NOW $219 SAVE $30 6.5” 50WRMS CS-2472 WAS $299 NOW $249 SAVE $50 $ FROM 219pr SAVE UP TO $50 Use this Powerline Ethernet Adaptor to extend your Ethernet network connection over already-installed mains power connections. Simply plug the main unit into mains power and an Ethernet cable from your router. Place the receiver unit in another part of the home or office up to 300m away. Ethernet speeds up to 500Mbps allow HD streaming, fast file transfers, and more. Simple plug and play installation. 119 $ FATHER'S DAY 3RD SEPTEMBER ANDROID OTG HUB & CARD READER DOCK WC-7765 Convenient way to access expanded storage on Dad’s Android device. • 3 x USB 2.0 ports, 1 x SD slot FATHER'S DAY RECHARGEABLE WATERPROOF SPEAKER WITH BLUETOOTH® TECHNOLOGY XC-5213 Dad can stream music and take calls from his Bluetooth® enabled Smartphone while camping, by the pool, or in the bathroom. Phone not included. 14 95 $ Catalogue Sale 24 July - 23 August, 2017 FATHER'S DAY $ 69 95 NOISE CANCELLING HEADPHONES WITH BLUETOOTH® TECHNOLOGY AA-2130 Perfect for Dads who travel on planes or noisy public transport. • Rechargeable • Folds flat 139 $ FATHER'S DAY $ 24 95 USB TO AUDIO & MIC CONVERTER XC-4953 Connects to a spare USB port and provides a microphone input, and stereo headphone output - ideal for use with headsets. To order phone 1800 022 888 or visit www.jaycar.com.au CONNECT YOUR ARDUINO® WITH... ... WI-FI, ETHERNET & USB In the 21st century, connectivity allows us be in touch with people and devices. All the shields and modules on this page can help you connect your Arduino project- whether it’s to something in the same room like an infrared remote control or even a device on the internet on the other side of the world. YUN WI-FI SHIELD XC-4388 Harness the power of the Yun Shield to get your Arduino® online. Containing a tiny Linux computer with Wi-Fi, Ethernet and USB, the Yun Shield sidesteps the limitations of an Arduino® by putting a much larger, faster processor directly under its control. Connect devices like webcams, sound cards and USB stick. $ 7995 $ 34 95 $ ESP-13 WI-FI SHIELD XC-4614 Uses the ESP8266 Wi-Fi module to get your Arduino® connected. Controlled via simple ‘AT’ text commands, the Wi-Fi Shield can scan and connect to networks, and is powerful enough to even turn your Arduino® into a webserver. WI-FI/ETHERNET SHIELD WITH AIRPLAY/DLNA AUDIO XC-4548 159 $ Adds audio streaming via Wi-Fi to your Arduino® project for DLNA and AirPlay compatible devices. Receive audio from smartphones and other Wi-Fi devices. 39 95 $ USB HOST EXPANSION BOARD XC-4456 Adds a MAX3421E USB host IC to your Arduino® project. The downloadable library includes examples for reading from a keyboard or mouse as well as a variety of game controllers. 39 95 ETHERNET EXPANSION MODULE XC-4412 If you haven’t tried Arduino® networking, or prefer a wired option over Wi-Fi, this Ethernet Shield is a great place to start. Built-in examples to demonstrate webservers, telnet clients and even how to get the time using NTP. Includes a microSD card slot. ... BLUETOOTH® 19 95 $ $ BLUETOOTH® V2.0 MODULE XC-4510 With Bluetooth® available on smartphones and many computers these days, Bluetooth® makes for an easy, short distance way to send data. This XC-4510 module supports the SPP profile, allowing data to be sent just the same as it would be sent to a serial port. 29 95 $ BLUETOOTH® V4.0 BLE MODULE XC-4382 As Bluetooth® standards improve, and with iOS reducing support for the SPP protocol, this XC-4382 Bluetooth Module brings the latest Bluetooth® 4.0 standards to your Arduino® as well as connecting to computers and smartphones. ... INFRARED & RF 59 95 BLUETOOTH® V4.0 SHIELD XC-4549 Based around the ZBmodule Bluetooth® 4.0 module, the XC-4549 also provides breakouts for many Arduino® pins and is designed to allow smartphone app control of an Arduino® board. VERO BOARD XC-4426 INFRARED TRANSMITTER & RECEIVER MODULES ULTRA MINI EXPERIMENTERS BOARD HP-9556 Despite wireless technologies, the InfraRed remote control is still an important part of our lives. Using the XC-4426 IR Transmitter module, you can emulate many remote controls, putting most household entertainment appliances under your Arduino’s control. Paired with the XC-4427 to help learn the codes that control all these devices, your own custom entertainment control project is a possibility. INFRARED RECEIVER XC-4427 $3.95 INFRARED TRANSMITTER XC-4426 $4.95 • 20 holes (D) x 16 holes (W) with links and strips (bus rails) every 2 holes • Can be snapped apart to make two boards • Supplied as a pair, end-to-end Page 50 FROM 3 $ 95 RF TRANSCEIVER MODULE XC-4522 2.4GHZ WIRELESS TRANSCEIVER MODULE XC-4508 The XC-4508 Module is a compact 2.4GHz digital radio module which can transmit and receive at high speeds via its SPI interface. It is based around the popular NRF24L01 IC and there are compatible libraries for Arduino® use via the Library Manager. XC-4427 4 $ 95 9 $ 95 Another compact module similar to XC-4508, but running on the 433MHz band, and featuring an external antenna socket allowing larger antennas to be installed (small antenna included). This module is based on the NRF905 IC and also boasts high throughput via SPI. IC EXPERIMENTERS BOARD HP-9558 19 95 $ Follow us at facebook.com/jaycarelectronics • 30 holes (D) x 50 holes (W) with a "link"/"Strip" (bus bar) pattern enabling alternate V+ and earth rails. • Alphanumeric markings on grid pattern. 6 $ 95 Catalogue Sale 24 July - 23 August, 2017 ARDUINO® PROJECT OF THE MONTH WI-FI WIRELESS POWER SWITCH This kit is a combination of the RTC Power Point Timer and a Wi-Fi Environmental Datalogger as requested on one of our avid readers. We figured it sounds handy, and since everything is better with Wi-Fi, we got it working. The Arduino serves up a basic webpage which can be viewed on a computer or phone, and clicking links on the page triggers the Arduino to send a signal like the remote from the wireless remote. Finished Project. KIT VALUED AT $114.75 SEE STEP-BY-STEP INSTRUCTIONS AT www.jaycar.com.au/wi-fi-power-switch WHAT YOU WILL NEED: WI-FI SHIELD XC-4614 LEONARDO BOARD XC-4430 REMOTE CONTROLLED MAINS OUTLET MS-6148 PROTOTYPING SHIELD XC-4482 433MHZ TRANSMITTER ZW-3100 YOU’LL ALSO NEED ABOUT 300MM OF WIRE. $34.95 $29.95 $19.95 $15.95 $13.95 XC-4614 SEE OTHER PROJECTS AT www.jaycar.com.au/arduino XC-4430 XC-4482 NERD PERKS CLUB OFFER BUY ALL FOR $ ZW-3100 8995 SAVE OVER $20 MS-6148 DON'T FORGET THE ESSENTIALS 85 ¢ 3 /m $ 95 4 $ 50 28 PIN HEADER TERMINAL STRIP RAINBOW CABLE 16 CORE STACKABLE HEADERS HM-3211 • Vertical Launcher • 0.1 (2.54mm) • Snap apart to make any length ALSO AVAILABLE: 40 PIN HEADER TERMINAL STRIP HM-3212 $0.95 WM-4516 $3.95/m or $99/30m roll Colour coded strands of insulated conductor bonded together in a flat cable. • Sold per metre or per roll HM-3208 Build a stackable shield, or make your current shield stackable. Alternatively, shorten the pins to make female headers just like the Duinotech main boards. 5 pieces. 14 95 15 95 $ $ BREADBOARD WITH 830 TIE POINTS PB-8815 Ideal for electronic prototyping and Arduino® projects. Labelled rows and columns. Adhesive back for mounting. • 200 Distribution holes • 165(L) x 54(W) x 9(H)mm PROTOTYPING BOARD SHIELD XC-4482 Provides solder-pad access to all of the Arduino®'s pins, and a large area of isolated pads. • Includes reset button 16 95 $ 5 $ 95 ea 150MM JUMPER LEADS 40 PIECE A pack of 40 jumper leads of various colours for prototyping. Ideal for Arduino® and DIY projects. Each flexible lead is 150mm long with pins to suit breadboards or PCB headers. PLUG TO PLUG WC-6024 SOCKET TO SOCKET WC-6026 PLUG TO SOCKET WC-6028 $ 29 95 RESISTOR PACK 300-PIECES RR-0680 LED PACK 100-PIECES ZD-1694 This assorted pack contains 5 of virtually This assorted pack contains 3mm and 5mm each value from 10Ω to 1MΩ. LEDs of mixed colours. Even includes 10 x 5mm mounting hardware FREE! See website • 0.5W 1% mini size metal film for full contents. See website for full contents. • Red, green, yellow, orange LEDs SEE OTHER NERD PERKS CLUB OFFERS ON PAGE 7 To order phone 1800 022 888 or visit www.jaycar.com.au See terms & conditions on page 8. Page 51 HARD DRIVE POWER CABLES HARD DRIVE DATA RECOVERY 19 95 $ $ 2.5" USB 2.0 SATA HDD ENCLOSURE XC-4681 Accommodates 2.5” HDD (up to 2TB capacity) and features a micro-B USB socket. Easy installation. • Transfer Rate: up to 30Mbps A range of SATA and eSATA data/power cables for use with computers and external serial ATA devices. HDD POWER TO 2 X HDD SOCKETS PL-0750 $4.95 SATA TO SATA PL-0978 $5.95 SATA RA TO SATA PL-0981 $7.95 HDD POWER TO SATA PL-0758 $5.95 HDD POWER TO 2 X SATA PL-0759 $7.95 44 95 $ SATA/IDE TO USB 2.0 HARD DRIVE ADAPTOR XC-4150 Perfect tool to backup or transfer large amounts of data between drives. Supports up to 3 hard drives simultaneously. ALSO AVAILABLE: SATA TO USB 3.0 ADAPTOR XC-4149 $39.95 79 95 USB 3.1 TYPE-C SATA HDD DOCKING STATION XC-4672 Connect an internal SATA drive to any USB Type-C equipped notebook or computer. Accepts 2.5” and 3.5” drives. Plug & play. Up to 430Mbps transfer rates. LINE INTERACTIVE UPS WITH LCD FROM 139 $ Ideal for laptops, network attached stored devices, game consoles or media players. 1TB 2.5" XC-5680 $119 2TB 3.5" Designed for surveillance systems. XC-5682 $199 FROM 119 $ 74 95 90W UNIVERSAL LAPTOP POWER SUPPLY MP-3476 9 $ 95 IEC MALE TO 3PIN FEMALE - 150MM PS-4100 Supplied with 9 different connectors to suit a wide variety of different laptops. • Voltage range: 12 - 22V • Current: 6A (max) • 150(L) x 58(W) x 37(H)mm FATHER'S DAY 4 HARD DISK DRIVES $ Protect computers from power failure. Initiates shutdown procedures in mains power blackouts. Ensures steady power supply during voltage drops/fluctuations. 360W - 650VA MP-5205 $139 900W - 1500VA MP-5207 $319 FROM $ 95 Full range available online or in-store. Ideal for connecting a standard powerboard to a UPS etc. • SAA approved ALSO AVAILABLE: IEC FEMALE TO IEC MALE PS-4108 $8.95 19" RACK MOUNT CABINETS WE ALSO SELL RACK MOUNT ACCESSORIES - SHELVES, CABLE SUPPORT, CABINET PANELS, PATCH LEAD PANEL ETC. Ideal for studios, PA, sound reinforcement, IT, or phone systems installations. HB-5182 $ FROM FROM 64 95 159 SAVE $10 FROM 239 $ $ SAVE $20 SAVE $30 EQUIPMENT CABINET ALUMINIUM FRONT PANEL FIXED FRAME CLEAR TEMPERED GLASS DOOR SWING FRAME CLEAR TEMPERED GLASS DOOR 1 UNIT HB-5120 WAS $74.95 NOW $64.95 SAVE $10 2 UNIT HB-5125 WAS $119 NOW $109 SAVE $10 3 UNIT HB-5130 WAS $139 NOW $129 SAVE $10 6U RACK HB-5170 WAS $179 NOW $159 SAVE $20 12U RACK HB-5174 WAS $239 NOW $219 SAVE $20 6U SWING FRAME HB-5180 WAS $269 NOW $239 SAVE $30 12U SWING FRAME HB-5182 WAS $349 NOW $319 SAVE $30 Limited stock. Not available onine. $ 64 95 $ 2 PORT VGA KVM SWITCH WITH AUDIO YN-8402 Share your keyboard, monitor, mouse, and USB devices between two different computers. Plug and play operation with no drivers required. • Hotkey switching • Onboard audio interface • High resolution VGA support Page 52 24 95 FROM 3 $ 25 9 $ 95 YN-8200 UNIVERSAL CPU COOLER WITH PWM FAN YX-2588 MIXED HOOK AND LOOP CABLE TIES HP-1232 Low noise top flow CPU cooler with silent 80mm fan and intelligent PWM. Compatible with a range of Intel® and AMD motherboard CPU socket types. 900-2200RPM. • Hydro dynamic bearing Keep your cables neat and tidy. • Packet of 16 • Assorted sizes from 125 to 180mm Follow us at facebook.com/jaycarelectronics CAT5E PATCH LEADS Suitable for most Ethernet and LAN applications. RJ45 to RJ45. • 0.5m - 30.0m See website for full range Catalogue Sale 24 July - 23 August, 2017 TECH TIP Wi-Fi DUAL BAND EXPLAINED Why buy a dual band router? … Single frequency routers operate in the popular 2.4GHz band, normally labelled 802.11n/g/b, 2.4GHz is also utilised by many other devices such as cordless phones, Bluetooth devices, baby monitors, etc. This means that your home 2.4GHz Wi-Fi network shares the same radio frequency with other devices around your home which means more interference on your Wi-Fi network leading to degraded network performance. Dual Band Routers offer two operating radio frequencies the 2.4GHz band, and a 5GHz band, (these routers are normally labelled 802.11ac/n/g/b, where ‘ac’ depicts the 5GHz band). The 5GHz band has fewer devices, hence less interference to your Wi-Fi network. It is much harder to congest the 5GHz Wi-Fi band because the 5GHz Wi-Fi band offers 23 non-overlapping channels, compared to only 3 nonoverlapping channels in the 2.4GHz band. If you want a congestion free Wi-Fi experience, you need to have a Dual Band router bearing the label “ac’ in the description as well as devices that support the 5GHz Wi-Fi band. You need not worry about interoperability because most devices that support 5GHz also support the 2.4GHz Wi-Fi band. $ 59 95 N300 WI-FI RANGE EXTENDER YN-8370 Use it as a repeater to extend the range of your existing Wi-Fi network, provides a Wi-Fi access point for your wired network, or even acts as a router for your existing modem. $ 39 95 DUAL BAND AC1200 WIRELESS ROUTER YN-8392 Featuring the latest 802.11AC wireless standards for solid streaming, fast gaming, and interrupt-free networking. • Up to 1200Mbps • One-touch WPS connection $ $ DUAL BAND AC600 USB WIRELESS NETWORK ADAPTOR 9995 49 95 N300 WIRELESS ROUTER YN-8390 Ultra compact, ideal for notebook computers being moved around and where a larger dongle may be easily knocked and damaged. Dual band 2.4GHz and 5GHz. Share internet connection and network made easy! Powerful 300Mbps wireless connectivity. Four wired ethernet ports. Dual antennas boost signal strength and reduce dead-spots. WPS provides hassle-free connection. NBN compatible. • Built-in Firewall DUAL BAND AC1200 WI-FI RANGE EXTENDER YN-8372 DUAL BAND AC1300 USB WIRELESS NETWORK ADAPTOR DUAL BAND AC600 OUTDOOR ROUTER / AP & REPEATER Quickly and simply eliminate dead-spots in your Wi-Fi network, or provide an access point on your existing wired network. It plugs straight into an available mains power point for compact, set and forget use. YN-8336 Plug this dongle in, and you’re ready to connect to your local Wi-Fi network. A powerful internal antenna and dual band connection offers fast and stable access to just about any Wi-Fi signal, and is compatible with Windows and MAC systems. $ 99 95 $ WITH POE YN-8349 The perfect Wi-Fi companion for your entertaining area, a carpark, or any other outdoor scenario. Acts as a Wi-Fi repeater, access point (AP), or router, and two large antennas (one for each band) help further maximise range. • Weatherproof 69 95 119 $ WI-FI SECURITY Limited Stock. Company owned stores only. Not available online. $ 88 95 $ FATHER'S DAY 79 720P WI-FI VIDEO DOORPHONE WITH SMARTPHONE APP QC-3698 720P HIGH DEFINITION P2P WI-FI PAN AND TILT CAMERA QC-3844 8 ZONE WI-FI ALARM KIT WITH APP LA-5610 Allows you to interact with your visitor even when you are not home. • Live video streaming to your Smartphone via free app • 720p HD resolution • Talk and record footage • Buzzer requires 2 X AA batteries (not included) View live footage on your Tablet or Smartphone in minutes! • Trigger the capture of still images/video when motion or sound is detected • Records to micro SD card (available separately) • 720TVL <at> 30fps resolution • 5VDC Power supply (included) • 125(H) x 100(W) x 95(L)mm Easy to install. Controlled via the touch screen, using a wireless key-fob or by your Smartphone. • Push notifications • 163(W) x 132(L) x 30(D)mm To order phone 1800 022 888 or visit www.jaycar.com.au See terms & conditions on page 8. $ 299 Page 53 WORKBENCH ESSENTIALS $ NOW 79 95 1 SAVE $20 ◄ ACCOMODATES 2 MONITORS 3 119 $ There has been an obvious resurgence in people getting back to the workbench and reviving skills involving manual dexterity. As you will see across the following pages, Jaycar has all the DIY tools you'll need to equip your workbench so you can create projects from the power of your brain and your hands. ▼RECHARGEABLE 1. DUAL PC MONITOR DESK STAND CW-2880 WAS $99.95 • Accommodates two monitors up to 27”, combined weight up to 8kg • Large base, height adjustable • Cable tidy clips & mounting hardware included ▲ CHARGES UP TO 10 DEVICES AT THE SAME TIME 2. ANTI STATIC FIELD SERVICE MAT/BAG TH-1776 WAS $39.95 • Work area 600 x 600mm (approx) • Ground lead and and wrist strap included 5 2 $ NOW 29 95 $ SAVE $10 4 NOW 79 95 6 SAVE $5 $ 22 95 $ HB-6389 14 95 $ $ 27 PIECE SMARTPHONE REPAIR KIT TD-2118 Designed to repair iMac®, Mac® Air, iPhone®, Samsung®, HTC®, Nokia®, Sony® as well as many brands of mobile phone. ALSO AVAILABLE: IPHONE® REPAIR TOOL SET TD-2115 $16.95 $ FATHER'S DAY FROM 24 95 ABS INSTRUMENT CASES WITH PURGE VALVES Comes with stainless steel pins, O-ring seals and very solid catches. Ideal for your camera gear, test, medical or scientific equipment. • 6 sizes available from 173mm to 530mm long See online for more details 29 95 FATHER'S DAY GAMING CONSOLE TOOL KIT TD-2109 $ Includes tools for nearly every console and handheld on the market today - WII, X-Box, Playstation etc. $ 29 24 95 54 TRAY TOOL / STORAGE CASE HB-6302 13 compartment storage box for small items with dividers that can be removed to accommodate larger items. Durable hinges & catches. • 270(W) x 260(H) x 150(D)mm 95 Page 54 5. NETWORK CABLE TESTER XC-5078 WAS $84.95 • Check cable integrity or measure AC & DC voltage with one unit • AC/DC voltages up to 600V • AC/DC current up to 200mA 6. CAT5 ADJUSTABLE PUNCHDOWN TOOL TH-1740 • Adjustable impact pressure • Supplied with 88 blade • 152mm long 49 95 LCD SCREEN OPENING TOOL TD-2121 Suitable for screen removal on many phones, tablets or any other smart devices. • Spring loaded suction pliers • Double-ended prying tool 3. 10 PORT USB CHARGING STATION WC-7768 • Maximum power output of 2.4A per port 4. ELECTRIC SCREWDRIVER SET TD-2491 • 102 piece stainless steel bits • 3.6V Rechargeable 2-IN-1 CRIMP & TEST TOOL TH-1939 An integrated cable stripper and cutter, with detachable cable tester. Quickly and easily test Ethernet twisted pair cables for wiring continuity, opens, shorts, and mis-wires. Includes PoE tester. $ 69 95 $ 39 95 $ 2795 NETWORK CABLE TESTER WITH POE FINDER XC-5084 Manually or automatically detects missing or disordered wiring, and open or short circuits. The included PoE (Power-overEthernet) Finder indicates if the network port or cable has power. RS-232 DB9M CONVERTERS Connect a variety of RS-232 devices to your modern computer with these adaptors. TO USB ADAPTOR XC-4927 $27.95 TO USB 1.5M XC-4834 $29.95 250G DUST REMOVER SPRAY CAN NA-1018 Non-CFC, non-flammable gas which allows removal of dust from electronic, electrical and optical devices. Does not leave residues and is non-toxic and non-conductive. See instore or website for details on our full range of Aerosol service chemicals. FROM 19 95 $ D9 SOCKET TO RJ45 COMPUTER ADAPTOR PA-0906 • Unwired • ACMA approved Follow us at facebook.com/jaycarelectronics 5 $ 95 Please note: Unit must be assembled. Catalogue Sale 24 July - 23 August, 2017 EXCLUSIVE CLUB OFFERS: 20% OFF 20% OFF FF COMPUTER 20% O * ADAPTORS COMPUTE ADAPTORSR* R TE COMPU * APTORS ADEXCLUSIVE *Including D9, D15, D25 Gender Changes, USB A , USB B, Firewire, SCSI, DVI. Excludes Type-C Converters. *Including D9, D15, D25 Gender Changes , USB A , USB B, SCSI, DVI. Excludes Firewire, Type-C Converte rs. WE HAVE SPECIAL OFFERS EVERY MONTH. LOOK OUT FOR THESE IN-STORE! CLUB OFFER NOT A MEMBER? EXCLUS E Sign up NOW! It’s free to join. CLUB OFIV FER NOT A MEM Sign up NOW BER? ! It’s free to E IV join. EXCLUS FER CLUB OF , USB A , USB D25 Gender Changes rs. *Including D9, D15, Type-C Converte SCSI, DVI. Excludes Not a member? Visit www.jaycar.com.au/nerdperks NERD PERKS CLUB OFFER FREE PP-1438 PACK OF 6 RJ45 PLUGS* 30M CAT5E SOLID NETWORK CABLE B, Firewire, Valid 24/7/17 to 23/8/17 NERD PERKS CLUB OFFER NERD PERKS CLUB OFFER 2 FOR JUST BER? NOT A MEM! It’s free to join. Valid 24/7/17 to $24.95 SAVE YT-6091 REG $16.95 EA. 6 $ 95 23/8/17 23/8/17 ADSL FILTER SAVE Valid 24/7/17 to Sign up NOW 25% WB-2023 RRP $39.95 $99 GAMER BUNDLE! VALUED AT $144.85 SAVE 30% Valid with purchase of WB-2023 * NERD PERKS NERD PERKS NERD PERKS NERD PERKS SAVE SAVE SAVE SAVE 20% 20% 13% 20% 16 PIECE TEST LEAD SET CERAMIC CAPACITOR PACK QUICK CONNECT CRIMP PACK LEAD FREE SOLDER WT-5218 REG $9.95 CLUB $7.95 Red & black colour. RC-5399 REG $9.95 CLUB $7.95 60 Pieces. PT-4530 REG $22.95 CLUB $19.95 160 Pieces. NS-3088 REG $24.95 CLUB $19.95 71mm 200g Roll. NERD PERKS NERD PERKS NERD PERKS NERD PERKS SAVE SAVE HALF PRICE! 23% 28% 23% SMD 555 TIMER IC SPEAKER CABLE - 30M ROLL PCB ETCHING KIT ZL-3550 REG $13.95 CLUB $9.95 Pack of 10. Surface mount. WB-1703 REG $12.95 CLUB $9.95 Light duty 2 core. HG-9990 REG $27.95 CLUB $13.95 Assorted boards. NERD PERKS NERD PERKS NERD PERKS SAVE SAVE SAVE 18% 20% SAVE 15A SPST MARINE TOGGLE SWITCH ST-0574 REG $12.95 CLUB $9.95 Pre-wired. Weatherproof. NERD PERKS SAVE 10% 22% AAA 900MAH NI-MH BATTERIES SOLAR EDUCATIONAL KIT ABS ENCLOSURE BLACK SPEAKER GRILLE CLOTH SB-1739 REG $10.95 CLUB $8.95 Pack of 4. HB-6128 REG $17.95 CLUB $15.95 171(W) x 121(D) x 55(H)mm. CF-2752 REG $17.50 CLUB $13.50 1 x 1.5m. KJ-6690 REG $18.95 CLUB $14.95 Ages 8+. NERD PERKS CLUB MEMBERS RECEIVE: 20% OFF COMPUTER ADAPTORS YOUR CLUB, YOUR PERKS: REMEMBER TO GET YOUR CARD SCANNED AT THE COUNTER TO GET POINTS*. $1 = 1 POINT, 500 POINTS = $25 JAYCOINS GIFT CARD * To order phone 1800 022 888 or visit www.jaycar.com.au Conditions apply. See website for T&Cs * *Including D9, D15, D25 Gender Changes, USB A , USB B, Firewire, SCSI, DVI adaptors. See terms & conditions on page 8. Page 55 WHAT'S NEW WE'VE HAND PICKED JUST SOME OF OUR LATEST NEW PRODUCTS. ENJOY! 199 129 $ 2 X 20WRMS STEREO AMPLIFIER AA-0517 Compact. Provides more than enough power for outdoor, ceiling, or even larger Hi-Fi speakers. 3-way input selection. Mains powered. • Balance, treble and bass control $ 79 95 $ 2 X 20WRMS COMPACT STEREO AMPLIFIER AA-0518 PASSIVE BOOK SHELF SPEAKERS CS-2459 Compact stereo amplifier for powering speakers anywhere you like. • Solid construction • Great sound 2 x 10W • Spring loaded speaker terminals FROM 19 95 $ $ FROM 19 95 $ 24 95 ADSL2+ FILTER WALLPLATE YT-6078 Ideal for wall-hanging land-line handsets. • Clips over existing wall plate • 2 x additional RJ12 ports • No wiring required FROM 9 $ 95 5 $ 95 SOLDERING IRONS WITH LED ARMOURED USB LEADS MICRO USB EXTENSION LEAD Illuminate the area so you get a better solder joint. Mains powered. 25W TS-1468 $19.95 40W TS-1470 $24.95 Protected against accidental damage. • Stainless steel • 1m long USB 2.0 TO MICRO B WC-7753 $19.95 USB 2.0 TO LIGHTNING™ WC-7754 $29.95 USB 2.0 TO TYPE-C WC-7755 $29.95 SMA ADAPTORS WC-7756 • 100mm long • Sold as a pair SMA PLUG TO FME PLUG PA-0618 $5.95 SMA PLUG TO SMA PLUG - R/A PA-0631 $6.95 SMA SOCKET TO SMA SOCKET - R/A PA-0632 $6.95 SMA SOCKET TO REVESE SMA SOCKET PA-0630 $6.95 AUSTRALIAN CAPITAL TERRITORY QUEENSLAND HEAD OFFICE 320 Victoria Road, Rydalmere NSW 2116 Ph: (02) 8832 3100 Fax: (02) 8832 3169 ONLINE ORDERS Website: www.jaycar.com.au Email: techstore<at>jaycar.com.au FREE CALL ORDERS: 1800 022 888 JAYCAR JINDALEE 2/601 SEVENTEEN MILE ROCKS RD, SEVENTEEN MILE ROCKS, 4073 QLD PH: 07 3715 6377 Belconnen Fyshwick Ph (02) 6253 5700 Ph (02) 6239 1801 Tuggeranong Ph (02) 6293 3270 NEW SOUTH WALES Albury Alexandria Ph (02) 6021 6788 Ph (02) 9699 4699 Bankstown Blacktown Bondi Junction Brookvale Campbelltown Castle Hill Coffs Harbour Croydon Dubbo Erina Gore Hill Hornsby Hurstville Maitland Mona Vale Newcastle Penrith Port Macquarie Rydalmere Shellharbour Smithfield Sydney City Taren Point Tuggerah Tweed Heads Wagga Wagga Warners Bay Warwick Farm Wollongong Ph (02) 9709 2822 Ph (02) 9672 8400 Ph (02) 9369 3899 Ph (02) 9905 4130 Ph (02) 4625 0775 Ph (02) 9634 4470 Ph (02) 6651 5238 Ph (02) 9799 0402 Ph (02) 6881 8778 Ph (02) 4367 8190 Ph (02) 9439 4799 Ph (02) 9476 6221 Ph (02) 9580 1844 Ph (02) 4934 4911 Ph (02) 9979 1711 Ph (02) 4968 4722 Ph (02) 4721 8337 Ph (02) 6581 4476 Ph (02) 8832 3120 Ph (02) 4256 5106 Ph (02) 9604 7411 Ph (02) 9267 1614 Ph (02) 9531 7033 Ph (02) 4353 5016 Ph (07) 5524 6566 Ph (02) 6931 9333 Ph (02) 4954 8100 Ph (02) 9821 3100 Ph (02) 4225 0969 Aspley Browns Plains Burleigh Heads Caboolture Cairns Caloundra Capalaba Ipswich Jindalee NEW Labrador Mackay Maroochydore Mermaid Beach Nth Rockhampton Redcliffe Strathpine Townsville Underwood Woolloongabba Ph (07) 3863 0099 Ph (07) 3800 0877 Ph (07) 5576 5700 Ph (07) 5432 3152 Ph (07) 4041 6747 Ph (07) 5491 1000 Ph (07) 3245 2014 Ph (07) 3282 5800 Ph (07) 3715 6377 Ph (07) 5537 4295 Ph (07) 4953 0611 Ph (07) 5479 3511 Ph (07) 5526 6722 Ph (07) 4922 0880 Ph (07) 3554 0084 Ph (07) 3889 6910 Ph (07) 4772 5022 Ph (07) 3841 4888 Ph (07) 3393 0777 VICTORIA Altona Brighton Cheltenham Coburg Ferntree Gully Frankston Geelong Hallam Kew East Melbourne City Melton Mornington Ringwood Roxburgh Park Shepparton Ph (03) 9399 1027 Ph (03) 9530 5800 Ph (03) 9585 5011 Ph (03) 9384 1811 Ph (03) 9758 5500 Ph (03) 9781 4100 Ph (03) 5221 5800 Ph (03) 9796 4577 Ph (03) 9859 6188 Ph (03) 9663 2030 Ph (03) 8716 1433 Ph (03) 5976 1311 Ph (03) 9870 9053 Ph (03) 8339 2042 Ph (03) 5822 4037 Springvale Sunshine Thomastown Werribee Ph (03) 9547 1022 Ph (03) 9310 8066 Ph (03) 9465 3333 Ph (03) 9741 8951 SOUTH AUSTRALIA Adelaide Clovelly Park Elizabeth Gepps Cross Modbury Reynella Ph (08) 8221 5191 Ph (08) 8276 6901 Ph (08) 8255 6999 Ph (08) 8262 3200 Ph (08) 8265 7611 Ph (08) 8387 3847 WESTERN AUSTRALIA Belmont Bunbury Joondalup Maddington Mandurah Midland Northbridge O’Connor Osborne Park Rockingham Ph (08) 9477 3527 Ph (08) 9721 2868 Ph (08) 9301 0916 Ph (08) 9493 4300 Ph (08) 9586 3827 Ph (08) 9250 8200 Ph (08) 9328 8252 Ph (08) 9337 2136 Ph (08) 9444 9250 Ph (08) 9592 8000 TASMANIA Hobart Kingston Launceston Ph (03) 6272 9955 Ph (03) 6240 1525 Ph (03) 6334 3833 NORTHERN TERRITORY Darwin Ph (08) 8948 4043 TERMS AND CONDITIONS: REWARDS / NERD PERKS CARD HOLDERS FREE GIFT, % SAVING DEALS, DOUBLE POINTS & MEMBERS OFFERS requires ACTIVE Jaycar Rewards / Nerd Perks Card membership at time of purchase. Refer to website for Rewards/Nerd Perks Card T&Cs. PAGE 3: Nerd Perks Card holders receive the Special price of $89.95 for Wi-Fi Wireless Power Switch Project, applies to XC-4614, XC-4430, MS-6148, XC-4482, ZW-3100 when purchased as bundle. PAGE 7: Nerd Perks Card holders receive FREE 6 Pack RJ45 Plug (PP-1438) valid with purchase of WB-2023 30m Cat5E Cable. Nerd Perks Card holders receive the Special price 2 x YT-6091 for $24.95. Nerd Perks Card holders receive a Special price of $99 for Gamer Bundle applies to 1 x XM-5250 + 1 x XC-5130 + 1 x WC-7725 when purchased as bundle. Nerd Perks card holders receive 20% OFF applies to Jaycar 701B Computer Adaptors product category. Arrival dates of new products in this flyer were confirmed at the time of print but delays sometimes occur. Please ring your local store to check stock details. Occasionally there are discontinued items advertised on a special / lower price in this promotional flyer that has limited to nil stock in certain stores, including Jaycar Authorised Stockist. These stores may not have stock of these items and can not order or transfer stock. Savings off Original RRP. Prices and special offers are valid from Catalogue Sale 24 July - 23 August, 2017. SERVICEMAN'S LOG Well-made 1980s amplifiers are worthwhile to repair While a great deal of recently manufactured consumer audio equipment is rarely considered worth repairing when it fails, older brand-name stereo amplifiers from the 1970s and 1980s were usually well made and had impressive extruded aluminium front panels with large, smooth-assilk controls. They are still well regarded by enthusiasts in-the-know and are usually well worth repairing when they ultimately fail. It could be something in the water, or perhaps a phase of the moon that is to blame for a recent surge in the number of audio amplifiers arriving at the workshop. Four all turned up at around the same time, although to be honest this is more likely down to me advertising musical instrument and amplifier repairs in the local telephone directories. However, this year will be the first time in almost 20 years I won’t have a display ad for my computer-repair siliconchip.com.au company in our version of the yellow pages, the reason being that when I worked the numbers for last year’s phone directory advertising, I didn’t achieve a return on that investment. It’s a sign of the times, probably due to the fading popularity of the printed version of the yellow pages over online searches, but also (and more unfortunately for me) because of the diminishing need for the traditional computer repair guy. Anyway, for whatever reason, these four amps turned up and all had similar faults; no sound at all from one channel or very low and distorted sound from one channel. The other striking simi- Dave Thompson* Items Covered This Month • JVC and Fountain amplifier repairs • • Electric golf trundlers 2002 Toyota Echo repair *Dave Thompson runs PC Anytime in Christchurch, NZ. Website: www.pcanytime.co.nz Email: dave<at>pcanytime.co.nz larity is that all these amps were made in the 1980s, and the reason their owners hadn’t junked them long before now is because they were regarded as top-of-the-line back then, or at least close to it and had cost a fair bit of money, while giving years of troublefree and great-sounding service. That is until ultimately, they didn’t. Everything gets old, there’s nothing more definite. Part of it is down to the laws of nature, and when you take the laws of physics into account as well, it is inevitable that hardware and components fail. You don’t need to be an audiophile to know what sounds good to your own ears, and when you finally put together a good-sounding system, it is natural to want to keep it going for as long as you can. Plenty of us have discovered that just because an amp or audio component is shiny and new, or is a much-anticipated new model of whatever hardware we already own, this doesn’t automatically mean it is or sounds better. To most of us, it is apparent that over the years the goal of most serious audio amplifier designers has been shaving off those last few fractions of a percent of distortion, and many (including the luminaries behind Silicon Chip designed and produced amps) have pretty much reached the practical and physical limits of this goal. With well-made components and clever design, distortion figures less than one thousandth of one percent are now achievable. August 2017  57 Serr v ice Se ceman’s man’s Log – continued However, most of the plastic-cased, flashing-LED-festooned, mass-produced rubbish one sees (and hears) pounding out bass-heavy beats at the local big-box warehouses don’t seem to care about such hard-won audio-related specifications at all, except to ensure some ridiculous PMPO wattage figure is emblazoned across the fascia in large, glittering and bold-coloured stickers. (Peak Music Power Out is a marketing-created measurement designed to entice ignorant buyers into believing that the only figure worth knowing about in any given audio system is wattage.) Modern buyers aren’t impressed with an amplifier rated at only 30W RMS per channel, so many manufacturers will use PMPO instead. 200W PMPO is a far more hairy-chested figure and will get far more interest from potential buyers who couldn’t care less about signal-to-noise ratios or input sensitivity. It is a scientifically-proven fact that people, and by people I mean men, and by men I mean me, if given the choice between two similar-priced systems where one has, say, 25W of power and the other 30W, will almost always buy the higher-powered system, even though a human ear could not possibly 58  Silicon Chip be able to discern the difference in loudness between the two systems. Due to the way sound is perceived and measured, doubling the output power from 50W to 100W results in just a 3dB gain, which is generally acknowledged to be the smallest volume difference us mere humans can detect. This means the difference between a 25 and a 30W system is moot, but I guarantee if given the option that I’d buy the bigger one! My point, as usual an absolute age in arriving, is that a lot of modern audio amplification is aimed at people who aren’t all that interested in super-low distortion and noise-floor measurements. Instead, they want the system with the biggest speakers, the most flashing lights and the highest PMPO figures in the store. Of course, there are audiophile-level amplifiers out there for sale but these tend to be sold in boutique stores and priced accordingly and often aren’t a real replacement option for the owners of these former high-class amps, which is why they would prefer to repair rather than replace them. The first amp I opened up is a (still) very nice JVC JA-S-series unit. In my opinion, JVC made some very good gear and from memory was at some point part of the Panasonic consumer-electronics empire. Interestingly, internet forums are packed with self-professed experts harping on about how anything built in the 1980s, regardless of brand, is by definition rubbish and everyone should give it a wide berth. It is this type of hogwash that turns me from most online discussions. Everyone has – and is entitled to – their opinions, however I cut my teeth on circuits from this era and have great admiration for a lot of the hardware that came from this decade. Of course, some of it is questionable, just like anything made in any era but there was a genuine quest to build better audio gear and in the 1980s great strides were made in this regard. Something I like is that the amplifiers are (mostly) made using thentop-of-the-line discrete transistors and components that are both easy to recognise and accessible for troubleshooting/testing purposes. That said, the 1980s was also an era in which audio amplifier modules made their appearance and while many had decent specifications and were dead-easy to utilise, with just a few flying leads to connect to the rest of the circuitry, there was a downside. While good for manufacturing and probably very economical to produce, many of these modules went out of production relatively quickly, some within a few years, meaning that replacing a faulty one after that time meant having a few stored away for such occasions. For example, I had an amp in the shop a few years ago that utilised a Sanken 80W per channel stereo module as the main output device. One side was faulty, and thus it needed replacing. I was fortunate that I experimented a lot in the 1980s with Sanken, ILP and other amplifier modules for musical instrument amplification and sound reinforcement and therefore had a collection of various used and NOS (New, Old Stock) modules in amongst my spare parts, one of which was an exact replacement for the faulty one. Bullet dodged, but I was lucky. Others I came across in the 1990s and 2000s used weird and wonderful modules like Sinclair and even some exotic no-name types and replacing them was out of the question, as I hadn’t even seen any in real life until I had to replace one. Any amp made siliconchip.com.au with those components that came in for repair and required a module replacement had to be either junked or heavily modified to use something else if it was to be kept alive. This JVC amp is typical of those of the era; a solid metal chassis with minimum plastics and lots of beefy screws holding things together. All the components are easily identified, with none of this part-number obfuscation that became so prevalent in later years. The various circuit boards are easily identified and isolated (should the need arise) and inter-board connections use quality plugs and sockets and ribbon cables. The output devices in this amp are modular, being labelled Darlington Power Pack and while initially I thought it might be some weird component, in smaller type near the bottom was a part number: STK-0040, which I recognised as a Sanyo-designed stereo output module rated at 40W. There were two of these modules bolted to a large heatsink; like most serious audio output devices, Sanken modules will perform well as long as they are kept cool, hence the substantial heatsink. The DPP is a “thick-film, hybrid” device, which means it is made from different layers containing the various components that comprise the module, such as resistors, capacitors and transistors. All are connected to the outside world via a row of pins, making it very easy to use in a circuit. These went out of fashion in a big way as better output devices were created but millions of amplifiers were made using these modules and as replacements eventually sold out, they became harder and harder to obtain. Now I needed an STK-0040, and I didn’t have one, so I hit the usual suspects and found a replacement pulled, NOS component on eBay. A pulled component is either used and salvaged from a discarded unit or as a NOS component is stripped from a new but unsold spare-parts replacement circuit board. At around US$20 it wasn’t a bad price either but the US$25 shipping charges put the brakes on buying that one. Then I had an idea, and hit my new favourite site, www.AliExpress.com A search pulled up dozens of brand-new Sanken modules, including the 0040 for a couple of bucks and free shipping, so I promptly ordered two, one siliconchip.com.au for this job and one for a spare. In amazement, I also searched for other, older and (I thought) no-longer-available chips like the SN76477N sound-effects generator and the MN300X series of bucket-brigade delay lines and discovered they are being sold on the site for very little money compared to what they used to sell for in the 1980s and 1990s. While these components are not likely to be of interest to anybody else outside of the DIY, analog guitar effects line, it is a trip down memory lane for me. Now I’m not sure whether these are being made again or whether they are simply stocks of unsold components being flicked off until they’re gone. I suppose it doesn’t really matter, as long as I can get what I need. It’s a Godsend to be able to get replacement components for these older yet still cherished devices. The STK-0040s duly arrived and sure enough, they appeared to be brand new. Removing the old one was as simple as de-soldering its 10 pins and unbolting it from the heatsink. I gave the new one a dollop of thermal paste before squishing it into place on the heatsink and doing up the nuts. I then flipped the whole caboodle over and soldered the pins back in. Once reassembled, a quick test showed everything was working as it should and the amplifier was sounding sweet once again. If only all fixes were this easy! The second amplifier I looked at is an older Fountain branded unit. Fountain was a New Zealand manufacturer of a range of domestic hifi and musical instrument amplifiers from the 1970s through to the late 1980s. Their home stereo amps were actually very well made and well-regarded, though when many Kiwis think of Fountain products they are more likely to recall their early ‘stereograms’ as being rather dowdy and dated in their design. This amp is a more modern-looking unit with linear controls, as was the fashion for a time. It worked but was very distorted on the left channel. The biggest clue to the problem came when I altered the balance control; the lightest touch produced some very nasty static from the speakers, though nothing really changed from one end of the control to the other. When a squirt of contact cleaner didn’t resolve the issue, I looked through my parts boxes for a replacement slider. Fortunately, my dabbling in a lot of audio circuits back in the day (especially the ETI 10-band-a-side Graphic Equaliser) left me with a large collection of pots of all types, including linear models, which are quite difficult to find these days. Those that are for sale sell for a premium, so having a few known-good ones lying around certainly helps in cases like this. The hardest part of this repair was getting the knob off the slider; it appeared to have been glued on at the factory, something some manufacturers resorted to due to the selected knobs not grabbing the shaft very well. A bit of carefully-applied heat from my heat gun softened the adhesive enough to release the knob and the slider was then unscrewed from the top of the chassis so it could drop out the bottom. I re-soldered the leads onto the relevant terminals one at a time and bolted the new control back into place; a quick test proved that I now had excellent sound from each speaker and nice, quiet tracking when operating the slider. I’m not sure what I’ll do when I run out of these hard-to-get parts but I have quite a few so hopefully they’ll see me out! His and Hers Electric Golf Trundlers J. N., of Mount Maunganui, in New Zealand is a semi-retired electrical/ electronics technician and a keen golfer. Living beside a golf course, it has become fairly common knowledge that he will repair electric golf carts and trundlers. It sounds like an idyllic location for the occasional repair job. Recently a local golfer rang me to see if I would have a look at both his and his wife's golf trundlers. I agreed and he duly arrived at my workshop with two of the well-known English-made PowaKaddy Freeway model Trundlers, complete with sealed lead-acid batteries and battery chargers. I always ask customers to bring not only their trundler but also the associated battery and its charger, in order to locate the source of the fault. He and his wife had not been using them very often but they now wanted to use them regularly. One unit was not working and the other was running off to the right and losing battery power two thirds of the way through a round of golf. August 2017  59 Serr v ice Se ceman’s man’s Log – continued Sometimes electric trundlers are not worth spending money on, especially if they are too old or worn out. In this case both units were not that old and as they were originally rather expensive to purchase, my customer was not too worried about costs. First I started checking out the trundler that was losing power and pulling to the right. A replacement righthand shaft clutch fixed the pulling to the right. Next, I load-tested the battery and found it to be reading low. I connected it to my shop charger and it responded well to come up to a good full charge. This indicated that the charger was not doing its job and after dismantling it and testing the charging cycle, it became apparent that it was not reaching the required full charge voltage before changing over to a float charge. After replacing the associated voltage comparator IC, the charger only required a slight adjustment (via the marked adjustment pots) to the cut-off point 60  Silicon Chip and the float charge voltage to then operate correctly. With the second trundler I first checked out the battery and its charger, to find that apart from having to tightening the battery connections, both battery and charger were in good condition. With the battery connected to the trundler there was no sign of movement and a clip-on ammeter around one of the battery leads indicated no current drain. This unit is operated via an On/ Off switch and a 1kW manual speed control potentiometer, all mounted conveniently in the handle. I dismantled the handle and discovered that the pot and the connecting wires were all in good condition but the On/Off switch had to be replaced. However, the unit still refused to function. All electrically-powered golf trundlers have a controller unit usually mounted close to the drive motor. Up until recently these controllers were usually repairable, however the trend is to now encapsulate the whole unit, including the connecting wiring. This renders them well protected from the elements but totally un-repairable. Fortunately this controller was not encapsulated. So after checking all the power and control wiring to ensure there was no fault present, I disconnected the controller and dismantled it. As soon as I opened it up I could smell the odour of burnt out and scorched parts. How badly damaged was it? I cleaned and gently scraped away the burnt parts on the PCB. This revealed burnt out copper tracks and blown field effect transistors that supply power to the motor. I also found a diode mounted alongside the FET that was cracked and shorted out. Without a circuit diagram I presumed that it probably had functioned in a anti-reverse voltage protection role. I then repaired the PCB tracks with soldered in wire bridges and replaced the blown semiconductors. Apparently the rest of the circuitry had escaped damage and the trundler now operated as it should. I can only assume the owner had accidentally left the trundler on while parking it, perhaps against a wall and it had quietly burnt itself out. It would not be the first time I have encountered this scenario and probably not the last! Exorcising an old Toyota Echo How do you fix an old car's ECU when the replacement is worth more than the car? This is a common scenario these days, particularly with cars more than 20 years old. B. Y., of Mackay in Queensland faced the problem a Toyota Echo and managed to fix the faulty ECU with an interesting workaround. . . A few weeks before last Christmas, my wife complained that the engine on her 2002 Toyota Echo sounded “funny”. Sure enough, it was only running on three cylinders and I knew what the problem was immediately – a rat. This is the third time this has happened. There is a convenient nesting spot under the exhaust manifold and within chewing distance of No.3 fuel injector. After removing the engine top cover I could see that the cables had been chewed through yet again. On the presiliconchip.com.au vious occasions (some two and three years ago) I did the repair job, I solved the problem by liberally spreading chilli oil over the cables to deter the blighters. Unfortunately, after fixing the cables this time, the car still only ran on three cylinders and I concluded that the ECU was damaged. A phone call to Toyota confirmed that the cost of a new ECU was greater than the value of the car and in any case there were none in the country. However, they did tell me that if I obtained a second-hand ECU they would be able to reprogram it to suit my car. Unfortunately, after I had acquired a second-hand ECU via eBay, this story changed and I was told that the immobiliser prevented the unit being reprogrammed though there may be aftermarket specialists who could help. I spoke to several auto electricians in Mackay where I live but although they were helpful none had the expertise required – apparently the one who did had relocated to Cairns some time earlier. So, what to do? I took the lid off the “new” ECU and, having previously traced the cables back from the fuel injectors, quickly determined that the four fuel injectors were driven by two SPF0001 dual driver chips. The equivalent circuit of each driver is a transistor with protection diodes and a typical HFE of 800 but it is neither a Darlington pair nor a Sziklai pair, as Vbe and Vce (saturated) are similar to those of an NPN transistor. The chips are surface-mount, of course but worse, the “collector” connections are on the underside of the chips as part of their thermal management. I didn't fancy my chances of replacing one of these without damaging something else – there are components on both sides of the PCB. Sending the ECU away for a specialist to replace the chip would be both expensive and time-consuming and it was just before Christmas, as noted above. I did a bit of research into fuel injectors and they are basically solenoid valves and the measured resistance of 14W indicates that the Echo uses saturation types as fitted to most cars. In other words the drive is a simple switch but, unlike most solenoid circuits, the flyback voltage is not clamped to 0.7V or so with a diode but used to control the closing rate of the siliconchip.com.au injector. The driving transistor therefore requires a high working voltage. I decided to replace the broken half of the SPF0001 with an NPN/PNP Sziklai pair. This way I could leave the circuit driving it unchanged and I figured that the higher Vce saturation of 1V or so would not make too much difference. I did consider using a Mosfet but BJTs are more rugged and I understand Mosfets have been used in the past but are less reliable in this application. The local electronics store had a BF469 (250V) and a TIP42C (100V) and I added a 75V zener to limit the flyback excursion. Now I took the old ECU out of the car, removed the cover and noted a bulge on what I believed was the offending SPF0001; so far so good. I was as concerned about vibration as much as anything else as there wasn't much to fix to. I isolated the bad chip half by cutting the PCB wire to the connector and the “base” pin on the chip. I could now string the components between those points and a convenient PCB earth in a way that gave reasonable mechanical support. I put it all back in the car and it worked. Whoopee! Five months later, it is still good so it looks as though I've had a win. I've also fitted some wire mesh into the space under the manifold. Hopefully this will deter rodents SC in the future! Servicing Stories Wanted Do you have any good servicing stories that you would like to share in The Serviceman column? If so, why not send those stories in to us? We pay for all contributions published but please note that your material must be original. Send your contribution by email to: editor<at>siliconchip.com.au Please be sure to include your full name and address details. August 2017  61 Higher power, loads more features . . . Deluxe Touchscreen eFuse PCB assembly and calibration We introduced our new Deluxe eFuse last month and described its hardware. Now we will get onto building it. All components mount on a single PCB which then attaches to the front panel and the whole thing fits into a Jiffy box. We’ll also go over the testing and calibration procedures. T his Deluxe eFuse can handle higher currents and voltages than our earlier and simpler eFuse design in the April issue (www. siliconchip.com.au/Article/10611). Based around the Micromite LCD BackPack, it uses a 320x240 colour touchscreen for feedback and control. Last month we featured the full circuit and described how it works, and now we will cover its construction. Before you start, you’ll need to obtain the PCB and gather the various parts, as detailed in the parts list below. We have made a few changes in the circuit, in the light of having built a second prototype, and these have been incorporated into the final PCB design. As shown in the circuit diagram last month (Fig.3), PNP transistor Q2 is driven directly from the output of IC2b. This causes a problem when Q1 is switched off, ie, when the positive load is disconnected (as it is when the unit is first powered on). That’s because IC2’s negative power supply is ground (0V) and when Q1 62  Silicon Chip is switched off, as there is no current feedback, IC2b’s output will try to go down to 0V. That is below V+H (ie, the V+H rail is about 10V below V+ so normally at least +2V) and this will cause Q1’s collector-base junction to become reverse-biased. This, in turn, allows IC2b to pull down the V+H rail, increasing its own supply voltage, potentially to damaging levels. Luckily, the solution is simple: we’ve simply placed a 1N4148 small signal diode (D17) in series with Part two: by Nicholas Vinen Q2’s collector, preventing its collector-base junction from becoming reverse biased. We’re also changing the two 22Ω resistors to 15Ω, as we discovered that the SenseFET current ratio for Q1 and Q3 is 500:1, not 1000:1 as we stated in the first article. Thus, the current through these sense resistors is twice what we had expected and so the voltages are also doubled. Reducing the resistor values brings the operation back closer our initial design parameters. Finally, we decided to change Q19 from a BC557 to a BC327, to ensure it’s reliable at the current level it operates at. The pinouts are identical so no PCB changes were required. Construction All components are mounted on the single 132 x 85mm PCB coded 18106171. Note that the input/output binding post/ banana terminals need to be attached to the front panel/lid before they can be mounted on the PCB, so we’ll get to that last. siliconchip.com.au Everything else is ICs must be oriensoldered to this tated with the PCB first. Refer notch/pin 1 to the overlay dot towards diagrams, Fig.4 the top of the (top side) and board. Fig.5 (bottom Fit all the side) as guides TO-92 packduring assembly. age devices As noted last next, which month, while this includes REG1 circuit is based plus seven on the Micromite BC547 and LCD BackPack seven BC557 (originally detransistors. scribed in FebCrank the leads ruary 2016), we out into a trianhave incorporatgular pattern ed its circuitry using small on the same PCB pliers, to suit as everything else, the PCB pads, to reduce cost and before soldering simplify construction. each one in place with the orientation place; it’s labelled 47µF on the PCB shown in Fig.4. So you only have to assemble the silkscreen, in case a tantalum type is one PCB. As with the diodes, be careful not fitted, but a 10µF ceramic SMD capaci- to get the similar-looking devices Start by fitting all the resistors. It’s tor is perfectly adequate. best to check the values using a mulmixed up. Now fit the 28-pin DIL socket for timeter since the colour bands can be IC1, with its notched end towards the Fitting the larger components easily confused (eg, orange can look bottom of the PCB. You can use sockets like red). The two 1Ω resistors are Now you can mount regulators for the other four ICs but we suggest REG2-REG4 and Mosfets Q5-Q8, all 0.5W types and may be 5% while all you solder these straight to the board of which are in TO-220 packages the others can be 0.5W or 0.25W 1% as this will result in better long-term and mounted flat on the top side of metal film. reliability. Follow with the diodes and zener the PCB. In each case, bend all three Note that the four 8-pin sockets/ leads down through 90°, 6mm from diodes, taking care to orientate them as shown in the bottom Fig.4. of the packNote that age, then feed there are three them through different dithe PCB holes odes types and affix the used: 1N4004 tab firmly us(x1), 1N4148 ing a 6mm (x13) and M3 machine 1N5819 (x3) screw, shakeas well as two proof washer different types and nut. You of zener dican then solode (15V [x6] der and trim and 33V [x2]) the three pins. so also check Next, fit Fig.4 carefully LED1. Oriento make sure tate it with the the right dilonger (anode) ode goes in the lead to the left right location. and push it If you’re usall the way ing an SMD cadown onto pacitor on IC1’s Fig.4: top side overlay diagram for the Deluxe eFuse PCB with a matching photo the board above. All the components are mounted on this PCB, with most on the top side. The VCAP pin, before soltouchscreen LCD module is mounted on top but only the dotted outline is shown, so now would be you can see where the components go underneath. Note that there are some slight dering it in a good time differences between this final PCB layout and the latest prototype, shown in the photos place. Now to solder it in so that the high-current binding posts have more clearance. mount the siliconchip.com.au August 2017  63 Fig.5: an overlay diagram showing where components are mounted on the underside of the PCB. Q1 and Q3 are mounted vertically on this side so that they project down into the box and have plenty of surrounding air for cooling. The fuses are mounted on this side also, as they would foul the lid on the top side. The two trimpots also go on the bottom, so you can still access them with the touchscreen in place, allowing you to perform the calibration while watching the screen. The photo on the facing page matches this overlay. four ceramic disc and 14 multi-layer ceramic capacitors, using the values and locations shown in Fig.4. These are not polarised. Follow with the two 10µF electrolytic capacitors near REG1, which are polarised; the longer leads should go through the holes towards the bottom of the board. If using a 47µF tantalum instead of the SMD ceramic, it can go in now and it is also polarised, with the lead marked + on the capacitor body going in the hole towards the bottom of the PCB. Now fit 14-pin female header CON4. To ensure it’s straight, we suggest you attach the four 12mm tapped Nylon spacers that support the LCD first. These go on the top side of the board, held in by 6mm M3 machine screws fed through from the underside. Plug the 14-pin socket into the touchscreen pin header, then feed it through the PCB and temporarily screw the LCD module to the PCB using a couple of extra machine screws. Make sure you don’t damage the touchscreen when you flip the board over and solder the header, then remove it again and put it aside until later. You can leave the tapped spacers in place Bottom side components The follows components are soldered on the opposite side of the board: the blade fuse holders for F1 and F2, trimpots VR1 and VR2, Mosfets Q1 and Q3 and their heatsinks and serial communication header CON3 (see Fig.5). 64  Silicon Chip Solder VR1 and VR2 in place first, in the usual manner, followed by CON3. Note that F1 and F2 may be supplied as two separate clips or one pair of clips held together with a plastic base. The type with the plastic base is easier to fit but make sure they are rotated correctly so that they line up with the silkscreen outline. Regardless, push the clips fully through the PCB and then solder on the opposite side. You will need a very hot iron and be careful that the clips are not resting on anything which might melt while doing so. It may take some time for the solder to form proper joints so keep feeding more solder/flux in slowly until you get good-looking fillets. Before soldering Q1 and Q3, you need to bend their leads to fit the staggered pads on the PCB. This involves bending all five leads out slightly to the front (labelled side) of the package, by a couple of millimetres, then bending the two outer leads, plus the centre lead, forward by another 4mm. Verify that the leads fit through the holes, then loosely attach both to the inside of the “U” heatsink (as shown in Fig.5) using an M3 machine screw, shake-proof washer and nut. You can now push the whole assembly down onto the board, with the heatsink posts going through their mounting holes and the five Mosfet leads as before. Make sure the heatsink is pushed all the way down and the Mosfet is straight, then do up the machine screw/nut tightly. If your heatsink has solderable posts, solder these in place now; as with the fuses, this will take a lot of heat and probably some time; you may have to wait for the soldering iron to get the whole heatsink pretty warm before the solder will take. We prefer the solderable type of heatsink but the types available from Jaycar/Altronics have anodised aluminium posts. In this case, they will just rest in the holes and the Mosfet lead solder joints will support the weight. Regardless of the type of heatsink used, now you can solder and trim the five Mosfet leads. Make sure the solder joints are nice and solid since two of them carry the full load current. These may take a little more soldering before they form good fillets due to the large copper area connected to those pads. Plug in blade fuses F1 and F2 now. Initial testing Before going any further, it’s a good idea to verify that the power supplies are working properly. You can do this with a 12V DC plugpack, bench supply or battery. If your test power supply is not current limited (eg, a battery), use a series 5W resistor of around 100Ω to protect the rest of the circuit in case there is a fault. First, connect the power supply ground to the 0V connection at either end of the PCB (eg, using an alligator clip against the side of the board) and the +12V output to the +IN terminal (this can also be done with a clip lead). siliconchip.com.au the IC body. If you haven’t already plugged in IC2 and IC3, do so now, noting that their orientation is different from IC1. Now you can also plug the touchscreen into CON4 and hold it in place using the four black M3 machine screws with Nylon washers under each screw. These will be important later when fitting the lid. Programming the chip If the 8-pin ICs have been soldered to the board, expect around 30mA to flow, or around 20mA if they are not in circuit yet. If using a series resistor, you can verify this by measuring the voltage across the resistor, ie, with 100Ω the voltage drop should be 100Ω x 0.02A = ~2V or 100Ω x 0.3A = ~3V. Once you’ve verified the current is OK, short out the resistor so the circuit can operate at the correct voltage. Check the voltage between the 0V and +IN terminals and ensure it is at least 12V. Now measure the voltage between 0V and the anode of D1. It should be only a tiny bit less. If it’s significantly lower, that suggests something is wrong with Q5 or its control circuitry. Then check the voltage between pins 1 and 8 of IC4 (or its socket, if it hasn’t been plugged in yet). You should get a reading close to 10V (9.3610.14V). Next, measure the voltage between pin 8 of IC3 (or its socket) and 0V. You should get a reading of 4.755.25V. You should also get a reading close to 3.3V between pin 1 of IC1’s socket and 0V. If any of these are wrong, switch off and check for faults. If IC4 has not been plugged in yet, switch the power off and plug it in, making sure it is orientated correctly (ie, with the pin 1 dot at upper left) and then switch the power back on. Check the voltage between pin 8 of IC2 (or its socket) and the +IN terminal. You should get a reading of 8.5-9.5V. siliconchip.com.au Since IC1 is not in circuit yet, Q1 should be off and as a result, you should find the voltage at Q7’s tab/ mounting screw is near 0V. To check the operation of the negative power supply circuitry, disconnect your 12V power supply and this time connect its positive output to the 0V terminal and its negative output to the -IN terminal. You should measure a similar current compared to the positive power supply. Having shorted out the protection resistor after checking the voltage (if you’re using one), check the voltage at -IN and make sure it’s at least -12V, then check the voltage at the cathode of D4 which should be just a tiny bit closer to 0V. As with IC4, you should get close to 10V between pins 1 and 8. Assuming you get the correct measurement, if it isn’t in its socket yet, switch off and plug it in (again, being careful with the orientation), then switch back on. LED1 should light up at a relatively dim level. You can then check that pin 4 of IC3 is around 6.5V below VIN-. Also, check that the tab/mounting screw of Q8 is near 0V (it may be floating around). This indicates that Q3 is not conducting, which should be the case at this point. Testing more of the circuit To do any further testing, you will need to switch off and plug IC1 into its socket. Make sure that its pin 1 dot is aligned with the socket notch and that none of the leads get folded under If your microcontroller (IC1) hasn’t already been programmed with the Deluxe eFuse firmware, you will need to program it now. If you have a blank PIC32 chip that hasn’t even been flashed with the Micromite software yet, you will have to do that before plugging it into the board since there is no provision for programming a blank chip on-board. We expect most constructors will either have a pre-programmed chip or a Micromite. If you have a bare Micromite chip, plug it in and hook up a USB/serial adaptor to CON3 using three or four jumper leads. CON3 has the same pinout as on the LCD BackPack. It should be labelled alongside CON3 on the PCB silkscreen. Connect GND on the USB/serial adaptor to the GND pin (pin 4) of CON3, TX on the USB/serial adaptor to the RX pin (pin 3) of CON3, RX on the USB/serial adaptor to the TX pin (pin 2) of CON3 and optionally, the 5V supply pin of the USB/serial adaptor to the 5V pin (pin 1) of CON3. If you decide to hook up the 5V supply lead, you can communicate with IC1 without needing to apply external power to the Deluxe eFuse board. Otherwise, you will need to provide at least 9V between the VIN+ and 0V terminals. You can then follow the instructions in the accompanying panel to set up the Micromite and load the BASIC program into it. When you switch the unit back on, it will automatically check the V+H August 2017  65 Parts list – Deluxe eFuse 1 double-sided PCB, coded 18106171, 132 x 85mm 1 ILI9341-based 2.8-inch LCD touchscreen with 320x240 pixels and 14-pin serial interface (SILICON CHIP online shop Cat SC3410) 1 UB1 Jiffy box (157 x 95 x 53mm) 1 laser-cut black acrylic lid to suit UB1 Jiffy box (SILICON CHIP online shop Cat SC4316) 2 50kΩ mini horizontal trimpots (VR1,VR2) 4 red 50A heavy duty binding posts (CON1a,CON1c,CON2a,CON2c) (Altronics P9225) 2 black 50A heavy duty binding posts (CON1b,CON2b) (Altronics P9226) 1 4-pin male header, 2.54mm pitch (CON3) 1 14-pin female header, 2.54mm pitch (CON4) 2 30A+ ATO/ATC blade fuse holders (F1,F2) 2 35A or 40A ATO/ATC blade fuses (F1,F2) 2 6021-type PCB-mounting flag heatsinks (for Q1,Q3) (element14 1317054, Jaycar HH8504, Altronics H0637) 6 M8 shake-proof washers 6 M8 spring/split washers 12 M8 flat washers 4 M3 x 12mm tapped Nylon spacers 13 M3 x 6mm machine screws 4 M3 x 8mm black machine screws 9 3mm ID shake-proof washers 4 3mm ID 6mm OD 1mm thick Nylon washers 9 M3 hex nuts 1 28-pin narrow DIL socket (for IC1) 2 8-pin DIL sockets (optional, for IC2 & IC3) Semiconductors 1 PIC32MX170F256B-I/SP or PIC32MX170F256B-50I/SP microcontroller programmed with the Micromite Mk.2 firmware V5.0.3 or later (IC1) 2 LT1490ACN8 dual “Over-The-Top” rail-to-rail op amps (IC2,IC3) (SILICON CHIP online shop Cat SC4319) 2 NE555/LM555 timers, or equivalent (IC4,IC5) 1 MCP1700-3302E/TO 3.3V low-dropout linear regulator (REG1) 1 LM337T adjustable 1A negative linear regulator (REG2) 1 7805 1A 5V linear regulator (REG3) 1 LM317T adjustable 1A positive linear regulator (REG4) 2 BUK7909-75AIE 75V 120A 5-pin SenseFETs (Q1,Q3) (SILICON CHIP online shop Cat SC4317) 7 BC557 PNP transistors (Q2,Q4,Q9,Q10,Q13,Q14,Q21) 2 IPP80P03P4L04 30V 80A P-channel Mosfets (Q5,Q7) (SILICON CHIP online shop Cat SC4318) 2 IRF1405 55V 169A N-channel Mosfet (Q6,Q8) 7 BC547 NPN transistors (Q11,Q12,Q15-Q18,Q20) 1 BC327 500mA PNP transistor (Q19) 1 3mm red high-brightness LED, 50mA rating (LED1) (eg, Jaycar ZD0104) 6 15V zener diodes (ZD1-ZD6) 2 33V zener diodes (ZD7-ZD8) 3 1N5819 schottky diodes (D1-D3) 1 1N4004 1A diode (D4) 13 1N4148 signal diodes (D5-D17) Capacitors 1 10µF 6.3V X7R SMD ceramic, 3216 package (1206 imperial) OR 1 47µF 10V tag tantalum 2 10µF 50V electrolytic 4 1µF multi-layer ceramic 10 100nF multi-layer ceramic 4 220pF ceramic 2 10pF ceramic Resistors (all 0.25W, 1% metal film unless otherwise stated) 4 2.2MΩ 4 1MΩ 2 390kΩ 8 100kΩ 2 3kΩ 2 1kΩ 2 680Ω 2 100Ω 66  Silicon Chip 2 30kΩ 2 15Ω 2 27kΩ 6 22kΩ 2 1Ω 0.5W 5% 5 10kΩ siliconchip.com.au Design, Develop, Manufacture with the latest Solutions! Showcasing new innovations and technology in electronics In the fast paced world of electronics you need to see, test and compare the latest equipment, products and solutions in manufacture and systems development. Make New Connections • Over 90 companies with the latest ideas and innovations • New product, system & component technology releases at the show • Australia’s largest dedicated electronics industry event • New technologies to improve design and manufacturing performance • Meet all the experts with local supply solutions • Attend FREE Seminars Knowledge is Power SMCBA CONFERENCE The Electronics Design and Manufacturing Conference delivers the latest critical information for design and assembly. Local and International presenters will present the latest innovations and solutions at this year’s conference. Details at www.smcba.com.au In Association with Supporting Publication Organised by Free Registration online! www.electronex.com.au August 2017  67 Melbourne Park Function Centre 6-7 September 2017 siliconchip.com.au Uploading the BASIC code to the BackPack Having established a serial console connection to the PIC32 (programmed with the MMBasic 5.2 firmware) using a USB-serial adaptor, you will need to set up the display and touch panel as detailed in the February 2016 article on the LCD BackPack. Note that the BackPack (and, if attached, the main board) can be powered from the PC during the programming process. Once you have the touchscreen set up and working, you need to load “Deluxe_eFuse_v1.BAS” into the Micromite. Having downloaded this from the SILICON CHIP website, grab a copy of Jim Hiley’s Windows/Linux “MMEdit” program. It is freeware and available from www.c-com.com.au/ MMedit.htm For Windows, download the setup file called MMEdit.exe and run it. It will work on any Windows version since XP. Run MMEdit and open the BASIC file mentioned above. and V-L voltages and verify that they are in the expected ranges. We’ve already verified they are in the required ranges so it should boot up normally but if a problem is detected, you will get a message on the screen indicating the problem and you can then switch off and check the circuit for faults. Calibration The Common Mode Rejection Ratio (CMRR) of the two differential amplifiers must be optimised to give correct current readings and trip levels. This is relatively easy but requires some test loads. Power resistors are suitable; for example, a 33Ω 5W resistor can be used to calibrate CMRR in both channels, using two 12V plugpacks or batteries (or a ±12V bench supply). Power up the unit by applying +12V to VIN+ and connect the 33Ω resistor between VOUT+ and 0V, with a multimeter connected in series and set in DC current measurement mode. Try to let the resistor hang in free air since it will get quite hot during this procedure. Set VR1 to its midpoint and set the trip current to maximum, then switch on the output. Adjust VR1 until the reading on the LCD screen is close to the reading on your multimeter. Then disconnect the load and check that the current reading falls to 0A. If not, rotate VR1 as little as possible to get a reading of 0A. Re-apply the load current and check that the reading is still correct. If not, use the software current scale calibration (see below) to correct it. 68  Silicon Chip Next, ensure the “Auto crunch on load” option in the Advanced menu is selected and set up the COM port to communicate with the Micromite by selecting the “New...” option under the Connect menu. You can then click the “Load and run current code” button, right-most in the toolbar under the menu (with the icon that looks like a blue stick figure running while holding a torch). You should get a progress dialog and the upload will take around 30 seconds. If it fails, close this window and re-check the COM port settings; make sure you don’t have the port open in another program. Once the upload is complete, the MMChat console window should automatically appear.You can then type in “OPTION AUTORUN ON”, press enter, then execute the “RUN” command to start the program. The unit should then start operating. Assuming it does, unplug the USB lead and proceed with the remainder of construction/set-up. If you have another different value power resistor, you can connect this and verify that the current reading is still correct. The procedure to calibrate the negative channel is similar except that you will need to apply +12V to VIN+ (for the digital circuitry to operate) and -12V to VIN-. You can provide the -12V supply using a second 12V plugpack (with floating [unearthed] output) or battery, as long as you connect its positive terminal to 0V and negative terminal to VIN-. In this screen, you can also change the default screen brightness, whether the screen backlight dims and eventually turns off automatically and if so, the duration of touch inactivity required to activate the automatic dimming. This can be useful to reduce the extra current drawn from the supply, and resulting extra dissipation in the case when using the unit for extended periods. All these setting are stored in flash so you only need to set them once. Software calibration Finishing the assembly While it isn’t strictly necessary, you can also calibrate the voltage measurements, to compensate for variations in resistor values, regulator outputs and so on. To do this, apply power as above but connect your multimeter between VIN+ and 0V, in DC voltage measurement mode. Access the calibration menu by holding your finger in the centre of the touchscreen for several seconds. You can then use the + and – buttons to adjust the VIN+ reading to match what you’re getting on your DMM. Then connect the DMM between VINand 0V and adjust the VIN- reading in the same manner. You can also use this screen to zero the current readings for both channels or adjust the current scaling factor in software using the adjacent +/- buttons. This should only be necessary if you can’t use the CMRR adjustment to get accurate current readings at different current levels. The lid requires a large, straight, rectangular cut-out for the LCD touchscreen to fit through, four mounting holes for the LCD module plus six large, profiled holes for the high-current binding posts. Since cutting all these accurately would be time-consuming and difficult, we can supply a laser-cut replacement lid made from black 3mm acrylic that already has all these holes cut out precisely. The plastic the lid is made from is matte on one side and glossy on the other. Since it’s symmetrical, you can use it either side up, so you can choose how you want the front panel of the unit to look. The rest of the assembly instructions will assume you’re using the pre-cut lid. Next month we’ll go over the remainder of the instructions, give some sample screen grabs from the software and describe its operation. SC siliconchip.com.au ONLINESHOP SILICON CHIP PCBs and other hard-to-get components now available direct from the S .com.au/shop ILICON CHIP ONLINESHOP NOTE: Not all PCBs are shown here due to space limits but the SILICON CHIP ONLINESHOP has boards going back to 2001 and beyond. For a complete list of available PCBs, back issues, etc, go to siliconchip.com.au/shop Prices are PCBs only, NOT COMPLETE KITS! PRECISION 50/60HZ TURNTABLE DRIVER RASPBERRY PI TEMP SENSOR EXPANSION 100DB STEREO AUDIO LEVEL/VU METER HOTEL SAFE ALARM UNIVERSAL TEMPERATURE ALARM BROWNOUT PROTECTOR MK2 8-DIGIT FREQUENCY METER APPLIANCE ENERGY METER MICROMITE PLUS EXPLORE 64 CYCLIC PUMP/MAINS TIMER MICROMITE PLUS EXPLORE 100 (4 layer) AUTOMOTIVE FAULT DETECTOR MOSQUITO LURE MICROPOWER LED FLASHER MINI MICROPOWER LED FLASHER 50A BATTERY CHARGER CONTROLLER PASSIVE LINE TO PHONO INPUT CONVERTER MICROMITE PLUS LCD BACKPACK AUTOMOTIVE SENSOR MODIFIER TOUCHSCREEN VOLTAGE/CURRENT REFERENCE MAY 2016 MAY 2016 JUN 2016 JUN 2016 JULY 2016 JULY 2016 AUG 2016 AUG 2016 AUG 2016 SEPT 2016 SEPT 2016 SEPT 2016 OCT 2016 OCT 2016 OCT 2016 NOV 2016 NOV 2016 NOV 2016 DEC 2016 DEC 2016 04104161 24104161 01104161 03106161 03105161 10107161 04105161 04116061 07108161 10108161/2 07109161 05109161 25110161 16109161 16109162 11111161 01111161 07110161 05111161 04110161 $15.00 $5.00 $15.00 $5.00 $5.00 $10.00 $10.00 $15.00 $5.00 $10.00/pair $20.00 $10.00 $5.00 $5.00 $2.50 $10.00 $5.00 $7.50 $10.00 $12.50 SC200 AMPLIFIER MODULE 60V 40A DC MOTOR SPEED CON. CONTROL BOARD 60V 40A DC MOTOR SPEED CON. MOSFET BOARD GPS SYNCHRONISED ANALOG CLOCK ULTRA LOW VOLTAGE LED FLASHER POOL LAP COUNTER STATIONMASTER TRAIN CONTROLLER EFUSE SPRING REVERB 6GHZ+ 1000:1 PRESCALER MICROBRIDGE MICROMITE LCD BACKPACK V2 10-OCTAVE STEREO GRAPHIC EQUALISER PCB 10-OCTAVE STEREO GRAPHIC EQUALISER FRONT PANEL 10-OCTAVE STEREO GRAPHIC EQUALISER CASE PIECES RAPIDBRAKE NEW THIS MONTH DELUXE EFUSE DELUXE EFUSE UB1 LID MAINS SUPPLY FOR BATTERY VALVES (INC. PANELS) JAN 2017 01108161 JAN 2017 11112161 JAN 2017 11112162 FEB 2017 04202171 FEB 2017 16110161 MAR 2017 19102171 MAR 2017 09103171/2 APR 2017 04102171 APR 2017 01104171 MAY 2017 04112162 MAY 2017 24104171 MAY 2017 07104171 JUN 2017 01105171 JUN 2017 01105172 JUN 2017 JUL 2017 05105171 AUG 2017 AUG 2017 AUG 2017 $10.00 $10.00 $12.50 $10.00 $2.50 $15.00 $15.00/set $7.50 $12.50 $7.50 $2.50 $7.50 $12.50 $15.00 $15.00 $10.00 18106171 $15.00 SC4316 $5.00 18108171-4 $25.00/set Prices above are for the Printed Circuit Board ONLY – NO COMPONENTS OR INSTRUCTIONS ETC ARE INCLUDED! P&P for PCBS (within Australia): $10 per order (ie, any number) PRE-PROGRAMMED MICROS Price for any of these micros is just $15.00 each + $10 p&p per order# As a service to readers, SILICON CHIP ONLINESHOP stocks microcontrollers and microprocessors used in new projects (from 2012 on) and some selected older projects – pre-programmed and ready to fly! Some micros from copyrighted and/or contributed projects may not be available. UHF Remote Switch (Jan09), Ultrasonic Cleaner (Aug10), Ultrasonic Anti-fouling (Sep10), Cricket/Frog (Jun12), Do Not Disturb (May13) IR-to-UHF Converter (Jul13), UHF-to-IR Converter (Jul13) PC Birdies *2 chips – $15 pair* (Aug13), Driveway Monitor Receiver (July15) Hotel Safe Alarm (Jun16), 50A Battery Charger Controller (Nov16) Microbridge (May17) Wideband Oxygen Sensor (Jun-Jul12) Hi Energy Ignition (Nov/Dec12), Speedo Corrector (Sept13), Auto Headlight Controller (Oct13), 10A 230V Motor Speed Controller (Feb14) Automotive Sensor Modifier (Dec16) Projector Speed (Apr11), Vox (Jun11), Ultrasonic Water Tank Level (Sep11), Quizzical (Oct11), Ultra LD Preamp (Nov11), 10-Channel Remote Control Receiver (Jun13), Revised 10-Channel Remote Control Receiver (Jul13), Nicad/NiMH Burp Charger (Mar14), Remote Mains Timer (Nov14), Driveway Monitor Transmitter (July15), Fingerprint Scanner (Nov15) MPPT Lighting Charge Controller (Feb16), 50/60Hz Turntable Driver (May16) Cyclic Pump Timer (Sep16), 60V 40A DC Motor Speed Controller (Jan17) Pool Lap Counter (Mar17), Rapidbrake (Jul17) Garbage Reminder (Jan13), Bellbird (Dec13), GPS Analog Clock Driver (Feb17) LED Ladybird (Apr13) Battery Cell Balancer (Mar16) 6-Digit GPS Clock (May-Jun09), Lab Digital Pot (Jul10), Semtest (Feb-May12) PIC12F675-I/P PIC16F1455-I/P PIC16F1507-I/P PIC16F88-E/P PIC16F88-I/P PIC16LF88-I/P PIC16LF88-I/SO PIC16LF1709-I/SO PIC16F877A-I/P PIC16F2550-I/SP Batt Capacity Meter (Jun09), Intelligent Fan Controller (Jul10) PIC18F4550-I/P GPS Car Computer (Jan10), GPS Boat Computer (Oct10) PIC32MX795F512H-80I/PT Maximite (Mar11), miniMaximite (Nov11), Colour Maximite (Sept/Oct12), Touchscreen Audio Recorder (Jun/Jul 14) PIC32MX170F256B-50I/SP Micromite Mk2 (Jan15) – also includes FREE 47F tantalum capacitor Micromite LCD BackPack [either version] (Feb16), GPS Boat Computer (Apr16) Micromite Super Clock (Jul16), Touchscreen Voltage/Current Ref (Oct-Dec16) Micromite LCD BackPack V2 (May17), Deluxe eFuse (Aug17) PIC32MX170F256B-I/SP Low Frequency Distortion Analyser (Apr15) PIC32MX170F256D-501P/T 44-pin Micromite Mk2 (Now with Mk2 Firmware at no extra cost) PIC32MX250F128B-I/SP GPS Tracker (Nov13), Micromite ASCII Video Terminal (Jul14) PIC32MX470F512H-I/PT Stereo Audio Delay/DSP (Nov13), Stereo Echo/Reverb (Feb 14), Digital Effects Unit (Oct14) PIC32MX470F512H-120/PT Micromite PLUS Explore 64 (Aug 16), Micromite Plus LCD BackPack (Nov16) PIC32MX470F512L-120/PT Micromite PLUS Explore 100 (Sep-Oct16) dsPIC33FJ128GP802-I/SP Digital Audio Signal Generator (Mar-May10), Digital Lighting Controller (Oct-Dec10), SportSync (May11), Digital Audio Delay (Dec11) Quizzical (Oct11), Ultra-LD Preamp (Nov11), LED Musicolor (Nov12) dsPIC33FJ64MC802-E/P Induction Motor Speed Controller (revised) (Aug13) dsPIC33FJ128GP306-I/PT CLASSiC DAC (Feb-May 13) ATTiny861 Thermometer/Thermostat (Mar10), Rudder Position Indicator (Jul11) ATTiny2313 Remote-Controlled Timer (Aug10) When ordering, be sure to nominate BOTH the micro required AND the project for which it must be programmed. SPECIALISED COMPONENTS P&P: FLAT RATE $10.00 PER ORDER# PCBs, COMPONENTS ETC MAY BE COMBINED (in one order) FOR $10-PER-ORDER P&P RATE NEW THIS MONTH: RAPIDBRAKE DDS MODULES (APR 17)   AD9833 DDS module (with gain control) (for Micromite DDS)      $25.00   AD9833 DDS module (no gain control) (El Cheapo Modules, Part 6)      $15.00 DELUXE EFUSE PARTS POOL LAP COUNTER (MAR 17)   two 70mm 7-segment high brightness blue displays plus logic-level Mosfet      $17.50   laser-cut blue tinted lid, 152 x 90 x 3mm      $7.50 (AUG 17) - laser-cut calibration jig pieces     $5.00 (AUG 17) - IPP80P03P4L04 P-channel Mosfets     $4.00 ea. - BUK7909-75AIE 75V 120A N-channel SenseFet     $7.50 ea. - LT1490ACN8 dual op amp     $7.50 ea. ARDUINO MUSIC PLAYER/RECORDER (JUL 17) Geeetech VS1053 Arduino MP3 shield      $20.00 ARDUINO LC METER (JUN 17) 1nF 1% MKP capacitor, 5mm lead spacing      MAX7219 LED DISPLAY MODULES 8x8 LED matrix module with DIP MAX7219 8x8 LED matrix module with SMD MAX7219 8-digit 7-segment red display module with SMD MAX7219 (JUN 17)     (MAR 17) DRV8871 IC, SMD 1µF capacitor and 100kW potentiometer with detent      $12.50 ULTRA LOW VOLTAGE LED FLASHER (FEB 17) kit including PCB and all SMD parts, LDR and blue LED      $12.50 $2.50 SC200 AMPLIFIER MODULE (JAN 17) hard-to-get parts: Q8-Q16, D2-D4, 150pF/250V capacitor and five SMD resistors      $35.00 $5.00 $5.00 $7.50 60V 40A DC MOTOR SPEED CONTROLLER $35.00 MICROBRIDGE (MAY 17) PCB plus all on-board parts including programmed microcontroller (SMD ceramics for 10µF)      $20.00 MICROMITE LCD BACKPACK V2 – COMPLETE KIT (MAY 17) includes PCB, programmed micro, touchscreen LCD, laser-cut UB3 lid, mounting hardware, SMD Mosfets for PWM backlight control and all other on-board parts      $70.00 EFUSE STATIONMASTER (APR 17) two NIS5512 ICs plus one SUP53P06      $22.50 (JAN 17) hard-to-get parts: IC2, Q1, Q2 and D1      COMPUTER INTERFACE MODULES (JAN 17) TOUCHSCREEN VOLTAGE/CURRENT REFERENCE   MICROMITE LCD BACKPACK KIT (programmed to suit) PLUS UB1 Lid    LASER-CUT MATTE BLACK LID (to suit UB1 Jiffy Box) (DEC 16) PASSIVE LINE TO PHONO INPUT CONVERTER - ALL SMD PARTS (NOV 16) CP2102 USB-UART bridge microSD card adaptor       $5.00       $2.50 SHORT FORM KIT with main PCB plus onboard parts (not including BackPack module, jiffy box, power supply or wires/cables) $70.00 $10.00 $99.00 $5.00 All items subect to availability. Prices valid for month of magazine issue only. All prices in Australian dollars and included GST where applicable. # P&P prices are within Australia. O’seas? Please email for a quote To Place Your Order: INTERNET (24/7) PAYPAL (24/7) eMAIL (24/7) MAIL (24/7) PHONE – (9-4, Mon-Fri) siliconchip.com.au/Shop Use your PayPal account silicon<at>siliconchip.com.au silicon<at>siliconchip.com.au with order & credit card details Your order to PO Box 139 Collaroy NSW 2097 Call (02) 9939 3295 with with order & credit card details You can also order and pay by cheque/money order (Orders by mail only). ^Make cheques payable to Silicon Chip Publications. 8/17 Sale ends August 31st 2017. www.altronics.com.au 1300 797 007 Build It Yourself Electronics Centre® August Savers NEW! A 2795 Upgrade your alarm clock to digital radio! 129 $ More channels, more choice. The ideal bedside companion to wake up to your favourite digital or FM station. Large colur TFT display shows time and scrolling digital radio information. (displays analog clock and date when radio is off). 20 channel presets. Two alarm times. Size: 135L x 110W x 90Hmm NEW! A 3D tracking and gesture HAT that lets you control the Raspberry Pi with a swipe, tap or flick your wrist. Detects your gestures up to 15cm away in 3D space. Also works as a tap/touch sensor pad. Slimline design combines both digital multimeter and an 400A AC clampmeter into one unit. Superb ease of use makes it perfect for working on live equipment. An essential for high voltage technicians, electrical trades etc. Features: • 400A AC • DC V to 600V • Capacitance • Temperature • Resistance 70 $ H 8190 SAVE 18% A versatile acrylic bracket for mounting the R-Pi behind monitors - with or without a bracket! VESA 75 & 100mm compatible. Includes cable ties & holes to secure leads. Case sold separately, H 8957 $11.75. Q 0964 $109 85 $ Wi-Fi audio streaming for any amp! 249 15.95 $ NEW! D 5584 $ 49.95 $ Z 6308 Raspberry Pi® VESA Mount SAVE $24 This brilliant music streamer simply plugs into your existing amplifier’s RCA/3.5mm input and pairs with your smartphone or tablet for instant high quality audio streaming. Can be networked into a multi-zone system for control by multiple devices. C 5066 NEW! FlickHAT for Raspberry Pi® Digital Multimeter & AC Clamp Combo ProtoHAT for Raspberry Pi® A HAT board with soldermasked 0.1” holes and stackable header so you dont lose access to the GPIO pins. Slots included for display & camera cables. Pi sold separately. 12 $ NEW! Great for classrooms! Z 6307 9 $ .95 K 9610 Edifier® Active Bookshelf Speakers With Bluetooth streaming. We were floored when we demo’ed these speakers! Great sound from a compact enclosure design. Fantastic sound for your home theatre, hi-fi or gaming rig. Dual analog RCA inputs. Model: R1700BT. Size: 154×258×214mm Prototyping Base For Pi & Arduino UNO 399 $ NEW! A 3601 ‘Getting Started’ Electronics Tool Kit Send HDMI signals wirelessly! Designed to send a 1080p HDMI signal wirelessly up to 35m line of sight using 5GHz band for reliable transmission. Supports full 7.1ch surround. IR control signals are also relayed wirelessly, back to your source equipment. Includes plugpacks. 34 $ .95 T 2162 Great for new enthusiasts, students and educators. This handy kit is supplied complete with carry case and includes all you need to get soldering! • 30W soldering iron with 1mm conical tip •Iron stand • 2m lead free solder • Vacuum solder sucker • Long nose pliers • Side cutters. Build It Yourself Electronics Centres » Virginia QLD: 1870 Sandgate Rd » Springvale VIC: 891 Princes Hwy » Auburn NSW: 15 Short St » Perth WA: 174 Roe St » Balcatta WA: 7/58 Erindale Rd » Cannington WA: 5/1326 Albany Hwy Great for schools and classrooms! This stable acrylic development base features rubber feet and standoffs. Suits P 1020 or P 1002 breadboards (sold separately). *Raspberry Pi for illustration purposes. Amp+ HiFiBerry® 2x25W Amplifier Module A high-quality, highly efficient Class-D power amplifier offering 2x25W output for the Raspberry Pi 3. Ideal building block for multi-room audio designs. Just connect speakers & power up the Pi to listening! Follow <at>AltronicsAU www.facebook.com/Altronics SAVE $47 Z 6404 99 $ SAVE 20% T 2173 23 $ 30pc Precision Driver Kit An aluminium driver with rotating ferrule top for easy servicing of precision high tech devices. Includes 70mm extension and 28 x 4mm hex bits. See web for full contents. Cut, Polish, Grind, Sand & Carve! 119 Micron 172pc Rotary Tool Kit T 2418A 145 $ SAVE $56 350 Q 1350 74.95 $ $ ® Upgrade your old clunker iron! This excellent multi purpose 80W soldering iron is ideal for service technicians, schools, engineers, R&D, production work etc. Japanese long life ceramic element. 200°480°C. 0.8mm tip. 2 year warranty. $ NEW! SAVE $24 T 2120 This workbench essential is just the shot for electronics projects, crafts, hobbies and odd jobs around the house! Powerful 130W motor (this is a real power tool!) with variable speed between 8000 and 33000 RPM. Included is a massive accessory kit of grinding wheels, drills, cutters, sanding discs, polishing pads and more! And it all stows safely away in a hard plastic carry case. Trace cabling with ease The Pocket Hero is here! This nifty 12 in 1 pocket sized saviour helps you fix lifes little problems then folds up to the size of a pack of gum! Includes belt pouch. Sniff out patch cables in racks or check for cable integrity. Ideal for tracing ports in building wiring. Requires 2 x 9V batteries (S 4970B $3.95). 13.95 SAVE $45 Micron Combo Soldering & Vacuum Desoldering Station ® Save space on your bench with this top performing 60W soldering iron and 90W vacuum desoldering station. Removes a 16 pin through hole IC in 30 seconds! Sucks molten solder away from components & pads in no time and is easily cleaned. 160° to 480°C adjustable. Includes 0.2mm soldering tip and three desoldering tips. T 2282 $ T 2052 NEW! $44.95 35 $ Measure temperature without touching T 2480 Twin laser beams for precise measurement between -50°C and 1050°C with 30:1 optical resolution. Adjustable emmisivity to cater for different surfaces. It even connects to an external probe. 2% accuracy. 149 $ Q 1130A 25 $ T 2451 Add 250ml butane for $7.50 SAVE 30% Autoranging Multimeter The perfect enthusiast multimeter! Features temperature range (probe included) and data hold function. 10A current range. SAVE $50 Q 1289 All heat & no flame! Iroda Pocket thermo-gun. Great for removing adhesives & paint. 650°C max. Refillable. ® Handy USB Soldering Iron Powered by a USB port! Great for occasional jobs like fixing a dry joint in an audio cable. Built in switch in the handle and automatic sleep mode ensures safe operation at all times. Includes stand & USB lead. NEW! 16.95 $ T 2699A LIGHT UP YOUR WORKSPACE! X 3250 Warm White X 3251 Natural White NEW! NEW! 19.95 $ LED Strip Light Camping Kit X 3260 65 $ Great for setting up temporary lighting in tents and campsites. Secure it with the included hook and loop ties and plug it into a 12V power source (via car accessory lead). Makes a great camp work light or dim it down for a reading light. Water resistant. Modular Aluminium 12V LED Strips Perfect for lighting cabinets and workspaces in caravans, 4WDs etc. Strips can be daisychained together using an included joiner. Provide a crisp 975 lumen output from 2835 size LEDs. 25Wx10Hx500Lmm. Shop online 24/7 <at> www.altronics.com.au NEW! X 0199A 24 $ .95 Super Bright Head Torch Great for work or play this high brightness 1 Watt LED torch features 7 light modes. Requires 3 x AAA (S 4904 $4.95 4pk) 1300 797 007 QUALITY AUDIO VISUAL & PRO AUDIO GEAR C 0993 10” 180W $99 $299 79 $ SAVE $74 250 $ A 0920 C 0991 8” 100W SAVE $20 255 $ Use your remote control up to 200m away (line of sight) from your equipment. Perfect for controlling your AV system from the patio or entertaining area. Includes plugpacks, IR emitter & receiver. Size 45W x 44D x 32Hmm. Flat TV Bracket With Cantilever Arm Silky smooth cantilever angle adjustment, stays just where you want it to. It even has 14° of tilt adjustment! Engineered for flat screens up to 84” using 600 x 400mm VESA. Max weight, 45kg. UHF Wireless Handheld Microphone Package WOW, a pro grade package with two handheld transmitters for under $200! Offers up to 60m range line of sight in ideal conditions. Offers wireless freedom without sacrificing speech quality. XLR/6.35mm output. Requires 4xAA batteries (lithium AA 2pk $4.95ea S 4906). C 8884 175 $ Control your AV gear up to 200m away! Suits flat TVs up to 84” H 8126B $235 SAVE UP TO $55 Address Large Crowds With Total Ease. An all in one portable PA sound system with amplifier that sets up in just seconds - no expertise required. Just plug into 240V power, switch it on and connect a mic. USB playback makes it easy to play your favourite tunes. Great for clubs, sports events, fetes, carnivals and bingo nights! 199 $ Opus One® 2x100W Stereo Amplifier Receiver Ideal for clubs & organisations. $439 A 2691A Expand your home audio system to the study or entertainment area. Features six stereo inputs, AM/FM tuner and A/B speaker selection. Includes remote. 350 $ POWER FOR AT HOME OR ON THE ROAD! A 0309B $34.95 30 SAVE $30 169 $ NEW! $ M 8623B 17.95 $ USB Car Charger With Readout Allows you to power up two USB devices in your car. Max 3.1A. Readout displays battery voltage & output current. M 8195 Lithium-Ion Car Jump Starter Suits 12V battery vehicles. 16800mAh rated battery provides up to 800A peak output when cranking. Two USB ports are provided for charging devices (like a giant battery bank!). It also has a super bright 1W LED torch in built. Dimensions: 178L x 84W x 45Dmm. NEW! NEW! Stay powered up on your travels! Pick up this great go-anywhere charger to keep your devices charged up on your travels. More than enough grunt to charge up to 4 devices at once! Includes adaptors for Australian, US, UK and European outlets. 5V 4.1A output. 100-240V AC input. 279 $ 9 $ .95 M 8861 1.0A NEW! Travel case included! 16.95 $ M 8862 2.1A SAVE $119 USB Mains Chargers 1A for phones or 2.1A for tablets. Fully electrical authority approved! M 8017A 12V M 8539 Ideal for 4WDs & Caravans Powerhouse® 7 Stage 12V Battery Charger This new model offers support for batteries up to 300Ah with an output current up to 12A! 7 stage charging delivers the appropriate charge current to maintain best performance & battery life. Can also recover deeply discharged cells. Suits permanent connection, making it great for seldom used vehicles. Auto reconnect starts charging again as soon as you connect the unit to mains! 440 $ or M 8018A 24V P 0690 Get Pure AC Mains Power From a Car Battery BIG & BEEFY 3000W SURGE RATING! Provides mains power anywhere, anytime! Delivers pure sine wave AC power to difficult loads, such as laptops, switchmode devices & game consoles. 12V input, 1000W continuous rated. 274 x 131 x 83mm. Shop online 24/7 <at> www.altronics.com.au NEW! $480 24.95 $ Switch Style USB Charge Port Handy USB charger which fits into standard auto and marine switch plates. 6.3mm lug connection. 12V input. 1300 797 007 SAVE $30 Record CD quality sound directly to an SD card! 99 $ 139 K 9350 Control access by the touch of a finger. $ SAVE $40 (SC Nov’ 2015) The Fingerprint Access Controller stores and recognises up to 20 prints and provides quick access for authorised people. An indoor control-panel allows easy setup of the system, while the fingerprint reader is mounted in the supplied wall-plate. K 5530 Touchscreen Audio Recorder Kit (SC June 2014) Offers hours of recording and playback time from an internal USB rechargeable Li-Ion battery. A stereo line input and mono mic input are provided via 3.5mm jacks, plus an internal microphone for instant handheld recordings. 3.5mm audio output & 3.5mm headphone output also provided. All adjustments and recording options are made via the backlit colour touchscreen. Ideal for podcasting, educators and more! $41.95 You save 20% this month! Professional 19” Rack Cases 1U Black H 5031 2U Black H 5032 $50 $70 $55 $70 30 NEW! $ K 9640 Acrylic Sheets New coloured 3mm acrylic sheets to feed to your laser cutter. Make your own enclosures and more! 199x199mm. Reduce the chance of being ‘rear ended’ with the Quick Brake kit. The Quick Brake detects fast pedal movements between accelerator and brake and switches on the brake lights before your foot reaches the brake pedal. LATEST SILICON CHIP KITS 13.50 $ NEW! NEW! K 5350 SAVE $20 44.95 $ NEW! $115 95 After massive customer demand we’ve found a source of quality rare earth magnets. T 1464 has 4.5mm countersunk hole. Add a spring reverb to your favourite guitar amp. 8 Digit Frequency Meter Kit A compact high resolution meter capable of reading up to 55MHz (even more with an external prescaler!) Ideal for technicians, general servicing and lab use. Can be USB powered. (SC April ‘17) This two spring tank type reverb unit provides reverberation effects for your guitar or other instrument. Adds complexity and depth to your sound to impress the punters. Easy to build and integrate into other projects thanks to its 9-15VAC or 12-15VDC power requirement. 9 $ .95 K 1134 39.95 $ NEW! 39.95 $ NEW! K 1137 Temperature Alarm Kit Combat zika and other mosquito borne viruses with this cheap and easy to build inaudible tone generator. Lures male mozzies to their doom! A simple temperature alarm for use with aquariums, home brew, heating & cooling systems etc. -33°C to 125°C range. Under and over indicators with 90dB piezo alert. B 0092 Build a mozzie lure trap Sale Ends August 31st 2017 Phone: 1300 797 007 Fax: 1300 789 777 Mail Orders: mailorder<at>altronics.com.au 44.95 $ H 0230 Pull Type Solenoids K 6075 eFuse Resettable Breaker Kit (SC April ‘17) Ideal resettable fuse for fixing equipment or automotive wiring. Adjustable trip current between 0.3 to 10A. 9-15V DC. Model Type RRP T 1464 25x5mm Countersunk $10.95 $9.95 $7.95 T 1465 25 x 5mm Solid T 1466 10 x 3mm 4 pack SMD Parts Storage Case NEW! NEW! ■ H 0725 Clear. ■ H 0726 Red Transparent ■ H 0727 Blue Transparent ■ H 0730 White ■ H 0731 Black ■ H 0732 Yellow Rare Earth Magnets! Easy to build! $ K 2610 H 5012 K 4344 $ (SC November ‘14) Schedule your appliances to turn on and off with this handy kit, helps to save power and add convenience to almost any appliance. Includes a RF remote mains switch. 2U Raw A huge assortment of parts for experimenting and building. Includes diodes, LEDs, switches, resistors, caps, strip board, a motor & more. Normal RRP value $55! $89.95 69 NOW $66.95 $93.50 $73.95 $93.50 Tinker Part Pack 35 Remote Switch Mains Timer Kit Normally H 5011 Type Tough powdercoated finish with raw (silver) or black anodised aluminium front. Aluminium rear panel for easy drilling. $ K 6130 Model 1U Raw Ideal for any project requiring a pulling actuator. 12V DC operating voltage. Full specs on website. NEW! 13.95 These tiny compartments are great for storing your SMD parts, each feature a spring loaded top. Includes 8 interlocking 18x18mm compartments that can be expanded to store as many parts as you need! NEW! NEW! 27.95 $ $ J 0900 Ultra mini J 0902 Standard Find your nearest reseller at: www.altronics.com.au/resellers Please Note: Resellers have to pay the cost of freight and insurance and therefore the range of stocked products & prices charged by individual resellers may vary from our catalogue. © Altronics 2017. E&OE. Prices stated herein are only valid until date shown or until stocks run out. Prices include GST and exclude freight and insurance. See latest catalogue for freight rates. LTspice Part 2: by Nicholas Vinen simulating and testing circuits This month, we build a flexible and realistic relay simulation in LTspice and then incorporate it into a simulation of the SoftStarter circuit, based on the power supply circuit shown last month. L ast month, we ended our first SPICE tutorial with a working model of the mains power supply from the SoftStarter, a project published in the April 2012 issue. It was designed to reduce the inrush current of mains devices, especially those with capacitor-input power supplies, such as desktop computers. We commented that LTspice has no built-in ability to simulate the relay in that circuit, so to complete the simula- tion, we would need to create a relay simulation. So we're going to show you how to do that this month. We'll start by creating a fairly basic relay simulation and introducing it into our test circuit, to demonstrate that it works. We will then increase its flexibility and realism. Next time, we'll show you how to set up LTspice to simulate an NTC thermistor, letting us properly simulate the entire SoftStarter circuit. We'll finish by taking a look at some of the other SPICE tools you'll need to understand in order to simulate even more complex devices. We won't go over the fine details of using LTspice which have already been described last month, such as how to place components, wire them up and set their values. If you need a quick refresh, re-read last month's article before diving into this one. Fig.1: the final circuit from last month's LTspice article, which was very similar to the mains power supply for the SoftStarter from the April 2012 issue of Silicon Chip. 74  Silicon Chip siliconchip.com.au 1. Creating the relay simulation model As explained last month, SPICE requires models for anything but the most basic components (resistors, capacitors and inductors) in order to properly simulate the properties of devices like diodes, transistors, Mosfets and so on. But you can also build models for custom devices such as ICs which SPICE may not already have provision for. These are made by creating a “subcircuit” which is hidden inside a component symbol. Our initial goal is to create a symbol for an SPDT relay with a 12V DC coil and get it to operate as you would expect. That is, initially the COM and NC terminals should be connected by a very low resistance while there should be a very high resistance between the COM and NO terminals. Once the coil voltage rises sufficiently high (above the “must operate” voltage, about 9V for a 12V relay), those two resistances should be reversed, simulating the relay armature switching. If the coil voltage then drops below the “must release” voltage (say 3V for a 12V relay), it should go back to its initial state. And the coil should draw a realistic current and should also be inductive, like a real relay coil, to properly test the driving circuitry. So, launch LTspice and open up the circuit we finished with last month, named “tutorial1.asc”. If you didn't go through last month's tutorial and create this file, you can download it from the Silicon Chip website. The final circuit from last month is shown in Fig.1. Now create a new, blank circuit for the relay subcircuit by selecting File→New Schematic from the main menu. Save it in the same directory as tutorial1.asc and call it “relay. asc”. Start off the relay circuit by placing a resistor in series with an inductor, both arranged vertically. This will form the coil of our relay. In order to determine their values, we had a look at the data sheet of a typical 2A relay, the Omron G5V-2 (available from element14, Cat 9949496). The data sheet gives siliconchip.com.au the following typical values for a 12V DC coil relay: 41.7mA coil current, 288W coil resistance, 0.47H coil inductance (armature off), 0.74H coil inductance (armature on), must operate voltage: 9V and must release voltage: 0.6V. So we can set our resistor value to 288 (ohms is implied) and for now, let's ignore the effect of the armature switching and just set the inductance value to 0.47 (Henries; you can add an H at the end if you want). Now, we need to tell SPICE where the external relay connections will be. There will be five: two for the coil plus the COM, NO (normally open) and NC (normally closed) terminals. For the sake of simplicity, let's label the top end of the coil “+” and the bottom end, “-”. To do this, we use the “Label Net” tool in the toolbar, which looks like the letter A in a box. Click this, then type in “+”. But before clicking OK, change the “Port Type” option to “Bi-Direct.” (which allows signals/ current to flow in both directions). Click OK, then place this port right at the top of your series resistor/inductor combination. Then repeat the same steps to place a port labelled “-” at the other end. The result is shown in Fig.2. That completes the coil simulation, for the moment, so let's go on to the relay contacts. These are simulated using two “voltage controlled switches”. To place the first one, click on the “Component” button in the toolbar (which looks like a logic gate), then scroll across until you can see the “sw” option. Click on this and you will see the description above says “Voltage controlled switch”. Click OK. Place the first one to the right of the coil components, with its top near the top of the coil, then place a second voltage-controlled switch immediately below it, so that its bottom is near the bottom of the coil. Draw a wire joining the two vertically adjacent switch contacts. You can now label the top of the top-most switch “NO”, the wire joining the two switches “COM” and the bottom of the bottom-most switch “NC”, using the same procedure as you did to label the two ends of the coil. Don't forget to set them as bidirectional ports. Fig.2: this shows the first part of our 12V DC coil relay with two external connections, modelled after the Omron G5V-2. The “+” and “-” labels are the names of two ports which are used to connect this fragment to the main circuit. August 2017  75 2. Configuring the switches Besides two contacts, each voltage-controlled switch has terminals labelled + and -, to connect the control voltage. Wire these up in parallel, ie, + to + and - to -. Then wire the + ends to the top of the coil and the - ends to the bottom of the coil. This is shown in Fig.3. Now we need to describe how the switches should respond to the control voltages. To do that, we create two switch models and assign one to each switch. This actually turns out to be pretty easy. The main parameters for a switch model are Vt (threshold voltage), Vh (hysteresis voltage), Ron (on-resistance), Roff (off-resistance) and Ilimit (current limit). You can see the whole set of parameters by accessing LTspice's built-in help (eg, press F1). Just type “sw” in the search box, press enter, then double-click on the “Voltage Controlled Switch” heading which appears below. Now we create our switch model for S1. Let's call it SWa. Click on the SPICE Directive button in the toolbar (it says “op”), then type: .model SWa SW(Ron=0.01 Roff=10Gig Vt=6V Vh=3V Ilimit=2A) After entering this, click OK and place the directive below the circuit components. This defines the on-resistance as 10mW, off-resistance (leakage) as 10GW, the switchon threshold as 9V (Vt+Vh), the switch-off threshold as 3V (Vt-Vh) (in our experience, a realistic value for a 12V relay) and sets the current limit to 2A; LTspice will limit current through the switch to this figure during simulation. Now right-click on S1 and change its “Value” parameter to “SWa”. This tells SPICE to use that model for switch S1. Using the same procedure, we'll create another switch model called SWb, as follows: .model SWb SW(Ron=10Gig Roff=0.01 Vt=6V Vh=3V Ilimit=2A) Note that all that's changed is that we've swapped the on-resistance and off-resistance values around, thus reversing the switch logic, ie, 76  Silicon Chip it will be off if the control voltage is above 9V and on if it's below 3V (in between, it will retain its previous state). Having also placed this directive in the circuit, change S2's model to SWb. Your circuit should now look like Fig.4. That completes our initial circuit defining how the relay works, so save it. Now we create a symbol for it, so we can place it in our main circuit. Fig.3: we have now added two voltage controlled switches (for NO and NC) to our simulated relay coil, with the common connection of the two switches connected to the common or COM port on the subcircuit. Fig.4: these two switch models have been added to tell LTspice how the switches should behave during simulation, in response to their control voltages. These are added by clicking on the SPICE Directive button on the toolbar (at far right). siliconchip.com.au 3. Creating the relay symbol Select the item in the main menu titled Hierarchy→Open This Sheet's Symbol. When it asks if you want to automatically generate one, say Yes. The result is shown in Fig.5. It has created a box with five ports, to match the five ports in the circuit, with a label on top. While we could use this in the circuit, it doesn't really look like a relay, so we might as well draw an improved symbol. Start by deleting everything; select Edit→Delete, then drag a box around the whole lot. This may seem like it makes the exercise pointless but it hasn't, as we now have a symbol file in the right location. Now choose Edit→Add Pin/Port (or just press “P” on the keyboard). For Label, enter “+” and for Pin Label Justification, choose LEFT. Click OK and place the port near the upper-left corner of the screen. Add another Pin/Port using the same method, called “-” and place this directly below the “+” port, near the bottom-left corner of the screen. Now we're going to place another port but just use it as a reference, so don't bother with labelling it. Just press “P”, click OK, then place it two grid squares below the “+” port box. Choose Draw→Line (or press “L” on the keyboard) and draw a vertical line, starting right in the middle of the “+” box and ending right in the middle of the unlabelled box. Now use the Edit→Delete option to delete the reference port we just placed (drag a box around it). Repeat this procedure to draw a line of the same length up from the “-” port. Next, use the Draw→Rect option (or press “R” on the keyboard) to draw a box touching the ends of the two lines and centred on them. You should have a result similar to that shown in Fig.6. That represents the coil of our relay. Next, place three additional ports, to the right of the coil: one labelled “NO”, BOTTOM aligned, to the right of the “+” port (in the same vertical position); one labelled “NC”, TOP aligned, to the right of the “-” port and immediately below the “NO” port, and one labelled “COM”, BOTTOM aligned, halfway between the other two. You can now proceed to draw the lines shown in Fig.7, representing the relay contacts. Hint: once you've drawn the top half, you can use the Edit→Duplicate command, then rotate and flip it and drop it in place at the bottom to avoid repeating the work. So that the symbol will appear with a component label next to it later, go to the Edit→Attributes→Attribute Window menu option, then click on InstName and then OK and place the name above the coil, as shown in Fig.7. The symbol is now complete so save it. Fig.5: now we move onto creating the relay symbol by selecting Hierachy→Open This Sheet's Symbol on the menu bar in LTspice. This is the default symbol that is created. Fig.6: we could have used the default symbol but decided to instead build one that looks more like a relay symbol, starting with the coil, which is drawn with lines and boxes. Fig.7: now we've added lines depicting the armature and normally open/normally closed switch contacts and placed the appropriate ports at the end of each line. siliconchip.com.au August 2017  77 4. Using the relay model Now that the relay model is ready to test, switch back to the “tutorial1. asc” tab, which will reveal our earlier circuit. We had placed a 1.8kW resistor across diode D3 to provide a simulated load to the circuit. Since the relay coil will be a real load, we no longer need this resistor, so delete it, then use the File→Save As menu option to save the modified circuit as “tutorial2.asc”. Now to place the relay in the circuit. Click on the “Component” option in the toolbar (which looks like a logic gate), then at the top of the dialog, where it says “Top Directory”, click on the directory name and select your User directory instead. Your new symbol should appear (see Fig.8). Click OK and place this so that you can wire it up across D3, then do so. So that we can see when the relay switches in the simulation, wire the NO terminal to the coil +, the NC terminal to ground and connect a resistor between COM and GND and set its value to 1kW. Right-click on the “.tran” directive and change the Stop Time to 500ms and Time to Start Saving Data to 0. Change C1 to 1µF, to ensure the power supply will be able to handle the relay load, then save the result. Your circuit should look similar to ours (Fig.9). We can now run the simulation and if you plot the voltages at VOUT and the COM terminal of X1 (our relay), you should see something similar to Fig.10. The green trace shows the voltage at VOUT. Note how, as soon as it surpasses 9V, the relay switches on. VOUT then drops slightly due to the extra loading from R3 (1kW) but since it does not drop below 3V, the relay remains switched on. You can now experiment by changing the value of R3 to determine what sort of load the circuit can handle before the relay will start to drop out and oscillate. We found the threshold to be just below 220 ohms (see Fig.11). Fig.9: C1 must be changed to 1µF to ensure that the power supply can handle the relay's load, for a simulated 12V DC coil. This causes the circuit to draw more current from the mains on each cycle, keeping C2's voltage up. Fig.8 (below): placing your new symbol in the LTspice circuit. Fig.10: a plot showing the voltage between VOUT and the COM terminal of X1. Once the coil voltage is high enough, the simulated relay switches on and the supply voltage drops slightly, due to the current then flowing through R3. 78  Silicon Chip siliconchip.com.au 5. Improving the relay model We're now going to improve the relay model in two ways. Firstly, we're going to allow you to set the relay voltage when you place the symbol, allowing you to have multiple relays with different nominal coil voltages in the same circuit, if necessary. Secondly, we're going to make it more realistic, by adding a switchon delay, a break-before-make characteristic and varying the coil inductance when the relay switches. Varying the nominal coil voltage requires us to vary the coil resistance, Fig.11: reducing the value of R3 causes the supply voltage to drop once the relay switches on, causing it to drop out and “chatter”. This will allow us to determine the maximum load the circuit can handle before the relay drops out. Fig.12: we now add a parameter called “Vcoil” and change the switch models so they use this to calculate the switching thresholds. This will allow us to change the relay coil operating voltage when placing this subcircuit in another circuit. siliconchip.com.au inductance and switch thresholds and hysteresis. To do this, first switch back to (or re-open) “relay.asc” and then add a new directive (using the “op”) button which reads: .param Vcoil 12V Place this in the circuit. This sets the default coil voltage to 12V but allows it to be overridden. If we examine the G5V-2 data sheet, we can see that we can compute the coil resistance for a given voltage as 2 × Vcoil2. The coil inductance (with armature off) can be approximated as Vcoil2 ÷ 300. The “must operate” voltage is 0.75 × Vcoil while a typical drop-out voltage will be around 0.25 × Vcoil. Have a look at Fig.12. We have moved the switches over to the right to make more room (using the Drag tool) and then changed the values of R1 and L1 and the models for the two switches to contain expressions which calculate their new parameters based on the value of Vcoil. Note how the expressions used in component values are surrounded by braces “{}”, which tells LTspice that it needs to evaluate these expressions at simulation time, to determine the values. The model parameters are already subject to evaluation at simulation time, so no braces are added there; we simply substituted mathematical formulae based on Vcoil for Vt and Vh. Save the new model, then go back to the main circuit and right-click on the relay, X1. You can now check the box next to the “PARAMS:” label, then just to the right, type in “Vcoil=9V”. If you re-run the simulation, you will now find that the relay does not switch on, because VOUT does not exceed 6V, due to the lower coil resistance of the relay (162W). You can now change C1 to 1.5µF and re-run the simulation. The relay will now switch on due to the increased coil voltage, at around 6.5V, and remains on since the minimum supply of around 3V is enough to keep the lower-voltage relay latched. August 2017  79 6. Increasing realism While it will have a negligible impact on this simulation, in some cases, attention to detail in the operation of the simulated component may be the difference between the simulation giving results that are true to life or not. Since it isn't too difficult, let's incorporate the relay latching delay, break-before-make characteristics and coil inductance changes in case those are important later. Our updated model is shown in Fig.13. We have disconnected the NO, COM and NC terminals from S1 and S2 and connected a 1V voltage source (V1) across the switches instead so that the junction of the two switches changes from 0V and 1V immediately when the relay should switch on. This then passes through an RC filter comprising a 1GW resistor and 1pF capacitor. The very high resistor value and very low capacitance were chosen so that the capacitor charging current is insignificant compared to the coil current. We need to connect the negative end of the capacitor to the coil negative end to keep the simulator happy (it doesn't like floating sections of the circuit; another option would be to make this connection with a highvalue resistor). The RC filter provides both a short delay and also allows the following switches, S3 and S4, to have different thresholds so that one will switch off before the other switches on. The NO, COM and NC terminals are connected to S3 and S4 as they were connected to S1 and S2 before. But S3 and S4 use different, fixed control voltage switching levels. When the relay turns on, S4 switches off as C1 exceeds 0.15V and S3 switches on once it goes above 0.35V, giving the break-before-make action, simulating the motion of the armature through the space between the two contacts. Similarly, at switch-off, the threshold for S3 is 0.85V while C1 must discharge further, to below 0.65V, before S4 switches back on. The effect of these changes can be seen in the simulation shown in Fig.14, where the main circuit has 80  Silicon Chip been changed so that both the openings and closings of both contacts can be observed. Note how the voltage at the NC terminal (green) drops to 0V (due to the 200W pull-down resistor) about 1ms (the transfer time) before the voltage at the NO terminal (blue) shoots up due to that contact closing. The final relay.asc and relay.asy files can be downloaded from the Silicon Chip website, along with the tutorial2.asc circuit, as shown in Fig.10. Fig.13: the updated relay model shown above incorporates a switching delay and hysteresis. S1 & S2 produce a control voltage which passes through an RC filter. The resulting voltage then controls the simulated armature of S3 and S4. Fig.14: the green and blue lines above show the effect of the supply voltage at the COM terminal being switched to the NC and NO terminals. As you can see, the updated relay model now has a “break-before-make” characteristic. siliconchip.com.au 7. Varying the coil inductance This is a pretty small detail but in some cases, it might be important. As we mentioned earlier, a relay's coil inductance changes as it switches since the magnetic circuit is also changing. However, this is pretty tricky to simulate in a generic way, since in some cases (such as the G5V-2), coil inductance increases with the armature on while in other cases, like the smaller G5V-1 version, it decreases. This depends on the relay's construction. Fig.15 shows a modified version of the relay model which varies the inductance as it switches. A parameter called “Ldelta” controls the change in inductance; if it's positive, the inductance increases when the relay switches on by the proportional amount (ie, 0.5 = 50%) and if it's negative, it decreases the inductance by a similar amount. To achieve this, we slowly switch a second inductor in parallel with the main inductor using a P-channel Mosfet. Unfortunately, SPICE lacks the concept of a voltage (or current) controlled resistance, so a Mosfet is the closest thing we have. Voltage source V2 is used to pro- vide the fixed gate bias to bring it on the edge of conduction while voltage-controlled voltage source E1 amplifies the relay control voltage to switch the Mosfet either on or off as the relay switches. Formulas built into the various parameters shown below the circuit calculate the required secondary inductor value and Mosfet gate scaling coefficients to provide a smooth transition in inductance as the simulated relay switches. The changes in coil current profile over time for three different values of Ldelta (0.5, -0.5 and 0.01) are shown above the circuit. Note that you can not set Ldelta = 0 as the formulas would break down. If you don't need this detail in your simulation, you're probably better off sticking with the simpler relay model which will be faster to simulate. Building a complete SoftStarter circuit The next tutorial will provide the information needed to finish and simulate the complete SoftStarter circuit. The critical piece we're still missing is the NTC thermistor. Simulat- ing this is quite complex because it involves calculating the instantaneous dissipation, modelling the resulting heating, tracking the temperature and then reducing its resistance as the temperature builds. This will involve designing several other very useful subcircuit building blocks which will no doubt come in useful for many other purposes. These include an analog multiplier (to multiply the voltage and current to calculate power), precision rectifier, absolute voltage generator and finally the NTC thermistor itself. In the process of designing these blocks, we will explain how to use voltage-controlled voltage sources, current-controlled voltage sources, constant current sources/sinks, voltage-controlled current sources/ sinks, current mirrors (built using current-controlled current sources/ sinks) and provide some other handy hints for building SPICE models such as the best way to buffer and invert signals, and apply gain or attenuation. For now, feel free to experiment with the models and circuits we've SC covered in this instalment. Fig.15: a modified version of our relay model which varies the coil inductance (by Ldelta) as it switches on and off. Depending on the type of relay being simulated, coil inductance can increase or decrease when the coil is energised. siliconchip.com.au August 2017  81 RapidBrake EMERGENCY STOP signalling for virtually any vehicle Give the guy behind you more time to pull up! PART 2 – by John Clarke Last month we described how this project uses an accelerometer module to detect heavy braking and then flash the brake lights or hazard lights. This will give a dramatic warning to following drivers, so that they can avoid running into you. This month we give the assembly details for the PCB, show the various wiring permutations for brake and hazard lights in most vehicles and the set-up procedure to make sure that the signalling is triggered under heavy braking. A ll the components for RapidBrake are assembled onto a single PCB, coded 05105171 and measuring 106 x 58.5mm. This is housed in a plastic utility box measuring 129 x 68 x 43mm (Jaycar HB-6023 or Altronics H0153). The 3-axis accelerometer module (Jaycar XC-4478) is also mounted on the PCB. Follow the diagram of Fig.4 when installing the parts. You can install the resistors first. The colour codes for the resistors are shown in table on page 38 of last month’s issue. A digital multimeter should also be used to check the values of each resistor since some of the codes can be hard to decipher. Diodes D1, D2, D3 and ZD1 are the next to be installed and these need to be inserted with the correct polarity with the striped end (cathode, k) oriented as shown in the overlay diagram. We recommend using an IC socket for the PIC micro, IC2. IC1 can be directly soldered to 82  Silicon Chip the PCB or you can also use an IC socket. Take care with orientation when installing the sockets and when inserting the ICs. There are seven test points and you can install PC stakes for these if you prefer. These test points are located at TP1TP5, GND & +5V. Install the two 3-way headers for JP1 and JP3 and the two 2-way headers for JP2 and the shunt keeper. The capacitors can be installed next. The electrolytic types must be oriented as shown and note that a ceramic 100nF capacitor is located near the cathode of D2. The remaining 100nF capacitors are MKT polyester. Then install Mosfets Q1 & Q2 and also REG1 and take care not to mix them up as they each use the same package. Trimpots VR1 to VR4 are next. VR1, VR2 and VR4 are 10kΩ and may be marked as 103. VR3 is a 1kΩ trimpot that may be marked as 102. These are oriented with the adjusting screw as shown. Install the XC-4478 accelerometer module by passing its five header pins through the allocated holes on the PCB. Then solder the header pins while ensuring the module is close to and parallel with the PCB. siliconchip.com.au Fig.4 (below): the same-size component overlay for the RapidBrake with its connections shown – use these in conjunction with Figs.6-8 overleaf, depending on which wiring you choose. A same-size matching photo (at left) will also guide you with construction. We recommend the use of sockets to mount both ICs – just make sure the orientation is correct! Incidentally, there are some minor differences between the prototype photograph and the final version. This step is most important because we rely on the fact that the horizontal axis of the accelerometer is parallel to the PCB – so don’t mount it crookedly! CON1 to CON5 can now be installed. CON1-CON3 are 3-way types and CON4 and CON5 are 2-way. CON1-CON4 are firstly connected together by using the dovetail mouldings on the side of each connector to slide the parts together. Install them with the wire entry closest to the edge of the PCB. The optional CON5 (for an external LED, if required) is Fig.5: these diagrams have the correct angles for the 6m/s2 slope adjustment (below) and the 2.5m/s2 slope adjustment (below right). Our original idea was for readers to photocopy these and use them as a template (which you can still do if you wish) but we then made a laser-cut jig which makes the whole /s operation much 6m easier (see overleaf). 2 also installed with the wire entry to the outside edge of the PCB, as shown in the photos and Fig.4. Finally, LED1, RLY1 & RLY2 can be installed. LED1 is placed with the top of its lens no higher than the top of the relays. Carefully check that all components are correctly installed and soldered. Testing & setting up Make sure IC2 is out of circuit and connect a 12V supply to the CON4 terminals. Check that there is close to 5V between the GND and +5V test points (left side of PCB). The voltage should be between +4.925V to +5.075V. If all is correct, switch off power and install IC2. If the voltage is incorrect, check that the LP2950ACZ-5.0 regulator is placed in REG1’s position and that the leads are soldered in correctly. You need to install the PCB in the plastic box before you can set it up. Insert the PCB into the box and mark out the mounting hole positions on the base. Drill them to 3mm. t on Fr 2 /s 2.5m 9.81m/s2 =1g 37.71 siliconchip.com.au Upper Threshold slope Front 14.76  9.81m/s2 =1g Lower Threshold slope August 2017  83 Fitting the completed PCB inside the case. It must be in the case before the compensation and calibration procedure can be commenced. Attach the PCB to the box using four 6.3mm tapped spacers. One or two holes are also required at one end of the box for the cable glands. If you are wiring to the brake switch, only one cable gland will be required. For wiring to the hazard lamps you will find it easier to use two cable glands to allow for the extra wiring. Initially, you need only the wires for +12V and 0V (GND) connected to CON4. The first step is to select the X or Y output of the accelerometer module to be monitored by the RapidBrake circuit. This gives you the option of having the long axis of the PCB (box) aligned with the long axis of the vehicle if you use the X output or having the long axis of the PCB aligned across the vehicle (ie, the short axis). So you should place the shunt in the X or Y position of JP1 accordingly. Power up the PCB and LED1 should light for about one second. Then wait several seconds (with the box sitting on a horizontal surface) and adjust VR1 so that voltage be- tween GND and TP1 is around 4V. Similarly, adjust VR2 for about 2.5V at TP2. These voltages are not critical but should be set to within about 200mV of the stated values. Compensation/calibration jig To do the adjustments for compensation and calibration, you will need two templates which match the angled slopes shown in Fig.5: one for the 6m/s2 upper adjustment and the other for the 2.5m/s2 adjustment. These can be photocopied and glued or taped to cardboard and cut to shape to make the sloped templates. However, as we went through the process for doing these adjustments, it became obvious that manipulating the plastic case and template and adjusting trimpots while monitoring voltages on the PCB with a multimeter was well-nigh impossible – you need four hands! Since none of the SILICON CHIP staff actually have four hands, we decided to design and laser-cut a jig which would making holding the box at the required angles easy. We have included pictures of the components of the jig, the jig in assembled form and how the jig is used for the various measurements. To make our life a little easier, we designed this jig for adjustments on the X-axis, and laser-cut it from polycarbonate. The cut sections are shown at left with the assembled jig at right (see the photos which explain how we used it). We figured it would also make our readers’ lives easier – so we’ve made it available from the SILICON CHIP online shop. (Cat SC4345). 84  Silicon Chip siliconchip.com.au The parts for the jig are available at low cost (just $5.00 plus p&p) from the SILICON CHIP on-line shop and they just clip together. Quiescent output adjustment OK. So connect a 12V supply and monitor TP1 again with your DMM. We now need to find the angle of tilt for the Z-axis reading where the voltage is at its maximum. Ideally, this should be when the box is on a horizontal surface but it may be very slightly off from horizontal due to slight misalignment of the accelerometer PCB and/or the accelerometer IC. Step 1: If the jumper at JP1 is set for the Y-axis, go to step 2. If the jumper is set for the X-axis, as before, slightly angle the box up a little at the CON1-CON4 end and then up a little at the IC1 end to find the angle where TP1 shows maximum voltage. You can use a piece of thin plastic to prop the PCB at this angle (we used the lid of the box as it was handy). Now go to Step 3. Step 2: If the jumper at JP1 is set for the Y-axis, again using the box lid or something similar, tilt the PCB slightly at the trimpot side and then at the CON5 side to find the angle where the TP1 voltage is at maximum. siliconchip.com.au Step 3: Now, making sure the PCB is kept very still, insert a shorting jumper at JP2. You have one second before the voltages at TP2 and TP1 are stored inside IC2. These are the quiescent voltages for the accelerometer. LED1 will light up once the values are stored and the jumper link can then be removed. If you need to measure and store the quiescent voltages again, reinstall the jumper. Tilt compensation Step 4: Compensation for tilt is done with a jumper shunt in the UP/DN position of JP3. This allows the gain of the compensation to be adjusted while angling the PCB to simulate a sloped road. If JP1 is set for the X-axis, the case is angled up at the CON1-CON4 end and then up at the IC1 end by about 15° each way from horizontal. If JP1 is set for the y-axis, angle the case up at the trimpot side and then up at the CON5 side by about 15° from horizontal in each direction. The first photo shows the case sitting on the low level of the jig, corresponding to an angle of very close to 15° (14.76° to be precise). Use your multimeter to check if the voltage at TP5 remains relatively constant for the ±15° range. Trimpot VR3 is adjusted to give the required compensation gain. Set VR3 so the variation in voltage over the ±15° range is less than 100mV in each direction. There shouldn’t be a variation of much more than August 2017  85 Fig.6: shows the wiring for positive (left) and negative (right) brake lamp switching arrangements. The common (COM) and normally closed (NC) contacts of RLY2 are connected in series with the brake switch in both cases. 100mV in each slope direction over the full 37.71° range (corresponding to the 6ms/s2 slope in the diagram of Fig.5). Note however, that you will need to change the angle of the case very slowly, since the Z output reading is averaged out and so will not provide an immediate compensation of the X or Y output. When the adjustment is satisfactory, remove the jumper from the UP/DN position. The compensation gain value will be stored in memory. Readjustment of VR3 in the next calibration step will not alter the compensation. Deceleration calibration Step 5: This step sets the 6m/s2 and 2.5m/s2 deceleration thresholds. Initially set TP3 to 3.3V, by adjusting VR3. Similarly, set TP4 to 2.8V, using VR4. Place the shorting shunt for JP3 in the Calibrate position. In this position, the TP5 output shows the measured voltage of the X or Y signal and this is without any slope compensation. This voltage is compared against the VR3 and VR4 trimpot settings that provide the upper and lower braking thresholds. When the TP5 voltage is above TP3, this will initiate the emergency brake signalling. The emergency brake signalling will cease once the TP5 voltage drops below TP4. 86  Silicon Chip In practice, RapidBrake is placed on the sloping planes of the test jig to set the upper and lower thresholds, as shown in our photos. In each case, the little arrow for the X-axis (or Y-axis if that it what you have selected) needs to point up the slope. Hence, when you install the RapidBrake in the vehicle, that arrow should point to the back of the vehicle. Step 6: VR3 is adjusted so the LED starts flashing when RapidBrake is raised just a little higher than the slope for 6m/s2. Step 7: adjust VR4 so the LEDs stop flashing just before RapidBrake is placed on the lower slope that is equivalent to 2.5m/s2 deceleration. That completes the calibration for RapidBrake. The jumper can be removed and placed in its keeper position located above JP3. Installation & lamp wiring Regardless of whether you have selected JP1 for monitoring the X or Y-axis of the accelerometer, the case must installed parallel to the floor of the vehicle. You can install a red, orange or green LED for the emergency brake indication on your vehicle’s dash, wired to CON5 so it that connects in parallel with LED1. LED1 is a blue LED and has a nominal 3.3V drop across it when lit. A red, orange or green LED has a voltage drop of 1.8 to 2V drop and it will effectively disable the blue LED. Make sure the LED polarity is correct. The longer lead on the LED is the anode. The +12V terminal should be con- nect to the switched side of the ignition so that power is only supplied when the ignition is switched on. The GND wire should be terminated to an eyelet for the screw connection to chassis. As previously noted, you can connect either the brake lamps or hazard lamps for emergency brake indication. The brake lamp option is the easiest to do but it does not have the same dramatic impact as having the hazard lamps flash repeatedly when the brake lamps light up. Fig.6 shows the wiring for positive and negative brake lamp switching arrangements. The common (Com) and normally closed (NC) contacts of RLY2 are connected in series with the brake switch. That way, the brake lamps will be switched on normally with the brake pedal switch, but will flash when RLY2 is switched on and off during emergency stop signalling. Use 5A-rated automotive wire for the connections. Fig.7(a) shows the wiring for the hazard lamps for negative side switching (ie, all lamps are connected to +12V). Fig.7(b) shows the detail for for positive switched lamps. In both cases, RLY1 isolates the connection to the indicator and hazard lamp flasher unit during emergency stop signalling. For the negatively switched version RLY1 intercepts the connection from the + terminal of the flasher and the common of the indicator switch. For the positive switched lamps (Fig.7(b)) wiring diagram, RLY1 intercepts the C connection of the flasher to the Common of the indicator switch. When RLY1 is switched on, the hazard lamps are temporarily prevented siliconchip.com.au Fig.7(a): wiring for hazard lamps switched on the negative side Fig.7(b): similarly, wiring for hazard lamps switched on the positive side from operating and RLY2 then flashes them independently of traffic indicator operation. The double pole contacts for RLY2, switch the left and right side indicator lamps separately. Note that some vehicles may drive their indicators in a different manner, eg, with individual lines from the siliconchip.com.au body computer driving the lamps on each side or even controlling them via CANbus. So before you go to wire your vehicle up, check its service manual. If the two sides are driven independently, you will need to drive a DPDT relay with the RLY1 outputs to disconSC nect both at the same time. August 2017  87 Almost every mobile phone, tablet and laptop PC has a lithium-ion rechargeable battery and larger packs made from similar cells are the main power source for many electric vehicles. This article explains how these batteries actually work and how they’re best charged and discharged. What you need to know about Li-ion Cells & Batteries I n the last few years, lithium-ion based cells and batteries have overtaken all other types of rechargeable power source for portable electronic devices like mobile phones and laptop PCs. That’s because they provide a much higher energy storage density than earlier lead-acid, nickel-cadmium (Nicad) or nickel-metal hydride (NiMH) batteries. It’s also because they can be charged much faster and they withstand repeated charging and discharging cycles better, maintaining more of their capacity for longer. They’re different! But lithium-ion battery technology is rather different from the earlier battery types and so these cells and batteries need to be treated differently when it comes to charging and discharging. 88  Silicon Chip You can’t charge a Li-ion battery using a charger designed for Nicad or NiMH batteries, for example. And although Li-ion batteries don’t have any significant memory effect and can hold a charge for much longer than other rechargeables, they do need to be recharged as soon as their terminal voltage drops below a “safe” level. In this short article, we will try to give you enough understanding of Liion cells and batteries to allow you to get the most from them. Just before we start though, a bit of clarification. Although many people use the terms cell and battery interchangeably, strictly speaking, they don’t have the same meaning. So here we’re going to be using the terms according to their strict definitions, using “cell” to refer to a single energy storage element and “battery” to refer to a group of cells connected by JIM ROWE together in series or parallel, to store more energy and/or provide a higher terminal voltage. The lithium-ion cell First of all then, what exactly is a lithium-ion (Li-ion) cell, and how does it work? The three elements in a basic Liion cell are shown in Fig.1: a positive electrode, a negative electrode and an electrolyte layer between them. Both of the electrodes have a layered structure which is termed “intercalative”, meaning that the layers of the material’s molecules allow individual molecules or ions to move through the material. The main component of the positive electrode is usually a layered oxide like lithium cobalt oxide, a “polyanion” such as lithium iron phosphate or a “spinel” such as lithium mansiliconchip.com.au Li-ion cell is that instead of ganese oxide. The negative a liquid or gel electrolyte beelectrode is usually formed tween the two electrodes, a from graphite (carbon), again LiPo cell has a solid polymer in a layered form. electrolyte (SPE) such as polThe electrolyte in a comyethylene oxide (PEO), polymon Li-ion cell is usually a acrylonitrile (PAN), polymmixture of non-aqueous orethyl methacrylate (PMMA) ganic carbonates (such as or polyvinylidene fluoride ethylene carbonate or die(PVDF). thyl carbonate), containing The so-called solid electrocomplexes of lithium ions. lyte is typically one of three The latter are usually lithtypes: dry SPE, gelled SPE ium hexafluorophosphate and porous SPE. Or it may (LiPF6), lithium hexafluorobe a combination of two of arsenate monohydrate (Lithese, with the porous elAsF6), lithium perchlorate ement being a separator (LiClO4), lithium tetrafluorformed from a microporous oborate (LiBF4) or lithium film of polyethylene (PE) or triflate (LiCF3SO3). polypropylene (PP). As you can see, there is Some LiPo cells have a negligible lithium metal prePVDF polymer binder in both sent in the cell, nor is there of the electrodes themselves, any water in the electrolyte. plus an additive to improve This is quite important since electrical conduction. the two react strongly (alFig.1: this diagram shows the basic elements of a LithiumDespite these differences most explosively) together. That’s also why Li-ion ion cell, and how lithium ions move between the electrodes in construction, LiPo cells and through the electrolyte in one direction or the other, operate in exactly the same cells have to be sealed se- during charging and discharging. way as standard Li-ion cells, curely, to prevent the possiple of this type of construction is the as shown in Fig.1. ble entry of water. The main differences are in terms When the cell is being charged, posi- so-called “18650” cell, used in many of physical construction; many LiPo tively charged lithium ions (ie, atoms laptop computer batteries and in small cells are sealed in a flexible foil-type that have lost an electron) move into LED torches (and even electric cars). The name 18650 is a contraction of (polymer laminate) pouch, rather than the negative electrode and take up positions between its layers (over on the its physical size, 18.6mm in diameter a rigid metal case. This allows them to and 65.2mm long. Typically, the 18650 be about 20% lighter in weight than right in Fig.1). They move there from both the elec- Li-ion cell has a capacity of between equivalent cylindrical cells of the same trolyte and the positive electrode, un- 1500 and 3000mAh, with the maxi- capacity. They can also be made in more comder the influence of the electric field mum being about 3700mAh. Claims for 18650 cells with much plex shapes, to fit the available space between the two electrodes created by higher capacities (up to 10,000mAh inside an electronic device (eg, a tablet the charger. Then when the cell is being dis- or more) are simply fraudulent; it computer), allowing the device to use charged, the positively charged lithi- just isn’t possible with present-day a higher capacity battery than would be possible if it had to be a rectanguum ions move back out of the negative technology. Another approach is to flatten the lar prism or cylinder. electrode. Some of them pass through Having said that, most of the LiPo the electrolyte and enter the positive roll into a thin rectangular form, to electrode, while others just move out make it suitable for use in smaller port- cells and batteries you will come able equipment like mobile phones. across will be rectangular and in into the electrolyte. One common cell of this type meas- most cases, they will also be shrinkWhile this is happening, electrons are flowing between the negative and ures 56mm long by 42mm wide by wrapped, likely along with some propositive electrodes through the exter- only 4mm thick, with a rated capac- tection circuitry; see the section below titled “Battery pack protection”. nal load circuit, delivering the ener- ity of 1000mAh. gy that was stored in the cell during What about LiPo cells? Electrical characteristics charging. Before we go any further, we should Lithium-ion cells tend to have a So that’s how the Li-ion cell works. When it comes to construction, many look at how lithium-polymer (LiPo) much higher energy storage capacity than other types of rechargeable cells of the most common Li-ion cells are cells differ from Li-ion cells. Essentially, LiPo cells are just anoth- like the lead-acid, Nicad and NiMH made from electrodes and electrolyte in the form of thin strips, rolled up to- er form of lithium-ion cell and strictly type, for a given size and weight. But just as these types differ from gether in Swiss-roll fashion to produce speaking, they should be called lithium-ion polymer cells. one another, lithium-ion cells have a cylindrical shape. That’s because the main difference their own particular characteristics. This is then sealed inside a cylinbetween a LiPo cell and a standard For example, the nominal voltage of drical outer container. A good examsiliconchip.com.au August 2017  89 ceiver, it would be a potential problem when you want to power something that needs a fairly constant 5V or 3.3V. Because of this, most of the USB Power Bank type devices sold to allow recharging of mobile phones and tablet PCs include a switch-mode DC-DC boost converter, to provide a regulated 5V DC output from the varying output from the Li-ion cell or cells inside. Charging a Li-ion or LiPo cell Fig.2: discharge curves for a rather poor quality 18650 Li-ion cell being discharged at current levels of 1000mA (red), 500mA (purple) and 250mA (blue). a Li-ion cell is around 3.7V but during charging this can rise to around 4.14.2V. Then during discharge, the voltage first drops quite rapidly to around 3.7-3.9V, after which it falls more slowly when delivering most of its charge, before finally dropping to below 3.0V at the end of discharge. (In some cases, discharge is terminated at a higher voltage, resulting in less degradation for each charge/discharge cycle.) You can see this typical behaviour in the curves shown in Fig.2, which shows the voltage of a rather poor quality 18650 cell discharging at three different current levels: 1000mA (red curve), 500mA (purple curve) and 250mA (blue curve). Also shown in Fig.2 are the nominal cell voltage of 3.7V (green horizontal line) and the minimum recommended cell voltage of 3.0V (magenta horizontal line). The latter is the voltage below which further discharging may cause the useful life of the cell to be significantly reduced. Many Li-ion cells have a small electronic “cut-out” or protection circuit included inside the case, to disconnect the load when the cell voltage drops below 3.0V. Cell capacity We should mention here that like many other cell types, the nominal storage capacity (C) of a Li-ion cell is usually defined in terms of the discharge current in milliamps it can provide for one hour before the cell volt90  Silicon Chip age drops to the 3.0V level. So the particular 18650 cell used to provide the curves shown in Fig.2 would be described as having a capacity of about 575mAh, as revealed by the purple curve. This is a bit disappointing, considering that 18650 cells are supposed to have a capacity of between 1500 and 3000mA, but I admit it was an “Asian cheapie”. And as the blue curve shows, it can still deliver a current of 250mA for just on 2.7 hours; not bad at all for a cell measuring only 18 x 65mm. It would be OK for powering a piece of electronic gear drawing less than 250mA. Varying voltage Bear in mind that the voltage output of a Li-ion cell during discharge does vary over a fairly wide range, as shown in Fig.2. While this may not be a problem when it’s used to power a LED torch or even a small radio re- Because Li-ion and LiPo cells can be easily damaged by overcharging, a “safe charging protocol” has been established for them. This defines the best way to charge one of these cells both safely and in close to the shortest practical time. The protocol can be summarised like this: 1. First, the cell is charged with a constant current (CC) until its voltage rises to 4.0V. This corresponds to about 60% of its final charge. (If the cell voltage is much below 3.0V, a smart charger will use a much lower charge current until the cell comes back up to 3.0V, before resuming the full CC charging rate. This is to limit damage from swelling.) 2. Then the charger switches over to constant-voltage (CV) charging, with a charging voltage of around 4.1-4.2V. This second phase continues until the charging current drops to around 5-10% of the initial charging current level, whereupon the charger stops charging altogether since the cell will now be charged to more than 98% of its full capacity. You can see a graphical representation of this protocol in Fig.3. Here the red curve shows the charging current, and as you can see this remains constant during the initial CC mode. Then when the cell voltage (blue curve) rises to 4.0V, the charger switches to CV mode. The charging current then starts Fig.3: graphs showing the safe charging protocol recommended for single Li-ion cells and batteries with the cells connected in parallel. siliconchip.com.au age), it can go back to CV mode to “top up” the cell. Repeated top-ups should bring it very close to 100% of its design capacity. Multi-cell batteries Part of disassembled 18650 Li-ion cell, with a section of the “Swiss Roll” cut away to show the inside construction. to fall, while the cell voltage rises only a little further before staying constant at around 4.1-4.2V. The CV mode continues until the current falls to around 5% of the CC level, signifying that the cell has reached very close to its full capacity (green curve). Then the charger turns off, to prevent overcharging. It might seem a little complex but as you’ll see in another article in this issue, there are now low-cost ICs which take it in their stride. You’ll find these ICs used in many of the low-cost Liion/LiPo chargers and modules. If the charger remains powered, it can continue to monitor the cell voltage and if it drops very much (by say 100mV from the fully charged volt- Li-ion/LiPo cells can be used alone, as in most mobile phones, but they’re also commonly used in multi-cell batteries, with the cells connected either in parallel to provide a higher current capacity, or in series to provide a higher voltage (or both). For example, many USB Power Banks have two, three or four low-cost 18650 cells in parallel to provide extra “grunt”, while some of the Li-ion batteries used in portable power tools may have three, four or five cells in series to provide a higher voltage. It’s easy to pick the batteries which have the cells connected in parallel because they still have the same terminal voltage as a single cell; nominally, around 3.7-3.9V. In contrast, any Li-ion battery which has a higher terminal voltage than this (like 7.6V, 11.4V, 15.2V or 18.5V) must have the cells in series. When it comes to charging, you can treat batteries which have the cells connected in parallel in exactly the same way as a single cell. This means you can use the same kind of charger; it’ll simply take longer to charge the battery than it would with a single cell. But Li-ion batteries which have the cells connected in series should be handled in a different way for charging. For a start, these batteries need a higher voltage from the charger because otherwise, they won’t receive any charge at all; as with other batteries, the various transition and cut-off voltages are simply multiplied by the number of cells in series. In addition, a series string of Li-ion cells ideally isn’t charged in exactly the same way as a single cell because the individual cells may not charge at exactly the same rate, due to variations in cell capacity and internal resistance. The result is that by the time the battery has reached its full charge voltage, some cells may not yet be fully charged while others may be overcharged. These over-charged cells may be damaged, especially if over-charged repeatedly. Because of these problems, seriesstring Li-ion batteries are normally charged using a different kind of charger. This type of charger has a third balancing mode in between the CC and CV modes, where the charging current is either reduced or cycled on and off while the state of charge of the individual cells is brought to the same level by a balancing circuit. This continues until all the cells are charged equally, after which the charger switches to the CV mode until the full charge level is reached. We published a circuit to balance a Li-ion or LiPo battery pack with 2-8 cells in the March 2016 issue (www. siliconchip.com.au/Article/9852). This small module uses a PIC and some analog SMD components to constantly monitor and compare the voltage across each cell during charging and/or discharging and it slightly discharges the cell with the highest voltage, until they all exhibit the same voltage (within a fairly tight tolerance). Note that while it’s a good idea to balance a Li-ion/LiPo battery pack each time it is charged or discharged While we have been concentrating on cells and batteries, Li-ion cells are found in a huge range of consumer equipment; at left is a typical 2900mAh phone battery, while above is a pack from Master Instruments specifically intended to start your car or truck when its battery won’t! It will supply several hundred amps for a short time. siliconchip.com.au August 2017  91 Li-ion Cell and Battery Protection The most common anode material used in Li-ion cells is lithium cobalt oxide, because this gives the best energy density. However, cells of this construction also have a worrying habit of exploding and/or bursting into flames when overcharged. For this reason, loose Li-ion cells and even madeup packs are now banned in many cargo flights; indeed, there are now also some restrictions on carrying devices such as laptop/tablet computers and phones powered by Li-ion batteries on passenger aircraft. This is despite the fact that many (but definitely not all!) Li-ion cells and battery packs incorporate protection electronics, usually consisting of a tiny PCB with a high-current Mosfet and voltage-sensing circuitry which prevents the cell/battery from being charged if the cell voltage exceeds say 4.25V/cell. Normally, charging will stop at 4.2V/cell or less so this will not be activated unless a faulty or incorrect charger is used. Cells and packs without protection are normally cheaper, but given the dangers, we would not recommend using them in most circumstances. Basically, to use an unprotected cell or pack, you need 100% confidence that your charger both uses the correct charging method and also cannot fail in such a way as to over-charge the battery. Many of the protection circuits available will also prevent battery pack destruction due to over-discharging. This works similarly to the over-charging protection, except that it uses a second Mosfet to prevent the pack from discharging any further once its voltage drops below a threshold of usually between 2.7-3.0V per cell. This may complicate charging should the protection kick in, as the charger may no longer be able to properly sense the pack voltage. However, the application of a small amount of current will normally allow the cell voltage to rise into the normal range, disabling the protection and normal (fast) charging can then resume. Some chargers will detect and handle this case by themselves; others may need user intervention. Packs which lack over-discharge protection can easily have cells rendered useless if current continues to be drawn once they are flat. The pack would then require cell replacement or in the worst case, total replacement. Depending on the size of the battery, this could be an expensive proposition. Hence over-discharge protection is always recommended for Li-ion batteries, whether it is built into the pack or the load. Despite their relatively small size, 18650 cells are available with built-in protection circuitry. The adjacent photos show how a small discshaped PCB is sandwiched at the end of the cell, with a connection back to the opThis 18650 protection PCB is shown about three times life size for clarity: it’s actually about 18mm in diameter. This, and the diagram below, shows how the tiny protection PCB is fitted to the bottom end of an 18650 battery. It adds about 3mm to the normal 65mm length. posite terminal and so all current passes through this PCB. It typically contains two SMD Mosfets plus a control circuit to switch them off if the cell voltage is too low or high. The whole thing is then shrink-wrapped to hold it together. So 18650 cells with protection are slightly longer than those without; usually around 69-70mm compared to the nominal 65.2mm and that’s one way to tell if a cell has protection. However, the outside packaging of the cell will usually make it quite clear that it has protection, since this is a major selling feature. As a result, most readers would be well advised to stick to using this sort of cell in their own projects. Incidentally, you can buy Li-ion protection PCBs incredibly cheaply from such places as ebay – for example, the PCBs pictured here are as low as 10 for $AU2.00 – pack and post included! Many other sizes and shapes are also easily obtainable, in a range of currents. If you have a project which uses unprotected cells, you’d be wise to avail yourself of a few! You should also be aware that many (unscrupulous) manufacturers have branded non-protected cells as protected, some even going to the trouble of packing them to increase their length to that of protected cells. There are countless videos (eg, on YouTube: siliconchip. com.au/l/aaeb) showing the disassembly of “protected” branded cells revealing . . . no protection! There are also videos which show how easy it is to check if a cell really is fitted with this vital safety aid. There is an enormous variety of videos (particularly on YouTube) showing just how dangerous Li-ion batteries (and in particular 18650 cells) can be when not handled properly. There’s a huge amount of energy in those little packs just waiting to get out (with the smoke)! Finally, besides the extra cost and size, one other difference with protected cells is that the charge/discharge current may be lower than that for a cell by itself, as the Mosfets in the protection module will have their own current limit. If so, this limit will normally be printed on the outside of the cell. Optional metal plate Wire Optional Top Original 18650 cell PTC and pressure valve (CID) Wire Wrapper 92  Silicon Chip Protection PCB siliconchip.com.au for the best possible lifespan, in practice it takes multiple cycles for a damaging imbalance to build up. Fast and/ or deep charging/discharging exacerbates this effect. So one possible approach is to use a non-balancing charger to recharge a battery “in the field” as long as it is periodically re-balanced back at the home/office/depot. This approach is safest if the battery is never fully discharged nor fully charged, except for when it is connected to the balance charger, since that minimises the chance of any single cell becoming over-discharged or over-charged. The bottom line is that higher voltage, series-connected Li-ion batteries should normally be charged using a specially designed charger. That’s part of the reason why power tools which use Li-ion battery packs come with a matching charger. Safer lithium chemistries and functional differences We mentioned near the start of this article the various different compounds that can be used to form lithium-ion cell anodes but we didn’t describe their relative advantages and disadvantages. As explained in the June 2013 article titled “Get a LiFe with LiFePO4 Cells” by Stan Swan (www. siliconchip.com.au/Article/3816), cells which use lithium iron phosphate in the anode (ie, LiFePO4 cells) have somewhat different properties to the more familiar lithium cobalt oxide (Li-ion/LiPo) cells. 9800mAh and 10,000mAh Li-ions? Unbelievable! The 18650 Ultrafire Li-ions at left and the unbranded cell at right are regularly offered for sale on ebay at very attractive prices (eg, 6 for $13 including postage!). But if you look closely, you’ll see the Ultrafires are rated at 9800mAh. The unbranded cell is even “better” at, wait for it, 10,000mAh (ie, 10Ah!). This is amazingly powerful for an 18650 cell, considering the highest rating 18650s currently being manufactured are about 3700mAh! Many online tests confirm this brand, and many like it, are totally bogus and may not even reach a tenth of their claimed rating! Anything above 3700mAh (and even many below it in some brands!) should not be believed. They are frauds. By the way, $13 is not a bad price for ONE legitimate brand 18650 (eg, Panasonic, Sanyo, etc). The major benefit of LiFePO4 cells is that they are much more tolerant of being over-charged or rapidly discharged (eg, with the terminals shorted) and even if they are damaged from excessive over-charging, don’t tend to fail destructively. They also have a much flatter voltage discharge curve. On the flip side, they have a lower energy density (ie, lower watt-hour capacity for the same size/weight of cell) and they also have a lower terminal voltage, which means LiFePO4 chargers must operate differently from other Li-ion chargers (some chargers can be switched between different modes to suit either type). As stated earlier, a fully charged Liion cell is about 4.2V, nominal operating voltage is around 3.7-3.9V and a discharged cell is around 3.0V. By contrast, a fully charged LiFePO4 cell is around 3.6V, nominal operating voltage is 3.2-3.6V and 2.5V when fully discharged. Also, when a Li-ion/LiPo cell is charged to 4.2V, it will remain at that voltage for a long time (months/years) if untouched. By contrast, LiFePO4 cells charged to 3.6V drop back to around 3.3V a short time after charging ceases. This is similar behaviour to other cell chemistries such as lead-acid and NiMH. LiFePO4 cells are also claimed to survive more charge/discharge cycles, especially deep discharges, compared to Li-ion. Because they are non-flammable, protection circuitry isn’t as critical for LiFePO4 cells but is still a good idea to minimise the chance of cell damage due to over-discharge. Lithium ion manganese oxide and lithium nickel manganese cobalt oxide (anode) cells appear to offer similar properties to LiFePO4 cells, ie, they are safer than traditional Li-ion cells, however, they do not appear to be as popular as LiFePO4 at the moment. SC We visit Australia’s largest battery importer, distributor and packager: Master Instruments At the time of preparing this feature, we took the opportunity to visit Master Instruments Battery Engineering at their new (and huge 5500m2) premises in Milperra, Sydney. A third-generation, family owned Australian company, they’ve grown from primarily making panel meters for the defence forces during WWII to a major player in the Australian electrical and electronics industry with offices in four states. They’re not only the largest importer of cells and batteries in the country, they also manufacture batteries for a huge variety of equipment, eisiliconchip.com.au ther to special order for OEMs or for the wholesale and retail market. They have a large production area packaging and preparing cells into the shapes and sizes required – and to back this up, they carry Australia’s largest inventory of cells and batteries of every shape and size – many you would never have heard of. There are over 8000 individual stock lines in vast racks in the new warehouse. But they also offer support, including R&D if required, for industrial and commercial battery users who need specialised batteries for their equipment – including mining, distribution, medical, transportation, defence and many more. See the Master Instruments story at their website: www.master-instruments.com.au August 2017  93 Vintage Radio By Associate Professor Graham Parslow STC's 1946 model 512 5-valve mantel radio Post WWII, most manufacturers concentrated on producing budget sets in a time of austerity. But as a last hurrah from the 1930s, STC offered the model 512 as a traditional timber cabinet radio with a 5-valve line up. Interestingly, it carried over a feature of pre-war designs – an electrodynamic loudspeaker. Before the war, STC had been targeting high-end radio buyers, along with Stromberg Carlson and HMV. The mass market was dominated by AWA, Astor and Kriesler and after the war these market leaders concentrated on budget mantel radios in Bakelite cases. Many of the high-end manufacturers similarly adapted to the market and made budget models. STC's budget line was a succession of Bantam radios. During the war, STC ceased domestic radio production as all new radio valves were reserved for military applications after 1941, even though many civilian valves were not rugged enough to endure the shock and stress of military service. So at the end of 94  Silicon Chip the war there were substantial stocks of valves available for domestic radio manufacture. Even though the model 512 was new for 1946, it was a 1930s design. The high quality wood veneer cabinet from E. B. Deering was available at least as early as 1941, when it was pictured on the STC stand at the Sydney Romance of Radio Exhibition. STC was a major global developer and supplier of high power transmitters and military electronics, particularly for radar. The British parent company at the time was among the top 100 companies listed on the London stock exchange. STC in Australia would have made many of their own components for domestic radios, including the 6-inch electrodynamic speaker for this model. In fact, it is likely that the speaker had been on a shelf for the duration of the war and was used instead of a permanent magnet speaker which after the war would have been cheaper and competitive in efficiency. Rola permanent magnet speakers were used in other STC models of 1946 including the model D150 in my collection. The electrodynamic speaker was further relegated to irrelevance by the development of high value electrolytic capacitors for ripple filtering. The speaker's 2000W field coil could therefore be replaced with a separate siliconchip.com.au The unrestored cabinet suffered from a tattered speaker grille, yellowing of the celluloid dial cover and general all-round wear of the cabinet. The cabinet was made by E. B. Deering in Ashfield, NSW. choke or a resistor between two filter capacitors. The chassis on the model 512 has the same high quality appearance of STC sets from the 1930s. Even the data panel on the rear of the chassis, showing the valve placement, is the same style as seen on 1930s STC radios. By comparison, the economy 1946 STC model D150 has a plain steel chassis with stencilled valve data painted on it. The D150 also had flimsy clipon goat shields for the valves (for a description of goat shields, see page 91 of the January 2017 issue; www. siliconchip.com.au/Article/10515) rather than the somewhat more substantial cylindrical valve shields seen on the model 512. One deviation of the model 512 from the 1930s is the vertical dial arrangement that was the trend for the 1940s. In the 1930s, STC used rotary dials, mostly sweeping a pointer through 180 degrees. The front view of the model 512 chassis shows a section cut away in front of the transformer; this allows the speaker to slot into the chassis. details of the electrodynamic speaker. An external antenna is coupled to the first tuned circuit and the tuned signal is fed into the control grid of a 6A8G pentagrid self-oscillating mixer. The plate of the 6A8G drives the first IF transformer which then drives the grid of the 6U7G pentode and it, in turn, drives the second IF transformer, both tuned to 455kHz. All of the valves have octal sockets and the first three have top-cap con- The top view of the chassis after cleaning, but before the top cap grid wires were replaced. 6B8 6U7 siliconchip.com.au 6V6 5Z4 5-valve superheterodyne circuit We have redrawn the circuit diagram, based on that from the 1946 Australian Official Radio Service manual (see Fig.1). That circuit did not show the trol grids. Terminating the grids at the top allows for shorter wiring connections to minimise the effects of stray capacitance. The third valve, a 6B8G audio preamplifier, has a shielded lead coming from the volume control fed through a hole in the chassis to contact the top-cap grid inside the shield can. An interesting addition to the front end is a 1200W trimpot that joins the 6A8G cathode to earth. As the resistance is increased, the 6A8G's control grid becomes more negative, thereby reducing the RF amplification. This was a way of protecting against front-end overload from a local transmitter. The trimpot can be adjusted by the screw at the rear of the chassis adjacent to the ARTS&P label. This function was confirmed by tuning to a weak station and hearing a change in level by using the trimpot. Strong stations showed no audible change because AVC compensated for the change in front-end gain. There are no design surprises in either the oscillator using the 6A8 or the IF amplification (6U7). The 6B8G is a dual diode pentode, with both diodes wired in parallel to produce a common signal for detected audio and negative AVC voltage which is applied to the grids of the 6A8G and 6U7G. The pentode in the 6B8G amplifies the demodulated audio and its output is fed to the grid of the 6V6G output pentode via a 10nF capacitor. In this radio, that coupling capacitor to the 6V6G had already been replaced by 6A8 August 2017  95 The rear view highlights the two substantial metal screens fitted to the 6U7G and 6B8G valves. Note the top-cap grid leads for the first three valves. This was common in pre-war receivers to minimise the effects of stray capacitance. a previous restorer so there was no leakage to cause positive grid bias on the 6V6G. The 6V6G class-A output stage is conventionally designed, with a 350W cathode resistor and 10µF bypass capacitor between the cathode and earth. The grid is connected to earth by a 500kW resistor and measured 0V, as it should. The grid bias was -12.7V, as developed across the cathode resistor. The anode of the 6V6G measured 226V and the screen 240V, relative to earth; all good figures. Because the 6V6G valve operates in class-A mode, the power used is independent of the audio volume. Total power consumption was 44W. The 3-position tone control switch has two settings offering capacitive top-cut to the signal fed to the output transformer primary. Maximum top-cut produces an unpleasantly muffled sound, as you might expect with a value of 1µF. That really is excessive, as the corner frequency with a 1µF capacitor effectively across the 5kW load would be around 31.8Hz – no wonder it sounds muffled! A better choice would have been 100nF, with the intermediate tone position suppressing a bit of hiss in appropriate circumstances. The non-cut position is a bit strident, but still my choice for listening. The HT rectifier would usually be a 5Y3 but my set has a 5Z4G that features a large envelope and is seated next to the transformer. Although mine is in a glass envelope it was also manufactured in a metal envelope. It has highend specifications, in excess of what is needed for a domestic radio receiver, since it is capable of delivering up to 500V at 350mA. All the electrolytic capacitors on the underside of the chassis had previously been replaced but the original paper capacitors, made by Chanex Condenser Company, were OK and left in place. 96  Silicon Chip siliconchip.com.au The 5V directly-heated cathodefilament is driven from a separate transformer winding as otherwise, HT would be applied to all the valve heaters. Because the speaker field coil is part of the HT filtering circuit, failing to plug the speaker in deprives the rest of the circuit of HT. The radio was acquired through eBay at a time when I was particularly keen to collect STC radios. I paid more for it than I should have, considering the visibly poor condition. It sat on various shelves for a decade, taunting me to make a start on restoration. The poor appearance resulted from multiple degradations. The tattered speaker grille was an immediate eyecatcher and the celluloid dial cover was strongly yellowed. The shellac finish had become flaky and tinted the timber with a golden hue that was not true to the tones of the veneers. Some veneer had broken away. The first step was to disassemble the cabinet to a bare case, less speaker grille and dial cover. Using a scraper and abrasives, the shellac was completely removed to avoid any chemical reaction with the polyurethane finish that was to be applied. The black and brown timber highlights were repainted before spraying with satin-finish Carbothane. The first coat was sanded back with particular care to create a smooth surface for the next three coats. The detailed grain of the inlaid veneers, revealed under polyurethane, made a fitting display of the craftsmanship that went into this cabinet. The round-the-corner speaker grille is a design feature that does nothing to indicate directionality of the speaker which faces in the forward direction. Interestingly, the grille profile is supported by a fly screen wire mesh. The choice of a replacement grille cloth was not an easy one and was arrived at after some agonising. As part justification for the choice, orangered fabric can be seen on other 1940s radios, notably AWA and Kriesler. Even though I had misgivings about the final choice of cloth, I have come to like it. The original yellowed celluloid dial cover was heat-moulded to bulge outwards. I made a mould to heatshape some thermoplastic sheet and siliconchip.com.au Fig.1: Silicon Chip staff have redrawn this circuit to include the details of the electrodynamic speaker. This was a feature of 1930s designs but carried over to this post-war receiver. Note the very large capacitor used in the top-cut tone control switch, which leads to a very muffled sound. 68 or 100nF would be a better choice than 1µF. Cabinet Restoration August 2017  97 The elaborate vertical dial for the set includes markings for New Zealand and Australian stations. The vacant 5-pin socket on the left-hand side of the chassis is for the speaker plug. ended up with a close to acceptable result. However, imperfections were evident and would have compromised the end result. Many previous STC dial covers were moulded so that a dial pointer could project forward into the space created by the moulding. After checking this one, I established that the pointer was recessed into the case. A plain piece of 1mm thick PETG plastic was duly installed as the dial cover and did not foul the pointer. The knobs were cleaned ultrasonically to complete the external restoration. The electrical restoration was easier, in spite of the challenging layer of dust over the chassis. Happily, the overall The fully restored STC model 512 5-valve radio in all its glory. Sporting a fresh coat of paint and lacquer, new grille cloth and a newly made dial cover. 98  Silicon Chip condition of the unit was excellent and as noted, a previous restorer had already replaced some parts, specifically capacitors. It is a tough call whether to power up the radio before cleaning it. In this case I crossed fingers and was rewarded with the radio working immediately, while drawing appropriate power (41W, without the dial globes working). Although I was tempted to replace a few more components, everything worked so I left the components as they were. The dial lights turned out to be two open-circuit 2.5V globes. The marginally-serviceable wiring to the dial lamps was replaced and the correct 6.3V lamps installed. Those lamps provide edge lighting to the dial glass, creating a colourful dial display in a dark room. The 240VAC mains cable was a modern plastic sheathed cable; functional but not in keeping with the time of manufacture. It was replaced with a new cotton-covered cable. The top-cap wire to the 6U7G valve was replaced, as was the tatty aerial wire. That was it. After a decade of waiting, the ugly duckling was transformed into an elegant display piece, illustrating a notable transition period in AusSC tralian radios. siliconchip.com.au ASK SILICON CHIP Got a technical problem? Can’t understand a piece of jargon or some technical principle? Drop us a line and we’ll answer your question. Send your email to silicon<at>siliconchip.com.au Are cockroaches attracted to LED light? For the past few days I've been observing a couple of cockroach hatchlings crawling around the display in my microwave oven; they are visible when they obscure the segments, and rather than pull the appliance apart (too dangerous!) I'm waiting for them to emerge for food and water. Are cockies particularly attracted towards LEDs? If so, this could form the basis of a simple cockroach trap; if it matters, the LEDs are yellow. (D. H., Gosford, NSW) • We don't think cockroaches are attracted to anything electronic or numeric, regardless of the colour, but they are certainly attracted to a permanent source of warmth, particularly if there is plentiful food nearby (as in any kitchen, no matter how spotless it may appear to be). The solution is to take the outer case off the microwave oven (making sure the power is off and that the high-voltage capacitor has had time to discharge) and then thoroughly clean, spray, nuclear bombard it or mutter incantations in divers' tongues, to get rid of all baby cockroaches and eggs. Good luck with that, because you are unlikely to get all the blighters. Failing that, put out cockroach baits and spray inaccessible parts of your kitchen with surface spray. Mind you, if you only have the microwave oven powered up when you are actually cooking something, it will no longer be a source of permanent warmth and it might be less attractive to cockroaches. You could also give up, on the basis that cockroaches will continue to thrive long after humans have been eliminated from the surface of the planet! eFuse trip current and data sheet discrepancy I recently purchased an eFuse kit from Altronics (K6075), based on the article in the April 2017 issue (www. siliconchip.com.au/Article/10611). My intention is to fit a 2-pole, 6-position switch with appropriate resistors to provide an easily varied current tripping range. Close inspection of the data sheets for the NIS5112 device reveals a possible discrepancy of the graphical data on page 4 compared to the data in the magazine, in Tables 2 and 3 on page 42 of the April issue. Dubbing VHS to DVD I would like to transfer a number of tapes from VHS to DVD. VHS/ DVD combo player/recorders are no longer available. I was wondering if you had a project which used a basic VHS player to play the VHS tapes and the content could be transferred via computer to a DVD burner. Could you give me any information in this regard? (M. F., via email) • These days the best option for dubbing VHS tapes is to feed the signal from a VHS recorder to your PC and use conversion software. You will find a number of guides siliconchip.com.au on how to do this on the internet. You will need a video capture dongle, they are relatively inexpensive these days and many are supplied with suitable software. We haven't tried this particular dongle/software combination so can't necessarily recommend it but it is available from OfficeWorks for $99.95: www.officeworks.com.au/ shop/officeworks/p/roxio-easy-vhsto-dvd-3-plus-roe109576 Presumably it is supplied with sufficiently detailed instructions to allow the average computer user to successfully convert their tapes. The graph in the data sheets is a log-log graph and the lowest current shown on the graph is approx 400mA. This shows different resistor values for the lowest current trip values of 315mA, 350mA (Table 2) and 800mA (Table 3). Have the resistance values for the above trip currents been tested? The possible source of this discrepancy may be an error in the data sheet, in Fig.2 on page 4. The y-axis labelling for this graph starts at 0A but since it's a logarithmic axis, that's impossible and it should be labelled 0.1A instead. Hence, the lowest trip current shown on this graph should be 400mA, not 300mA. Finally, to increase the possible range of trip currents I am thinking of placing an on/off switch in the trip resistance line (R2) to IC2, effectively halving the trip current when off. In the second column on page 41, the circuit description notes indicate that when using both ICs, one will trip before the other so the remaining IC will carry the current set by its trip limit resistor for a short period. So, will there be any difficulty if only one of the two ICs (IC1) is in operation by itself for currents up to 5A? (C. H., via email) • You are correct that Figure 2 in the NIS5112 data sheet is labelled incorrectly. We reproduced this graph as Fig.5 on page 43 of the April 2017 issue but you may have noticed that we corrected this error. However, we did check that the trip currents on our prototype were approximately correct for the resistor values given in Tables 2 and 3 in the article. Considering that the trip current thresholds between individual NIS5112 ICs may vary by 56%, it's possible that yours will not trip at exactly the currents specified in those tables. It's recommended that you actually test the trip current for each setting if you need high accuracy. To switch IC2 out of circuit, it's recommended to use the switch to disconnect its enable input (at pin 3) from the August 2017  99 Upgrading headphone amplifier to produce more power I have recently constructed the S ilicon C hip High-Performance Stereo Headphone Amplifier (September & October 2011; www. siliconchip.com.au/Series/32). As I wish to drive loudspeakers, I installed the 4700µF capacitors and obtained the 22VA plugpack, as per the articles. I am very happy with the amplifier’s performance with headphones, however I feel that the 4.25W music power available is somewhat limiting when running small hifi loudspeakers. So I am now considering modifications to increase the audio power output and would appreciate any comments or recommendations you can offer. The first possibility I have considered is to adopt some of the design changes that were incorporated in the Tiny Tim amplifier design (October & December 2013 and January 2014; www.siliconchip.com.au/ Series/131). In other words, to continue using the plugpack but take the unregulated 1µF capacitor and S1 and connect it directly to ground instead. This can be easily done using an SPDT switch. We recommend switching IC2 out this way because open-circuiting R2 may cause erratic operation of IC2 since the sensing current cannot flow. Alternatively, you could switch R2 between its selected value and 1kΩ so that IC2 trips at a very low current, leaving IC1 to carry the full load current. Programmable Ignition System spark limitations I have discovered a possible drawback with your Programmable Ignition System project from the March-May 2007 issues (www.siliconchip.com. au/Series/56). First, consider a conventional distributor. Irrespective of how much vacuum advance or how much centrifugal advance is introduced, the rotor will always point to the same point on the distributor cap when the points open, or when any other trigger system takes effect. 100  Silicon Chip voltages (approximately ±17V DC) at the cathode of D3 and the anode of D5 and feed these to the points C and D via jumpers as shown in December 2013 Tiny Tim article. I would also feed the regulated voltage via jumpers to the points shown in the article (after cutting the tracks as mentioned in the article, of course). The second possibility is to build the general purpose supply as used in the Tiny Tim amplifier and remove the now-redundant parts from the headphone amplifier in order to implement this change, as well as upgrading the components indicated in the Tiny Tim article. The power transformers specified raise a question. Will the 30VA transformer provide more power compared with the 20VA unit or will the difference in power be negligible? Thank you for the efforts which obviously go into producing an interesting quality magazine. (R. K., Cessnock, NSW) • We recommend that you build the Tiny Tim version of the amplifier This point, of course, should be when the rotor is in direct line with the associated spark plug lead. With the Programmable Ignition System, the trigger point is always the same and the advance, or firing point, is calculated from this electronically. This means that the firing/ rotor position is now advanced relative to the cap. With a possible maximum advance in the order of 40° of engine rotation or 20° of distributor rotation and taking a typical Holden distributor as an example, the rotor, 33mm long, will be over 11mm from its correct position. There is 60° between each spark plug lead, and the rotor is out of position by 1/3 of that distance. This could possibly cause misfiring under high advance, high ignition load conditions. What do you think? (J. B., Upper Caboolture, Qld) • It is true that the ignition system can't be set for excessive advance or retard since as you say, the rotor is not going to be in the correct position at but it is largely immaterial whether you use the 20V or 30VA transformer. The larger transformer would allow slightly higher continuous power output to be delivered from both channels but the difference would be completely inaudible on normal program signals. If you do decide to modify your board to the Tiny Tim standard, don't forget to also make the component changes which allow it to operate at a higher power level, such as changing the transistors to the versions which can handle higher dissipation (ie, Q7, Q9, Q19 and Q21). Refer to the changes shown in red on Fig.5 (pages 60 & 61 of the October 2013 issue). By the way, we tested the Headphone Amplifier driving a pair of Wharfedale Atlantic AT-400 tower speakers and achieved very adequate volume levels for listening in a modest-size room, however, they have a rated sensitivity of 92dB/1W <at> 1m which is quite high. Chances are your speakers are less sensitive, or perhaps you are running them in a larger room. firing. In practice, this does not tend to be an issue since that much spark advance or retard is not necessary or advisable on a street car engine and the rotor contact caters for a wide range of timing, due to its length. However, if the programmed advance means that the rotor does not line up with the distributor cap, the entire ignition map can be readjusted in the programming to add some overall retardation to the timing. To compensate for this retardation in timing, the physical timing point can then be readjusted for more advance. That will allow for plenty of spark advance while the rotor is still in position to allow the plugs to fire. Using CDI Module when coil output is negative I have a question about the circuit of the Replacement CDI Module for Small Petrol Motors (www.siliconchip.com. au/Article/1820) from the May 2008 issue, which I saw on your website. You say that this CDI won’t work if the polarity of the generator coil siliconchip.com.au LED Audio Level/VU Meter injects noise into audio signal I just finished building your Stereo Valve Preamplifier (January & February 2016; www.siliconchip.com.au/ Series/295) and am very happy with its sound. I wanted to "bling it up" so I have just finished adding the LED Audio Meter (June/July 2016; www. siliconchip.com.au/Series/301) and it looks great! Unfortunately though, it introduces a significant amount of high frequency noise (my guess is somewhere between 2-8kHz) into the sound system, rendering the meter unusable. I was hoping you might be able to give me some insights into tracking down the cause. I have been through the board looking for bad joints however I haven't spotted any obviously dodgy ones. With no audio connections, the board makes a noise that can be heard with your ears alone. This is a similar frequency to the noise introduced into the sound system when it is connected. The noise may be coming from the power supply end of the board however it is hard to pin down. The noise is louder when some of the bar LEDs are lit. With the unit connected to an oscilloscope, I had a look at the power supplies and the input. With no LEDs on, the 3.3V rail (from REG1) is at 3.24V DC and swinging ±17mV in a triangle wave at about 3.3kHz. With no LEDs on, the 11.2V rail (REG2) is at 11.19V DC and swinging ±1mV is negative before triggering. Could I solve this problem if I use a bridge rectifier after the generator coil? (A. B., Switzerland) • A bridge rectifier will not work as the coil is not isolated and one side of the generator coil connects to the chassis. To reverse coil polarity, the end of the coil connecting to chassis would need to be disconnected and used as the output. Then other end of the coil should be connected to the chassis instead. Graduating from PICAXE to school of Micromite I enjoy experimenting with the PICAXE chips especially as they are siliconchip.com.au with a messy looking wave. I changed the range to 100dB and peak to -10dB to get some LEDs lit just from noise. With no audio connections, the board noise that can be heard with ears alone was louder. Something is going on at regular interval (3.5ms) which produces spikes on the 3.3V rail of +70mV. So I suspect something to do with this rail is the culprit. Any thoughts on whether what I sent through is normal or how I might go about getting rid of the noise? (J. M., Leeming, WA) • That certainly is mystifying. While you would expect a little noise on the 3.3V rail due to the current transients from multiplexing the LEDs, it certainly should not be audible, nor should it be fed back into the audio signal. Our prototype did not behave as you describe. It sounds like the regulator or one of its bypass capacitors is not doing its job properly. We suggest you try replacing the capacitors at the input and output of REG1, or try using higher value/lower ESR capacitors in these locations. (We received an update from the constructor: "I was looking at the circuit diagram and noticed some of the 2.2µF capacitors were marked X7R. I then noticed three of the supplied 2.2µF capacitors were bigger than the rest. I decided to move the bigger 2.2µF capacitors to the input and output of REG1." "The audible noise with no audio connections still exists, however it is now not being transferred into the audio system. Yay!” “I believe the X7R is just a temperature rating and given nothing seems to get warm in this circuit, I can't work out why the temperature rating on capacitors would make a difference. There is no significant difference in the waveforms on the oscilloscope." "The solder joints now look slightly worse than before due to component change however still passable. Any idea why it might be fixed?") We suspect it was a bad solder joint. It's quite easy to solder an SMD capacitor and get a joint which looks OK upon casual inspection but has adhered to the capacitor and not the PCB pad, forming a very high resistance connection. It's also possible one of the capacitors was a dud and swapping them simply moved it to a less critical location. X7R is more than just a temperature rating; it's a tolerance rating (including over temperature) but affects the type of ceramic used and physical construction of the capacitor. Because X7R material has a lower dielectric constant, more layers need to be used than for say Y5V, resulting in a lower ESR capacitor. So X7R capacitors are generally superior to other common types ceramic capacitors with the exception of C0G/NP0. easy to programmed using BASIC. I would like to to start experimenting with other micros like the PIC16F84 etc, and wonder if you could recommend some software similar to the BASIC compiler use to programmed the PICAXE. (A. S., Liverpool, NSW) • The 16F84 is an old micro and we have not used it for more than ten years. It was replaced by the 16F88. If you want to work on a micro which is programmable with BASIC, why not have a look at our series of articles on the Micromite and Maximite? Meter described in the June 2017 issue (www.siliconchip.com.au/ Article/10676). I am using Arduino IDE version 1.8.2 on Windows 7 with an Arduino/Genuino Uno board. I went through the steps to get the sketch loaded but when I try to verify and compile the code, I get an error message as follows: Difficulty Using Arduino LC Meter sketch I wonder if you can advise me of how I might overcome this error. (G. D., Melba, ACT) • Function names in the Liquid- I am building the Arduino LC Arduino_LC_meter_sketch:75: error: ‘class LiquidCrystal_I2C’ has no member named ‘init’ lcd.init(); // initialise LCD ^ August 2017  101 Driveway Sentry may have been magnetically overloaded I built two of the Driveway Monitor units from July and August 2015 issues (www.siliconchip.com.au/ Series/288) but I have not been able to get any sense out of either of them. I have not added the RF units but installed a connector at the TX1 location so that the RF transmitter can be added later. To make sure that I hadn't got the chip mixed up with blanks, I re-flashed the PICs. Both units exhibit the following: • no voltage on the VCC pin of TX1 • 5V DC on the VCC pin in diagnostic mode • IC1 output is 2.49V in diagnostic mode, no change when a magnet is introduced to the sensor • IC1 output is 0.28-0.36V between output and reference during normal operation; no change when a magnet is introduced to the sensor • supply voltage is 5.5V DC • nothing can be detected on the data pin of TX1 when a magnet goes over sensor. Any help with this would be appreciated. (W. M., Wynnum, Qld) • The HMC1021 magnetic field Crystal_I2C library appear to have changed over time. So depending on which version of the library you have, the code may not compile. The solution is to update it to the latest version, which you can do in the Arduino IDE. Go to the “Sketch” menu, then click on “Include Library”, then “Manage Libraries...” In the window which appears, change Type from “All” to “Updata- sensor is designed to detect the very small changes in the earth's magnetic field changes when a metallic object is brought near. A nearby magnet would tend to drastically overload the sensor. We think the magnetic field sensor may have temporarily latched up due to the strong magnetic fields introduced with a magnet. We recommended using a large pair of pliers as a "magnetic disturbance field". It may be that you will need to leave the driveway monitor running and powered up for a while without a magnet nearby so that the set and reset pulses that occur every 10 seconds have a chance to remove the re-magnetisation of the sensor before the sensor will operate correctly. Honeywell, the manufacturer of the HMC1021 sensor, states: Set/Reset Strap Operation The reasons to perform a set or reset on an AMR sensor are: 1) to recover from a strong external magnetic field that likely has magnetised the sensor; 2) to optimise the magnetic domains for most sensitive performance; and 3) to flip the ble”. LiquidCrystal_I2C should appear In the list. Click on it, then click on the “Update” button next to it. You can then close the window and you should find that the LC Meter sketch will compile successfully. We have changed the software download on our website to include the latest version of LiquidCrystal_ I2C so that should fix this problem domains for extraction of bridge offset under changing temperature conditions. Strong external magnetic fields that exceed a 10 to 20 gauss “disturbing field” limit can come from a variety of sources. The most common types of strong field sources come from permanent magnets such as speaker magnets, nearby high current conductors such as welding and power feeder cables, electric motors (eg, domestic vacuum cleaners) and by magnetic coils in electronic equipment such as CRT monitors and power transformers. Magnets exhibit pole face strengths in hundreds to thousands of gauss. These high intensity magnetic field sources do not permanently damage the sensor elements, but the elements will be oriented to the exposed fields rather than the required easy axis directions. The result of this re-magnetisation of the sensor elements, the sensor will lack sensitivity or indicate a “stuck” sensor output. Using the set and reset pulses will magnetically “restore” the sensor. for other constructors. You could potentially install the newer library by re-downloading the software package but you would need to delete the old library first. To do this, go to your Documents folder, then Arduino, then libraries and delete the LiquidCrystal_I2C folder. You can then install the newer library from the package on our webSC site. WE WILL FIRST PUBLISH KITS AND PROJECTS/NEW ITEMS ON THE electronickits.com.au & electronicprojects.com.au FIRST DAY OF EVERY MONTH STARTING THIS SEPTEMBER AT: EG: STEPPER MOTOR ARDUINO-ETC. EDUCATIONAL PACK 12V 7W ALUMINIUM LED BARS 2x small 5V 4Wire 2-Phase 25mm 1/2m Long Bars..36 high output Stepper Motors + 2x Driver modules Pure White LED's....covered by + 1x Universal 5V Regulated Plugpack: a diffuser strip... Around 700Lumens at 12V K416....$9 !! IT117....$5.00 ea 8x 20W LEDS CLEARANCE: Includes (45 x 45/33V) PACK OF 6 BARS IT117P....$24.00 and 1x FS-272 Solar Panel 72W SOLAR W hile they last: OATLEYELECTRONICS.COM SKYLIGHT $ K415 .... 50!!!! KIT Pick-up from the Woy Woy area on the NSW Central Coast. More info on our website P– hone or SMS to request a callback: Phone/email for a freight quote, call 0428 600 036 102  Silicon Chip (Search for part no) 0428 600 036 siliconchip.com.au MARKET CENTRE Cash in your surplus gear. Advertise it here in SILICON CHIP KIT ASSEMBLY & REPAIR KEITH RIPPON KIT ASSEMBLY & REPAIR: * Australia & New Zealand; * Small production runs. Phone Keith 0409 662 794. keith.rippon<at>gmail.com VINTAGE RADIO REPAIRS: electrical mechanical fitter with 36 years ex­ p erience and extensive knowledge of valve and transistor radios. Professional and reliable repairs. All workmanship guaranteed. $10 inspection fee plus charges for parts and labour as required. Labour fees $35 p/h. Pensioner discounts available on application. Contact Alan on 0425 122 415 or email bigal radioshack<at>gmail.com DAVE THOMPSON (the Serviceman from SILICON CHIP) is available to help you with kit assembly, project troubleshooting, general electronics and custom design work. No job too small. Based in Christchurch, NZ but service available Australia/NZ wide. Email dave<at> davethompson.co.nz FOR SALE PCB MANUFACTURE: single to multi­ layer. Bare board tested. One-offs to any quantity. 48 hour service. Artwork design. Excellent prices. Check out our specials: www.ldelectronics.com.au LEDs, BRAND NAME and generic LEDs. Heatsinks, fans, LED drivers, power supplies, LED ribbon, kits, components, hardware, EL wire. www.ledsales.com.au tronixlabs.com.au – Australia’s best value for hobbyist and enthusiast electronics from adafruit, DFRobot, Freetronics, Raspberry Pi, Genuino and more, with same-day shipping. PCBs MADE, ONE OR MANY. Any format, hobbyists welcome. Sesame Electronics Phone 0434 781 191. sesame<at>sesame.com.au www.sesame.com.au Where do you get those HARD-TO-GET PARTS? Where possible, the SILICON CHIP On-Line Shop stocks hard-to-get project parts, along with PCBs, programmed micros, panels and all the other bits and pieces to enable you to complete your SILICON CHIP project. SILICON CHIP On-Line SHOP www.siliconchip.com.au/shop WANTED WANTED: EARLY HIFIs, AMPLIFIERS, Speakers, Turntables, Valves, Books, Quad, Leak, Pye, Lowther, Ortofon, SME, Western Electric, Altec, Marantz, McIntosh, Tannoy, Goodmans, Wharfe­ dale, radio and wireless. Collector/ Hobbyist will pay cash. (07) 5471 1062. johnmurt<at>highprofile.com.au WANTED SOFTWARE, Microbyte 2650 Assembler, Basic and DOS System Disks or tape. For sale S100 DOS boards. Ron Koenig 0409396592 or email koenigre<at>gmail.com KEEP YOUR COPIES OF SILICON CHIP AS GOOD AS THE DAY THEY WERE BORN! ONLY 95 $ 1P6LUS p&p A superb-looking SILICON CHIP binder will keep your magazines in pristine condition. * Holds up to 14 issues * Heavy duty vinyl * Easy wire inserts ORDER NOW AT www.siliconchip.com.au/shop ADVERTISING IN MARKET CENTRE Classified Ad Rates: $32.00 for up to 20 words (punctuation not charged) plus 95 cents for each additional word. Display ads in Market Centre (minimum 2cm deep, maximum 10cm deep): $82.50 per column centimetre per insertion. All prices include GST. Closing date: 5 weeks prior to month of sale. To book, email the text to silicon<at>siliconchip.com.au and include your name, address & credit card details, or phone Glyn (02) 9939 3295 or 0431 792 293. siliconchip.com.au August 2017  103 Next Month in Silicon Chip El Cheapo Modules, part 9: GPS modules We describe two common GPS modules, their features and how to interface them to an Arduino or Micromite. Using a DDS Module for AM Radio IF Alignment In this article, we present updated software and slight tweaks to the hardware of the Micromite BackPack Touchscreen DDS Signal Generator described in the April issue. These changes make it a cinch to align the IF stage of a transistor or valve-based superheterodyne AM radio. LTspice - simulating and testing circuits, part 3 We build on this month’s article by showing how to design a subcircuit to simulate an NTC thermistor, in order to complete our simulation of the SoftStarter. This involves some advanced SPICE modelling techniques and you will be introduced to more of the software’s features along the way. Advertising Index Altronics.................................. 70-73 AV-COMM...................................... 7 Dave Thompson......................... 103 Digi-Key Electronics....................... 3 Electronex.................................... 67 Emona Instruments.................... IBC Hare & Forbes.......................... OBC High Profile Communications..... 103 Icom Pty Ltd................................. 10 Jaycar............................... IFC,49-56 The Death of Cassini The Cassini-Huygens probe was launched from Earth on October 15th, 1997 and entered orbit around Saturn on July 1st, 2004. Since then, it has been studying Saturn, its rings and its moons. It will be deliberately crashed into Saturn on September 15th this year. We look at the great scientific benefits of the Cassini mission over the past 20 years. Fully Adjustable Stereo 2/3-way Active Crossover This new active crossover design is suitable for use in hifi systems and unlike our last such design, it’s easy to tweak the crossover frequencies and gain/attenuation for each frequency band. This allows very accurate tweaking of loudspeaker performance to suit the characteristics of the individual drivers used. Keith Rippon Kit Assembly......... 103 LD Electronics............................ 103 LEDsales.................................... 103 Master Instruments.................... 103 Microchip Technology................... 33 Mouser Electronics......................... 9 Oatley Electronics...................... 102 Note: these features are prepared or are in preparation for publication and barring unforeseen circumstances, will be in the next issue. Ocean Controls.............................. 8 The September 2017 issue will come with the 408 page Altronics catalog and is due on sale in newsagents by Thursday August 24th. Expect postal delivery of subscription copies in Australia between August 24th and September 7th. Rohde & Schwarz.......................... 5 Notes & Errata Arduino-based Digital Inductance/Capacitance Meter, June 2017: the soft-SC ware as provided assumes an I2C LCD address of 0x27 which is for displays with a PCF8574T IC. If your display has a PCF8574AT IC, you will need to change the address near the top of the sketch from 0x27 to 0x3F before compiling and uploading it. Note also that if printing the front panel artwork PDF, you need to set up your printer to print “actual size” (rather than “shrink to fit”, etc) so that it comes out the right size. Premier Batteries...................... 11 Ron Koenig................................ 103 Sesame Electronics................... 103 SC Online Shop........................... 69 Silicon Chip Binders.................... 43 Silicon Chip Wallchart................. 87 Tecsun Radios................................ 7 Tronixlabs................................... 103 Vintage Radio Repairs............... 103 WARNING! SILICON CHIP magazine regularly describes projects which employ a mains power supply or produce high voltage. All such projects should be considered dangerous or even lethal if not used safely. Readers are warned that high voltage wiring should be carried out according to the instructions in the articles. When working on these projects use extreme care to ensure that you do not accidentally come into contact with mains AC voltages or high voltage DC. If you are not confident about working with projects employing mains voltages or other high voltages, you are advised not to attempt work on them. Silicon Chip Publications Pty Ltd disclaims any liability for damages should anyone be killed or injured while working on a project or circuit described in any issue of SILICON CHIP magazine. Devices or circuits described in SILICON CHIP may be covered by patents. SILICON CHIP disclaims any liability for the infringement of such patents by the manufacturing or selling of any such equipment. SILICON CHIP also disclaims any liability for projects which are used in such a way as to infringe relevant government regulations and by-laws. Advertisers are warned that they are responsible for the content of all advertisements and that they must conform to the Competition & Consumer Act 2010 or as subsequently amended and to any governmental regulations which are applicable. 104  Silicon Chip siliconchip.com.au “Rigol Offer Australia’s Best Value Test Instruments” Oscilloscopes RIGOL DS-1000E Series NEW RIGOL DS-1000Z Series RIGOL DS-2000A Series 450MHz & 100MHz, 2 Ch 41GS/s Real Time Sampling 4USB Device, USB Host & PictBridge 450MHz, 70MHz & 100MHz, 4 Ch 41GS/s Real Time Sampling 412Mpts Standard Memory Depth 470MHz, 100MHz & 200MHz, 2 Ch 42GS/s Real Time Sampling 414Mpts Standard Memory Depth FROM $ 469 FROM $ ex GST 579 FROM $ ex GST 1,247 ex GST Function/Arbitrary Function Generators RIGOL DG-1022 NEW RIGOL DG-1000Z Series RIGOL DG-4000 Series 420MHz Maximum Output Frequency 42 Output Channels 4USB Device & USB Host 430MHz & 60MHz 42 Output Channels 4160 In-Built Waveforms 460MHz, 100MHz & 160MHz 42 Output Channels 4Large 7 inch Display ONLY $ 539 FROM $ ex GST Spectrum Analysers 971 FROM $ ex GST Power Supply RIGOL DP-832 RIGOL DM-3058E 49kHz to 1.5GHz, 3.2GHz & 7.5GHz 4RBW settable down to 10 Hz 4Optional Tracking Generator 4Triple Output 30V/3A & 5V/3A 4Large 3.5 inch TFT Display 4USB Device, USB Host, LAN & RS232 45 1/2 Digit 49 Functions 4USB & RS232 1,869 ONLY $ ex GST 649 ex GST Multimeter RIGOL DSA-800 Series FROM $ 1,313 ONLY $ ex GST 673 ex GST Buy on-line at www.emona.com.au/rigol Sydney Tel 02 9519 3933 Fax 02 9550 1378 Melbourne Tel 03 9889 0427 Fax 03 9889 0715 email testinst<at>emona.com.au Brisbane Tel 07 3392 7170 Fax 07 3848 9046 Adelaide Tel 08 8363 5733 Fax 08 83635799 Perth Tel 08 9361 4200 Fax 08 9361 4300 web www.emona.com.au EMONA