Silicon ChipFebruary 2017 - Silicon Chip Online SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Where does innovation come from?
  4. Feature: Autonomous Flying Cars: your next mode of transport? by Ross Tester
  5. Feature: Getting Started with the Micromite by Geoff Graham
  6. PartShop
  7. Project: GPS-synchronised Analog Clock Driver by John Clarke
  8. Project: Ultra-low-voltage Versatile LED Flasher by Nicholas Vinen
  9. Subscriptions
  10. Project: El Cheapo Modules from Asia - Part 4 by Jim Rowe
  11. Serviceman's Log: Snoring through the night by Dave Thompson
  12. Project: High Power DC Motor Speed Control – Part 2 by Design by John Clarke
  13. Project: New SC200 Audio Amplifier – Part 2 by Nicholas Vinen
  14. Feature: First look: Aussie-made battery soldering iron by Ross Tester
  15. Vintage Radio: Hotpoint Model P64MEX 4-valve by Associate Professor Graham Parslow
  16. Feature: First look: Icom’s VE-PG3 Radio over IP Gateway by Ross Tester
  17. Market Centre
  18. Advertising Index
  19. Notes & Errata: High Power DC Motor Speed Control, Jan-Feb 2017
  20. Outer Back Cover

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

You can view 44 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.

Articles in this series:
  • Getting Started with the Micromite (February 2017)
  • Getting Started with the Micromite (February 2017)
  • Getting Started with the Micromite, Part Two (March 2017)
  • Getting Started with the Micromite, Part Two (March 2017)
  • Micromite Tutorial, Part 3: strings and arrays (May 2017)
  • Micromite Tutorial, Part 3: strings and arrays (May 2017)
  • Getting Started with the Micromite, Part 4 (June 2017)
  • Getting Started with the Micromite, Part 4 (June 2017)
Items relevant to "GPS-synchronised Analog Clock Driver":
  • GPS-synchronised Analog Clock Driver PCB [04202171] (AUD $10.00)
  • PIC16LF88-I/P programmed for the GPS-Synchronised Analog Clock for movements with stepping hands [04120217A.HEX] (Programmed Microcontroller, AUD $15.00)
  • PIC16LF88-I/P programmed for the GPS-Synchronised Analog Clock for movements with sweep hands [04130217A.HEX] (Programmed Microcontroller, AUD $15.00)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (Component, AUD $5.00)
  • VK2828U7G5LF TTL GPS/GLONASS/GALILEO module with antenna and cable (Component, AUD $25.00)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (clone version) (Component, AUD $3.00)
  • Firmware (C and HEX) files for the GPS-synchronised Analog Clock [04120217A.HEX/04130217A.HEX] (Software, Free)
  • GPS-synchronised Analog Clock Driver PCB pattern (PDF download) [04202171] (Free)
Items relevant to "Ultra-low-voltage Versatile LED Flasher":
  • Ultra-low-voltage Versatile LED Flasher PCB [16110161] (AUD $2.50)
  • Ultra Low Voltage Bright LED flasher kit (Component, AUD $17.50)
  • Ultra-low-voltage Versatile LED Flasher PCB pattern (PDF download) [16110161] (Free)
Items relevant to "El Cheapo Modules from Asia - Part 4":
  • DHT22/AM2302 Compatible Temperature and Humidity sensor module (Component, AUD $9.00)
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 "High Power DC Motor Speed Control – Part 2":
  • High Power DC Motor Speed Control main PCB [11112161] (AUD $10.00)
  • High Power DC Motor Speed Control Mosfet PCB [11112162] (AUD $12.50)
  • PIC16F88-I/P programmed for the High Power DC Motor Speed Controller [1111216A.HEX] (Programmed Microcontroller, AUD $15.00)
  • Hard-to-get parts for the High Power DC Motor Speed Controller (Component, AUD $50.00)
  • Firmware (ASM and HEX) files for the High Power DC Motor Speed Control [1111216A.HEX] (Software, Free)
  • High Power DC Motor Speed Control PCB patterns (PDF download) [11112161/2] (Free)
Articles in this series:
  • High Power DC Motor Speed Control (January 2017)
  • High Power DC Motor Speed Control (January 2017)
  • High Power DC Motor Speed Control – Part 2 (February 2017)
  • High Power DC Motor Speed Control – Part 2 (February 2017)
Items relevant to "New SC200 Audio Amplifier – Part 2":
  • Ultra-LD Mk3/Mk4 Amplifier Power Supply PCB [01109111] (AUD $15.00)
  • New SC200 Audio Amplifier PCB [01108161] (AUD $10.00)
  • Hard-to-get parts for the SC200 Audio Amplifier Module (Component, AUD $50.00)
  • New SC200 Audio Amplifier PCB pattern (PDF download) [01108161] (Free)
Articles in this series:
  • New SC200 Audio Amplifier (January 2017)
  • New SC200 Audio Amplifier (January 2017)
  • New SC200 Audio Amplifier – Part 2 (February 2017)
  • New SC200 Audio Amplifier – Part 2 (February 2017)
  • New SC200 Audio Amplifier - Part 3 (March 2017)
  • New SC200 Audio Amplifier - Part 3 (March 2017)

Purchase a printed copy of this issue for $10.00.

PROJECT OF THE MONTH Our very own specialist’s are developing fun and challenging Arduino®-compatible projects for you to build every month, with special prices exclusive to Nerd Perks Club Members. DUINOTECH FM RADIO IMPRESS YOUR FRIENDS WITH YOUR GENIUS! With our FM Radio Module in the range, we've received many requests for a FM Radio Project. We think our 'Make your own Radio' kit will be our coolest one yet. This project boasts amazing functionality from just 6 parts, some wires and a little bit of soldering. Mix in some of your skill, our instructions and parts, and you have got your very own FM Radio. XC-4430 XC-4482 XC-4595 Finished Project SEE STEP-BY-STEP INSTRUCTIONS AT jaycar.com.au/duinotech-fm-radio LEONARDO MAIN BOARD FM RADIO MODULE PROTOTYPING SHIELD 128X128 COLOUR LCD DISPLAY MODULE 2 X SNAP ACTION KEYBOARD SWITCH 4.7KOHM RESISTOR PACK BUY ALL FOR 7495 $ SAVE OVER $14 ADD THESE ESSENTIALS AA-2136 Offer superb performance. Great replacement for your tired or damaged earphones. SP-0722 WHAT YOU WILL NEED: NERD PERKS CLUB OFFER STEREO EARPHONES WITH RUBBER FINISH XC-4629 MB-3726 Compact and portable charger designed to charge Smartphones and tablets on the go. Charge using the built-in USB cable • Lithium polymer battery • 10,200mAh • 5V/1.3A Output • 133(L) x 66(W) x 17.5(D)mm 7 NERD PERKS CLUB MEMBERS RECEIVE: 10% OFF SELECT COMMUNICATION, TELEPHONE & COMPUTER PUTER DA DATA CABLES IN ROLLS OR BY THE METRE* (*Applies only to cables listed on page 5 of February 2017 flyer) Catalogue Sale 24 January - 23 February, 2017 XC-4430 $29.95 XC-4595 $24.95 XC-4482 $15.95 XC-4629 $14.95 SP-0722 $1.45 RR-0588 $0.55 PUMP UP THE VOLUME ADD THIS POWER BANK FOR PORTABILITY $ 95 VALUED AT $89.25 RR-0588 $ 69 95 ARDUINO® COMPATIBLE AMPLIFIER MODULE 4 $ 25 ALL PURPOSE REPLACEMENT SPEAKER AS-3006 8 ohm- 1 watt. Round. No mounting holes. 76mm. XC-4448 This remarkably small module provides a complete 2 x 3W stereo audio amplifier. Ideal for driving small speakers $ and earphones. Requires no external components. • Operating Voltage: 2.5-5.5VDC • 23(W) x 16(D) x 2(H)mm 4 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.2; February 2017 SILICON CHIP www.siliconchip.com.au Features 14 Autonomous Flying Cars: your next mode of transport? When heavyweights such as Airbus and Larry Page start investing huge dollars, you’d better believe they’re serious! There have been a lot of false promises, but there are some flying cars actually in production – by Ross Tester 20 Getting Started with the Micromite It has become one of the most popular micros in Australia . . . but where and how do you start? By doing, of course – by Geoff Graham Autonomous Flying Cars – Page 14. 86 First look: Aussie-made battery soldering iron Battery-powered soldering irons have never really made the grade. Until Now! – by Ross Tester 93 First look: Icom’s VE-PG3 Radio over IP Gateway Regardless of what type of radio network you run, you can expand it to the next building or the next country with this interface from Icom – by Ross Tester 12-60V, 40A DC Motor Speed Controller – Page 64. Pro jects To Build 28 GPS-synchronised Analog Clock Driver Traditional analog clocks are fairly accurate, whether they have a swept or stepped second hand. Add this GPS driver and yours will be always 100% accurate, and you don’t even have to adjust it for daylight saving! – by John Clarke 40 Ultra-low-voltage Versatile LED Flasher Want to flash a LED . . . any LED, any colour? Want it really bright? Want to set the duty cycle or flash rate? This tiny module will do all this and more – and give you control like you’ve never had before – by Nicholas Vinen 46 El Cheapo Modules from Asia - Part 4 Measuring temperature and humidity with an AM2302/DHT22 – by Jim Rowe Icom’s VE-PG3 Radio over IP Gateway– Page 93 64 High Power DC Motor Speed Control – Part 2 Putting together our new 12-60V <at> up to 40A DC Motor Speed Controller . If you’re looking for REAL grunt, this is it! – Design by John Clarke 78 New SC200 Audio Amplifier – Part 2 The second installment of our all-new, all-performance 200W audio amplifier module. It’s easy to build – and uses no tiny surface-mount components – by Nicholas Vinen and Leo Simpson Building the SC200 Amplifier – Page 78 Special Columns 58 Serviceman’s Log A do-it-yourself snoring solution – by Dave Thompson 69 Circuit Notebook (1) Simple Motion Detector Alarm (2) “Squash” and “Ping-pong” two-player games using 16 LEDs (3) Using GPS Modules for Surveying (4) Signal Generator Buffer for Testing Amplifiers 88 Vintage Radio Hotpoint model P64MEX 4-valve – by Associate Professor Graham Parslow Incredibly versatile LED Flasher – Page 40. Departments 2 Publisher’s Letter 4 Mailbag siliconchip.com.au 96 SC Online Shop 98 Ask Silicon Chip 103 Market Centre    104 Advertising Index 104 Notes and Errata February 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 Brendan Akhurst David Maddison B.App.Sc. (Hons 1), PhD, Grad.Dip.Entr.Innov. Kevin Poulter Dave Thompson 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. Printing: Offset Alpine, Lidcombe, NSW. Distribution: Network Distribution Company. 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, 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 ISSN 1030-2662 Recommended & maximum price only. 2  Silicon Chip Publisher’s Letter Where does innovation come from? This question comes about because of a story written by Dave Thompson in this month’s Serviceman’s Log. Normally his stories are a quirky mixture of electronic detective work combined with tragic-comedy as he copes with the vicissitudes of working in a quake-affected environment. He usually manages to sort out faults, source the wanted components for repairs and still manages to maintain a good humour in spite of everything. Having visited New Zealand over the Christmas period I have to record my admiration of that country’s achievement in managing quite good economic performance over the years since the devastating earthquake in Christchurch in 2011. This comes from a country which is not generously endowed with natural resources and whose population has had to cope with lots of earthquakes in the aftermath of the 2011 event. The contrast of New Zealand’s economic record with Australia’s is even more stark when you consider our enormous natural resources and our vast export incomes. But Dave Thompson’s Serviceman story this month was somewhat out of the ordinary. Instead of being about an electronic repair it is about his search for a solution to snoring. This problem probably affects the majority of the population as they age. It certainly affects the sleep patterns of the snorer and their unfortunate partner and it ultimately can lead to early death if nothing is done about it. Around the world huge amounts of money are spent on sleep research and it must be said that the various treatments are not simple, inexpensive or even particularly effective. So in the face of that enormous research effort, what chance would Dave Thompson have of coming up with any solution at all? The result may surprise you because it certainly surprised me. And millions of dollars were not spent! Dave just applied some kiwi ingenuity. As detailed in Dave Thompson’s story on page 58 of this issue, his solution is a simple VOX circuit which detects the incidence of snoring and then vibrates the snorer’s pillow to stop him – face it, it’s usually a male. I won’t give you the full details – read the story for yourself. In fact, readers can do their own experimenting with the idea using a standard SILICON CHIP VOX circuit and PCB. What gets me about this story is that Dave came to his solution in a relatively straightforward way. He wondered whether a VOX circuit might work, tried it out, did a few mods, lashed up a working prototype and there you are. Incredible. And maybe it may not prove to be the most effective solution but it sure is worth more development. So congratulations, Dave. Now I’m not saying that Dave is a genius (well, maybe he is!) but how is it that he came up with a simple solution using such a direct approach? What are all these other researchers doing? Or have such approaches been used in the past and found wanting? That seems unlikely. More to the point, given that we have huge resources these days in the form of almost magical electronic components, enormous databases of info on every subject available at any time from computers and smartphones, where are all the younger people with their supposedly more agile brains which are open to all sorts of new ideas? What are they doing? By comparison, Dave is an “old dude”. I haven’t heard of too many breakthrough ideas from all the smart young folk (apart from millions of useless smartphone apps). Or don’t they know enough about science in order to have useful ideas? Leo Simpson siliconchip.com.au MAILBAG 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”. Electron flow versus positive ion flow I was prompted to write this note after reading the mailbag letter on page eight of the December issue of Silicon Chip concerning the direction of current flow, and Silicon Chip’s response. During my career I have been very involved in both the teaching of human physiology and in the development of laboratory instrumentation (analog & hybrid). I well remember the push during the 1960s to move from the conventional Networking over power lines is convenient but not fast or secure A month or so ago, John Crowhurst of Mitchell Park, SA, wrote in looking for a “CAN Bus” like solution for running a network through his home power lines because WiFi bands were so crowded. There is good and bad news here. Good in that such a standard is mature and exists but bad in that it isn’t the “free lunch” John is looking for. IEEE 1901 is a standard for high speed (up to 500 Mbit/s at the physical layer) communication via electric power lines, often called broadband over power lines (BPL). The standard uses transmission frequencies below 100MHz. This standard is usable by all classes of BPL devices, including BPL devices used for the connection to internet access services (<1500m to the premises) as well as BPL devices used within buildings for LANs, energy controls, transportation platforms (vehicles) and other data distribution applications (<100m between devices). It includes a mandatory coexistence Inter-System Protocol (ISP). The IEEE 1901 ISP prevents interference when different BPL implementations are operated within close proximity of one another. However, it suffers from exactly the same 4  Silicon Chip current flow direction of positive-tonegative, to the apparently logical one of electron flow, negative-to-positive. From an engineer’s point of view this seemed perfectly reasonable and many of us tried to do so. Several problems soon emerged, however. First of all, it was clear that charge flow in ionised plasmas and electrolytic solutions involved both positive and negative carriers, and so immediately one was faced with having to make a choice between “conventional” and “electron” flow. Next, problems that both WiFi and CAN bus suffer from – limited bandwidth when it comes to sharing with multiple users. One user is fine, three users are probably OK, 24 users will be cursing constantly. The other issue it shares with WiFi is poor security because, to an even larger extent than WiFi, you are pumping your data (or in the case of home automation, your usually unencrypted control signals) into every house within half a block. There are many good reasons why Ethernet abandoned the concept of hubs and went to switches; two of which are the fact that sharing bandwidth inherently limits speed and that it also makes it easy to intercept packet data. If you don’t want to share limited bandwidth (and IEEE 1901 has less than WiFi or even Bluetooth) or you don’t want your data shared with the rest of the world, you need to bite the bullet and cable up your house (just as I did some 15 years ago). One DSL switch/router and $600 later I have LAN ports in every room in the house where we might need them. It would have been a lot cheaper if I had been fit and agile enough to climb through the ceilings and do the work myself. Fabian Stretton, Surrey Hills, Vic. in solid-state electronics we had to embrace the idea of majority and minority carriers, both positive and negative, although admittedly positive charge carriers such as “holes” could be considered simply as “lack of electrons”. Thus, a controversy was established. As a physiologist, however, I would like to point out that for millions of years prior to Volta’s experiments with chemically-generated electric currents and Faraday’s demonstrations of electric currents generated by moving magnetic fields, Nature has used electrical signalling in virtually all life forms, both animal and vegetable. Indeed, it is no exaggeration to suggest that life as we know it on this planet would not exist without the organically generated potentials and currents that occur in living organisms. Just to mention a few found in the animal kingdom: the electro-chemical phenomena responsible for neural signalling in brain and peripheral tissues; the processes at work in excitation and contraction of skeletal, vascular and cardiac muscle; the incredibly complex activities involving motility, secretion and absorption in the gut and the excretion, absorption and secretion processes in the kidneys. In virtually all of these situations, membrane potentials and electric charge movement principally involve positive charge in the form of sodium, potassium and calcium ions. The dominant role of electron transfer is generally in the oxidation-reduction reactions that characterise metabolic activities and energy transfer within cells but not in the generation of electric currents. The point I would like to make, therefore, is that while engineers may focus on the flow of electrons moving along various conductors and transferring energy to a variety devices, Nature has invested heavily in positive charge siliconchip.com.au siliconchip.com.au February 2017  5 Mailbag: continued Pumped hydroelectric storage should be extended in Australia It was good to see the article on Pumped Hydroelectric Storage in January’s issue of Silicon Chip. Although I agree with Leo Simpson’s comments concerning the impracticality of having very large power storage, Australia will be forced to have some moderate power storage and PHS is the most economic method. It is obviously the preferred method in the rest of the world but there are several more compelling reasons for Australia to use it. The dams and most of the infrastructure would be made in Australia. Australian companies could supply the steel and the concrete plus almost everything would be built using Australian labour. The majority carriers (ions) that have become the basis of all life on earth. While electron current technically may be deemed to be the rational choice, in the wider world that includes the living biosphere, it remains pragmatic to avoid confusion and to stick to the convention of positive current flow. Anthony Goodman, Worrigee, NSW. Submarines are obsolete I always read the Publisher’s Letter first, as it is always interesting. I do not always agree but it causes me to think. I also like Silicon Chip’s policy of publishing interesting articles about relat- 6  Silicon Chip of the expenditure would remain in this country and boost our economy whereas the other storage methods simply would not offer that same economic boost. Wally Fietkau’s letter concerning the banning of ionisation smoke alarms in Queensland deserves some comment. I am very critical of bad science and the Queensland government has a history of implementing bad science and bad engineering. This is surely a political move to please the greenies and their stance against radioactive substances. It is a pity that they don’t realise that they are surrounded by minuscule amounts of radioactive material every day. George Ramsay, Holland Park, Qld. ed subjects, which makes you unique in the publishing world. In December 2016, you raised the question of new submarines for Australia. Submarines have had a long history (over 150 years) and have done a lot in the various wars. The diesel type reached its peak of effectiveness early in World War 2. However, early in 1942, the Allies developed planes which were able to span the Atlantic, closing off the previously safe zone in the middle of the ocean. After this, the submarines were hunted down wherever they went. Bombing of their bases also reduced their effectiveness. There was a resurgence with nuclear types in the 50s, 60s and 70s, because of their ability to remain undetected deep underwater for long periods, however, this advantage was lost with the advent of satellite surveillance and better detection devices. I agree that nuclear would be better than diesel but suggest that the question asked should be: why do we want submarines at all? What could we use them for? The range of diesel subs and weapons capability (unless nuclear) means that they could not sink a modern aircraft carrier. Surveillance and covert operations could be better carried out by satellite and drones and ocean management by a fleet of patrol boats. Like the battleship, tanks and even fighter planes, submarines are obsolete. Wars now are now fought by terrorists in single combat, not industrial scale contests. We need patrol boats, armoured vehicles, helicopters, small robot weapons, body armour, satellite killers and drone-based weapons to fight current wars. Australia should develop its own cheap, innovative weapons, such as a camera drone carrying a pistol. We could build 100,000 of these for the cost of one jet fighter. With electronic counter measures, smart missiles are of no use but the old fashioned dumb missile will still work without hindrance. A jet plane hitting a small object whilst travelling at speed would be destroyed. So we need dumb missiles or some such which will put objects in the jet’s path, rather than smart missiles. If it ever comes to a war with a super power, then we need nuclear weapons and the means to deliver them, (God forbid!) but that is another question. siliconchip.com.au Mailbag: continued Some articles published are not appropriate for Silicon Chip As an electronics enthusiast I resent “my magazine” being used as a platform for anti-environmental propaganda. That may not be the publisher’s view but it is mine, and I’m the target audience! Taking your December 2016 outrage, can you understand that people feel cheated when they discover that a purported electronics magazine is actually a disguised copy of “Jane’s Weekly”? All about the weapons-lover’s ultimate wet dream, the Nuclear Submarine! You might be interested Leo, we are not. I’m not arguing the details in With submarines off the table, we need to use our brains to develop large numbers of cheap but effective weapons, better suited to the use to which they are put. In World War 2, the Americans defeated the German panzer tanks with vastly inferior tanks because they were available in greater quantities. So, let us forget submarines and harness our brains and local industries to find a better and cheaper solution for our defense requirements. David Tuck, Yallourn North, Vic. Nuclear submarines are no longer relevant in modern warfare The December 2016 feature article on nuclear submarines did not this forum; it’s meant to be an electronics magazine. Michael James, Hackett, ACT. Leo Simpson responds: I regard the topic of nuclear submarines as being quite within the purview of Silicon Chip magazine and just as appropriate as previous articles on nuclear and super-critical coal-fired power stations. I don’t have a political agenda in this instance and I would have felt the same way if a Labor government had made the same decision. We do appreciate the fact that you consider Silicon Chip to be “your magazine” and thank you for the compliment! go into the relevance of nuclear submarines in modern warfare and this would, perhaps, have explained the choice for non-nuclear submarines by the ADF. Nuclear submarines are a product of the cold war between USA and USSR in the 1960s and 70s. Their role was to get nuclear-tipped missiles close enough to have a reasonable chance of reaching their targets. 20 years later, the major powers had ICBMs capable of flying half way around the world on their own. At this time, land-based launch sites were likely to be destroyed within hours of the start of war and nuclear submarines were re-purposed to provide mobile launchers for ICBMs which were less likely to be hit in the first attack wave. By 2000, that purpose was made obsolete as ICBM interception systems are now pretty reliable. Post-2000, the role of nuclear submarines is a bit obscure. Much of the work formerly done by them (convoy attack and defence) is now better done by aircraft. The value of submarines has always been in their ability to remain hidden, but because nuclear submarines emit massive amounts of heat, they are always detectable from aircraft or even space. If they are deep underwater, it may take a few hours for their heat plume to reach the surface, but when it does, the enemy will know its location; completely negating its stealth advantage. It is hard to imagine that all nuclear submarines would not be destroyed within days of a “hot” war as they have no real defence against airborne anti-submarine methods. Non-nuclear submarines create far less heat and while they are detectable when they come up for air, at least they don’t leave a “contrail” across the ocean for enemies to follow. The other disadvantage of nuclear submarines is that no-one knows how to dispose of them. The UK has 19 of them tied up to a wharf in Devonport – at a maintenance cost of $16 million per year. After a 16 year delay, they are now removing the fuel rods and temporarily storing them with other high level nuclear waste (of course they don’t know how to permanently dispose of used fuel either). The submarines remain far too radioactive to cut up and sell for scrap metal and will remain so for several The Australian Arduino experts! Tronixlabs is owned and operated by Arduino experts including "Arduino Workshop" author John Boxall Check out our wide range of quality Arduino and compatible boards, modules, and so much more! Order online • Visit tronixlabs.com.au/arduino support<at>tronixlabs.com • $5 flat-rate delivery Australia wide! • Latest updates on twitter - follow <at>tronixlabs 8  Silicon Chip siliconchip.com.au siliconchip.com.au February 2017  9 Mailbag: continued decades. See www.telegraph.co.uk/ news/2016/10/18/navys-old-nuclearsubmarines-will-not-be-finally-disposed-of-unt/ I also want to comment on the closure of Alinta power station in Port Augusta. It was closed for economic reasons. Those who are saying that the South Australian government should not have closed the Alinta (Port Augusta) power station need to get with 2016 reality. Since Alinta is owned by a private enterprise, short of nationalising them, the state government could not force them to continue producing when no-one would buy power at their cost price (8c/kWh or $80MWh). Yes, I know retail consumers pay 35c/kWh – but that has distribution cost and retailer mark-up added. All are now private enterprise owned and everyone wants a profit! The coal Alinta was burning was the second-worst quality in Australia, the deposit was nearly exhausted and the plant was over 60 years old. To stay in operation, Alinta would have to switch to gas fuel and build a brand new plant at huge capital expense. Which would have made their product even more expensive – and they already knew that their major customers (BHP and Arrium) would not pay 8c for a 24 hour supply. I am sure Alinta would have sold BHP the plant for scrap value if they wanted to run it but they obviously did not want it; they wanted taxpayers to provide them with cheap power. What makes this really interesting is that SA may be first state with this problem but Victoria, NSW and Queensland are close behind. All have power plants well past their use-by date and (largely overseas-based) private owners, who are facing big investment costs into an industry which cannot compete with solar power when the sun is shining. Producers also have the added complication that any significant price increase will persuade huge volumes of users to get off the grid entirely. Cliff Hignett, Naracoorte, SA. Comment: How can decommissioned nuclear submarines be highly radioactive? Clearly, they weren’t radioactive when they were in service, otherwise their crew would have suffered radiation sickness and related diseases. The reactor would certainly be radioactive and would remain so for many years. Australia not sufficiently developed to operate nuclear submarines In the Publisher’s Letter in the December 2016 issue, Leo Simpson asks “If a such a topic [nuclear power for submarines] cannot be raised in a technical magazine, where else will it ever appear?” Well, fairly obviously in journals dedicated to military and/or strategic issues, or government policy papers, the general media etc. While I am inclined to the view that nuclear power is not an unmitigated LOOKING FOR Distributors of quality test and measurement equipment. Signal Hound – USB-based spectrum analysers and tracking generators to 12GHz. Virtins Technologies DSO – Up to 80MHz dual input plus digital trace and signal generator Nuand BladeRF – 60kHz– 3.8GHz SDR Tx and Rx Bitscope Logic Probes – 100MHz bandwidth mixed signal scope and waveform generator Manufacturers of the Flamingo 25kg fixed-wing UAV. Payload integration services available. Australian UAV Technologies Pty Ltd ABN: 65 165 321 862 T/A Silvertone Electronics 1/21 Nagle Street, Wagga Wagga NSW 2650 Ph 02 6931 8252 contact<at>silvertone.com.au www.silvertone.com.au 10  Silicon Chip PROJECT PCBS? PCBs for most* recent (>2010) SILICON CHIP projects are available from the SILICON CHIP On-Line Shop – see the On-Line Shop pages in each issue or log onto siliconchip.com.au/shop You’ll also find some of the hard-to-get components to complete your SILICON CHIP project, plus back issues, software, panels, binders, books, DVDs and much more! Please note: the SILICON CHIP OnLine Shop does not sell complete kits; for these, please refer to kit suppliers’ adverts in each issue. * PCBs for some contributed projects or those where copyright has been retained by the designer may not be available from the SILICON CHIP On-Line Shop siliconchip.com.au Grid needs work before adding more renewable power sources Your Publisher’s Letter in the December 2016 issue was salient because politicians in South Australia have long pushed renewable energy at the expense of the state’s established coal and gas-fired generation and it has now reached the point where the economic future of SA is being questioned. This government fails to comprehend that isolated groups of wind turbines on the landscape don’t constitute sound energy policy. Numerous power blackouts in SA have borne out this fact, one on September 29th when Adelaide and areas further north, including BHP’s Olympic Dam mine, faced a blackout with wind turbines contributing little to the state’s grid due to insufficient wind at that time! Such events destroy business and consumer confidence and this, along with the October blackout, has raised enough concern for Murray River irrigators and other sections of the SA community to seriously consider purchasing their own diesel powered generators. This, on top of predicted summer blackouts is a damning indictment of the state government’s policy direction. A further indictment are the remarks by the Federal Energy minister, Josh Frydenberg, who stated to the Australian Financial Review (December 3-4) that “the debate over the future of the nation’s energy mix is driven by ideology and self-interest” and that South Australian premier Jay Weatherill “was refreshingly honest when he admitted that SA was conducting a big experiment by pushing renewables” and he further concluded that the experiment had failed! Frydenberg also raised doubts about the realisation of future energy targets set for the states and that any talk of the demise of coal generation is premature. There is now speculation in SA that a private Brisbane-based entity may purchase the recently closed Port Augusta power station which, if bought back online, will again provide power supply security to the state grid. At the present time, renewable energy has a long journey ahead before it will be integrated successfully into a national or state-scale grid alongside conventional synchronised methods of power generation and an even longer journey before renewables can replace them entirely. All that most consumers want is a reliable power supply, so it is pointless for the renewables lobby to throw their arms into the air when the viability and role of renewables is questioned because they fail to meet the needs of the consumer, which is what your Publisher’s Letter implied. Chris Hankin, Mount Gambier, SA. Available at Digi-Key Electronics http://www.digikey.com.au/en/product-highlight/d/digilent/analog-discovery-2 siliconchip.com.au February 2017  11 Mailbag: continued Helping to put you in Control TECO OP10N 4.3” Graphic Panel Graphic Panel with192 x 64 pixels, 4 Function Keys, Numeric Keypad, Monochrome, 2 serial ports, 24VDC input power. Connects to PLC or other controller using Modbus and other protocols. SKU: TEI-001 Price: $209.00 ea + GST Programmable Logic Relay TECO SG2 Series PLR V.3, 100~240VAC powered, 12 AC Inputs, 8 Relay Outputs, Keypad / Display, Expandable (Max. 44) I/O. SKU: TEC-010 Price: $189.95 ea + GST SparkFun Inventor’s Kit Special Edition A great way to get started with programming and hardware interaction with the Arduino programming language. SKU: SFK-015 Price: $115.00 ea + GST Voltage Type Accelerometer AKE390B-08 MEMS 3 axis Accelerometer with range +/-8G and gives three 0 to 5 V analog voltages out. Protection IP67. SKU: SRS-1504 Price: $699.95 ea + GST Ultrasonic Level and Distance Sensor The ToughSonic CHEM 10 is an ultrasonic sensor designed for measurement applications involving corrosive chemical liquids or gasses, but it is an excellent choice for benign materials as well. Maximum range of 10 feet (3 meters). SKU: SNS-080 Price: $949.00 ea + GST Data Acquisition OEM Board OEM version of the Labjack U3-HV. Features 12 Flexible I/O which can be confirgured as digital input or output and analogue input. Ships with the board only. SKU: LAJ-025 Price: $132.00 ea + GST Eight 12VDC Relay Card This card includes a relay driver allowing direct connection to many logic families, industrial sensors(NPN+PNP), dry contacts or voltage outputs SKU: RLD-128 Price: $109.95 ea + GST For OEM/Wholesale prices Contact Ocean Controls Ph: (03) 9782 5882 oceancontrols.com.au Prices are subject to change without notice. 12  Silicon Chip evil, neither am I convinced that it is the best power option for our naval forces. It can be quite expensive and requires sophisticated infrastructure to support it which Australia does not have. The US Navy has nuclear submarines in part to escort its fast carrier groups, which Australia does not have. As Wikipedia says, “Nuclear propulsion has been ruled out due to the lack of an indigenous nuclear industry in Australia and public opposition to nuclear technology.” To the best of my knowledge, the only countries that have operational nuclear powered submarines are the five permanent members of the UN Security Council (China, France, Russia, UK and USA) with India expected to accept a hybrid SSN/SSBN into service in 2018. The argument that Australia should have nuclear powered subs to be in that league or to counter their subs is not particularly convincing, in my opinion. You have to accept that Australia is not in that league. Australia has quite extensive territorial waters with more than 25,000km of coastline. With twelve subs, that would be more than 2,000km for each sub to patrol. It is quite naive to think that those twelve submarines could adequately patrol it; it would be more efficiently patrolled from the air and with long range radar, with subs used for more specific tasks. If memory serves me correctly, the RAN has had difficulty finding sufficient crew to keep two submarines at sea and if that remains an ongoing concern then the power source for them is likely to be irrelevant. As it is, the Collins-class has a range sufficient for it to go more than half way around the world surfaced, and slightly less at snorkel depth. Fully submerged, it is significantly less but still more than enough to go beyond our territorial waters and return. In “A Look At Nuclear Submarines”, Dr Maddison writes (on page 22) of the “US Seawolf design, which was cancelled before production...” Production was cancelled after three Seawolf submarines were made and all three are in service. The last boat was extensively modified from the original design. Phil Dennis, Darlington, NSW. Electricity grid stability without rotational inertia With more and more renewable energy sources feeding power into the grid, one hears frequent lamentations how the stability of the system is compromised. One such example is The Finkel Independent Review into the Future Security of the National Grid, December 2016. Like almost all the previous studies that have reviewed our grids, they suggest that as more feeds-in are of an inverter type that the stability of a system will be compromised as the size of the rotational inertia of the spinning turbines and rotors form a smaller and smaller part of the feed-in mix. I find it surprising that no one seems to be talking about controlling the system in another way so the stability is not compromised. When AC electricity is generated by a rotating device of some kind, the frequency is controlled by the speed of the rotor. From the outset, speed governors controlled the frequency and the voltage was controlled by the excitation. From the start to the present day, the same approach has been used with more and more sophistication as multiple generators work in unison to make up almost all modern electrical grids. These grids are often interconnected in a more and more complex fashion as well. With rotating machinery as generators, usually the more efficient plant is set to full throttle while the speed or frequency of the system as a whole is controlled by some of the plant being set on governor control, usually with matched governor characteristic. The throttle is simply opened and closed by comparing the speed with the set point. What really happens is that the very small difference between the energy input and the energy consumed is made up by the kinetic energy of the spinning inertia of the turbine and rotors. That small difference is manifested by a change in speed and the throttles are adjusted siliconchip.com.au siliconchip.com.au New IDAS series Arriving late 2016 ICOM5009 to return those speeds to the chosen set point. This thinking has persisted and no one seems to be thinking outside the square. There are other ways to control plant connected to a grid and some of the alternatives are not compromised by having smaller and smaller rotational inertia. In, fact there need to be no rotational machinery at all with some control designs. With a constant voltage DC grid, the energy input devices would be attempting to control the supply voltage. The small difference between the input energy and the consumed energy is manifested as the resultant supply voltage and the throttle control then comes from monitoring the supply voltage and comparing it to the set point. There are no fundamental reasons why an AC grid need be controlled any differently to a DC grid and in some situations there need be no rotating devices in the mix at all. In grid-talk, among those close to the industry, there are all sorts of discussion like “riding through a fault”. These ideas come from the traditional grids powered mostly by rotating machines and they make perfect sense while things do not change but the world is changing and so must the thinking. The Finkel report mentions how the managers of some grids overseas are deploying old, unused rotating devices as synchronous condensers. This thinking is nothing other than trying to return things to what they once were without considering other control strategies. It is wrong to suggest that the rotational inertia that comes from the kinetic energy of the spinning mass is the source of stability under fault conditions. The main contribution that the rotational inertia provides is that it makes a grid like a grid that was once found to be stable over the years by using the same damping and other constants that are used in the throttle control transfer function without revisiting the system stability analysis that was once understood by engineers that ran the show instead of the modern so-called “non-technical managers”. In the case of rotational plant, there are no reasons why the frequency can not be controlled by a stable clock which provides the set point for phase or angular position control of the rotor. The throttle can then be controlled by the voltage as would be the case with a DC grid. Inverter feeds can either be “slaved” to the grid in-phase (and hence frequency-locked), or they too can have their phase controlled by a stable clock that sets the inverter phase and so the frequency while the voltage again can be monitored to control the energy input, or allowed to determine their own power input as would be the case of devices like wind turbines. There is a vast depth of technical thinking that directs the design of the control mechanisms that go with rotational power station plant. When the rotational equipment forms a smaller and smaller fraction of the grid then that conventional thinking becomes stained and it is difficult to change some of the control transfer function constants and still maintain system stability. However, that is not the only way to control generation equipment that feeds a grid. Thinking outside the square suggests other ways that are not so constrained when trying to maintain system stability. Kenneth Moxham, PhD, MIEAust. CPEng, Urrbrae, SA. SC The new generation IDAS series boasts a modern design and an impressive range of functions. These advancements and an exceptional attention to detail bring you a solution that not only looks smart but works smart too. Refinements and enhancements to design, usability and features combined with the electrical and industrial hardware improvements further increase the quality and reliability of the new IDAS series. To find out more about Icom’s products email sales<at>icom.net.au WWW.ICOM.NET.AU February 2017  13 On their way to your neighbourhood? No, it’s not April 1st. When heavyweights such as Airbus start putting serious money into projects, you’d better start taking them seriously. Even Uber is getting in on the action, releasing a 98-page white paper late last year outlining its plans to bring “flying cars” to commuters by 2026. AUTONOMO FLYING CAR Your Next Mode of Tran I f you’re a (relatively!) old dude like me, you may remember the regular stories in magazines like Popular Mechanics and Popular Science in the 50s and 60s about some backyard tinkerer who’d built a car that could fly . . . or a plane that could be driven on the highway. Indeed, the concept featured on a cover of Popular Science way back in 1926. (Remember the Model T Ford was still being made in 1926 and first powered flight was only made 23 years earlier). 14  Silicon Chip I’m not sure if many (any?) of those flying cars were much more than a thought bubble – certainly there weren’t too many flying cars in our skies or on our streets as the century ticked over many decades later! But given the rather sensational advances made in aircraft, electronics and computing in very recent years, it looks like at least some of those stories might be coming true. We’re not claiming this is an exhaustive list by any means – you can find many more on line. But you’ll also find that many of them (and perhaps even some shown here) are nothing more than “vapourware”. Indeed, some are claimed to be typical internet scams, ready to separate the gullible investor from their hardearned! by Ross Tester Some companies have even made it through to prototypes and expect The AeroMobil siliconchip.com.au “Mark my word: A combination airplane and motorcar is coming. You may smile, but it will come.” Henry Ford, 1940. Fortunately for pilot Stefan Klein, the AeroMobil was fitted with a safety parachute for its inaugural flight. Strangely enough (!), there is no mention of this minor setback on the Slovak company’s website – they’re still saying you can order one this year for 2019/20 delivery. The price: not finalised yet; all they are saying is “several hundreds of thousand Euro”. If we take a guess at €500,000, at current exchange rates that’s a bit over $AU700,000! (www.aeromobil.com) OUS RS – nsport? to start sales this year with delivery in the next two or three years. The photo above, the AeroMobil, is real – AeroMobil have been developing the flying car since 1990, although not always with 100% success – their AeroMobil3 spectacularly crashed and was written off on its maiden flight in May, 2015 (see above right). The co-owner of AeroMobil, Stefan Klein, survived with the aid of the car’s inbuilt safety parachute and suffered only minor injuries. The craft itself was not quite so fortunate. siliconchip.com.au The AeroMobil is not autonomous – it requires a pilot, although at the moment that’s likely to be only an LSA (light sport aircraft) licence. Zee.Aero and Kitty Hawk However, Larry Page (you may remember him as co-founder of Google) has put together a company named Zee.Aero, with reports of their prototype actually flying “after hours” at their base at Hollister Municipal Airport, California, USA (long after other users had left for the day). Page’s dream is to have a plane/car which is autonomous – driverless on the road and pilotless in the air. Along with putting in $100 million of his own money since it was launched in 2010, Page has been incredibly secretive about his involvement with Zee.Aero and the company itself – in fact, staff only refer to him as GUS, the guy upstairs! (Page used to live on the second floor until Zee. Aero needed the space). The only information on Zee.Aero’s operations have come from other pilots using Hollister Airport and very occasionally spotted (and sometimes even photographed) a strange looking plane. Page is also behind a second start- up, Kitty Hawk (now where have we heard that name before?) who are actually working on a competing design to that of Zee.Aero. Reports suggest that Zee.Aero and Kitty Hawk are not only independent of each other but Page makes sure staff actively compete against each other! Airbus/A3 Back to Airbus (yes, they of the A380 etc) and their “Project Vahana.” Actually, it’s more correct to say this is being developed by A3, which is a It’s not exactly a new concept, as this cover from Popular Science, March 1926, clearly demonstrates: “Rides both roads and air”, it says! February 2017  15 Artist’s rendering of the all-electric, eight-rotor point-to-point VTOL aircraft from Airbus/A3 Project Vahana, with an “inside view” inset above. It’s being thought of as next generation’s taxi . . . Graphics: Project Vahana division of Airbus, based in Silicon Valley, California. A3, like Uber and Zee.Aero, are all working on VTOL (vertical take-off and landing) aircraft, as distinct from flying cars. Their attitude is that you won’t need to take to the highway if you can take off and land in your own backyard (or on your roof). Whether that ever happens depends a lot on the regulations governments put in to control VTOL aircraft. And as A3 freely admit, the regulatory aspects are “definitely something difficult to overcome.” Despite this, A3 maintain they will have the pilotless Vahana ready in four years. It’s an all-electric, single passenger aircraft with eight rotors. It also has lidar, radar and cameras, the same technology currently being deployed on self-driving cars. Operating altitude will be around 300m and its range will be, according to A3, about the diameter of a city. Instead of summoning a taxi (or Uber), you’ll call for one of these. It will already have its destination programmed in and once you’re on board, it will take you straight there. 16  Silicon Chip Uber’s plan Uber’s 98-page “white paper” follows on from their redefining taxi services around the world – not to mention their fleet of selfdriving cars currently being trialled in Pittsburgh, PA. Their vision takes this one The Terrafugia “Transition”. With prototypes already flying, the company claims an on-sale date around 2019. It has an 800km range and 320km/h top speed. Estimated cost will be around $US120,000. They also claim autonomous flying capability. siliconchip.com.au It’s claimed the Volocopter is much simpler that flying a helicopter – there’s no cyclic or collective, etc – just a simple joystick to go up, down, left, right, forward and backwards. And triple redundant computers even take over some of that for you! Uber’s “Elevate” concept is to have a fleet of autonomous VTOL “taxis” which will whisk you across town much faster than their Uber cars, at a not-toodissimilar cost. Destinations would be pre-programmed – you just get in and go! While the first stage is to operate from several nearby bases, before too long it could be door-to-door.        Graphic: Uber step further with a network, called “Elevate”, of fully autonomous, ondemand electric aircraft that will take of and land vertically, thus requiring no highways. Uber’s concept is that within a decade, the Elevate network can have you across a city in a fraction of the time required for a highway-based trip, Uber or not! It doesn’t plan on making this dream a reality in itself but bring together governments and private individuals who can solve the myriad of problems that will undoubtedly have to be dealt with before it can progress. Terrafugia’s Transition Terrafugia’s mission is to create practical flying cars that enable a new dimension of personal freedom. Terrafugia (www.terrafugia.com) (ter-raFOO-gee-ah) is derived from the Latin for “Escape the Earth”.Their motto is We’re Driven to Fly. The company was founded by five MIT graduates in 2006. Today, their “Transition” is claimed to be the world’s first practical flying car. Unlike some other soon-to-be-released (?) flying cars, it will incorporate autonomous technology that will make it safer than any other small aircraft in the sky today. Because of the autonomous flight capability, Terrafugia are hoping that the Transition will be approved for flight with only an operator’s certification, as distinct from a full pilot’s licence. This (and a huge number of other questions) are currently under negotiation with US regulators. They are hoping to have the Transition licensed as a Light Sport Aircraft (LSA) which allows a lower level of skill than a typical aircraft. Terrafugia has already developed and flown two full-scale prototypes and has received all the legal approvals necessary to bring the Transition to market in the USA. It first flew in 2009 and was demonstrated at the Oshkosh Airventure Show in 2013. Terrafugia are also developing the Terrafugia see their concept TF-X as the future of personal transportation. It will be a four-seat, 200 mph VTOL craft that they claim will make flying easier and safer than ever before. Production is planned for 2023-2027, assuming a number of legal pitfalls can be overcome. siliconchip.com.au February 2017  17 Evolo claim that the Volocopter is much easier and safer to fly than a helicopter – the pilot merely commands direction via a joystick – and with 18 individual motors and rotors, it has significantly higher levels of redundancy built in. Once flown to a position, it will stay there until commanded otherwise. And to land, all the pilot needs to do is hold down a button on the joystick – once near the ground the Volocopter’s guidance system automatically controls the craft until it lands gently. The prototype VC200 was first flown in November 2013. There are several Youtube videos and visualisations showing the craft in action (www. youtube.com/user/volocopter). I-TEC Maverick Paraglider It’s not a toy; it’s not even a commercial model. This is a full-sized, two person (pilot +1) 18-motor/rotor Volocopter, which had its maiden flight on April 6 last year. See https://www.youtube.com/watch?v=OazFiIhwAEs TF-X, a more advanced plug-in hybrid electric flying car with VTOL capabilities and computer-controlled flight. The are hoping to commence production of the TF-X between 2023 and 2027 but there are many regulatory hurdles to be overcome before then. Evolo’s Volocopter The next craft is definitely not a flying car but we list it for its interesting features, including the level of autonomy built in. Germany-based Evolo (www.evolo. com – it’s in German but Google will translate it) claim that their alreadyflying Volocopter is “the dawn of a revolution in urban mobility”. The VC200 Volocopter, seen above, is an 18-motor/rotor design similar to a very-much-oversized drone. The difference is that the Volocopter can take two people aloft, much like a small helicopter. It weighs 450kg with passengers and flies at speeds up to 100km/h. It can also be “folded” for transportation and hangar needs. In Germany, the prototype craft ([VVZ] D-MYVC) is licenced as an ultralight aircraft. OK, so it’s not really a flying car – but it can fly and it can drive on the ground . . . just about any ground! Actually developed by a missionary organisation to allow transportation into areas where they can’t drive, the I-TEC Maverick was conceived as a safe, easy-to-operate air and land craft in an area “beyond roads”. Florida-based I-TEC are not the first to produce a paraglider but they are amongst the first to mount an all-terrain road vehicle underneath! The idea is simple: you drive as far as you can then use the propellor and parasail to push you along . . . and up! The Maverick was said to be popular with off-road enthusiasts, especially at the bargain price (in 2012) of around $US94,000 (www.mavericklsa.com). SC Photo by Tory Townsend - http://itecusa.org/images/IMG_4806.JPG, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=52493537 The I-TEC Maverick: a capable off-road buggy that also has a propeller and parasail to soar where obstacles (eg, a deep river!) stop you driving. It is said to be very easy to learn (and a whole lot of fun!). Price (in 2012) was about $US94,000. 18  Silicon Chip siliconchip.com.au Getting Started with the Micromite Want to learn how to program a microcontroller? There’s no easier way to start than with this guide to using the Micromite. With this easy-tofollow article, all you need is a Micromite chip and a couple of hours and you can become an embedded programmer. Part 1 – by Geoff Graham T he Micromite, in its various configurations, has become a big hit with thousands built. Readers have used it for jobs ranging from controlling a heating element through to the brains behind an intelligent amplifier/tuner. But there are still many people who would love to “get into it” but don’t know how to program in BASIC (or any other computer language). Is this you? This tutorial will guide you through the basics of using the Micromite, programming in the BASIC language and show you how to get the Micromite doing something useful almost straight away. We’ll start with some small, easy programs and progress to learning a few of the more advanced features which make the Micromite so versatile. Silicon Chip readers should be familiar with the Micromite by now. Essentially, it is a super-fast 32-bit microcontroller programmed with an advanced BASIC interpreter called MMBasic. You use MMBasic to write your programs and because it is designed to be easy to use, you can get your project running in far less time than if you were writing in a complex language like C or assembly. To run the examples below, you can use a bare Micromite chip with just one capacitor, one resistor and a 3.3V power supply, as shown in Fig.1. However, we strongly suggest that you put together the Micromite LCD BackPack, as described in the February 20  Silicon Chip 2016 issue as this will be required for some of the examples in subsequent articles in this series. The BackPack can do much more than a bare Micromite, thanks to its 2.8-inch LCD touchscreen and it has been extremely popular, with around 1000 built! So if you don’t already have an LCD BackPack, we suggest you put one together. Regardless, once you have your Micromite up and running, you will need to connect it to your computer using a USB/serial adaptor and terminal emulator, as described in the February 2016 construction article and also in the side-panel later in this article. Once you’ve done that, you can try out all the example code in this article. When you have it set up and working, wire up a LED to the BackPack’s pin 14 (as shown in Fig.2) and load 2 x AA OR 3.3V DC SUPPLY +2.3V to +3.6V <at> 26mA 1 28 27 8 28-PIN MICROMITE the following program using MMEdit: SETPIN 14, DOUT DO PIN(14) = 1 PAUSE 200 PIN(14) = 0 PAUSE 300 LOOP Run it (by clicking the icon of the running man in the toolbar) and you should see the LED flashing twice per second (ie, 2Hz). In microcontroller circles, flashing a LED is pretty much the most basic test program you can write, a sort of “hello world” program. It demonstrates that your chip is running correctly and you are able to program it and control its I/O pins properly. This is the hardest part; from now on you can simply build a program pieceby-piece on this foundation, until you have it doing what you want. Fig.1: the best option for experimenting with the examples in this tutorial is the Micromite LCD BackPack but if you wish to just use the 28-pin Micromite on a breadboard, this is the basic circuit necessary to get it going. Note that the capacitor must be tantalum or ceramic type. 20 10µF 6V Console TX Console RX CERAMIC OR 11 12 13 47µF 6V 19 TANTALUM siliconchip.com.au This short program works by first configuring the pin connected to the LED as a digital output (“DOUT”). It then enters an endless loop (DO … LOOP) where it turns the LED on and off with pauses in between. The full syntax of the initial SETPIN command is: SETPIN nn, mode Where “nn” is the pin number on the Micromite to configure and “mode” is how you would like the pin to be configured. The mode can be: AIN – analog input (ie, measure a voltage between 0V and 3.3V) DIN – Digital input (ie, sense low [~0V] or high [~3.3V]) FIN – Measure the frequency of the signal on pin PIN – Measure the period (ie, the time between positive going edges) of the signal on the pin CIN – Count the number of pulses on the pin DOUT – Digital output (either held low [~0V] or high [~3.3V]) Note that the pin number “nn” refers to the physical pin number of the chip as shown in the data sheet. This makes it easy for you to cross-reference a component connected to the chip with the programming commands that will manipulate it. We will go through the other modes later but all you need to know for now is that the first line of the program sets pin 14 to be a digital output. To make that pin go high, you assign a non-zero number to it, as in “PIN(14) = 1”. To make it go low, you assign the value of zero to it, as in “PIN(14) = 0”. The I/O pins on the Micromite can supply a reasonable amount of current for driving external components (about 10mA each) and as the LED will only draw about 4mA, due to its series current-limiting resistor, that Fig.2: if you are using the Micromite LCD BackPack, this is how you should connect the LED to try out some of the examples. You can plug the BackPack into a solderless breadboard or you can directly connect to the BackPack I/O pins as shown here. Note CTRL-C can get you out of all sorts of difficult situations so remember it because you will find useful at some time in the future. is well within the chip’s capability. PAUSE command The PAUSE command in our example program does exactly what its name suggests, ie, causes the program to pause or wait for a certain amount of time. This time is expressed in milliseconds, so PAUSE 200 will suspend the running of the program for 200ms or one fifth of a second. You need this delay because the BASIC program runs quite fast and without the PAUSE commands, the LED would flash at such a rate that you would only see a dim light. You can verify this by entering the program without the PAUSE commands: SETPIN 14, DOUT DO PIN(14) = 1 PIN(14) = 0 LOOP If you attach an oscilloscope to pin 14, you will see that your BASIC program is toggling the output at about 9kHz. There are four commands being executed in this loop, suggesting that each command requires an average of 28µs to execute. Note though that if you run this same program on the Micromite Plus (eg, the Explore 64, Explore 100 or Micromite Plus LCD BackPack), it will run faster, which is a good demonstration of why it’s a bad idea to rely on execution speed for program timing. Another part of this program that needs explanation is the DO … LOOP construct. This forms an “endless loop” which causes the contained commands to be repeated over and over forever! When MMBasic reaches a LOOP command, it searches backwards for a matching DO command and then jumps back to there and executes the following commands again. Fig.3: pin connections for the microUSB-to-serial converter. Note that the RX pin from the converter goes to the TX pin on the board, and vice-versa. siliconchip.com.au February 2017  21 Setting up the Micromite As mentioned at the start of the article, the best set-up to play with the examples in this series of articles is the Micromite LCD BackPack, which was featured in the February 2016 issue of Silicon Chip. This simple project uses fewer than ten components and can be built in half an hour. It includes a 3.3V power supply, 28pin Micromite and LCD touchscreen. In future tutorials, we will cover drawing graphics on the display and using the touch interface, so the Micromite LCD BackPack will enable you to follow the examples and experiment for yourself. A complete kit is available from the Silicon Chip Online Shop, which includes all the parts you need to build the BackPack, here: www. siliconchip.com.au/Shop/20/3321 The February 2016 issue which describes the Micromite LCD BackPack can also be purchased from: • w w w. s i l i c o n c h i p . c o m . a u / Shop/2/3317 (printed copy) • w w w. s i l i c o n c h i p . c o m . a u / Shop/12/3330 (online version) • We can also supply a USB/serial interface module to connect it to your computer at the same time: • w w w. s i l i c o n c h i p . c o m . a u / Shop/7/3437 (with USB TypeA plug, no cable required) • w w w. s i l i c o n c h i p . c o m . a u / Shop/7/3543 (with microUSB Type-B socket, cable required) However, you do have the option of simply plugging a 28-pin Micromite into a solderless breadboard and use jumper leads to connect up the LCD display whenever you needed to. Either choice is viable so it is up to you. If you would like to follow this route, you can purchase just the 28-pin Micromite from the Silicon Chip Online Shop at: www. siliconchip.com.au/Shop/9/2908 Connecting to a computer To program the Micromite using MMBasic, you can enter commands and programs via the console. The console is a serial interface over which you can issue commands to configure the chip and edit/run programs. MMBasic also uses the console to display error messages; your own programs can also display messages on the console, and receive user input from it. A serial interface consists of two signals. One, referred to as TX or TXD (for transmit [data]) carries coded signal data from the device while the other, called RX or RXD, receives similarly coded signals. ASCII encoding is used for each character sent or received. The speed of transmission is referred to as a baud rate which is another way of saying bits per second. The Micromite starts up with its console serial port set to a baud rate of 38400. The serial port uses TTL signalling which means that the signal swings between zero and 3.3 volts. To use the serial console, you need a USB-to-serial converter which plugs into a USB port on your PC and on the other end, connects to the Micromite’s serial console. This provides a virtual COM port on which your PC can send and receive data from the Micromite. Two suitable devices, both using the CP2102 chip and available from the Silicon Chip Online Shop, are mentioned above. The CP2102 and how it works is described in greater detail in the January 2017 issue. The picture opposite shows how such a converter is connected to the 28-pin Micromite on a solderless breadboard. Note that this photo shows the Micromite with an independent 3.3V power supply but the 3.3V output on the converter can be used to power the Micromite. When the converter is plugged into your computer and the correct driver is installed, it will appear as a serial port (eg, COM29 in Windows). You then need to start a terminal emulator on your computer to open the port. For Windows, we recommend Tera Term version 4.88 which is a free download from http://tera-term. en.lo4d.com Set the interface speed to 38400 baud as shown in Fig.4 and connect to the serial port created by the USB to serial converter. With this done, apply power to the Micromite and in the terminal emulator’s window, you should see the Micromite’s startup banner as shown in Fig.5. At this point, you can enter, edit and run programs from the command prompt using nothing more than the terminal emulator and a USB cable. When your program is running successfully on the Micromite, you do not necessarily need the console, so you can set the Micromite to automatically run its program on startup (OPTION AUTORUN ON). However, unless you managed to get the program perfectly correct the first time (unlikely), you will find yourself repeatedly reconnecting to make one tweak or another, so many people leave the USB-to-serial converter permanently connected (they do not cost much). Troubleshooting What if it does not work the first time? Fig.4 (left): startup screen for Tera Term, where the baud rate and other values can be set on launch. Fig.5 (right): startup banner for the Micromite running in the Tera Term console. 22  Silicon Chip siliconchip.com.au 1) Check your power supply. Is it 3.3V and is it stable and free from electrical noise? If you have doubts, you can use two fresh AA batteries in series as a power source for testing. Then check that 3.3V is on each pin shown in Fig.1 and that each ground pin is correctly connected to 0V. 2) Check the 10µF or 47µF capacitor connected to pin 20 on the 28-pin chip or pin 7 on the 44pin chip. As mentioned earlier, this capacitor must be a ceramic or tantalum type; an electrolytic capacitor will not work. 3) Has the chip been properly programmed? If you programmed it yourself, check that the programmer did report that the programming operation was successful. A current draw of about 26mA means that the chip is working correctly and running the BASIC interpreter. Less than 10mA indicates that MMBasic is not running and: • a power or ground connection is faulty; • the 10/47µF capacitor is faulty or not connected or; • the chip was not programmed correctly. If you have a current draw of about 26mA, the fault is most likely with the USB-to-serial converter or your terminal emulator. To check these two elements, disconnect the serial connections from the Micromite and short the TX and RX pins of the converter together. When you type something on the keyboard into the terminal emulator, you should see the same characters echoed on the screen. If not, diagnose and correct the error in your USB-to-serial converter and terminal emulator before proceeding. If the above test is OK (ie, keystrokes echo on the screen), the only possible remaining fault is in your connection of the USB-to-serial converter to the Micromite. Check that the TX pin on the converter goes to the Micromite’s RX pin and that RX on the converter goes to the Micromite’s TX pin, as illustrated in Fig.3. Loading your program If you prepare your program on a desktop (or laptop) computer, you can transfer it to the Micromite siliconchip.com.au The Micromite works well with a simple solderless breadboard. In this photo it is running the flashing LED example (with the LED connected to pin 15). using either the AUTOSAVE or XMODEM commands. The AUTOSAVE command puts the Micromite into a mode where anything received on the console will be saved to the program memory. This means that you can simply copy the text and paste it into the terminal emulator (eg, Tera Term) which will send it to the Micromite. From the Micromite’s perspective, pasting text into the terminal emulator is the same as if a high speed typist was typing in the program. To terminate the AUTOSAVE command, press CTRL-Z in the terminal emulator (ie, hold CTRL and then press Z) and the Micromite will save the program to flash memory and return to the command prompt. The XMODEM command is a little more complex. It uses the XModem protocol to transfer the data which includes an integrity check. The full command is XMODEM RECEIVE, which instructs the Micromite to look for an XModem connection on the console. After running this command, you then instruct your terminal emulator to send the file using the XModem protocol. When the file has been sent, the Micromite will save it in program memory and return to the command prompt. One of the most convenient methods of creating programs and sending them to the Micromite is to use the MMEDIT software. This program was written by Silicon Chip reader Jim Hiley in Tasmania. It can be installed on Windows or Linux and it allows you to edit your program on your PC and transfer it to the Micromite for testing with a single click. MMEDIT is easy to use with colour-coded text, mouse-based cut and paste and many more features such as bookmarks and automatic indenting. Because the program runs on your PC, you can save and load your programs to and from the computer’s hard disk. It can be downloaded from Jim’s website at: www.c-com.com.au/ MMedit.htm It is free, although he would appreciate a small donation. The Micromite also has its own built-in editor. This relies on you using a terminal emulator that is VT100 compatible (eg, Tera Term) on your desktop computer and to invoke it you use the EDIT command. If you are used to an editor like Notepad in Windows, you will find that the operation of this editor is familiar. The arrow keys will move your cursor around in the text and the other keys on your keyboard will do what their titles suggest. The editor is a very easy method of developing a program. With it, you can write your program on the Micromite then save and run it from within the editor. If your program should stop with an error, you can jump back into the editor again with the cursor positioned at the line that caused the error. As a result the edit/ run/edit cycle is very fast. February 2017  23 Normally, either the DO portion or the LOOP portion will have a condition attached that will tell MMBasic when to terminate the loop but in this case, there is no terminating condition, so the program will loop forever. This introduces another subject – how do you stop something like this when it is running? The answer is that you use the CTRL-C sequence on the console, which is done by holding down the CTRL key when pressing the C key. This is called the break key or character. When you type this on the console’s input, it will interrupt whatever program is running and immediately return control to the command prompt. The PRINT command One of the most frequently used commands in the BASIC language is the PRINT command. Its job is simply to display something on the console. This is commonly used to tell you how your program is running (and can help to find bugs) and the displayed message can be something simple, like “Pump running” or “Total Flow: 23 litres”. In its simplest form, the PRINT command will just print whatever follows it. So, for example: PRINT 54 Will display the number 54 on the console, followed by a new line (ie, so that the next print command will display its output below). The data to be printed can consist of “expressions”, which refers to something that needs to be calculated. We will cover expressions in more detail later but as an example, consider the following: PRINT 5*(9+2) This will print the number 55 (“*” means multiply; “+” obviously means addition). The following program illustrates the use of the PRINT command. It will measure the voltage on pin 4 of the Micromite and display the reading on the console repeatedly, once per second: SETPIN 4, AIN DO PRINT PIN(4) PAUSE 1000 LOOP This program is similar to our LED 24  Silicon Chip flasher but in this case, we have configured pin 4 to be an analog input with the “SETPIN 4, AIN” command. To read the voltage on the configured pin you just use the “PIN(4)” function to get the voltage, which the “PRINT” command will then display on the console. You can test this program by connecting various 1.5V cells between pin 4 and GND (positive end to pin 4) and noting how the reading will change. Congratulations, you have built a digital voltmeter with five lines of BASIC code! You can also use the PIN() function to read the state of a digital, frequency, period or counter input. Note that for a pin configured as an analog input, MMBasic returns the value in volts but it assumes the power supply rail is exactly 3.3V, as this is used for the reference input to the analog-to-digital converter. If your power supply is not exactly 3.3V, the returned value will have to be adjusted as shown later in this tutorial. Variables Before we go much further, we need to define what a “variable” is as they are fundamental to the operation of most computer languages, including BASIC. A variable is simply a place to store an item of data (ie, its value) for later use. Variables can be any one of three types. The most common is a floating point (decimal) number and this is the default if the variable type is not specified. The other two types are integer (ie, whole number) and string (ie, text) and we will explain them later. 7, 3.45, -99.0, .012 and 120.09 are all valid floating point numbers. “Floating” refers to the fact that the decimal point does not have a fixed number of digits either before or after it. When a number is stored in a variable, the variable can then be used in place of the number itself. It simply represents the last value assigned to it. As a simple example: A=3 B=4 PRINT A + B This will display the number 7. In this case, “A” and “B” are variables and MMBasic used their current values in evaluating the expression after the PRINT statement. BASIC will automatically create a variable when it first encounters it, so the statement “A = 3” both creates a floating point variable (the default type) with the name “A” and then it assigns it the value 3. The name of a variable must start with a letter, while the remainder of the name can use letters, numbers, underscores or full stops. The name can be up to 32 characters long and the case of the letters used (ie, lower case or upper case [capitals]) is not important. Here are some examples of valid variable names: Total_Count ForeColour temp3 count The IF statement Making decisions is at the core of most computer programs and in the BASIC language, that is usually done with the “IF” statement. This is written almost like an English sentence: IF condition THEN action The condition is usually a comparison such as testing for equality, less than, greater than, etc. For example: IF Temp < 20 THEN HeaterOn “Temp” would be a variable holding the current temperature and HeaterOn refers to a section of the program containing commands which perform the action(s) necessary to turn the heater on (this is called a subroutine and will be explained later). There is a wide range of comparisons that you can use: = equal to < less than > greater than <= less than or equal to >= greater than or equal to <> not equal to These can be combined using “AND” and “OR”, for example: IF Temp > 20 AND Temp < 30 THEN Temp_OK = 1 You can also add an “ELSE” clause which will be executed if the condition tested false. For example, this program will turn on a LED connected to pin 14 if the voltage on pin 4 is more than 2V and turn it off if it is less: SETPIN 4, AIN SETPIN 14, DOUT DO IF PIN(4) > 2.0 THEN PIN(14) = 1 ELSE PIN(14) = 0 LOOP This program will spin at high siliconchip.com.au speed, constantly setting the output high or low but that does not matter because the program has nothing else to do and it means that the LED will react instantly to any change to the voltage on pin 4. Note that in an IF statement like this with an ELSE clause, one of the two commands is always executed but never both. The previous examples use singleline IF statements but you can also use multi-line IF statements for cases where multiple commands need to be executed. They look like this: IF condition THEN TrueAction1 TrueAction2 ... ELSE FalseAction1 FalseAction2 ... ENDIF Generally, the single-line IF statement is used for simple situations while the multi-line version is much easier to understand if the commands required are numerous and/or long. Note that the multi-line version must be terminated with the ENDIF command; this tells MMBasic where the commands associated with the ELSE leg have terminated. You can also have the multi-line IF statement without an ELSE section. For example: IF condition THEN TrueAction1 TrueAction2 ... ENDIF An example of a multi-line IF statement with more than one action is: SETPIN 4, AIN SETPIN 14, DOUT DO IF PIN(4) > 2.0 THEN PIN(14) = 1 PRINT “Voltage high” ELSE PIN(14) = 0 PRINT “Voltage low” ENDIF LOOP Note that in the above example, we indented (added spaces before) each action to make it clearer which part of the IF structure it belonged to. While this is not mandatory it siliconchip.com.au does make a program much easier to understand and is highly recommended. Hence, all our examples have been indented. Remember that after only a few months, a program that you have written will have faded from your mind and will look strange when you pick it up again. Accordingly, you will end up thanking yourself if you indent consistently. Measuring voltages We mentioned measuring voltages previously but there are some details that you need to know before you can properly use this feature. The 28-pin Micromite (as used in the LCD BackPack) has 10 I/O pins that are capable of voltage measurement and the 44-pin Micromite has 13. Naturally, the 64-pin and 100-pin Micromite Plus chips have even more. They are marked as ANALOG on the pin diagrams. Remember that you need to use a command like this to set an I/O pin (number “nn”) to be an analog input: SETPIN nn, AIN The input voltage range is from zero to whatever the supply voltage is (normally 3.3V). Assuming your supply is stable but not exactly 3.3V, you can measure its actual voltage and compensate to give accurate measurements as follows. In this example, let’s say you measure it as exactly 3.17V: PRINT PIN(4) / 3.3 * 3.17 To avoid having to put the supply voltage all over the program, you can set it as a constant variable at the top of your program and then just refer to the constant, like this: CONST SUPPLY_VOLTAGE = 3.17 … PRINT PIN(4) / 3.3 * SUPPLY_ VOLTAGE Taking this concept a step further, if you’re doing a lot of analog measurements, the following will make the code a little simpler and also faster: CONST SVFACT = 3.17 / 3.3 … PRINT PIN(4) * SVFACT To measure voltages greater than the supply voltage, you will need to connect a voltage divider between the voltage to measure, the analog pin and ground. Rather than use precision resistors for this, you can simply apply a known voltage to the divider and get the Micromite to display what it measured on the input (ie, PRINT PIN(4)). Then, if you use a digital voltmeter to measure the actual voltage at the input of the voltage divider, you can scale future readings from that pin to give the correct value by using the following expression: PRINT PIN(nn) * (Vmes / Vmm) Where “Vmes” is the measured input voltage and “Vmm” is the reading returned by the MMBasic PIN() function. This approach will also automatically correct for a supply voltage that is not exactly 3.3V, so you don’t need to do that separately (and yes, you can use a constant variable to simplify this command, as demonstrated above). Note that to retain the accuracy of the reading, the source resistance for an analog input pin needs to be 10kW or less. This means that in most circuits, the bottom resistor in the voltage divider should be no more than 10kW. To measure very small voltages accurately (well under 1V), you may need an amplifier to bring the input voltage into a reasonable range for measurement. Fig.6 shows a typical arrangement using the popular and inexpensive LM324 quad operational amplifier. The LM324 can operate from a single 5V supply (as provided by the Micromite LCD BackPack on CON2) and contains four identical amplifiers in the one low-cost 14-pin package. The gain of this amplifier is determined by the ratio of R2 to R1 plus 1 (ie, R2 ÷ R1 + 1) and using the components in Fig.6, the gain is 101. This number can be used in the BASIC program so that the readings are scaled to represent the input voltage. For example: PRINT PIN(4) / 101 Alternatively, as with the voltage divider, you could just measure the input voltage and pin reading simultaneously and use the ratio to scale future readings. This would also compensate for resistor value and supply voltage tolerances. February 2017  25 Amplifier Gain = 1 + R2 R1 LM324 A OUTPUT 1 A -INPUT 2 A +INPUT 3 1 4 + + 14 D OUTPUT 13 D -INPUT 12 D +INPUT 11 GND 10 C +INPUT V+ 4 B +INPUT 5 B -INPUT 6 9 C -INPUT B OUTPUT 7 8 C OUTPUT + 2 3 + (Top View) DO loops Returning to our example program earlier, it used a “DO LOOP” to repeatedly step through a set of commands which is a common requirement in computer programs. In the example program, the DO LOOP never stopped running (until CTRL-C is pressed). However, it is more common to provide a test which will terminate the loop at some point. For example: count = 0 DO WHILE count < 10 count = count + 1 PRINT count LOOP This program will simply print the numbers from one to ten. The key aspect is the WHILE test which ensures that the program will only keep looping while the value of “count” is less than 10. When the value of count equals or exceeds 10, MMBasic will terminate the loop and continue on with the code after the LOOP command. The conditional test is the same as for the IF command so you can test for equality, less than, greater than and so on. As another example, you might need to delay the start of a program for two seconds to allow external circuitry to settle. This could be done with this loop: DO WHILE TIMER < 2000 LOOP “TIMER” is a built-in MMBasic function which returns the number of milliseconds since the Micromite was powered up. This empty loop will simply “sit there and spin” 26  Silicon Chip With the values shown the gain will be 101 and therefore a 32mV input will result in a full scale reading. 5V POWER 1 + 2 CON2 Input (0-32mV) Fig.6: to measure small voltages you need an amplifier and this shows how to use the LM324 quad op amp. It can operate from a single 5V supply (as provided by the Micromite LCD BackPack on CON2) and contains four identical amplifiers in the one 14-pin package. until the value of TIMER reaches 2000ms, thereby providing the required delay. Note that a similar effect could be achieved with the PAUSE command, however, consider that if you had other commands to run before the loop, the time taken to execute them would be taken into account by this method. Thus this method which would give a faster start-up while still providing the required settling time. An important feature of the above loops is that the test is made before the loop is executed and that in turn means that if the test is initially false, the contents of the loop will not be executed at all, not even once. However, if you do want the loop’s contents to be executed at least once, you can position the test at the end of the loop instead, as follows: DO statement statement LOOP UNTIL condition Micromite 4 3 LM324 2 1 10kΩ Input Pin 11 R2 10kΩ R1 100Ω In this case, the statements within the loop are executed at least once and only then is the condition is tested. Also note that because the keyword “UNTIL” is used, the test is reversed; if it is true the loop will be terminated, otherwise it will be repeatedly executed until the condition does becomes true. This is our previous example rewritten to place the test at the end of the loop: count = 0 DO count = count + 1 PRINT count LOOP UNTIL count = 10 Both forms of the “DO LOOP” do the same thing, so you can use whatever structure fits with the logic that you want to implement and is the most clear to write and interpret. Next month we will continue the tutorial with drawing graphics on an LCD display panel, FOR loops, expressions and much more. SC Getting more information on the Micromite The Micromite is a fully functional computer with a multitude of facilities and the Micromite User Manual which describes it adds up to almost 100 pages. This manual is the ultimate reference for the Micromite and covers everything from the I/O pins through to functions that you might only need in specialised circumstances. It is in PDF format and available for free download from the Silicon Chip website (at www.siliconchip.com.au/ Shop/6/2907) and the author’s website (http://geoffg.net/micromite.html). This tutorial (including the parts to come in future months) will go through many aspects of the BASIC language but it cannot cover everything. For example, many commands have additional features that are only used in special circumstances. So it would be worthwhile downloading the manual and having it handy as you read through the tutorial. That way you can explore the full detail of a command that might interest you. siliconchip.com.au siliconchip.com.au February 2017  27 GPS-synchronised Analog Clock Driver Design: John Clarke Software: Geoff Graham Words: Nicholas Vinen Traditional clocks (with hands) are fairly accurate – but every now and then you have to get them down off the wall and adjust them so they show the real time. And daylight saving means you have to adjust it twice a year anyway! Wouldn’t it be nice if the clock adjusted itself so it was ALWAYS 100% spot on AND adjusted itself for daylight saving? Build this GPS Analog Clock Driver and your wishes will come true . . . B attery-powered quartz crystal clocks are inexpensive, look good hanging on the wall and for many people, they are the preferred way to check the time. But (despite what many people think) they usually aren’t that accurate, drifting by as much as two seconds per day, which means they can be out by up to one minute after a month. And you have to remember to change them twice a year if you have Daylight Saving in your area. That’s especially troublesome if the clock is mounted up high since you need to get up on a ladder or chair to adjust the 28  Silicon Chip Fig.1: inside a typical quartz clock mechanism with stepped second hand, showing the modifications we made to terminate the connecting leads to the stepper motor coil. time. Wouldn’t it be nice if you never had to do that again? Well, at least until it’s time to change the battery… This design replaces the electronics in a standard quartz wall clock with a controller that always knows the correct time, thanks to the Global Positioning Satellite (GPS) system. It uses an inexpensive ($25) GPS module to get the precise time from orbiting atomic clocks and a microcontroller to drive clock hands. It will run for up to two years on two alkaline AA cells (or one year with a sweep second hand movement) and over that period will keep the time accurate to within one second. siliconchip.com.au (If you don’t understand the difference between “sweep” and “stepped”, a sweep second hand appears to rotate in a continuous movement, where a stepped second hand will appear to “jump”, usually in one-second steps). If your clock has a stepped second hand, you can even program your local Daylight Saving rules into the clock using a USB cable from your computer and then, when the time comes, the clock will automatically go forward or back by an appropriate amount of time. It does this by either advancing the second hand twice per second, or not at all, until the time shown is correct again. For clocks with step hands, all you have to do is set all three hands to the 12 o’clock position before inserting the battery. The controller will use its onboard GPS module to get the current time and then step the clock hands at high speed around the dial until it has reached the correct time. It will then drop back into normal timekeeping mode with the time derived from a 32,768Hz crystal oscillator. For clocks with sweep hands, the procedure is similar, but rather than setting it to 12 o’clock, you set it to the next full half hour and the firmware will then wait an appropriate amount of time before driving the clock mechanism, so that the time shown is correct. To conserve the battery, the GPS module is only used to synchronise the clock every 44 hours and following synchronisation, the clock will either skip seconds or double-step to reach the correct time. Features & specifications • • •    • • • • • •    •    After synchronisation, the microcontroller is also able to calculate the inherent inaccuracy of its crystal oscillator and will then compensate the clock accurate between synchronisations. This also means that you will probably never even notice the clock making a correction; the time will simply be right! Battery status monitoring by occasionally skipping or double-stepping a second, without the GPS module needing to be powered up. This process can also compensate for aging of the crystal and will keep SOFT IRON STATOR LAMINATIONS A Drives virtually any battery-powered quartz clock movement Works with a sweep or stepped second hand Long battery life from two AA cells: about one year for clocks with sweep second hand and two years for stepped second hand Small enough to mount on the back of most clocks Time synchronised to GPS satellites every 44 hours (configurable) Can use a variety of GPS modules, including low-cost types Automatically skips or adds extra seconds to keep clock accurate Automatically trims internal crystal oscillator based on GPS updates Automatically sets time when fresh cells are inserted (with stepped second hand only) Automatically adjusts for Daylight Saving Time (with stepped second hand only) STATOR COIL WINDING B The controller monitors the battery voltage and when it has dropped below 2V (ie, 1V per cell), the microcontroller will stop the clock at a convenient position. For clocks with stepped hands, it w i l l stop at exactly 12 o’clock before the battery is so flat that it can no longer drive the mechanism. You then replace the battery and it A A CURRENT PULSE CURRENT PULSE B B (N) (S) N S N BASIC STEPPER MOTOR – AT REST AFTER FIRST 'ODD' SECONDS PULSE MAGNETIC FLUX IN STATOR DURING PULSE N (N) S (S) N S (S) S S MAGNETIC FLUX IN STATOR DURING PULSE N S MULTI-POLE PERMANENT MAGNET ROTOR WITH PINION GEAR (N) N N AFTER NEXT 'EVEN' SECONDS PULSE Fig.2: the clock motor consists of a multi-pole permanent magnet rotor inside a circular gap in a soft-iron stator. It’s made to step in one direction by reversing the polarity of the current pulse at each step. siliconchip.com.au February 2017  29 Fig.3: a sweep hand clock movement which has had the original crystal-based driver board removed and a pair of wires connected to the motor coil instead. will then automatically advance to the correct time again. For clocks with sweep hands, the firmware will halt the clock at exactly the hour or half-hour position. Before you replace the battery you need to set the hands to the next hour or half hour but hopefully, you will not have to mess with the second hand because it should have stopped at the exact 12 o’clock position. Either way, if during operation the GPS signal level drops to a point that is too low for the module to get a lock on enough satellites, the clock will stop at exactly five minutes before the hour/ half hour. Similarly, if the GPS module stops running altogether the clock will stop at 10 minutes before. These indications make it easy to differentiate between a low battery and something more serious. In either event, the firmware will try to acquire a GPS lock again ten times with a 4-hour delay between each attempt before it gives up. This gives the GPS module plenty of opportunities to come good. Internally, the firmware measures time in eighths of a second. This allows for much finer tracking of errors and control of where the clock’s hands are pointing. Theoretically, it will mean a higher degree of accuracy although this is offset to some extent by the fact that most clocks with sweep hands will lose a fraction of a second when they start up. This is something that the firmware is not aware of and cannot correct for. Revised design Astute readers (or those with long memories!) may recall our original GPS-synchronised Analog Clock articles from the March and November 30  Silicon Chip 2009 issues. The first was for clocks with step hands only and the second article showed how to modify it for clocks with sweep hands. Both projects have been very popular. This new design works with either type of movement and features a number of benefits over those earlier designs. Firstly, the PCBs for those older projects are no longer available whereas the new PCB is now available and will be kept in stock for the foreseeable future. Secondly, the EM-408 module used in those projects is now obsolete and difficult to get; the VK2828U7G5LF module we are using this time is substantially cheaper and has a number of benefits including support for GALILEO (European) and GLONASS (Russian) positioning satellites in addition to the GPS (United States) system. +1.5V 14 Vdd PIC 16LF88 In fact, it can use satellites from all three systems simultaneously to increase the chance of getting a signal indoors, as a GPS fix relies on receiving signals from multiple satellites (normally at least three). This module is based on the u-blox Neo-7 chip and has slightly better sensitivity than the previously used EM-408, with a specified tracking sensitivity of -162dBm compared to -159dBm. It also has a slightly lower current drain, at around 30mA compared to 44mA. Plus it has a faster “cold start” average time of 26 seconds compared to 42 seconds, meaning it doesn’t need to be powered up for as long to get the time. We have also substantially increased the power efficiency of the GPS module supply; while the GPS module is only powered up about once every two days, it does draw significant current during that time and so any improvement in efficiency should extend battery life both through draining less charge each time, as well as reducing the temporary voltage drop due to the load on the cells which may push them below the 1V cut-out threshold. Finally, we have ditched the oldfashioned DB9/DE9 serial cable and fitted a micro-USB port so that you can easily hook it up to your computer to set up the daylight saving rules and make other setting tweaks. How it works A standard battery-operated wall 1s 0s 2s 1.5V RA1 18 RA0 17 RA6 15 0V CLOCK COIL 41.66ms 1.5V 958.34ms 41.66ms 958.34ms Vss 5 –1.5V    Fig.4: the new driving arrangement for the clock motor. +1.5V With this configuration, the microcontroller can apply positive or negative pulses of 1-1.5V amplitude to the coil. Three outputs are 0V connected in parallel for better drive strength. The output waveform for stepped second hands is shown at top and sweep at bottom. Pulse durations can be –1.5V adjusted in the set-up menu. WAVEFORM WITH STEPPING SECOND HAND 31.12ms 31.12ms 31.12ms 31.12ms WAVEFORM WITH SWEEP SECOND HAND siliconchip.com.au Fig.5: this scope screen grab shows the output signal from pins 15, 17 & 18 of microcontroller IC1 with no load connected and is measured with the centre point of the cells as the ground reference. clock uses a crystal oscillator and binary divider to generate a pulse once per second which drives a simple stepper motor and, via gears, the hands of the clock. The motor consists of a coil with a soft iron core and a small bar magnet (the rotor) positioned in the magnetic field (see Fig.1). When an alternating current flows through the coil, this causes an alternating magnetic field and the rotor rotates to follow this field. It is this rotation that, via gears, drives the clock’s hands (see Fig.2). The crystal oscillator is normally quite accurate, especially when the clock is new – but it’s affected by age, temperature and battery voltage, all of which can add up to 14 seconds a week. Our circuit replaces the clock’s electronics and generates compatible pulses to drive the stepper motor. A clock with sweep hands works essentially the same way except that its gearing has a higher reduction ratio, so many more pulses are needed to advance the hands by one second (see Fig.3). This allows the pulses to be produced more-or-less continuously so the hand moves in a smooth manner. In exchange for a greater battery drain (due to the much higher duty cycle operating the motor), you eliminate the “tick-tick-tick” noise, making for a much more luxurious timekeeping (and, for some people, sleeping!)experience. By contrast with the standard clock, at the heart of our circuit is siliconchip.com.au Fig.6: the same measurement as in Fig.5 but with the clock movement connected. The voltage spikes are created by the motor’s inductance each time the drive current is reduced to zero. They are clipped by schottky diodes D3 & D4. a PIC16LF88 microcontroller which uses a 32,768Hz watch crystal to drive a timer within the chip. This timer generates an interrupt which is used by the software running on the microcontroller to keep time and also generate pulses to drive the clock motor. Fig.4 shows how the clock motor is driven by the microcontroller. One end of the clock coil is connected to the junction of the two (nominally) 1.5V cells while the other end is driven by three paralleled output pins which can momentarily be connected to Vdd, Vss or left open-circuit. The resulting bipolar waveform for continuous sweep hand clocks has 16 pulses per second, while the waveform for stepping hands is similar but has just one pulse per second (positive or negative). Fig.5 shows a scope grab of this same waveform, without the mechanism connected while Fig.6 shows the same waveform with the coil in-circuit. For clocks with sweep hands, the rotor in the clock’s movement has a certain amount of momentum which keeps it spinning while driven by this pulse train, so it never stops. This is different to the stepping clock movement where the voltage pulse on the coil pulls the rotor around and then stops it dead – once every second – thereby creating that ticking sound. Besides driving the motor, the software also needs to keep track of time, calculate the daylight saving state and time zone offset, as well as periodi- cally power up the GPS receiver and interpret its output. As a result, the software is really quite complex. As an illustration of this complexity, drafting the circuit took just a few hours, while the software took many weeks to develop. A normal clock cycle starts at the beginning of each second. The timer generates an interrupt which causes the processor (CPU) in the microcontroller to wake up and execute the interrupt code. The program will perform some calculations (more on this later) and then simultaneously drive output pins 15, 17 and 18 either high or low. It then sets the timer to generate another interrupt after a few tens of milliseconds and promptly puts itself back to sleep. When the timer expires again, it wakes the CPU up and the program sets these outputs back to being highimpedance. If the clock has a stepping hand, its job is done and it can wait until the next “tick” and repeat the whole process. But if it has a sweep hand, it will set the timer to wake up again after another short period to deliver the next driving pulse. During the sleep period, everything except the crystal oscillator and the timer is shut down, resulting in a current drain of only a few microamps by the microcontroller. In addition, the CPU in the microcontroller will run at full speed for only 60-100µs while processing an interrupt, so the total current drawn February 2017  31 by the microcontroller is negligible. Most of the current, in fact, is drawn by the clock stepper motor – which is the case with a “standard” battery-operated clock (see the box: Calculating Battery Life). At the start of each second, the program compares where the clock hands are actually positioned and where we would like them to be. Depending on the result of this comparison, the program may bring the clock’s hands closer in agreement to the correct time by skipping a pulse to the clock’s stepper motor or by generating a double step. For example, when daylight saving starts, the software simply adds 3600 seconds (one hour) to the desired position and the clock will then automatically “fast forward” until it is an hour ahead. When it is time to synchronise (ie, once every 44 hours), rather than going back to sleep after handling the interrupt, the micro switches on power to the boost regulator which provides either 3.3V or 5V to the GPS module. This is derived from the 2-3V battery voltage. Once the GPS module has acquired enough satellites to get an accurate time reading, the microcontroller extracts this from the serial data stream and converts it into an internal representation (seconds since January 1st, 2000), applies the time zone offset, calculates if daylight saving applies, calculates the internal crystal oscillator error, and so on – all the steps necessary to keep the clock showing the right time. When it has finished and the current time setting is confirmed as correct, the GPS module is powered down and the unit goes back to normal operation The GPS module We normally think of a GPS module as a device to find our position on the globe. However, the GPS system is based on time signals derived from extremely accurate atomic clocks, so the UTC time is also supplied in the GPS receiver output. In fact, most time standard bodies around the world use the GPS system as a “standard beacon” to transfer accurate clock readings between each other. And let’s face it, at $25, a GPS module is a tad cheaper than an atomic clock – even a used one! Most GPS modules follow the 32  Silicon Chip NMEA (National Marine Electronics Association) standard for data output and generate a serial data stream at 4800 or 9600 baud, with eight bits per character. They generally use a TTL-level version of the RS-232 serial protocol. The NMEA standard also describes the content of the data and we use the RMC (Recommended Minimum data) message which is part of the default output for almost every GPS module made. You don’t have to use the VK2828U7G5LF module; any GPS module which can run off 3.3V or 5V and supply a TTL-level RS-232 stream at 9600 baud should work. But keep in mind that if its sensitivity is inferior to the VK2828’s, or the current drain is higher, your clock might not work as well as our prototype. Stepping or sweep hands? Believe it or not, some people actually like the “tick, tick, tick” sound of stepped clocks and find them soothing and conducive to sleep. Others may find that noise terribly annoying. So it’s really up to you, just keep in mind that if you choose a clock with continuous sweep hands, you will be changing the battery more often. Also note that if you are using a clock with sweep hands, the daylight saving adjustment can not take place automatically and you will also need to do a bit of extra work whenever you insert fresh cells (see below for details). While it’s quite hard to find clocks with a battery-powered continuous sweep movement, the movements are readily available on eBay and Ali Express for just a few dollars. So if you want a sweep hand clock, A slightly oversize view of the recommended GPS module. Other modules should work; we know this one will! (It’s available from the SILICON CHIP online store). we suggest you purchase a clock based on its appearance, then replace its mechanism. You can do that at the same time as fitting the GPS timekeeping module. Just make sure to purchase a movement with the correct shaft diameter and length. Basically, once you have your clock, take the hands off the shaft and then remove the movement from the clock. Measure the shaft diameter and length and find a sweep movement with an equivalent shaft. The replacement movements are often advertised along with shaft dimensional diagrams so you can match them to your clock. Here are a few examples that can be yours for around $5 (including delivery): www.aliexpress.com/item/New-JIALI-JL6262-Sweep-Mute-MovementQuartz-Clock-Movement-for-ClockMechanism-Repair-DIY-Partsclock/32334679634.html www.aliexpress.com/item/NewLong-axis-22mm-JL6262-SweepMute-Movement-Quartz-ClockMovement-for-Clock-MechanismRepair-DIY/32414124808.html www.aliexpress.com/item/NewLong-axis-28mm-JL6262-SweepMute-Movement-Quartz-ClockMovement-for-Clock-MechanismRepair-DIY/32414136013.html Many of the movements are also supplied with hands, so you can decide whether to keep the hands that came with your clock or replace them with the new ones. If you want to try to purchase a clock with sweep hands, terms that are worth searching for in conjunction with “clock” are: “sweep”, “continuous sweep”, “silent” and “mute”. By the way, if you have a clock with a failed movement but you prefer a stepping second hand, Ali Express and eBay are also an excellent source of low-cost replacement stepping movements, so you can keep your favourite clock in operation almost indefinitely. Note that the circuit is exactly the same for driving either type of movement, the only difference is in the firmware; you simply program the chip with the firmware appropriate to the type of movement you are using. Sweep hand driving limitations Because the motor on a clock with a continuous sweep second hand needs to be driven constantly, rather than just delivering the occasional pulse, and siliconchip.com.au current-limiting resistor) serve to hold the microcontroller in reset for a few seconds after the battery is connected. This provides enough time for you to properly seat the cells in the holder before the microcontroller starts executing its program. Diode D1 prevents the capacitor from discharging into the microcontroller when the cells are removed. The serial interface connector CON2 is linked to the microcontroller via a few protective resistors. This design relies on the fact that nearly all modern serial RS-232 interfaces use a threshold of about 1.5V between a high and low signal. This is not what the full RS-232 standard specifies but we use this fact to provide a simple interface to a personal computer for configuring the clock. You can use a PICAXE-style serial cable terminated with a 3.5mm stereo jack plug to connect to CON2. But as we think most constructors will lack such a cable, we’ve provided a mounting location on the board for a low-cost CP2102-based USB/serial to the 12 o’clock position and the clock will then advance the hands to the correct time. This is not possible for the same reason as stated above. So with a clock with a sweep second hand, what you do is set the time to the next half hour (eg, if it’s 11:18, set it to 11:30) and it will then wait until the hands are in the correct position before driving the movement. since the motor is designed to operate at a certain speed, it can only really be sped up or slowed down by around 6%. This is perfectly fine for making one or two second adjustments to keep the clock accurate but it would take too long to make up an hour during Daylight Saving Time transitions. As a result, if you want automatic DST adjustments, you need to use a clock movement with a stepping second hand. Having said that, manual DST adjustments on a clock with sweep hands is not that difficult; you let the clock continue to operate, driving the second hand, and wind the minute/hour hands backward or forward by an hour (or whatever the appropriate time period is) and ensure that the minute hand agrees with the position of the second hand as it sweeps around. This is much easier than having to find an accurate time source to completely reset the clock. Also, when using a clock with a stepping hand and inserting a fresh pair of cells, you simply set the hands Circuit description The full circuit is shown in Fig.7 and the key component is IC1, the PIC16LF88 microcontroller. This drives the clock’s stepper motor, controls the power to the GPS module and interprets the output of the module. Note that the LF version of the PIC16F88 is guaranteed to operate down to 2V, while the standard version is only rated to work down to 4V. Having said that, you may well find that a standard PIC16F88 will operate without fault to below 2V; it just isn’t guaranteed. The 10kΩ resistor and 470µF capacitor connected to pin 4 of IC1 (via a 1kΩ +3V +3V K 10k D1 10k A 1k SET-UP 100nF 14 Vdd 4 MCLR RA4 470 F S1 RA3 11 CON2 S R 3.5mm JACK SOCKET 220 22k T 16 9 4.7k 3 2 Q2 BC 32 7 270 B 100nF E 470 L1 4 7H A 220 F  LED1 RA2 RB2 RB4 K 4 1 1 5 100nF TO CLOCK MECHANISM 6 REG1 MAX756 3 2 7 8 220 F LOW ESR 8 LOW ESR K RA7 AA CELL D2 1N5819 A RB5 IC1 PIC16LF88 -I/P +1.5V C STARTUP RB3 AA CELL +3V GPS VOLTS SELECT JP1 CON1 10k 10 5V 3 .3 V +3.3V DTR RXI TXO GND 13 X1 32.768kHz +5V CP2102 BASED USB-UART BRIDGE MODULE SC 20 1 7 12 T1OSC1 RA1 RA0 RA6 T1OSC0 Vss 2x 22pF 5 18 +3V 17 100nF PPS 1k V+ 15 K Tx K D3 1N5819 Rx D4 1N5819 A GPS SYNCHRONISED CLOCK VK2828U7G5LF GPS RECEIVER MODULE GND A EN D1: 1N4148 A K 1N5819 BC3 2 7 LED1 B K Fig.7: complete circuit for the GPS Clock Driver, omitting only A K A E C the clock movement which connects to CON1. Microcontroller IC1 powers up the GPS module via transistor Q2 and boost regulator REG1 and receives its serial data stream at pins 8 & 10. When the GPS module is not powered, it uses its internal Real-Time Clock and watch crystal X1 to keep time and produce the pulses from output pins 15, 17 & 18 to drive the clock mechanism. Note that there is no Q1 due to a late circuit update. siliconchip.com.au February 2017  33 Parts list – GPS-Synchronised Clock Driver 1 PCB, code 04202171, 140 x 61.5mm 1 VK2828U7G5LF GPS module* 1 CP2102-based USB/serial interface module with microUSB socket# 1 32768Hz crystal (X1) 1 47H 1A+ inductor (L1; Jaycar LF1274, Altronics L6517) 1 small cable tie 1 3.5mm switched stereo socket (CON2; Jaycar P0092, Altronics PS0133) 1 vertical PCB-mount tactile momentary pushbutton switch (S1; Jaycar S1120, Altronics SP0600) 2 single AA PCB-mounting cell holders (Altronics S5029) 1 18-pin DIL IC socket 1 3-way pin header, 2.54mm pitch, plus shorting block (JP1) 1 2-way polarised right-angle PCB-mount header, 2.54mm pitch (CON1) 1 2-way polarised header plug, 2.54mm pitch 1 short length light duty twin lead 1 short length tinned copper wire or component lead off-cut 2 AA alkaline cells Semiconductors 1 PIC16LF88-I/P microcontroller programmed with either 04120217A.hex (stepping movement) or 04130217A.hex (sweep movement) (IC1) # 1 MAX756CPA DC-DC Converter (REG1; element14 1290853, RS 786-1287) 1 BC327 PNP transistor (Q2) 1 1N4148 diode (D1) 3 1N5819 schottky diodes (D2-D4) 1 3mm high-brightness LED (LED1) Capacitors 1 470F 10V electrolytic 2 220F 25V low-ESR electrolytic (Jaycar RE6324, Altronics R6144) 4 100nF 50V MKT, ceramic or multi-layer ceramic 2 22pF ceramic Resistors (all 0.25W, 5%) 1 22kΩ 3 10kΩ 1 4.7kΩ 2 1kΩ 1 470Ω 1 270Ω 1 220Ω * this module suits the PCB pattern and also has an integral antenna. It is available from the SILICON CHIP online shop. Other modules can be used but they may have different pin-outs and cable arrangements and some may require an external antenna. # available from the SILICON CHIP online shop converter which has an onboard micro-USB socket. This connects to the serial transmit/receive pins on IC1 (via the same resistor network) and also to GND. Since there is no power connection, you still need the battery in place to set the unit up. Crystal X1 provides a stable timebase for the clock with the two 22pF capacitors providing the correct loading. Normally you would need to trim at least one of these capacitors for the clock to be accurate but since the software automatically corrects for crystal timekeeping errors by periodically comparing the internal (RTC) time to the GPS time, this is not required. The microcontroller applies power to the GPS module by pulling its pin 3 34  Silicon Chip low. This turns on PNP transistor Q2, which switches on and charges the 220µF capacitor at its emitter to around 2.8V, powering the boost regulator. This is based around REG1, the MAX756 DC-DC converter. REG1 operates by drawing a current through inductor L1 and then suddenly cutting it off. The collapsing magnetic field causes a positive voltage spike across the inductor that is dumped via schottky diode D2 into the 220µF output capacitor, powering the GPS module. REG1 can operate with a low supply voltage (down to at least 1.8V) and still deliver a closely regulated output of 3.3V or 5.0V. The actual output voltage is controlled by pin 2 and this can be configured using JP1, to suit the GPS module in use. L1 must have a saturation current rating of 1A or greater. This means that it should be wound with heavy gauge wire on a powdered iron core; an RF choke will not work. The parts list provides two alternatives. Also, both the 220µF capacitors must have low ESR (equivalent series resistance). The configuration of Q2 is one of the improvements we’ve made to the circuit; the original design used a Darlington pair which caused a voltage drop of around 0.7-0.8V from the battery to REG1. This reduced its efficiency markedly and caused it to draw more current from the battery, draining it faster. With a single transistor and a higher base drive current of 4.5-10mA (due to the 270Ω base resistor), Q2 is capable of supplying at least 400mA – more than enough for REG1 to start up and operate, with an overall efficiency improvement of between 29% (at 3V) and 65% (at 2V). REG1 generates an internal reference voltage of 1.25V which is used in regulating its output voltage. This reference voltage is also made available at pin 3 of the chip and we pass it back to the microcontroller which uses it as a reference to measure the battery voltage. By accurately measuring the battery voltage, we can stop the clock at the 12 o’clock position before the battery gets too low to operate the microcontroller. Incidentally, the microcontroller is programmed to measure the battery voltage at the time of greatest current draw (about 160mA) when the GPS module is starting up. If you measure the battery voltage without a load, you will probably get a higher reading. The GPS module is one of the simpler parts of the circuit. It has two connections for power, two for communications to the microcontroller (transmit and receive data) and an enable signal. We connect the enable line to its V+ pin so that the module is always enabled when power is applied. As we do not send anything to the GPS module (the manufacturer’s default configuration suits us just fine), the receive data line is also pulled high, by a 1kΩ resistor. The 10kΩ resistor in series with pins 8 & 10 of the microcontroller limits the current into the microcontroller when the GPS siliconchip.com.au 100nF + + 5819 REG1 MAX756 5V 3.3V JP1 220 F 470 F 1N5819 LED1 CONVERTER 3.3V CP2102 TXO RXI DTR USB to UART SERIAL GND +5V CON2 CONFIG. S1 220 1k 4.7k IC1 PIC 16F88 470 10k 270 L1 47H D1 1k D2 R 100nF 10k D3 10k AA CELL HOLDER CON1 CLOCK D4 5819 5819 220 F S T 4148 1N4148 + 2x1N5819 Q2 BC 327 100nF + + AA CELL HOLDER Fig.8: follow this PCB overlay diagram and the same-size photograph below* to build the GPS Analog Clock Driver. Use a socket for IC1 but not REG1. If you use the specified GPS receiver, it will be supplied with a cable colour coded as shown here. Otherwise, you will need to determine the module’s pinout from its data sheet and match it up to the labels on the PCB. If it has an enable input, it should normally be tied high (ie, to VCC) for normal operation but check the data sheet to make sure. Vcc X1 Tx Rx GND PPS Vcc TxD RxD GND EN VK2828U7G5 LF GPS RECEIVER MODULE 32,768Hz Vcc A STARTUP 22k 22pF 22pF 100nF *Note that this photo is of the prototype – there is no Q1 (it has been bridged out with a link) and Q2 is now a BC327 (not a BC557), as shown in the overlay diagram above. module operates at a higher voltage. The microcontroller drives the clock stepper motor from pins 15, 17 and 18 which are paralleled for a higher output current. When these pins are at a high impedance, no current flows through the clock motor. If they are driven high, there is about +1.5V across CON1 while if they are driven low, there is about -1.5V. The micro produces alternate high and low pulses to drive the motor, at 1Hz for stepping second hand clocks and 8Hz for sweep hand clocks. Schottky diodes D3 and D4 clamp inductive spikes from the motor windings to the supply rails. These occur when output pins 15, 17 and 18 switch to a high impedance after delivering a pulse to the motor windings and are caused by back-EMF from the collapsing magnetic field of said windings (see Fig.6). Finally, pushbutton S1 can be held down during start-up to signal microsiliconchip.com.au controller IC1 to go into configuration mode, where its settings can be changed over the serial/USB interface. LED1 flashes at start-up and indicates whether the clock is in set-up mode or operating normally. The USB module has on-board LEDs to indicate when it has power (red) and if it has a GPS signal (green). Construction All of the components for the GPSSynchronised Analog Clock driver, including the GPS module and the AA cell holders, are mounted on a PCB measuring 140 x 61.5mm and coded 04202171. The component overlay is shown in Fig.8. Start by fitting the wire link next to Q2, then follow with diode D1 and the resistors. Check each resistor value with a multimeter before soldering it in place. Follow with D2-D4, being careful to orientate all diodes in the same direction as shown in Fig.8. Next, fit the socket for IC1 (notch at top), switch S1 and REG1. REG1 should be soldered directly to the board and be careful to orientate it as shown. Now solder the ceramic and MKT capacitors in place where shown on the overlay diagram, followed by the electrolytic capacitors, with their positive (longer) leads through the pads marked “+” on the diagram. Fit Q2, followed by the pin header for JP1 and then LED1, which can be pushed right down or soldered with short leads. Its longer (anode) lead must go through the hole marked “A”. Push CON2’s pins through the slots in the board and make sure it is flat on the board and its edge is parallel with the edge of the PCB before soldering all five in place. You can install CON1 at the same time. Now use double-sided tape to attach the two cell holders and the GPS module to the board. This is important February 2017  35 since it prevents the solder joints from breaking when you insert and remove cells. Solder and trim the cell holder leads. Be careful when soldering them as the plastic can easily be melted if you apply too much heat. You can now strip the ends of the wire supplied with the GPS module and solder them to the pads with colour coding as shown in Fig.8, then plug the connector into the GPS module socket. Loop a cable tie through the central hole of toroidal inductor L1 and down through the hole on the board, up through the other hole and tighten it, with the square plastic part on top of the board (so it doesn’t stop it from sitting with the bottom side flat against the back of the clock later). Once L1 is held firmly in place on the PCB, solder and trim its two leads. The PIC16LF88 (IC1) must be programmed using the file coded 0420217A.hex (for a stepping second hand) or 0430217A.hex (for a sweep second hand), both of which can be downloaded from the SILICON CHIP website. Alternatively, you can purchase a pre-programmed microcontroller. Either way, once it has been programmed, straighten its pins and plug it into the socket with its notched end aligned with the socket (ie, towards the top of the board). Finally, place a jumper on header JP1. We recommend using the 3.3V setting with the specified module; although this is the minimum specified operating voltage for the VK2828U7G5LF, it will reduce the power consumption while the GPS is active by around 35% and should not affect performance. If you have trouble getting it to work, you can switch to 5V later. If you’re using a different GPS module, check its data sheet to see what supply voltage it needs before fitting the shunt. If you leave it off, it could damage the GPS module measure the voltage at the connector to the GPS module. Ours measured 3.33V and you should get a similar reading. If it’s below 3.3V, consider removing a cell and changing to the 5V setting. If you do, it’s a good idea to re-measure the voltage to ensure it’s correct. Now that you have confirmed that you will not blow up your GPS module you can remove a cell and plug in the GPS module. Finally, replace the cell and the controller should go through the whole startup sequence as described in the section on troubleshooting. Powering up Modifying the clock mechanism At this point, temporarily unplug the GPS module so that you can make some tests. With IC1 in its socket, insert two fresh cells in the battery holder. After a second, you should see one flash from the Startup LED (LED1), followed by a further two flashes another second or so later. These indicate that the microcontroller and the DC-DC converter, respectively, are working. If you do not get these indications, refer to the section below on troubleshooting. After the double flash, the microcontroller will wait for two minutes, expecting some data from the GPS module before shutting down the DCDC converter. In this time, you need to Now it’s time to connect the driver to the clock movement, which involves removing the existing quartz crystalbased drive circuit and replacing it with a cable to go to the new driver board. Start by removing the cover from the clock mechanism. Identify the leads to the stepper motor coil, cut these, strip them and solder them to a twin-core lead terminated with a 2-way header plug. Insulate the solder joints and anchor the cable (eg, using some silicone sealant) before replacing the cover. The stepper motor coil should be easily identified, as it will be a large coil of enamelled copper wire. Every Fig.9: connect the unit to your PC using a microUSB to USB cable, configure a terminal emulator, hold down switch S1 and insert a pair of fresh AA cells to access the configuration menu. The one shown here is for clocks with a stepping second hand. Changing settings is fairly self-explanatory once you’ve established serial communications. 36  Silicon Chip siliconchip.com.au clock is different so you will be on a journey of discovery here. You can check your modification by using a 1.5V alkaline cell. Just connect the cell to the wires leading to the stepper motor coil, then reverse the celland repeat. On each connection, the clock’s second hand should step by one second (for a stepping clock) or 1/16th of a second (for a clock with sweep hands). The method of attaching the driver PCB to your clock will also vary but in the simplest case, you can use doublesided adhesive tape to hold it onto the back of the clock. Troubleshooting Hopefully, your clock will work first time but if it does not, you can use the Fig.10: the set-up menu for clocks with sweep hands, shown here, is much Startup LED (LED1) to help isolate the simpler than for stepped hands because it does not include any of the Daylight problem. This LED will flash during Saving options. However, it does include the option to run the clock for a fixed normal initialisation (when the set- time so that you can check that it isn’t losing any time. This should ideally be up button is not pressed) to indicate checked with a supply voltage of around 2V (see text). that each step of the initialisation has been completed. The point at where it then check the wiring to the module the GPS module. does not flash will indicate where you and that the GPS power supply is • Four flashes: the GPS module has should start hunting. When you insert between 3.3V and 5.5V. If you have locked on to sufficient satellites and the battery, you should see the followan oscilloscope, check that there is has responded with an accurate time ing signals in sequence: less than 150mV peak-to-peak noise signal. This can take up to 90 sec• One flash: the microcontroller has superimposed on the supply rail to onds or more, so be patient. If you started up. If you don’t get this, try putdo not get this then ting the board closer something is funto a window and open damentally wrong any metal blinds. If with the microyour indoor GPS sigcontroller or the nal is poor, you will cells. need to keep this in • Two flashes: the mind when choosMAX756 DC-DC ing a location for the converter has clock. started up (deterImmediately folmined by measlowing the GPS lock uring a voltage (four flashes), the on pin 3 of REG1 clock should doublevia pin 1 of IC1). step around the dial to If you fail to get reach the correct time this signal, check (assuming a stepped REG1 and its assecond hand. sociated compoIf this does not hapnents. Check for pen, it means that the about 2.7V (with crystal oscillator (X1) fresh cells) on the is not working or the collector of Q2 and clock’s stepper motor between 1.23V is not correctly wired and 1.27V on pin to the controller. In 3 of REG1. particular, check that • Three flashes: the you have isolated GPS module is the clock’s electronic working and has module and soldered transmitted its Here’s how we secured the PCB to the clock – a little bit of judicious filing your wires properly startup message. If removed a couple of ridges, then a few dollops of silicone sealant holds the to the stepper motor you do not get this PCB securely in place. This method allows easy battery change later on. coil. See the “Setting siliconchip.com.au February 2017  37 it up” section below for more information on how to check the connection to the clock motor. Testing the clock drive For stepping clock mechanisms, the most important test is that the drive pulse is long enough to reliably step the clock with a supply as low as 2V. If you have a bench supply, you can use clip leads to connect its negative output to the spring in the right-hand cell holder and its positive output to the cathode of D4. You will also need to wire a 47Ω resistor across each cell holder, to provide the “centre tap” voltage to drive the clock mechanism. If you don’t have a suitable supply, you will just need to scrounge up some almost-but-not-quite-completely-dead AA cells that produce close to 1V each under a moderate load. Either way, you just need to leave the clock running for a few minutes and check that it doesn’t miss any steps. If it does, use the set-up menu (explained below) to increase the pulse width by 8ms and try again. Repeat if necessary, until it works reliably. Another point to note is that you must sit the clock upright in its normal position while testing. The clock’s motor has very little power and if it is going to misbehave, it will occur while the clock is trying to push the second hand up against gravity. Sweep movements need to be tested more thoroughly and the firmware has a function in the setup menu that makes this quite easy. It will run the clock for an exact number of minutes and then stop. A good test is for 60 minutes and the idea is that the minute and second hands should return to exactly the same spot as they started from. Any error, even by half a second, will indicate a problem. Once again, you should run this test with a 2V supply, if at all possible, as explained above. It is at that low voltage point that problems will surface if they are going to. As with the step movement, orientate the clock vertically during testing. If the clock does lose some time, the answer again is to increase the pulse width in the set-up menu. This allows the pulse width to be varied in steps of one millisecond with increasing values delivering more energy to the clock’s motor at the cost of battery life. Note that you need to start the test at a normal voltage (about 3V) because the serial interface will not work at low voltages and the clock will not start running at low voltages. Once the test has started running, you can reduce the supply voltage. If you don’t have a variable supply, this may be possible to arrange by initially paralleling fresh cells with the slightly flat cells, then disconnecting them later to more thoroughly test the arrangement. Setting it up The set-up menu varies depending on which firmware you have installed. That’s because the sweep hands firmware does not support Daylight Saving changes, so the related options have been eliminated. The menu for clocks Calculating Battery Life With an application such as this, battery life is important. After all, what is the point of a clock that does not need adjustment if you are forever changing the batteries? To calculate the consumption, we need to divide the activity of the circuit into phases according to the current drawn from the battery. Then, for each phase, we determine the current consumption and its duty cycle (the percentage of time that the current is drawn). Finally, we can calculate the average current drawn per hour and then the battery lifetime for a given battery capacity. The tables below are the results for our prototype. These tables indicate what is the major power user and this is the current drawn while driving the clock’s stepper motor. This is where you should concentrate your efforts if you wish to improve the battery life. One way to do this is to reduce the width of the pulse using the set-up menu, but you have to be careful doing this as you may cause the clock to become inaccurate at lower battery voltages. If you plan to experiment with this, you should connect a variable power supply (with simulated centre tap) in place of the battery and test that your clock steps correctly at less than 2V, the minimum expected battery voltage. Don’t just test it on its back either; stand the clock upright in its normal position as you might find that the stepper motor does not have enough power to lift the second hand against gravity. Power consumption for clocks with stepping hands Function Current Drain (mA) On Time (seconds) Total Time Duty Cycle (seconds) Consumption (mAh) PIC in sleep 0.004 158355 158400 99.97% 0.004 Clock step pulse 3 0.04 1 4.00% 0.120 During GPS sync 80 45 158400 0.03% 0.023 Battery self discharge* 0.009 1 1 100% 0.009 Total 0.158 Expected lifetime for alkaline AA cells (capacity of 2400mAh) in months: 21 Power consumption for clocks with sweep hands Function Current Drain (mA) On Time (seconds) Total Time Duty Cycle (seconds) Consumption (mAh) PIC in sleep 0.004 79200 158400 50% 0.002 Clock step pulse 0.6 0.5 1 50% 0.300 During GPS sync 80 45 158400 0.03% 0.023 Battery self discharge* 0.009 1 1 100% 0.009 Total 0.334 Expected lifetime for alkaline AA cells (capacity of 2400mAh) in months: 10 38  Silicon Chip siliconchip.com.au with step hands is shown in Fig.9 and for sweep hands, in Fig.10. For clocks with stepping hands, by default the controller is configured for the NSW, Victorian and Tasmanian time zone and daylight saving rules. If you live in these states and the government has not changed the daylight saving rules since January 2017, then you do not need to do anything. If you live in another state, you will need to change the settings by connecting the GPS Analog Clock Driver to a USB port on your PC via the onboard adaptor. Or if you have a PICAXE programming cable, you can connect this to CON2 instead. You will also need a serial terminal emulation program running on your computer configured for 9600 baud, 8 data bits, no parity and one stop bit. Many free programs are available on the Internet including TeraTerm Pro, PuTTY, RealTerm or Hercules Terminal Emulator. Use Google to search for one or more of these names. To enter set-up mode, hold down the Set-up button (S1) while you install fresh cells and continue to hold it down until you see the menu via the terminal emulator on your PC. The Startup LED (LED1) will also flash when the microcontroller transmits a character to your computer, and this may help in diagnosing communication problems. If your state observes Daylight Savings, you can select any month (1-12) for the end and start. You can also set the day for the event (1st, 2nd, 3rd or last Sunday in the month). The time of the day that daylight saving starts (2am) is fixed in the program, as is the end time (3am). For either type of clock, the clock pulse width can be changed in steps of 1ms and this setting might need to be adjusted to suit your clock. Most clocks work with the default setting but some may need slightly longer pulses to reliably step with a low battery voltage. Also, to gain a lit- tle extra accuracy or improve battery life, you can change the interval between GPS synchronisations. All changes are saved in non-volatile memory and therefore will be retained, even when you remove the battery. As the time adjustment on most clocks does not affect the second hand you will not have an opportunity to set the second hand to 12 o’clock before the clock starts – and then it is too late. To solve this, while the clock is waiting for the half-hour to roll around (during which time LED1 flashes slowly), you can press the set-up button (S1) and while you hold this button down, the clock will run, causing the second hand to move around the dial. When the second hand reaches the exact 12 o’clock position, release S1 and use the normal time setting facility of the clock to adjust the hour and minute hands to the correct position. Setting the time Source code We explained this earlier but you may not remember the details so here’s a quick run-down. For clocks with stepping hands, simply set it so that all the hands point at the 12 o’clock position and insert the cells. Once the GPS module has a good signal and IC1 is able to determine the correct time, the hands will “quickstep” around the dial until the time is correct and then it will run normally. To save the clock from having to double-step for hours to reach the correct time, it makes sense to power up the clock shortly after 12 o’clock (ie, your local time). In that way, it will only take about ten minutes or so for the clock to finish double stepping and revert to normal accurate time keeping. For clocks with sweep hands, it’s a bit more tricky. First, check the current time and then set the hour and minute hands so that they are pointing to the immediately following half-hour. For example, if it’s 3:08, set the clock to show 3:30 before inserting the cells. But there’s a problem in that the second hand will be pointing at some random position on the dial and when you insert the battery, the clock will sit motionless until it is time to start. The firmware for this project is written in the C language and can be compiled with either the CCS C compiler or the Hi-Tech C compiler Lite for PIC10/12/16 microcontrollers. The Hi-Tech C compiler was purchased by Microchip some time ago and is now obsolete but it can still be downloaded and used. The good thing about it is that it is totally free, so if you want to get into the C language and play around with the code, this is a good way to do it. Download links and installation instructions are available at: www. cs.ucr.edu/~eblock/pages/pictools/install.html A close-up of the micro-USB module (left) and the optional 3.5mm programming socket (CON2, right). Conclusion Well, that’s it. With your clock properly set up, you can hang it on the wall and be assured that at least one clock in the house is always accurate. Just make sure it has a decent GPS signal where it’s located (eg, not deep inside under a corrugated iron roof!) so that it will stay synchronised. Incidentally, you can also check the clock’s accuracy at any time if you have internet time enabled on your desktop computer. SC Resistor Colour Codes        siliconchip.com.au No. 1 3 1 2 1 1 1 Value 22kΩ 10kΩ 4.7kΩ 1kΩ 470Ω 270Ω 220Ω 4-Band Code (1%) red red orange brown brown black orange brown yellow violet red brown brown black red brown yellow violet brown brown red violet brown brown red red brown brown 5-Band Code (1%) red red black red brown brown black black red brown yellow violet black brown brown brown black black brown brown yellow violet black black brown red violet black black brown red red black black brown February 2017  39 Ultra Low Voltage Mini LED Flasher by NICHOLAS VINEN This versatile design uses just a handful of components to flash any colour LED brightly and it can be powered from a single Alkaline cell. In fact, it will run off any supply from 0.8V to 3.3V and consumes very little power when the LED is off. It’s built on a tiny board, so it will fit just about anywhere and incorporates ambient light monitoring to switch the LED off during the day. W e have presented simple LED flashers in the past but this one is a little different. While it uses just a handful of parts, it’s able to drive the LED with a current of up to 50mA, to provide a very bright flash, even when running from a 1.5V cell. The complete module is just 15 x 19 x 4mm, so it can fit inside toy cars, model railway locomotives and other tight spots. The LED current is set by a resistor and the maximum setting produces an almost blinding flash when used with a high-brightness LED. But it consumes just a few microamps the rest of the time for a low average current draw and thus excellent battery life. It also incorporates a feature we previously introduced in a recent LED flasher design, an optional light-dependent resistor (LDR) which turns the flasher off during the day or when bright indoor lighting is switched on, to avoid wasting energy and thus further extend battery life. While this design does rely on a few small SMDs to build such a compact module, they are not especially difficult to solder and do not require any special tools. You just need a temperature-controlled soldering iron, flux paste, solder wick, magnifying lamp (or equivalent) and reasonably steady hands. And although the ICs are relatively Features & Specifications Supply voltage: 0.8 – 3.3V LED current: 12mA as presented; can be set to 1-50mA Supply current: 4mA average as presented, 50mA peak (8% duty cycle) Standby current: ~20µA average when not flashing Battery life: ~10 days with button cell; ~25 days with alkaline AAA; 50+ days with alkaline AA (10 hours flashing per day) LED driving efficiency: ~60% LED forward voltage: 1-3.6V LED flash rate: 0.1-10Hz, as set by C1; increases by up to 50% with reduced supply voltage LED duty cycle: 8% as presented; can be set to 1%-25% by changing R2 Size and weight (not including cell/battery): 15 x 19 x 4mm, <5g 40  Silicon Chip specialised, they are not expensive nor difficult to get. We will be offering a kit for this project which includes the PCB and most of the parts, to save readers the hassle of gathering them. But before we get into the construction, let’s look at how it works. Circuit description The complete circuit is shown in Fig.1 and consists of two main parts, an oscillator which determines the LED flash frequency and duty cycle (at lower left) and the switchmode regulator in the middle, which boosts the supply voltage up to that required to run the LED, and regulates the current through it. Let’s look at the oscillator first. This is based around IC1, an SN74AUP1G14DBVR schmitt trigger inverter. The part number is a mouthful but you may notice the 74 and the 14 in there, indicating that it’s similar to a 74HC14 IC, but with just a single inverter instead of six. It’s designed to run from between 0.8V and 3.6V and has a static current drain of less than 1µA, although its dynamic power consumption in this circuit is higher with the current at around 10µA. This needs to be relatively low as the oscillator is constantly powered from the unregulated supply (typically a single cell at around 1-1.5V). siliconchip.com.au POWER L1 4.7µH K 2 4.7µF 6 Vin SW Vout 5 A C1 1µF 2 IC1 SN74AUP1G14 5 330kΩ 4 REG1 MCP1640 3 3 100kΩ R2 10MΩ D1 BAT54 LDR1 λ EN GND K A A 1 CON1 ZD1 LED CATHODE BAND 1 K ZD1 λ LED1 VFB 5.6V K 4 2 A 4.7µF R1 100Ω BAT54 K A K NC A MCP1640 SN74AUP1G14 5 SC  2017 MICROPOWER LED FLASHER 1 2 3 6 5 4 1 4 2 3 Fig.1: complete circuit for the Micropower LED Flasher. The circuit is based around an SN74 schmitt trigger inverter (IC1) and an MCP1640 low voltage boost regulator (REG1) with an integrated load disconnect switch. It oscillates due to positive feedback from its output to its input, mainly via the 10MW resistor and the rate of oscillation is determined by this in combination with C1, which forms an RC low-pass filter. When IC1’s output is high, C1 discharges (ie, the voltage at pin 2 increases) until the voltage at pin 2 reaches its positive-going threshold and output pin 4 goes low. C1 then charges through the 10MW resistor until the pin 2 voltage reaches the negativegoing threshold and the output at pin 4 switches high again. The difference between the two thresholds is known as the hysteresis voltage and for IC1 this can be calculated as 70mV + (VCC – 0.8) ÷ 3. Unfortunately, since the hysteresis varies with VCC, the frequency will increase as the supply voltage drops (eg, due to the cell discharging). To give an idea of the magnitude of the effect, if the flash rate is 1Hz at 1.5V, it will be around 1.5Hz at 1V. Schottky diode D1 and its series 100kW resistor (R2) change the duty cycle of the square wave at pin 4 of IC1. Normally it would be close to 50% but this would result in visibly long LED flashes and waste power. When pin 4 goes high, D1 is forward-biased, so C1 discharges via R2, speeding up its discharge rate and thus reducing the time that pin 4 is high. The values shown set the duty cycle to around 8%. You might think it would be 1% but remember that D1’s forward voltage is a significant fraction siliconchip.com.au of the supply voltage. Despite this low duty cycle, the LED flashes appear very bright on our prototype. The opposite end of timing capacitor C1 is connected to the positive power rail so that input pin 2 of IC1 is initially high and thus its output is low and the boost regulator (REG1) and LED1 are disabled. C1 needs a couple of seconds to charge before the oscillator begins to operate and it’s best for REG1 to be off during this time. The oscillator output at pin 4 of IC1 goes through a voltage divider consisting of a 330kW fixed resistor and the LDR, which has a dark resistance in excess of 1MW and a light resistance below 50kW. Thus, in the dark, when the output of IC1 is high, the voltage applied to pin 3 of REG1 is close to VCC, since the resistance in the bottom leg of the divider is so high. But in relatively bright light, the ~50kW resistance of the LDR shunts most of the current from the output of IC1, reducing the voltage at pin 3 of REG1 by 0.3V and this is insufficient to switch REG1 on. So if the ambient light level is high, REG1 is off and the LED won’t flash. The only power consumption in this condition is that of IC1, the current required to charge/discharge C1 and the current through the 330kW/ LDR divider, which only flows when the output of IC1 is high. This averages to around 20µA (see Fig.6). Note that if you want the LED to flash constantly, all you need to do is omit the LDR so that the output of IC1 reaches REG1 without attenuation. When pin 3 of REG1 is high, the IC is enabled. REG1 is a somewhat unusual boost regulator in that when it is disabled, the current path from input to output is cut off entirely. This is very useful since otherwise the supply voltage may be high enough to cause the LED to light even when it should be off. But REG1’s internal switch ensures that there is no path for current to flow even so. Fig.2 shows the internal block diagram of the MCP1640 boost regulator. In brief, what it does is pulse pin VOUT (PIN 5) VIN (PIN 6) Direction Control SW (PIN 1) EN (PIN 3) Fig.2: internal block diagram of the MCP1640 boost regulator (REG1). Once the voltage at pin 1 (SW) rises above that at pin 5 (VOUT), the top transistor in REG1 switches on to allow current to flow from pin 1 to 5. This charges the external capacitor at pin 5. The other internal transistor (an N-channel Mosfet) pulls pin 1 low, in order to charge the external inductor which provides the voltage boost. Internal Bias IZERO ILIMIT Gate Drive and Shutdown Control Logic ISENSE GND (PIN 2) Oscillator Slope Compensation ∑ PWM/PFM Logic 1.21V VFB (PIN 4) February 2017  41 Fig.3: there is enough light on the LDR to attenuate the Fig.4: shows the same traces as Fig.3 except the LDR is output of pin 4 to a low voltage; thus REG1 is not triggering. shaded from light so that the enable pulses reach REG1. The The yellow trace is pin 2 of IC1 while green is at pin 4. blue trace is pin 1 of REG1 while pink is at LED1's anode. 1 (SW) low at a frequency of around 500kHz with a controlled duty cycle, so that the interruption of current through inductor L1 causes an increase in the voltage at this pin, compared to the input at pin 6. Current then flows from L1 through REG1 and out of pin 5, charging the 4.7µF output capacitor and also driving current through LED1. The current through LED1 and R1 rises until it reaches approximately 12mA, at which point the voltage across R1 reaches about 1.21V. At this point, REG1 throttles back the duty cycle of its internal switch to maintain this current level. This continues until the pin 3 enable (EN) input goes low and the 4.7µF output capacitor discharges through LED1 and R1. In more detail, when REG1’s internal transistor from pin 1 to pin 2 (ground) is switched on, current starts to flow through SMD inductor L1, increasing in a smooth manner. As the current increases, L1's magnetic field charges up. When this internal switch turns off, L1’s magnetic field continues to drive current from the supply at pin 6 through to pin 1. As a result, the voltage at pin 1 rises. Once the voltage at pin 1 rises above that at VOUT (pin 5), the other transistor in REG1 switches on to allow current to flow from pin 1 to pin 5. This charges up the 4.7µF capacitor from pin 5 to ground and, depending on whether the voltage is sufficient to cause LED1 to conduct, some or all of this current causes it to light up. Note that should the supply voltage be more than 1.21V above the forward voltage of LED1, the current flow will be higher than intended. However, R1 will still limit this current, albeit at a higher level. But even with a very low forward voltage for LED1 at around 1.8V, you would need a supply of over 3.01V (1.8V + 1.21V) for this to happen and then the increase in current would be minor; no more than a few milliamps. Because REG1's feedback is set up to regulate the current through LED1, the voltage supplied to LED1's anode pin Fig.5: is the same as Fig.4 except over a shorter timebase, letting you easily see the switching of REG1 (blue) in detail, which has a switching frequency of 485kHz in this case. 42  Silicon Chip will automatically be adjusted to take into account its forward operating voltage, which will depend on its colour. For example, blue LEDs normally have a forward voltage of at least 3V while red LEDs will often operate below 2V. REG1 will simply supply more voltage to a blue LED than a red one, in order to achieve the pre-set current flow. However, were LED1 to become disconnected (eg, due to an intermittent section of wire, a bad solder joint or if it fails), because no current could flow through R1, the output voltage could increase to an unsafe level, possibly damaging REG1 or other components. To avoid this, we've included zener diode ZD1. Should the output voltage exceed 6.81V (5.6V for ZD1 plus 1.21V at pin 4 of REG1), ZD1 will conduct and prevent REG1's output from rising any higher until the connection for LED1 is fixed. Operating waveforms The scope grabs of Figs.3-6 show the Fig.6: shows the measured current draw from one AAA cell while there was enough light on the LDR to prevent the LED from flashing. siliconchip.com.au operation of the flasher running from a single AAA cell. In each case, the yellow trace shows the voltage at pin 2 of IC1, depicting the charging and discharging of timing capacitor C1. The green trace shows the voltage at pin 4 of IC1, the pulses which enable REG1 when the LDR is in darkness and also determine the length of the LED flash. The blue trace shows the voltage at pin 1 of REG1, the switch terminal, while the pink trace shows the voltage at the anode of LED1. In Fig.3, there is enough light on the LDR to attenuate the output of pin 4 to a low voltage and thus REG1 is not being triggered. You can see the charge/ discharge sawtooth ramp of the timing capacitor at top and the resulting trigger pulses below. The frequency read-out is 900mHz, ie, just a little less than 1Hz (with a 1µF timing capacitor) and the amplitude of the sawtooth waveform can be seen to be 520mV, around ⅓ of the 1.5V supply voltage. Fig.4 shows the exact same traces but this time, the LDR is shaded so that the enable pulses reach REG1. You can see that the frequency has increased slightly, to 1.04Hz, due to the slight drop in cell voltage from the extra current drain and also, to some extent, due to the noise from REG1 affecting the operation of IC1. You can also now see some evidence of the switching output of the boost operator in the blue trace (although note that, due to the high frequency, the scope is underestimating its amplitude) and the 4.45V now being applied to the LED anode in ~60ms bursts. Fig.5 is similar to Fig.4 but with a shorter timebase so you can better see the operation of REG1 in detail. The switching frequency is 485kHz and you can see how pin 1 of REG1 is pulled to 0V briefly, after which it shoots up to over 4V, before dropping down to 0V as the energy in L1 is exhausted. It then sits at around 1.5V (ie, the supply voltage) while D1 is reverse-biased before being pulled low again for the next cycle. Fig.6 shows the measured current from the AAA cell while there was sufficient light on the LDR to prevent the LED from flashing. We connected a 1:1 scope probe across a 100W shunt resistor placed in series with the cell and set the scope to measure in microamps. We then used its measurement facility to average the result. Note that there’s a significant DC offset of 5.4µA in the measurement which you have to subtract to get an accurate reading and note also how the current draw changes during the oscillator cycle and spikes when the oscillator output is briefly high. Component value selection Using the values shown will give a flash rate of around 1Hz at 1.5V and a peak LED current of around 12mA. If you want a slower flash rate, simply increase the value of C1, eg, 2.2µF will result in around 2.2s between flashes (0.45Hz); 470nF will give around 0.5s between flashes (2Hz), etc. If you need a rate that’s between those that are easy to achieve with preferred values, you can quite easily parallel two SMD ceramic capacitors by soldering one on top of the other. It’s best to use X5R (±20%) or X7R (±10%) capacitors for C1 to avoid too much variation with temperature, but Fig.7 (right): overlay diagram for the LED Flasher which is built on a 15 x 19mm PCB. This makes it easy to fit in a model train or toy car. When building the Flasher, it's best to use an X5R (±20%) or X7R (±10%) capacitor for C1 as its value won't drift as much due to changes in temperature. TO BATTERY 0.85-3.3V NOTE: PCB IS SHOWN TWICE ACTUAL SIZE GND ZD1 R1 5.6V + 100Ω C1 100kΩ 1µF 10MΩ IC1 330kΩ siliconchip.com.au LED1 A K D1 BAT54 1 4.7µF 4.7µF L1 MCP1640 remember that regardless of the accuracy of C1, it will vary somewhat with supply voltage and you may need to experiment with capacitance if you want a particular rate. Setting the peak LED current is easy; simply select R1 = 1.21V ÷ (current in amps). So for example, if you want to set it at 5mA (which will still be quite bright), use 1.21 ÷ 0.005 = 242W or the nearest value, in this case, 240W. Keep in mind that the current drawn from the supply is substantially higher than this programmed current due to the fact that the supply voltage is normally considerably lower than that required to drive the LED, and due to limited efficiency. For example, on our prototype we measured a peak draw of around 50mA from the 1.5V (nominal) cell when LED1 was receiving 12mA, with its anode at around 4.6V. Of course, the battery only has to supply this 50mA for the 8% or so of the time that LED1 is lit. The average battery drain can be reduced by lowering the duty cycle. To do this, reduce the value of R2, to as low as 15kW which should give a duty cycle of around 1%. Likewise, the value of R2 can be increased, up to about 2.2MW, for a duty cycle of up to around 25%. Power supply You can use one or two AA or AAA cells, a 3V Lithium button cell or a 3.3V regulated supply. Keep in mind that the relatively high internal resistance of a button cells places an upper limit on how much current the circuit can reasonably draw, so we recommend increasing the value of R1 and possibly lowering the value of R2 for LDR1, which is optional, can either be soldered to the board as shown at the bottom of the PCB, or attached via flying leads. 1 4.7µH REG1 LDR1 February 2017  43 reasonable performance and battery life if using a button cell. Construction The LED Flasher is built on a tiny double-sided PCB measuring just 15 x 19mm. That makes it easy to fit inside something like a model railway carriage or toy car, especially since it can be run from a single AAA cell. The PCB is coded 16110161 and carries 12 SMD components plus the LED, optional LDR and power supply header/wires. The overlay diagram, shown twice actual size, is shown in Fig.7. None of the components are overly difficult to solder but IC1 and REG1 have the closest pin spacings. Start with REG1. This has six pins, three on each side, so you will have to examine it with a magnifying glass under good light to find the printed dot which indicates its pin 1. Orientate REG1 so that pin 1 is closest to L1, ie, on the side nearest to the LDR mounting pads. Melt a small amount of solder on one of the pads for REG1, then carefully slide it into place while heating the solder on that pad. Check its orientation with a magnifier and if necessary, re-melt that solder and gently nudge the component until all six leads are positioned properly above their pads. Now solder the pins on the opposite side of the one you tack-soldered, then go back and solder the three on the other side (refresh the solder on that initial pin). The solder will flow more easily if you spread a little flux paste over the pins of the IC. Since they are so close together, when you solder them, there is a high chance that the solder will bridge the pins. This can be cleaned up by adding a little flux paste and then applying some solder wick and a hot soldering iron. It should suck the excess solder right off the pins once it reaches the right temperature. You can then slide the solder wick away from the part and remove the soldering iron. Clean off with methylated spirits, isopropyl alcohol or flux cleaner and then check carefully with a magnifier that all the joints are good and there are no bridges. You can then move on to soldering IC1 using a similar technique. Its orientation should be obvious since it has two pins on one side and three on the other. You will find soldering 44  Silicon Chip Parts List 1 double-sided PCB, coded 16110161, 15 x 19mm 1 4.7µH 100mA+ inductor, size 3226/3216 (imperial 1210/1206) (eg, Taiyo Yuden CBC3225T4R7MR or BRL3225T4R7M) 1 LDR, dark resistance >1MW (eg, GL5528) (optional) 1 2-way pin header with plug or light duty twin lead 1 1.2-3.3V (nominal) battery or DC power supply Semiconductors 1 SN74AUP1G14DBVR schmitt trigger inverter, SOT-23-5 (IC1) 1 MCP1640T-I/CHY* synchronous boost regulator, SOT-23-6 (REG1) 1 high-brightness LED, size and colour to suit application; 3mm and 5mm through-hole types are suitable (LED1) 1 5.6V SMD zener diode, SOT-23 (ZD1) 1 BAT54 SMD schottky diode, SOT-23 (D1) Capacitors 2 4.7µF 10V X5R SMD size 2012/1608 (imperial 0805/0603) 1 1µF** 6.3V X5R/X7R SMD size 2012/1608 (imperial 0805/0603) (C1) Resistors (all 1% 1/4W SMD size 2012 or 1608 [imperial 0805/0603]) 1 10MW 1 330kW 1 100kW# 1 100W * do not use MCP1640B, MCP1640C or MCP1640D ** increase value for lower flash rate or reduce for faster rate # increase value for longer flash period or reduce for shorter period Note: a kit of parts is available for this project from the Silicon Chip Online Shop and that includes the PCB and all SMDs, including a few extras to allow you to alter the flash rate and duration. A blue high-brightness LED and a suitable LDR are also included but no battery or power supply connector/wiring. the side with the two pins easier due to the increased spacing. With that in place, soldering the remaining SMDs should be quite easy. Don’t get ZD1 and D1 mixed up as the packages look very similar. It will take a little more time to form the solder joints for L1 than the resistors and capacitors due to its larger size but the passive components can all be soldered using a similar technique as for the semiconductors. LED1 can either be mounted on the board or via flying leads, depending on what’s more convenient. Just make sure to get the anode and cathode the right way around. It can be a 3mm or 5mm LED or even a 2012/0805 SMD LED soldered directly across the pads, if that suits you. LDR1 can also be soldered to the board or attached via flying leads. It’s located at the opposite end of the board from LED1 to prevent optical feedback from causing LED1 to flicker, however, you can probably get away with mounting them in reasonable proxim- ity if necessary, as long as they don’t face each other. As mentioned earlier, if you don’t want the Flasher disabled by a high ambient light level, simply leave LDR1 off. There is no reversed supply protection on this board (to minimise size and voltage loss) so be very careful in wiring up the supply connections. Make sure to connect the negative end of your power supply to the corner pad (GND) of CON1 and it should be OK. A power switch can be wired in series with either supply wire should that be necessary, using either a twopin vertical or horizontal header or, as with our prototype, simply solder a pair of flying leads to these pads. Make sure they can’t move around too much, though, or the wires will eventually break due to metal fatigue. That’s it. Once you’ve applied power and LDR1 (if fitted) is in the dark, LED1 should start flashing after C1 has charged up to its normal voltage, which may take a few seconds. SC siliconchip.com.au OOPS! Did You Forget Someone Special at Christmas Time? Here’s the perfect (late!) Christmas Gift: A SILICON CHIP subscription! It’s the perfect way to say “oops – sorry!” . . . give the gift that keeps on giving – month after month after month! Or even give it to yourself! SILICON CHIP is Australia’s only monthly magazine focused on electronics and technology. Whether a PhD in quantum mechanics, or the newest beginner just starting out, SILICON CHIP is the one magazine that they’ll want to read from cover to cover, every month. Print subscriptions actually cost less than buying over the counter! Prices start at just $57 for six months, $105 for 12 months or $202 for 24 months. And yes, we have binders available (Australia only) to keep those magazines safe! Taking out a gift subscription for someone special has never been easier. Simply go to our website, click on the <SUBSCRIBE> tab and select <GIFT SUBSCRIPTIONS>. We’ll even send a special message from you to the recipient . . . AND we’ll send you a reminder when the subscription is about to fall due. What could be easier? Or call us – 02 9939 3295, between 9am and 5pm Monday to Friday (AEDST). 4 4 4 4 4 4 Remember, it’s cheaper to subscribe anyway . . . do the maths and see the saving! Remember, we pick up the postage charge – so you $ave even more! Remember, they don’t have to remember! It’s there every month in their letter box! Remember, your newsagent might sell out – and they’ll miss out! Remember, there’s also an on-line version you can subscribe to if you’re travelling. Remember, subscribers qualify for a 10% discount on any item from the online shop* *excluding subscriptions We’re waiting to welcome them – or you – into the SILICON CHIP subscriber family! A GIFT SUBSCRIPTION MAKES LOTS OF SENSE AND SAVES LOTS OF CENTS! siliconchip.com.au www.siliconchip.com.au February 2017  45 Measuring Temperature and Relative Humidity U s in g Ch e a p A s ian El e c t r M o d u o nic l Par t 4e s The AM2302/DHT22 digital temperature and relative humidity (RH) sensing module provides about the simplest way to make a microcontroller project with temperature and RH sensing capabilities. by JIM ROWE L ow-cost modules capable of sensing and measuring both temperature and relative humidity (RH) have been available for a few years now. Initially these modules appeared as peripherals for Arduino and similar microcomputers but they soon became an almost standard add-on for just about any micro-based project. How humidity is measured Relative humidity is the ratio of the amount of water vapour per volume of air at a particular temperature to the maximum amount of water which can be contained by that volume of air at that same temperature without condensation. Another way to state this is that RH is approximately the ratio of the actual vapour pressure to the saturation vapour pressure. The saturation vapour pressure depends on the dew point temperature, which is the highest temperature for a given humidity level at which water vapour will condense and form dew. This means that RH depends on three factors: the amount of water vapour in the air, air temperature and atmospheric pressure at the time of measurement. Since the module described here measures both RH and temperature, if you assume a fixed barometric pressure (eg, at sea level it is typically close to 1 bar), you can compute the absolute humidity based on these two readings. Just about all of these temperature/ RH sensing modules are based on integrated digital sensors made by Chinese firm Aosong Electronics (based in Guangzhou), which also goes Fig.1: close-up of the humidity sensor, showing the two capacitor plates. Note the darker plate marked with red is much smaller than the gold one underneath.* Fig.2 (below): complete connection diagram for the AM2302/DHT22 sensor module. The 4.7kΩ pull-up resistor allows for bidirectional communication with a single DATA pin. AM2302/DHT22 RH & TEMPERATURE SENSOR MODULE 4.7kΩ 100nF DATA VCC GND 46  Silicon Chip 1 2 3 4 VDD DATA (NC) GND by the name MaxDetect Technology. What’s inside Most modules currently available use their improved AM2302 sensor, which has alternative names: DHT22 or RHT03. Aosong/MaxDetect say little about what's inside the AM2302/DHT22/ RHT03 but mention that it contains a dedicated 8-bit microcontroller (see Fig.5), a temperature sensor and one RH sensor, the latter being based on a special polymer capacitor. Curious to know more, I carefully cut away the slotted upper section of the plastic device body. All this achieved was to reveal the two sensors, fitted on the top of a very small PCB (18 x 14mm) which is potted inside the remaining part of the plastic body (see photo and Fig.6 at right). The polymer capacitor humidity sensor (Fig.1) and it works by measuring the relative change in the dielectric constant of the capacitor with varying humidity. Since the change in value differs between capacitors, sensor calibration is required to provide accurate results. A thermistor provides temperature sensing. The thermistor used is an NTC (negative temperature coefficient) type, made of a conductive material which decreases in resistance proportionally as the temperature rises. The microcontroller measures the RH sensor capacitance and the thermistor resistance, then converts the siliconchip.com.au BUSBUS RELEASED RELEASED FOR FOR 20µ20 s µs VCC VCC CODING CODING FORFOR DATA DATA BIT 'BIT 0' '0' s µs 80µ80 s µs 80µ80 START START SIGNAL SIGNAL FROM FROM MICRO MICRO (1ms (1ms RECOMMENDED) RECOMMENDED) CODING CODING FORFOR DATA DATA BIT 'BIT 1' '1' 28µ28 s µs 70µ70 s µs VCC VCC LOGIC LOGIC HIGH HIGH LOGIC HIGH LOGIC HIGH LOGIC LOW LOGIC LOW LOGIC LOW LOGIC LOW GND GND GND GND FORMAT OFOF START REQUEST SIGNAL FROM MICRO, FORMAT START REQUEST SIGNAL FROM MICRO, 'OK WILL START' RESPONSE FROM AM2302 SENSOR 'OK WILL START' RESPONSE FROM AM2302 SENSOR 50µ50 s µs SENSOR SENSOR RESPONSE RESPONSE SIGNAL SIGNAL 50µ50 s µs DATA DATA BITBIT CODING CODING FOR FOR 'READ' 'READ' SIGNALS SIGNALS FROM FROM AM2302 AM2302 Fig.3: to wake the sensor from standby mode, the micro pulls Fig.4: the micro differentiates between what type of bit it RH HIGH RH HIGH BYTE RH LOW RHaLOW BYTE BYTE PARITY BYTE BYTE TEMP TEMP HIGH HIGH BYTE BYTE TEMP TEMP LOW LOW BYTE BYTE has received based on the pulsePARITY time; a data bit of value the DATA line low for a minimum ofBYTE800µs and maximum zero has a pulse time of 78µs while a one has a pulse time of 20ms. The DATA line then goes high for 20µs. This is of 120µs. regarded as a start request sent to the AM2302. LSB LSB MSB MSB LSB LSB MSB MSB LSB LSB MSB MSB LSB LSB MSB uring range is from -40 to +80°C with capacitor from VCC to ground and a a resolution of 0.1°C and an accuracy 4.7kΩ pullup resistor between the digiSINGLE SINGLE 'READ 'READ FROM FROM AM2302' AM2302' TRANSACTION TRANSACTION DATA DATA FORMAT FORMAT of ±0.5°C. The long-term RH stability tal data bus line and VCC. is rated as ±0.5% per year. The reason for that resistor leads us The device is designed to run from to discuss the way the device commu3.3-5.5V DC, with operation from nicates with an external micro, over 5V recommended. It has a nominal that single-wire bus. current drain of 1.5mA when measuring, or 50µA when in standby. It How it handles data needs at least two seconds between Although it's poorly explained in measurements. the AM2302 data sheet, here's the T h e A M 2 3 0 2 / D H T 2 2 / R H T 0 3 basic idea: when the DATA line is module itself measures only 25.1 allowed to float at logic high levx 15.1 x 7.7mm, while the PCB for el (pulled high by the 4.7kΩ resisthe most common module using it tor), the sensor effectively sleeps in measures 39 x 23mm, as shown in standby mode. our picture. To wake it up, the external micro The sensor has four connection pins, must pull the DATA line down to logalthough one is labelled “NC” (no con- ic low for at least 800µs, but no more nection) in Aosong's data sheet. than 20ms. In fact, they recommend As you can see from Fig.2, there's that it be pulled down for 1ms. very little in a typical sensing modThen the micro should release the ule apart from the AM2302/DHT22/ DATA line, allowing it to float high RHT03 device itself. again for about 20µs. There are just two passive compoThis “1ms-low-followed-by-20µsnents on the board: a 100nF bypass high” sequence is regarded as the MSB LSB LSB MSB MSB analog readings to digital values. 'OK'OK WILL START START ' ' START SIGNAL SIGNAL ThisSTART micro and aWILL number of associRESPONSE RESPONSE FROM FROM MICRO MICRO FROM FROM Am2302 Am2302 ated components are mounted on the underside of the PCB; we can’t determine their exact configuration as it’s impossible to remove the potting without destroying most of the circuit. However, there is a YouTube video where someone has removed all the components from the device. Some of the pictures from that video are shown in this article, and the link to the video is at the end of this article. Aosong/MaxDetect state that every AM2302 sensor is temperature compensated and calibrated in an accurate calibration chamber, during or after which the calibration coefficients are saved in the micro's one-time programmable memory. Considering its low price, the claimed performance of the AM2302 is quite impressive. The RH measuring range is from 0 to 100%, with a resolution of 0.1% and an accuracy of ±2%, while the temperature meas- Fig.5 (above): the internal layout of the micro in the AM2302 sensor.* The module in question with the case still intact. The module has a fairly low profile, measuring only 7.7mm high. siliconchip.com.au Fig.6 (right): the sensor module with the top of the case removed. The bead type sensor is an NTC themistor and to the right is the capacitive humidity sensor.* February 2017  47 MSB LSB LSB PARITY BYTE TEMP LOW BYTE MSB MSB TEMP HIGH BYTE LSB MSB 'OK WILL START' RESPONSE FROM AM2302 RH LOW BYTE LSB START SIGNAL FROM MICRO MSB RH HIGH BYTE 50µs DATA BIT CODING FOR 'READ' SIGNALS FROM Am2302 LSB FORMAT OF START REQUEST SIGNAL FROM MICRO, 'OK WILL START' RESPONSE FROM AM2302 SENSOR 50µs SENSOR RESPONSE SIGNAL SINGLE 'READ FROM AM2302' TRANSACTION DATA FORMAT Fig.7: once there has been a start response from the sensor, the AM2302 sends out its measurement data in 40 bit sets. The first 16 bits is the relative humidity, the 16 bits after is the temperature and the final 8 bits are parity bits to pad the length of the data to 40 bits total. micro sending a start request signal to the AM2302. If the AM2302 responds to this wake up call, it pulls the DATA line down to logic low for 80µs, and then allows it to float high again for another 80µs. This is regarded as its “OK, will start” response. This “start request” and “OK will start” sequence is shown in Fig.3. Soon after this startup sequence, the AM2302 sends out its current measurement data as a sequence of 40 bits of data, grouped in five bytes as shown in Fig.7. The relative humidity reading is in the first two bytes (RH HIGH and RH LOW), followed by the temperature reading in the next two bytes (TEMP HIGH and TEMP LOW), and finally there's a checksum or parity byte to allow error checking. All of these bytes are sent MSB (most significant bit) first and LSB (least significant bit) last. It's also worth noting that both the RH and temperature readings have a resolution of 16 bits. While this single-wire-bus transaction may look fairly straightforward, it isn't quite that simple – because of the special encoding that Aosong uses for the data bits themselves. As shown in Fig.4, a binary zero is coded as a logic low of 50µs followed by a logic high of 28µs, whereas a binary one is coded as the same logic low of 50µs, but followed by a logic high of 70µs. So both a zero and a one begin with a logic low lasting for 50µs but a logic high that follows lasts for only 28µs in the case of a zero rather than 70µs in the case of a one. As a consequence, data bits with a value of 0 last for a total of 78µs, while those with a value of 1 last for 120µs. So the time taken by each of those data bytes as shown in Fig.7 will not 48  Silicon Chip be fixed but will vary, depending on the data bit values. For example, a byte consisting of all zeroes (00000000) will last for only 624µs, while a byte of all ones (11111111) will last for 960µs. So in practice, the duration of each data byte will vary between 624 and 960µs. The micro connected to the AM2302 needs to take this rather unusual coding system into account when it decodes RH and temperature data. How it's used You shouldn't have to worry about decoding the AM2302 measurement data yourself, because many people have already worked it out for most of the popular microcomputers. For example, if you want to hook up an AM2302-based module to a Maximite or Minimite, Geoff Graham has already solved this problem and provided a special command in his MMBasic programming language. It looks like this: HUMID pin, tVar, hVar Where HUMID is the command keyword and “pin” is the micro's I/O pin to which the module's DATA line is connected. “tVar” is the name of the floating-point variable you want to receive the returned temperature (in °C) and “hVar” is the name of a second floating-point variable to receive the returned relative humidity (as a percentage). It's that easy! If you're running the module from a 5V supply, you do have to make sure that you connect the module's DATA line to a Micromite pin that is 5V tolerant – ie, one of pins 14 to 18, 21 or 22 on the 28-pin Micromite. So if you have connected the module's DATA line to pin 18 of the Micromite and have declared the temperature and RH variables as say temp! and RH! respectively, you'll be able to read the sensor's data with this oneline command: HUMID 18, temp!, RH! If you want to take a sequence of say 10 readings spaced apart by the recommended minimum of two seconds and print them to the console, here's the kind of simple program you'll need: DIM nbr% = 10 DIM temp! = 0.0 DIM RH! = 0.0 PAUSE 1000 DO HUMID 18, temp!, RH! PRINT "Temperature = "temp! "C & humidity = " RH! "%" nbr% = nbr% - 1 PAUSE 2000 LOOP UNTIL nbr% = 0 If you want to hook up an AM2302based module to any of the Arduino versions, it's almost as easy. You have quite a choice when it comes to prewritten applications, some of which you'll find using these links: https://github.com/RobTillaart/ Arduino/tree/master/libraries/DHTlib https://github.com/nethoncho/ Arduino-DHT22 https://github.com/sparkfun/ SparkFun_RHT03_Particle_Library/ blob/master/firmware/examples/ RHT03-Example-Serial.ino There are also sample programs on both of these websites: www.aosong.com www.humidity.com So it's not at all difficult to use one of these low cost AM2302/DHT22/ RHT03 based modules with a readily available microcomputer. * these pictures have been taken from the video at: http://youtu.be/ C7uS1OJccKI by www.youtube.com/ SC user/electronupdate siliconchip.com.au CLEVER TECH TO CONNECT & COMMUNICATE USB 3.0 TYPE-C TO DISPLAYPORT CONVERTER XC-4971 NEW LOW PRICE Designed to convert an existing DisplayPort signal to a new USB Type-C connector. This converter takes advantage of high performance USB Type-C connectors on new PC’s and MacBooks® and doesn’t need complicated drivers. Delivers up to 4 x 2K resolution depending on the application. • Display Port V1.2 • Resolution: Up to 4 x 2K, 60Hz • 43(L) x 43(W) x 13(D)mm $ $ 59 95 349 SAVE $150 USB 3.0 TYPE-C HUB AND CARD READER WITH POWER DELIVERY XC-4308 Enables existing Type-C power supply to charge a laptop whilst hub is connected. Ideal for use with the MacBook® to maximise connectivity of its singular USB Type-C input. 2 x USB 3.0 Type-A Ports. 1 x SDXC Slot. 1 x microSD Slot. 1 x USB 3.0 Type-C Power Delivery/Data Port. 81(L) x 52(W) x 15(H)mm $ USB TYPE-C MAINS POWER ADAPTOR MP-3445 79 95 USB 2.0 TYPE-C TO MICRO B SOCKET ADAPTOR PA-0937 Charge your smartphone or tablet anywhere you go. Overload protection and fully regulated output. • 100-240VAC input voltage • 5VDC output voltage $ 7 29 95 $ 95 A lot of recent computers only have USB Type-C sockets. Use this adapter for when you require a USB Micro B socket. 2-IN-1 POWER BANK / USB MAINS POWER ADAPTOR USB POWERED HDMI REPEATER AC-1703 Amplify your HDMI signal and extend the distance up to 35m. • It supports up to 4K at 30Hz $ 34 95 Simple and affordable, print within minutes of opening the box. Supports SD card and computer-based printing. 90 x 90 x 90mm print area. Supplied with white 1.75mm filament, SD card & reader, tools and user manual. ORRP $499 USB 3.0 EXTERNAL SATA HDD DOCKING STATION XC-4698 Allows you to connect a SATA 3.5 or 2.5” hard drive into a USB port of your computer. Plug and play compatible method to access any compatible hard drive. $ • 138(W) x 78(D) x 65(H)mm 49 95 RGB LED CUBE KIT XC-4624 A stunning piece of art-meetsillumination that you can build yourself. Features 64 individually addressable RGB LEDs arranged as a 4x4x4 matrix. Sleek white PCBs give the completed project an ethereal appearance that is sure to enchant all who behold it. MP-3438 Convenient wall charger and portable power bank. Features a detachable plug for you to carry the slim power bank conveniently. LED indicator. Pass-through charging technology to charge the power bank and your device simultaneously. • 2000mAh • 76(L) x 36(W) x 27(D)mm $ DUINOTECH MINI 3D PRINTER TL-4076 Requires RGB LED driver board XC-4498 $44.95. 39 95 3 WAY TOSLINK SWITCH WITH IR AC-1594 Versatile unit allows connection of up to three TOSLINK sources to one TOSLINK input. • Source selection via remote control or side switch • Supports formats LPCM2.0 / DTS / Dolby AC3 • 60(W) x 54(D) x 20(H)mm $ $ 49 95 ANALOGUE TO DIGITAL AUDIO CONVERTER AC-1716 Converts your analogue (RCA) stereo audio into digital signal. Outputs as either TOSLINK (optical) or digital coaxial, for compatibility with all digital inputs. ALSO AVAILABLE: DIGITAL TO ANALOGUE AC-1715 $64.95 39 95 $ 64 95 VISIT OUR BRAND NEW STORE IN REDCLIFFE QLD Catalogue Sale 24 January - 23 February, 2017 To order phone 1800 022 888 or visit www.jaycar.com.au PCDUINO & ACCESSORIES COMMUNICATIONS MODULES & SHIELDS pcDuino3 is a high performance, cost effective single board computer. It runs operating systems such as Ubuntu Linux and Android and has HDMI interface to output to a monitor or TV. It is also compatible with the popular Arduino ecosystem such as Arduino Shields. $ 95 BLACK ENCLOSURE TO SUIT XC-4350 PCDUINO XC-4354 House your pcDuino in this enclosure for a safe and presentable appearance. $ $ 29 95 SATA CABLE FOR PCDUINO XC-4366 • Length: approx. 15 cm 9 $ 95 29 95 5 $ 95 INFRARED TX MODULE XC-4426 X AND Y AXIS JOYSTICK MODULE Use your Arduino® to control your TV or Media Centre via Infrared. Use it to control our infrared RC helicopters! • Operating Voltage: 5VDC ALSO AVAILABLE: INFRARED RX MODULE XC-4427 $3.95 XC-4422 The board is interfaced through 5 pin header and provides a small gamepad style joystick. There is also a tactile switch when you push the stick down. • 47(L) x 25(W) x 32(H)mm 14 95 9 $ $ 95 VOLTAGE CONVERTER MODULE PCDUINO V3.0 FOR XC4350/52 PCDUINO XC-4362 Safely marries 5V Arduino® shields with the 3.3V pcDuino and will stop damage caused by connecting a 5V shield to the pcDuino. • 70(L) x 50(W) x 4(D)mm WITH WI-FI XC-4350 • Built in Wi-Fi capability • Supported digital audio via I2C • 121(L) x 65(W) x 15(H)mm 19 95 129 $ 2.4GHZ WIRELESS TRANSCEIVER MODULE XC-4508 ETHERNET INTERFACE MODULE XC-4436 Communicate on the license free ISM band. Despite its size, it supports on-air data rates of up to 2Mbps. No external components are required (other than your Duino’). All the circuitry required to implement a complete Ethernet interface. Use with your latest DuinoTECH project to send and receive email or host its own website! • Operating Voltage: 3.3V • 160(L) x 60(D) x 15(H)mm 19 95 $ $ RF TRANSCEIVER MODULE XC-4522 Add a versatile 433MHz radio to your Duinotech project to allow two-way wireless communication. Controlled via SPI. Prewritten libraries available. • Includes antenna. • 32(W) x 19(L) x 19(H)mm (Excluding antenna) $ 4 BLUETOOTH® MODULE XC-4510 Create a seamless serial-port link between you and your Duino’ or communicate with your Bluetooth®-enabled Smartphone. Connected via the serial pins, and to your device via Bluetooth®. • 28(W) x 13(L) x 8(H)mm 34 95 $ RS-232 SHIELD XC-4227 Connect a legacy device (or computer) to your existing Arduino® board and communicate with a huge variety of serial peripherals. • MAX232 Chipset • DB9 Female Socket • RS-232 Voltage compliant • 65(L) x 54(W) x16(H)mm $ 34 95 ETHERNET EXPANSION MODULE XC-4412 Set up your Arduino® as webserver, control your project over your network or connect to the web. • 10/100Mb Ethernet port • Reset button • microSD card slot • 69(L) x 48(W) x 14(H)mm $ ESP-13 WI-FI SHIELD XC-4614 Uses the powerful ESP8266 IC. 80MHz processor. • Integrated TCP/IP stack • Simple AT command interface with Arduino® main board • Can be programmed directly with Arduino® IDE (separate programmer needed) • Web configuration interface • Switches on shield to disconnect 39 95 59 95 $ 39 95 USB HOST EXPANSION BOARD XC-4456 Bring USB Host connectivity to your Arduino® project. Supports Google Android® ADK for connections to Smartphones and Tablets. • Dimensions: 55(W) x 54(D) x 23(H)mm 159 $ BLUETOOTH® 4.0 SHIELD XC-4549 Brings the latest Bluetooth® 4.0 BLE (Bluetooth® Low Energy) to Arduino®. • CC2541 Bluetooth® Chip Solution • Startup in a few milliseconds vs. 4 seconds on Bluetooth® 2.1 • Tiny unit with 3.3V input, and RoHS Compliant • UART interface and with baud rate setup function iBeacon WI-FI / ETHERNET SHIELD WITH AIRPLAY/DLNA AUDIO XC-4548 • Accepts music being pushed over Airplay for iOS devices or DLNA compatible devices including Android. • Includes Shield, Wi-Fi module & Antenna cable SAVE UP TO 25% ON THESE SHIELDS & MODULES NOW 1195 $ SAVE $4 $ NOW 29 95 SAVE $4 OLED STICK MODULE OLED SHIELD XC-4245 WAS $15.95 XC-4269 WAS $33.95 Suits XC-4270 OLED Display. *Limited Stock. Not available online. Page 50 $ NOW 49 95 $ SAVE $17 NOW 39 95 NOW 149 $ SAVE $8 SAVE $20 128X128 PIXEL OLED DISPLAY MODULE LEOSTICK STEPDUINO BOARD XC-4266 WAS $47.95 XC-4249 WAS $169 XC-4270 WAS $66.95 *Limited Stock. *Limited Stock. Not available online. Follow us at facebook.com/jaycarelectronics Catalogue Sale 24 January - 23 February, 2017 ARDUINO® PROJECT OF THE MONTH RFID PASSWORD TYPER PROJECT Tired of typing your password every time you need to log into your computer? Then we have just the thing for you. Carry around an RFID tag (or even use a card you might already have in your wallet), and simply wave it over the reader. Your password is typed for you! Wave the card again, and if you are using Windows, your computer is locked. Finished project XC-4620 Some soldering, assembly and programming required. XC-4506 WC-6028 NERD PERKS CLUB OFFER SEE STEP-BY-STEP INSTRUCTIONS AT www.jaycar.com.au/rfid-password-typer BUY ALL FOR $ 39 95 SAVE OVER $15 SEE OTHER PROJECTS AT www.jaycar.com.au/arduino WHAT YOU WILL NEED: LILYPAD BOARD XC-4620 $29.95 RFID READ AND WRITE KIT XC-4506 $19.95 PLUG-SOCKET JUMPER LEADS WC-6028 $5.95 VALUED AT $55.85 ARDUINO® ESSENTIALS DUINOTECH LITE (LEONARDO) XC-4430 Emulates a computer keyboard, mouse, joystick and many other types of input device. • 75(W) x 53(L) x 13(H)mm $ 29 95 DUINOTECH NANO BOARD XC-4414 Fully compatible with all the features of the full DuinoTECH boards but on a tiny DIP-style form. • ATMega328P Microcontroller $ 29 95 ARDUINO® STACKABLE HEADER 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. FROM 16 95 $ BREADBOARD JUMPER KIT PB-8850 Kit includes 70 stripped pieces of single core sturdy wire. • 5 pieces each of 14 different lengths • Supplied in a plastic box for easy storage RESISTOR PACK 300-PIECES RR-0680 This assorted pack contains 5 of virtually each value from 10Ω to 1MΩ. • 0.5W 1% mini size metal film SOLDERLESS BREADBOARD WITH POWER SUPPLY PB-8819 LIGHT DUTY HOOK-UP WIRE 830 tie-point breadboard with removable power supply module. Power via USB or 12V plugpack (not supplied). Includes 64 mixed jumper wires, different lengths and colours. • 3V and 5V switchable output 19 95 5 $ 45 RELAY BOARDS 13 50 $ $ 4 $ 50 See website for full contents. 8 COLOURS PACK WH-3009 Quality tinned hook-up wire on plastic spools. 8 rolls included, each roll a different colour. • 25m on each roll $ To order phone 1800 022 888 or visit www.jaycar.com.au 34 95 Provides the easiest way to use your Arduino® project to switch real world devices. • Status LEDs show channel status • Screw terminals for easy connection to relay contact 1 CHANNEL 5VDC 40(W) x 27(D) x 18(H)mm. XC-4419 $5.45 4 CHANNEL 12VDC 77(W) x 55(D) x 17(H)mm. XC-4440 $12.95 8 CHANNEL 12VDC 135(W) x 50(D) x 19(H)mm. XC-4418 $19.95 LED PACK 100-PIECES ZD-1694 This assorted pack contains 3mm and 5mm LEDs of mixed colours. Even includes 10 x 5mm mounting hardware FREE! $ 29 95 See website for full contents. • Red, green, yellow, orange LEDs See terms & conditions on page 8. Page 51 WORKBENCH ESSENTIALS 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. $ $ 1. GAMING CONSOLE TOOL KIT TD-2109 • Tools for nearly every console and handheld on the market today - WII, X-Box, Playstation etc. 2. 2 IN 1 NETWORK CABLE TESTER AND DIGITAL MULTIMETER XC-5078 • Remote terminator included • 600V, 2000 count • AC/DC voltages up to 600V • AC/DC current up to 200mA • Test leads and carry case included • 162(L) x 74.5(W) x 44(D)mm 29 95 1 84 95 2 5 4. BENCHTOP WORK MAT HM-8100 • Durable A3 size PVC cutting mat is just the thing to protect your work benchtop • Ruled with a centimetre spaced grid for easy referencing • 3mm thick- 450 x 300mm NOW 54 95 $ SAVE $10 5. MAGNIFYING LED LAMP QM-3544 WAS $64.95 • Ultra bright, 3x & 12x magnifying lenses • Mains powered • Lens Dia. 100mm 6. PORTASOL PRO PIEZO GAS SOLDERING KIT TS-1318 3. 0 TO 30VDC REGULATED POWER SUPPLY WAS $129 MP-3840 WAS $179 • Includes tips and • 0 to 5A cleaning sponge/tray • 1mV ripple voltage • Avoid overheating, burnout, and over-current • Easy-to-use LCD display panel 4 12 95 $ 3 6 NOW $ 99 NOW 149 $ SAVE $30 SAVE $30 ESD SAFE PB FREE SOLDERING STATION 14 95 15 95 $ POCKET WIRE STRIPPER TH-1817 Strips anything from 2G to RG6 coax. Easy to use and small enough to take anywhere on the job. • 120mm long. TS-1584 • CHT- Curie Heat Technology • Power on demand • Accurate temperature control • No calibration requirement • Includes free 0.5mm chisel tip $ STAINLESS STEEL WIRE STRIPPER / CUTTER / PLIERS TH-1841 High quality precision stripper/cutter. Spring-loaded with locking jaws, rubber handles for added comfort. Strips stranded wire from 12-24 AWG and solid wire from 10-22 AWG. Cuts wire up to 3.0mm. Strips wire up to 2.6mm. $ 359 FREE MAGNIFYING LAMP WITH THIRD HAND FOR NERD PERKS CARD HOLDERS* Valid with purchase of TS-1584 * 6P / 8P MODULAR CRIMPING TOOL TH-1935 Crimp the following plugs: 6P2C, 6P4C RJ11, 6P6C - RJ12, 8P - RJ45. Also cuts and strips the cable. ALSO AVAILABLE: 4P/6P/8P/10P MODULAR CRIMP TOOL TH-1936 $44.95 CRIMP TOOL WITH NETWORK TESTER TH-1939 Quickly and easily test Ethernet twisted pair cables for wiring continuity, opens, shorts, and mis–wires. Includes PoE tester. FREE RJ45 CAT6 CONNECTOR PKT 10 FOR NERD PERKS CARD HOLDERS* Valid with purchase of TH-1939 * PP-1447 VALUED AT $13.95 $ 69 95 DURATECH SOLDER 60% Tin / 40% Lead Resin cored. 1KG ROLLS: 0.71mm NS-3002 $74.95 1.00mm NS-3015 $74.95 200G ROLLS: 0.71mm NS-3005 $15.95 1.00mm NS-3010 $15.95 NS-3002 WIN A PORTASOL SUPER PRO WORTH $159 GAS SOLDERING KIT NS-3010 win.jaycar.com/workbench SIMPLY SUBMIT A PHOTO OF YOUR WORKBENCH AND YOU COULD WIN. Page 52 FROM 15 95 $ TS-1328 19 95 $ TH-1989 VALUED AT $44.95 Competition closes 23rd Feb. See website for the T&Cs Follow us at facebook.com/jaycarelectronics Catalogue Sale 24 January - 23 February, 2017 INSERTS FOR KEYSTONE WALLPLATES FROM 4 A range of inserts to cater for computer and Audio video applications. They fit standard 110 keystone wall plates and allow to configure your installation any way you like. RJ11 SOCKET 6P4C YN-8026 $4.95 RJ45 SOCKET CAT5E YN-8028 $4.95 YN-8028 RJ45 SOCKET CAT6 YN-8029 $4.95 RIGHT ANGLE USB 2.0 SOCKET PS-0795 $5.50 USB B - USB A PS-0753 $4.95 USB A -USB A SKT PS-0773 $4.95 USB 3.0 - USB 3.0 PS-0799 $12.95 HDMI - HDMI PS-0771 $9.95 YN-8029 TECH TIP MAKE YOUR OWN CAT5/6 CABLES $ 95 KEYSTONE WALL PLATES Flush type wall plates to accept our standard keystone 110 jacks. Fits standard Australian electrical switch plate installation hardware and screw centres. • Supplied without keystone jacks PS-0795 • 70(W) x 114(H) x 6(D)mm SINGLE WHITE YN-8050 $2.50 DOUBLE WHITE YN-8052 $2.50 TRIPLE WHITE YN-8054 $2.75 QUAD WHITE: YN-8056 $2.90 PS-0799 6-WAY WHITE YN-8058 $2.90 1. Determine the amount of cable you’ll need. 2. Cut the cable length. 3. Prepare the ends of the cable for crimping. 4. Place cable ends into the RJ-45 connectors. (use PP-1438/39) CAT5 PUNCH-DOWN TOOL TH-1738 This versatile little tool will strip wire up to 5-6mm, and doubles as a punch-down tool for 110/88-type terminals, with blade. 8 $ 95 Designed for seating wire into terminal blocks and has an adjustable internal impact mechanism. Supplied with 88 blade. 152mm long. ALSO AVAILABLE: 110 REVERSIBLE KRONE BLADE TH-1743 $17.95 $ 22 95 2 YN-8054 YN-8052 YN-8050 5. Determine the orientation of the wires. 6. Line the 8 wires up so that they’ll fit into the plastic head. 7. Crimp the head onto the cable (use TH-1935). 8. Test your cable if desired (use XC-5078) 8 PIN US TYPE TELEPHONE PLUGS FROM 6 $ 95 FOR SOLID CORE CABLE 8/8 RJ45 Approved. PKT 6 PP-1438 $6.95 PKT 50 PP-1439 $34.95 CAT5 ADJUSTABLE PUNCH-DOWN TOOL TH-1740 FROM $ 50 RJ45 RUBBER BOOTS PK 10 PM-1441 $4.95 PK 50 PM-1442 $15.95 19 95 $ WATERPROOF RJ45 JOINER IP68 FROM 4 $ 95 PS-4064 Includes 2-way Cat5 joiner, but will also accommodate any connector that fits within the internal dimensions of the housing. • IP68 rating • Accepts cables 4 - 7mm Dia. • 120(L) x 35(Dia.)mm COMMUNICATION CABLE 1/m $ 45 4/m $ 50 50 OHM RG58U SOLID CORE COMMUNICATION CABLE 50 OHM RG213/U COMMUNICATION CABLE WB-2010 $120/100m roll Suited up to 500MHz. • Ideal for CB/marine/amateur radio WB-2015 $379/100m roll • Commonly used in UHF FROM 1/m $ 90 FROM 1/m $ 85 FROM 70 ¢/m 3 /m $ 50 TELEPHONE CABLE RAINBOW CABLE 16 CORE Flat cable. Ivory colour. ACA approved. 2 PAIR (4 WIRE) WB-1620 $0.70/m or $59/100m roll 3 PAIR (6 WIRE) WB-1622 $0.90/m or $79 /100m roll WM-4516 $87/30m roll Colour coded strands of insulated conductor bonded together in a flat cable. • Same rating as 13 x 0.12mm light duty hook- up wire 1/m $ 45 1/m $ 75 COMPUTER CABLE IDC RIBBON COMPUTER CABLE CAT 5 SOLID NETWORK CABLE CAT6 SOLID CORE UTP CABLE • Two cables suited for computers etc • All are shielded to stop RFI 6 WAY WB-1575 $1.90/m or $159/100m roll 9 WAY WB-1578 $2.20/m or $189/100m roll Designed for IDC connectors. • Grey in colour with red trace 16 WAY WM-4502 $1.85/m or $44/30m roll 26 WAY WM-4504 $2.95/m or $75/30m roll 50 WAY WM-4508 $5.95/m or $154/30m roll Single strand Cat 5e, used for long runs in permanent installations. • A Tick approved • 100MHz 8 CORE STRANDED WB-2020 $1.45/m or $125/100m roll SOLID CORE SINGLE STRAND WB-2022 $1.45/m or $125/100m roll WB-2030 $149/100m roll Designed for reliable high-speed network installations. • Suitable for IDC terminations on patch panels and wall plates • 4x24 AWG solid core twisted pairs NERD PERKS CLUB MEMBERS RECEIVE: 10% OFF 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 * SELECT COMMUNICATION, TELEPHONE & COMPUTER DATA CABLES IN ROLLS OR BY THE METRE* REGISTER ONLINE TODAY BY VISITING: www.jaycar.com.au/nerdperks (*Applies only to cables listed on page 5 of February 2017 flyer) To order phone 1800 022 888 or visit www.jaycar.com.au See terms & conditions on page 8. Page 53 USB TYPE-C ACCESSORIES USB TYPE-C LEADS FROM USB TYPE-C PLUG TO: USB 2.0 A PLUG 1.8M WC-7900 $19.95 USB 2.0 MICRO B PLUG 1.8M WC-7902 $19.95 USB 2.0 MINI B PLUG 1.8M WC-7904 $19.95 USB 2.0 B PLUG 1.8M WC-7906 $19.95 USB 3.0 A PLUG 1M WC-7910 $24.95 USB 3.0 MICRO B PLUG 1M WC-7912 $24.95 USB 3.0 TYPE C PLUG 1M WC-7920 $29.95 $ 54 95 $ USB 3.0 GIGABIT ETHERNET CONVERTER WITH TYPE-C ADAPTOR YN-8412 FROM 19 95 $ Provides a solution by converting a USB port to a ethernet port. With the combination of USB 3.0 and Gigabit ethernet, it maximizes the data transfer speed. A USB 3.0 Type-C adaptor is included so you can switch between Type-C and Type-A. $ 2 FOR 23 90 SAVE $10 CAT6 RJ45 INLINE COUPLER YN-8037 CAT 5 UTP SPLITTER YT-6090 $16.95 EA Join two fabricated Cat6 cables. • Wired straight through 60W UNIVERSAL TYPE-C LAPTOP POWER SUPPLY MP-3340 • Automatically detects the optimum voltage output for the connected device (from 5,9,15 and 20V) • Features both a USB Type-C port and USB 2.0 port • Suitable for MacBook® and Google Chromebook™ • 100-240VAC, 1.5A • 112(L) x 69(W) x 16(H)mm TELEPHONE ISOLATION ON HOLD KIT NERD PERKS 19 95 $ 89 95 Save time, money and space! Usually used in pairs, this UTP splitter enables two different devices to share the same Cat5 cable. YT-6070 Great for the small office or business. • Input via 3.5mm headphone socket • Works with any MP3 player • Includes an RCA adaptor • 75 x 28 x 21mm $ 29 95 See website for details. NOTE: Cannot be used to run two computers from one network and not suitable for gigabit networks. ACTIVE USB 2.0 EXTENSION LEADS Extend USB devices up to 25m. Suitable for USB 2.0 or 3.0, male or female. 5M XC-4839 $24.95 10M XC-4120 $39.95 FROM 20M XC-4124 $49.95 $ $ 24 95 119 $ GIGABIT POE INJECTOR YN-8047 USB RJ45 EXTENSION ADAPTOR XC-4884 Connects any USB device to a computer up to 50m away via CAT5 network cable. PC and Mac compatible. Supports USB 1.1. • Requires standard Cat 5e cables • Transmitter and Receiver included $ SERIAL ATA CABLES FROM 4 For use with computers and external serial ATA devices. SATA TO SATA DATA PL-0978 $5.95 HDD POWER TO 2 X HDD PL-0750 $4.95 HDD POWER TO 2 X SATA PL-0759 $7.95 59 95 $ 95 PL-0978 29 95 Use Power over Ethernet (POE) devices while being connected to a standard network switch or modem/router. Features remote power feeding up to 100m. • 100-240VAC input voltage • 10/100/1000Mbps network speed • IEE 802.3af, IEE 802.3at PoE standards • 155(L) x 58(W) x 36(D)mm USB 3.0 DUAL SATA HDD DOCKS XC-4697 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 69 95 3.5" SATA HDD ENCLOSURE WITH USB 3.0 XC-4667 SATA TO USB 3.0 ADAPTOR XC-4149 A simple way to access files temporarily on a SATA hard drive you no longer have installed. Includes USB 3.0 cable and mains adaptor. Page 54 $ 39 95 • Plug 'n' Play • Hot swappable • For 3.5" HDDs only (not included) • Supports SATA I/II/III • Supplied with USB 3.0 cable and mains adaptor Power up to 4 devices on your network. • 4 x PoE, 1 x Uplink ports. 55W power output (up to 30W per port) • 10/100Mbps peak throughput. Standard is 802.3af, 802.3at • 100m transmission distance • 55V, 1.25A power supply • 160(L) x 92(W) x 28(D)mm DATA CONVERTERS Easily backup and store gigabytes of data quickly. Suits 2.5"/3.5" SATA HDD's (not included). USB 3.0 cable and power supply included. HDD not included. $ 5 PORT POWER-OVER-ETHERNET (POE) SWITCH YN-8071 $ XC-4927 $ FROM 2795 89 95 USB TO RS-485/422 CONVERTER XC-4132 $ 59 95 Follow us at facebook.com/jaycarelectronics Wire up an RS-485/422 device to the 4 socket terminal block to give your hardware USB connectivity. Surge protected. Suitable for industrial, military, marine, science and custom built applications. • 610mm USB A Male to Male cable included Catalogue Sale 24 January - 23 February, 2017 NERD PERKS CLUB MEMBERS SAVE ON JAYCAR'S RACK MOUNT CABINETS & ACCESSORIES NETWORKING Ideal for IT or phone system installations, studios and PA systems. These cabinets are solid steel powder coated to provide high strength and rigidity under load and are packed flat for convenient transport. These 19" rack mount hardware are value for money with outstanding features found on more expensive units. SPECIAL $ 99 SAVE $20 NERD PERKS $ NERD PERKS FROM FROM 64 95 159 SAVE $10 EQUIPMENT CABINET ALUMINIUM FRONT PANEL 1 UNIT HB-5120 RRP $74.95 NERD PERKS $64.95 SAVE $10 2 UNIT HB-5125 RRP $119 NERD PERKS $109 SAVE $10 3 UNIT HB-5130 RRP $129 NERD PERKS $119 SAVE $10 SAVE $20 SAVE $20 FIXED FRAME SWING FRAME CLEAR TEMPERED GLASS DOOR 6U RACK HB-5170 RRP $179 NERD PERKS $159 SAVE $20 12U RACK HB-5174 RRP $229 NERD PERKS $209 SAVE $20 CLEAR TEMPERED GLASS DOOR 6U SWING FRAME HB-5180 RRP $269 NERD PERKS $249 SAVE $20 12U SWING FRAME CAT HB-5182 RRP $329 NERD PERKS $309 SAVE $20 NERD PERKS FROM 95 $ SAVE 15% PATCH LEAD MANAGEMENT PANEL HB-5434 RRP $29.95 1U size, keeps all your patch leads under control. NERD PERKS SPECIAL 41 95 $ SAVE 15% CAT 5/6 24-PORT PATCH PANELS 24 port patch panel with a hard metal exterior. Numbered ports and a labeling area for each port. CAT 5 YN-8046 RRP $49.95 NERD PERKS $41.95 SAVE $8 CAT 6 YN-8048 RRP $69.95 NERD PERKS $58.95 SAVE $11 NERD PERKS $ 249 $ SPECIAL 24 FROM $ NERD PERKS $ 5-IN-1 WIRELESS AC750 DUAL BAND ROUTER NERD PERKS 6-WAY POWER DISTRIBUTION UNIT MS-4094 RRP $69.95 Power up to six 240VAC components in your rack setup. Surge/overload protected and fits any standard 19” rack. Includes 1.6m power lead. 1U rack space. NERD PERKS FROM 20 95 NERD PERKS FROM FROM 15 95 $ SAVE 15% 58 95 SAVE 15% $ SAVE 15% 40 SAVE 15% RACK CABLE SUPPORTS BLANK PANELS RACK SHELVES Take the pain out of wiring and fault-finding rack cabinets. These high quality supports keep your cables organised and neat, and provides strain relief at the same time. 1U RACK HB-5430 RRP $24.95 NERD PERKS $20.95 SAVE $4 2U RACK HB-5432 RRP $29.95 NERD PERKS $24.95 SAVE $5 Black powder coated panels for filling in unused space or configuring to your own requirements. Mount hardware included. 1U RACK MOUNT BLANK PANEL - VENTED HB-5424 RRP $18.95 NERD PERKS $15.95 SAVE $3 2U RACK MOUNT BLANK PANEL - VENTED HB-5426 RRP $27.95 NERD PERKS $22.95 SAVE $5 Ideal for equipment withoug rack-mounting ears. Each shelf has ample slots for ventilation and takes loads of up to 20kg. 1U FIXED RACK SHELF HB-5452 RRP $49 NERD PERKS $40 SAVE $9 2U FIXED RACK SHELF HB-5454 RRP $69 NERD PERKS $58 SAVE $11 1U BALL BEARING SLIDING RACK SHELF HB-5450 RRP $99.95 NERD PERKS $84.95 SAVE $15 YN-8329 WAS $119 Router, access point, range extender, Wi-Fi bridge or WISP. 2.4/5GHz. 802.11ac router with Wi-Fi speeds of up to 750Mbps. Good Wi-Fi coverage and fast speeds without the mess of cables. WIRELES NETWORKING ANTENNA 5DB Improve the range at either your base station or terminal. These antennas are specifically designed for 2.4GHz applications and 802.11 wireless networking is an ideal application. Both models supplied with a detachable magnetic base. 5DBI 195MM AR-3273 $19.95 11DBI 380MM AR-3277 $39.95 FROM 19 95 $ AR-3277 AC600 LONG RANGE NETWORK ADAPTOR YN-8313 • Detachable 3dBi antenna for improved Wi-Fi performance • Dual band - switch between 2.4GHz (for 150Mbps) or 5GHz band (for 433Mbps). • 50(L) x 16(W) x 12(H)mm $ 44 95 PROTECT YOUR I.T. SETUP WITH UNINTERRUPTIBLE POWER SUPPLIES Protect your valuable setup with our value-for-money Uninterruptible Power Supplies. Keep your systems running long enough to save critical data when the mains power fails. Other models in-store or online. 139 319 $ $ MP-5224 MP-5207 To order phone 1800 022 888 or visit www.jaycar.com.au 139 $ MP-5205 MP-5224 MP-5207 MP-5205 Line interactive, economical model Line interactive, smart LCD desktop model Line interactive, smart LCD desktop model 600VA, 300W 1500VA, 900W 390VA, 650W 12V/7AH x1 12V/9AH x2 12V/7AH x1 Modified Sine Wave Modified Sine Wave Modified Sine Wave Transfer <10 ms Transfer <10 ms Transfer <10 ms 6 x AUS (3 bypass, 3 mains) 2 x AUS mains 2 x AUS mains Backup time: 31 mins / 11 mins / 4.5 mins Backup time: 94 mins / 49 mins / 31 mins Backup time: 25 mins / 9 mins / 5 mins See terms & conditions on page 8. Page 55 CLEARANCE Limited stock. Not available online. Contact store for stock availability. NOW NOW 2 4 $ 95 SAVE $2 NOW $ SAVE $2 $ SAVE $5 SAVE $5 USB A SOCKET TO SAMSUNG® OTG ADAPTOR USB TYPE C TO USB 2.0 A SOCKET ADAPTOR 150MM UNIVERSAL CPU COOLER WITH PWM FAN WC-7747 WAS $4.95 WC-7908 WAS $6.95 YX-2588 WAS $24.95 $ NOW 34 95 $ SAVE $10 USB 3.0 SATA 2.5/3.5 HDD DOCK YN-8313 WAS $44.95 XC-4696 WAS $49.95 NOW 54 95 $ SAVE $5 $ NOW XC-4946 WAS $59.95 NOW 119 NOW 109 $ SAVE $10 SAVE $15 NOW 48 95 10 PORT USB HUB 39 95 $ Quick backup for your smartphone or tablet. 16GB XC-5622 WAS $24.95 SAVE $11 NOW SAVE $5 74 95 16GB OTG USB FLASH DRIVE $ YN-8325 WAS $44.95 SAVE $10 AC600 LONG RANGE NETWORK ADAPTOR $ WIRELESS N150 BROADBAND ROUTER NOW 39 95 NOW 19 95 19 95 $ 95 SAVE $20 CARD READER WIFI MULTI CARD & USB VGA & R/L AUDIO TO HDMI SCALER CONVERTER POWER LINE ETHERNET ADAPTOR 360W 650VA LINEINTERACTIVE UPS WITH USB YN-8426 WAS $59.95 AC-1617 WAS $89.95 YN-8352 WAS $129 MP-5214 WAS $129 AUSTRALIAN CAPITAL TERRITORY N VY SIL ST McDON ALDS AVE SALL ST JAYCAR REDCLIFFE 1/83 ANZAC AVENUE REDCLIFFE QLD 4020 PH: 1800 022 888 OXLEY AVE 7 ELEVEN GOMER Ph (02) 6253 5700 Ph (02) 6239 1801 Tuggeranong Ph (02) 6293 3270 NEW SOUTH WALES 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 ANZAC Belconnen Fyshwick 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 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 Warwick Farm Wollongong Ph (02) 9821 3100 Ph (02) 4225 0969 QUEENSLAND Aspley Browns Plains Burleigh Heads Caboolture Cairns Caloundra Capalaba Ipswich Labrador Mackay Maroochydore Mermaid Beach Nth Rockhampton Redcliffe NEW 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) 5537 4295 Ph (07) 4953 0611 Ph (07) 5479 3511 Ph (07) 5526 6722 Ph (07) 4922 0880 Ph 1800 022 888 Ph (07) 3889 6910 Ph (07) 4772 5022 Ph (07) 3841 4888 Ph (07) 3393 0777 VICTORIA Altona NEW Brighton Cheltenham Coburg Ferntree Gully Frankston Geelong Hallam Kew East Melbourne City Melton 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 Mornington Ringwood Roxburgh Park Shepparton Springvale Sunshine Thomastown Werribee Ph (03) 5976 1311 Ph (03) 9870 9053 Ph (03) 8339 2042 Ph (03) 5822 4037 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 $39.95 for the RFID Password Typer Project, applies to XC-4620, XC-4506 & WC6028 when purchased as bundle. Also, they receive double points with the purchase of XC-4430, PB8850, PB-8819, XC-4414, RR-0680, WH-3009, HM-3208, ZD-1694, XC-4419, XC-4440 & XC-4418. PAGE 4: Nerd Perks Card holders receive a free TH-1989 with the purchase of TS-1584. Also they receive a free PP-1447 with the purchase of TH-1939 and double points with the purchase of TH-1817, TH-1841, TH-1935 & TH-1936. PAGE 5: Nerd Perks Card holders receive 10% off on all Communication, Telephone & Computer Data Cables sold in roll or by the metre listed on this page. Nerd Perks Card holders receive double points with the purchase of YN-8026, YN-8028, YN-8029, PS-0795, PS-0753, PS-0773, PS-0799, PS-0771, YN-8050, YN-8052, YN-8054, YN-8056, YN-8058, TH-1738, TH-1740 & TH-1743. PAGE 6: Nerd Perks Card holders receive double points with the purchase of YN-8037, YT-6090 & YT-6070. DOUBLE POINTS ACCRUED DURING THE PROMOTION PERIOD will be allocated to the Nerd Perks card after the end of the month. 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 January - 23 February, 2017. 16 20 IC U HO SEE O N SE W CH IT TO IP IN JA N ) THIS CHART .au m o c . ip SIL h t ra c on s ilic (o • Huge A2 size (594 x 420mm) • Printed on 200gsm photo paper • Draw on with whiteboard markers (remove with damp cloth) • Available flat or folded will become as indispensable as your multimeter! How good are you at remembering formulas? If you don’t use them every day, you’re going to forget them! In fact, it’s so useful we decided our readers would love to get one, so we printed a small quantity – just for you! Things like inductive and capacitive reactance? Series and parallel L/C frequencies? High and low-pass filter frequencies? And here it is: printed a whopping A2 size (that’s 420mm wide and 594mm deep) on beautifully white photographic paper, ready to hang in your laboratory or workshop. This incredibly useful reactance, inductance, capacitance and frequency ready reckoner chart means you don’t have to remember those formulas – simply project along the appropriate line until you come to the value required, then read off the answer on the next axis! Here at SILICON CHIP, we find this the most incredibly useful chart ever – we use it all the time when designing or checking circuits. If you don’t find it as useful as we do, we’ll be amazed! In fact, we’ll even give you a money-back guarantee if you don’t!# Order yours today – while stocks last. Your choice of: Supplied fold-free (mailed in a protective mailing tube); or folded to A4 size and sent in the normal post. But hurry – you won’t believe you have done without it! #Must be returned post paid in original (ie, unmarked) condition. Read the feature in January 2016 SILICON CHIP (or view online) to see just how useful this chart will be in your workshop or lab! NOW AVAILABLE, DIRECT FROM www.siliconchip.com.au/shop: Flat – (rolled) and posted in a secure mailing tube $2000ea inc GST & P&P* Folded – and posted in a heavy A4 envelope $1000ea inc GST & P&P* *READERS OUTSIDE AUSTRALIA: Email us for a price mailed to your country (specify flat or folded). ORDER YOURS TODAY – LIMITED QUANTITY AVAILABLE SERVICEMAN'S LOG Snoring through the night Dave Thompson* Because I supposedly “know everything about electronics”, I am often called upon to solve all sorts of technical dilemmas. But on this occasion I thought that someone must have already thought of the solution to this problem. Evidently, not. So could I come up with an electronic solution to the age-old problem of snoring and its effects on matrimonial harmony? You be the judge. Over the years, my oldest friends and acquaintances have come to know me as a fix-it man, someone to turn to when something breaks down. However, there was also a time when I got calls to stand in for musician friends in their bands, or for assistance changing a head gasket on a friend’s old banger that really should have been driven to the local scrap yard and left there. Sometimes I’d get a call to help out at the local model aircraft derby and I can still smell the burnt nitromethane and ethanol and hear the scream of high-performance model plane engines. These days, people come to me when their computer doesn’t work properly or their amplifier stops amplifying. And that’s a good thing; pulling allnighters, playing rock and roll and wearing leather pants are for young people (unless you’re a member of the 58  Silicon Chip Rolling Stones) and all that loud music and those model plane engines contributed greatly to the hearing problems I have today. Thankfully, I still sometimes get asked to fix something a bit outside the square, and the following tale illustrates one such occasion. A while ago, an old friend I hadn’t seen for a few years dropped by for the obligatory bull session. We’d talk about lost youth and about how it is wasted on the young and discuss the meaning of life; the usual stuff. When it came to how things were going at home, it turns out that there were problems and it was all down to my friend’s snoring. This is a familiar tale in shared bedrooms everywhere. As us blokes age, we tend to start snoring. Often, it’s down to weaker throat muscles and/or weight gain that often arrives with middle age. Whatever the cause, snoring doesn’t bother the snorer; for some odd reason, they don’t hear it and they’ll often swear they aren’t snoring, even if it sounds like a chainsaw chorus, leading to spouses sometimes making recordings to prove their case. It is only when snoring leads to health issues like sleep apnoea that it has any impact on the snorer; by far the most misery is imposed upon the person sharing the bedroom! Surely, my friend lamented, all this fancy technology and electronics voodoo that I do would have a solution to this problem. He’d searched the inter- net and asked everyone he knew, including his doctor, about what could be done. Lose weight, was the medical advice. Or have surgery. Avoiding dairy after 6pm was a solution for some. Pharmacists and health store workers sold him expensive contraptions; one pulled his tongue out while he slept, while another is an elastic sling that wrapped around his head and held his jaw forward. Others swore that peg-like devices that closed his nose off or opened it up were the answer, but none of these snake oil products stopped his snoring. People on internet forums offered all sorts of traditional suggestions, such as sewing tennis balls into pockets on the snorer’s pyjamas to prevent him sleeping on his back, or advised placing peeled garlic or a raw onion beside his pillow. I’m sure all this advice was given with the best intentions, and no doubt some of these methods worked for some snorers, but unfortunately none of them worked for my friend. Was there a gadget I could make that could help, perhaps? I felt his pain. I’ve been known to snore the odd night myself (apparently) and could empathise; it is no laughing matter. Some snoring is quite dangerous and could be symptomatic of a wider problem, which is why a doctor’s opinion should always be sought. I thought about it a lot over the following days and weeks and came up with an idea that I thought might work. I’ve long since discovered that no matter what bright idea I might have, it will have been thought of before. The Chinese have a proverb, “Nothing is ever new, only what has been forsiliconchip.com.au Items Covered This Month • • • A do-it yourself snoring solution It’s just not cricket Sherwood CD player *Dave Thompson runs PC Anytime in Christchurch, NZ. Website: www.pcanytime.co.nz Email: dave<at>pcanytime.co.nz gotten.” If someone has thought of it before, then the internet would know about it. My idea was simple enough; make up a ‘VOX’, a voice-operated switch that when triggered, would send a warning signal to a pillow speaker placed in or under the snorer’s pillow. This would wake him up (or her; women also snore, though of course they’ll never admit it), and thus stop the noise. Over time, the snorer would be trained to respond to the sound and stop snoring as soon as he starts. Although this method obviously wouldn’t stop a snorer snoring altogether, theoretically at least if the device worked as expected, the impact of the snoring should be greatly reduced. After searching the web I found a single oblique reference to a similar idea but like many historic forum posts, the attachments referred to had long-since disappeared. siliconchip.com.au I did find a very complicated circuit diagram of a device similar to what I was considering, but I could find nothing else about it and decided I’d just have to build up something myself. Like all things in hobby electronics, it could be as simple or as complicated as the builder wants to make it. The premise was simple enough; there were no end of sound or voiceactivated switch circuits out there, and even a few kits for sale at the usual hobby electronics outlets. These are very reasonably priced given that buying all the separate components would likely cost more than the kit, and with a kit you might also get a pre-drilled box and screenprinted PCB, two components that can make a project much more complicated (and costly) if you have to make them up yourself. I was sure S ilicon C hip had produced a VOX in years past and so the magazine’s website was my first stop. I found one project listed; published way back in March 1994, before I started buying the magazine and while the article was available from the Silicon Chip store, there was no PCB, I decided to look at other options. Most of the circuits on the web used an electret microphone insert, maybe a potentiometer, a handful of resistors and capacitors, an op-amp IC and/or a couple of transistors and a relay, all of which I had in my assortment of bits and pieces. However, as I wasn’t certain the idea would even fly and because I didn’t know whether any of those circuits on the internet were proven runners either, I decided to start with a kit; at least I’d know it worked and with so many other unknowns in this project, it would give me a good foundation to build on for the rest of it. It didn’t take long to find and assemble the kit and as expected, it worked perfectly straight out of the box. I made a few simple mods, adding a potentiometer instead of their method of trialling various fixed resistors to determine microphone sensitivity and added a capacitor in order to hold the relay closed for a few seconds longer February 2017  59 Serr v ice Se ceman’s man’s Log – continued than the ‘factory’ setting once noise triggering ceased. I then turned my attention to the annunciator part of the project. My original idea was to use a simple oscillator wired through the VOX relay’s normally open contacts to generate a tone and send it to a small pillow speaker which would theoretically wake the snorer. To accomplish this, I built a twotransistor multivibrator oscillator I’d found a while ago on the Talking Electronics website and had previously used as a basic square-wave generator. It is simple and works well, and it is easy to change the output frequency if required. I built it onto a small piece of Veroboard and by changing the value of two capacitors, fixed the output frequency at around 2kHz. I didn’t measure the frequency exactly, but as it was a rather piercing tone – and all without having to use an additional amplifier stage – I was sure it would do the job of waking anyone very close to the speaker. I also added another pot to allow volume adjustment of the oscillator’s output. The relatively small oscillator board would fit snugly inside the jiffy box I got for the project and I would mount everything into it once I’d proven the concept. All that remained was to feed 9V from the power supply to the VOX board and wire the oscillator output through the relay and out to a mono 3.5mm jack socket that would eventually be mounted on one end of the box. I would then plug my speaker into that. The pillow speaker I had on hand is a commercial model with a speaker of about three inches diameter mounted in a tapered, circular slim-line plastic case so it can easily slip under a pillow without creating an uncomfortable lump. With oblong holes spaced around the circumference, it looks a bit like a UFO from one of those old Gerry Anderson TV shows that were all the rage in the 1970s. With the project working electronically, it was time to put it to the test, so I placed the whole mess of circuit boards, flying leads and pots on a side table beside our bed and rigged up the pillow speaker, warning my wife of the upcoming trials. It would be fine lying in a mess on the table – as long as it worked! I powered it up with a surplus 9V DC plugpack and settled down to try some sensitivity tests. However, right off the bat I could see there was going to be “issues”. In the dead of night, when all through the house, not a creature was stirring, not even a mouse, when the oscillator went off, it sounded like an air-raid siren to anyone in the room! If I backed the volume off to be so quiet that my wife couldn’t hear it, it was too quiet and I doubted it would wake up the snorer either. Another issue with my prototype was the relay; with it clicking away every time the sound switch was activated, even that mechanical noise in the middle of the night was far too disturbing for others. And when I cranked up the sensitivity in order for the microphone to pick up some fake ‘snores’, it would activate the relay and the sound of the relay would activate the VOX and it would then get into a loop and chirp like crazy. If this thing was going to fly, it was going to need further thought! The theory was sound or at least, I thought it was sound. The obvious thing was to find a quieter relay and I’d have to ditch the oscillator. Instead of an oscillator and speaker, I could use a vibrating buzzer, like the ones used in mobile phones. I had a few of these tiny devices sitting in the workshop and so I set out to see what I could do with them. These phone buzzers are simply a tiny DC motor with an imbalanced weight mounted on the rotor shaft. When 5V is applied, the motor spins quite quickly and as it is solidly mounted into the phone’s frame, it vibrates to indicate 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. 60  Silicon Chip a call or other haptic feedback events. It should be simple enough to fashion a vibrating ‘pillow speaker’ and this also had the advantage of simplifying the device, as I could dispense with the oscillator side of it altogether and simply pick 5V from a point in the VOX circuit to run through relay contacts and the ‘speaker’ cable to power the motor. With that in mind, I set about modifying the snore machine. I tried various relays, most of which had different pin connections and so wouldn’t fit in the board. Most clicked, some louder and some quieter but none I tried were suitable. No doubt there are ultra-quiet mechanical relays out there or I could utilise an electronic relay, but the cost and complexity of going down that road started overtaking the original simple idea of the project. I ended up sticking with the original relay but made a ‘cosy’ for it out of foam rubber and insulation tape. Fortunately, I had room on the PCB to add the cover and a couple of layers of foam and tightly-wound tape soon had the activation noise reduced to almost nothing. I also mounted the whole thing in the jiffy box and made up a remote mount for the microphone, removing it from the board and instead soldering a 120mm length of heavy, enamelled copper wire to a PCB pin I’d soldered in the earth side, with the other end to be soldered to the mic’s earth contact. I then ran a length of insulated hookup wire up the side of the copper wire from the live pad on the PCB to the mic’s ‘live’ pad. Before I soldered the mic on, I pushed the wires through a hole I’d drilled in the jiffy box for them, then reinforced the junction with some epoxy resin and covered the exposed part of the ‘stand’ with a couple of lengths of heat-shrink tubing. With the mic soldered on, I covered that with pieces of larger diameter heat-shrink and shrunk it down to cover all the connections. It ended up looking pretty neat, with the mic on a now-movable boom, and it was more isolated from whatever mechanical noise came from the jiffy box. It could also now be directed toward the snorer by gently bending the boom. I modified the pillow speaker by taking it apart and removing the speaker, then gluing the vibrating motor to the bottom of the plastic case with another dab of epoxy resin. Finally, I soldered the old speaker wires to the motor siliconchip.com.au Editor’s Note We actually published a much more recent VOX project in the July 2011 issue, titled “Build A Voice-Activated Relay (VOX)”, by John Clarke. An Altronics kit is available (K5542) and we also stock the PCB in our Online Shop (completed PCB shown below, not to size). In this specific example, we suspect Dave Thompson missed the newer VOX project because it was described as a “voice-activated relay” rather than “voiceactivated switch”. But searching for “VOX” would have found both projects. If readers want to try Dave Thompson’s approach to detecting and stopping snoring, the July 2011 design can be used without the relay since the BC337 used to drive the relay could easily switch the phone buzzer motor directly. However, we would suggest changing the 10kΩ base resistor for the BC337 to 4.7kΩ and also connecting a 47Ω 1W resistor in series with the buzzer motor. No other changes to the circuit should be necessary. before re-assembling the top cover. Trials were much more satisfactory and I was able to get the mic’s sensitivity up high enough to pick up the slightest snore without noise from the relay setting it off. The unit, when assembled and sitting beside the bed, was almost silent in operation, and my wife could no longer hear the relay clicking, nor could she hear the buzzer going off under my pillow. But it sounded quite loud to me and had no problem waking me when something set the device off (it can’t have been me snoring!). One downside, which could perhaps be worked around with a more directional microphone, was that sounds such as the neighbour slamming their car door or giving a quick toot on the car horn when driving off also triggered the device, though those sounds might have woken me anyway. All it needed now was some field testing, and so I passed it on to my friend, who reported last time I saw him that it worked well and there was a lot less stress in the household now that they were both getting a reasonable night’s sleep. Fixed! It’s just not cricket D. P., of Faulconbridge, NSW siliconchip.com.au employed all sorts of fancy methods in an effort to track down an elusive intermittent fault in a Beyonwiz DP-P1 set-top box/PVR. Here’s his story . . . It all started one warm, humid day, when my wife sat down to watch a movie, only to find the projector displaying a very strange, multi-coloured image. It was then that she noticed water dripping from our air conditioner onto the cabinet containing our audiovideo equipment. She quickly turned everything off and called me in to take a look at the problem. The air conditioner, a split-system type, has a trough running along the bottom of the indoor unit to catch the water condensing on the heat exchanger. Unfortunately, the drain hose attached to the end of the trough had become blocked, causing the trough to overflow. Most of the water had gone down the back of the entertainment cabinet and into the set-top box (STB), a Beyonwiz DP-P1. This unit had copped the worst of the flooding, with copious quantities of water lying on top of its case and flowing out the bottom. I quickly disconnected the power to the cabinet and proceeded to mop up as much of the water as I could. I then took the STB outside, removed the cover and emptied out the water. The motherboard still had water on it but someone must have been on my side, because the water had all stayed at one end of the board, well away from the switchmode power supply. And as far as I could see, there was no water on the underside of the board. There didn’t appear to be any damage from the flooding, so I carefully soaked up as much of the remaining water as I could and left the unit in the sun to dry. I then brought the STB back inside and powered it up. To my relief, it booted up normally and all seemed well. It didn’t stay that way though. After a few hour’s operation, we began to notice that off-air images were occasionally pixellating. This problem got worse as time went on, the signal breaks eventually becoming long enough to cause a “No Signal” warning to appear on the screen. My first thought was that maybe I hadn’t pushed the antenna plug in properly and so, on the next signal break, I gave the antenna plug a wriggle. It seemed to have been properly seated but in any case, the signal immediately came good and seemed stable. However, I thought that water might have found its way into the antenna plug/socket, so I pulled the plug out and sprayed it and the socket with WD40. All seemed well after that, with no more pixellation or signal breaks. Unfortunately, it wasn’t long before the problem appeared again. Once again, wiggling the antenna connector “cured” it, so I thought that I would take a closer look at the antenna connector combination. The first thing I did was to try feeding the STB from a different antenna outlet. I ran a coax from another room and once again, the problem appeared to be cured. I then pulled the original antenna plug apart, expecting to find an intermittent short or open circuit. However, everything looked fine and it tested OK with a multimeter, so I put the connector back together again and plugged it back into the STB. Once again, I was greeted with a clean signal with no breaks but the fault returned with a vengeance just a few days later. In fact, the STB now became so unreliable that it was now pot luck as to whether or not it would work on a particular day. And even if it did, it wouldn’t work for long. February 2017  61 Serr v ice Se ceman’s man’s Log – continued Further testing revealed that a TV receiver plugged into the STB’s antenna feed performed perfectly, so the fault was evidently in the STB itself. It was time to set it up on the bench for some serious troubleshooting. I began by establishing that video files recorded on the HDD before all this had happened could be played normally, even when the STB was in the fault condition. This indicated that the problem was confined to the RF section but with the unit on the bench, the fault stubbornly refused to appear . . . most of the time. I thought that this might be because the cover was off but replacing it didn’t have any effect. On the rare occasions that the fault did appear, I tried heating, cooling and flexing the motherboard. Sometimes these actions cleared the fault and sometimes they didn’t. The “cure” always seemed vague but I did eventually get the impression that it was more sensitive in the vicinity of the tuners. The DP-P1 has two tuners so that one program can be watched while a different program is being recorded. These tuners are both branded LG and are housed in small tin-plate boxes with snap-on covers, with a row of pins along the bottom edge. One of the tuners had two Belling-Lee connectors, for RF input and RF output, while the other tuner had no connectors. I later discovered that the tuner with the connectors is designated the “master” and the other tuner, the “slave”. Apparently either tuner can be used for direct viewing or recording, the logic circuitry in the STB sorting out which tuner will be used for which task on any particular occasion. By now, I thought it was a fair bet that I had a tuner fault, although other possible culprits were the power supply and the logic controlling the tuners. Snapping the covers off the two tuners revealed that they were quite similar internally, the main difference being that the slave lacked the two BellingLee connectors. It also lacked the amplifier circuit which evidently fed RF to the output socket and (presumably) to both tuner circuits. However, most of the circuitry in the two tuners looked identical, so I thought that some voltage comparisons might give me a clue. I started with voltage measurements at the pins along the edges of the tun62  Silicon Chip er boards. In the non-faulty condition, the voltage readings were virtually identical between the two tuners. However, it was a different story with the fault condition. Most of the readings were the same but one was very different. In the “good” tuner, the reading on a particular pin was about 6V but in the “bad” tuner, it was around 0V and varying slightly. I traced the circuit back from this pin and this led me to believe that it was probably the tuning voltage but I really needed more data. A internet search for information on these LG tuners draw a blank. However, both were based around a UN6034 IC and I had more luck finding information on this device, a quick search revealing a comprehensive data sheet and an application note. It turned out that the UN6034 IC is virtually a complete digital TV front end. It contains no less than three separate voltage controlled oscillators (VCOs) and associated mixers (one for each of the three TV bands), the logic circuitry for switching between them, a programmable phase locked loop (PLL) for referencing the VCOs, a charge-pump circuit to generate the relatively high (33V) VCO tuning voltage, and an IF amplifier capable of driving a surface acoustic wave (SAW) filter. In addition, the chip incorporates various associated functions, including AGC and lock detectors. As far as I could see, the circuitry around the UN6034 in the tuners conformed quite closely to the application note, so by using the information in the application note, there was a chance I could track down the cause of the volt- age difference between the two tuners. Assuming that what I had measured was indeed the tuning voltage, then according to the data sheet, I should have measured somewhere between 0.4V and 33V over the full VCO tuning range. I was now beginning to suspect that the VCO in the master tuner wasn’t running. Either that or it was well out of range. But how to check it? The digital TV channels in my area are in the high VHF range, so the local oscillator (or VCO) should be running at the RF input frequency plus or minus the IF. My old analog scope would not be in the race at these frequencies but an RF probe that I use with my Heathkit VTVM (now converted to solid state) would probably tell me if the oscillator was running (but not if it was on the correct frequency). The SAW filter in each tuner was marked EPCOS X7253D which, from an EPCOS data sheet, I determined to have a 36MHz centre frequency, so I figured that this must be the IF. I reckoned that if the STB was tuned to our local ABC transmitter on 226.5MHz, then the local oscillator (LO) would be on either 262.5MHz or 190.5MHz, depending whether it was above or below the RF input. I then figured that I should be able to detect the local oscillator signal with my hand-held scanner. With the STB tuned to the ABC frequency, I took a punt that the LO frequency was above the input. My guess was correct – with the scanner tuned to 262.5MHz and a short piece of wire pushed into the scanner’s antenna socket as a “sniffer”, I immediately found a strong signal at that frequency in the vicinity of the IC and the oscillator coil in the nonfaulty condition. By contrast, in the fault condition, This photo shows the two tuners in the Beyonwiz DPP1 PVR. The red arrow indicates the position of the cricket body that was wedged under the master tuner. siliconchip.com.au there was no LO signal and the RF probe indicated no oscillator activity. So what was killing the VCO in the faulty tuner? According to the data sheet, there are a number of legitimate operating conditions that can stop the VCO. In addition, a component fault around the VCO, a fault in the IC itself or a power supply problem could do it. In addition, the VCO locks only when an input signal is present. Loss of RF would thus also kill the VCO, so the problem could be due to a loss of RF into the UN6034. This would need to be investigated but how to do it? My trusty scanner could certainly tune to the RF input frequency but it has a 50Ω input impedance, so it would be unsuitable for signal tracing the high-impedance circuitry in the tuner. In any case, I found that tuning it to a digital TV frequency with an antenna connected produced nothing useful. Even on its widest-bandwidth setting, it could not resolve anything meaningful. What I needed was a wide-band receiver that could decode a digital TV signal. Pondering this, I suddenly realised that I had one on the shelf right in front of me – an ordinary digital TV receiver! But what about its input impedance? 75Ω was better than 50Ω but still not good enough. After some more pondering, I hit on the idea of using a 1/4wave matching section. If I stuck to one frequency and cut a piece of coax to a 1/4-wavelength of that frequency, it would transform the 75Ω input to a high impedance. I wasn’t exactly sure how high but maybe it would be high enough. The wavelength of an electromagnetic signal in free space is given by the formula: λ=v÷f where: λ is wavelength, v is the velocity (300,000km/s) and f is the frequency in Hz. Plugging the ABC transmitter frequency into this formula gives: λ = 300,000 ÷ 226,500,000 = 0.001324503km ≈ 1.3245m. So a 1/4-wavelength would be 0.3311m. I planned to use RG59 coax which has a velocity factor of 0.659. Applying the velocity factor gives 0.3311 x 0.659 = 0.2182, or approximately 218mm. Accordingly, I fitted a connector to a piece of RG59 coax and cut it to 218mm, including the connector. On the open end, I soldered a very short siliconchip.com.au clip lead to the braid to make a ground connection to the tuner. A 10pF capacitor with very short leads was then connected to the inner conductor to act as a DC blocker and probe. It was all a bit rough but it worked! In the non-fault condition I found that I was able to successfully trace the RF signal from the STB’s input connector, through the RF stages and right up to the input pin of the IC, all without upsetting the operation. Apparently the input impedance of my matching section was high enough to do the job. However, once again my sense of having achieved something was to be short-lived. The next time the fault appeared, I found that RF was not reaching the IC and as before, the LO was not running. At this point I was stumped; this was a real chicken-andegg situation. After all this, I still couldn’t tell whether I had a VCO problem or a loss of RF. At this point, replacing the tuner seemed to be the next logical step but new tuners were unavailable as far as I could determine. The only way out would be to purchase a non-working DP-P1 set-top box on eBay, maybe one with a dead hard drive, with the hope of salvaging a good tuner from it. And then, as I was staring gloomily at the motherboard, I saw something I hadn’t noticed before. Hidden just underneath the suspect tuner was a small black blob of something. It was hard to see because there were only a couple of millimetres of clearance under the tuner. I gently poked at the blob with a toothpick and it seemed quite soft, as though it was something organic. Further digging then brought out a sad little pile of exoskeletal remains and decomposing soft tissue. It was hard to tell what it was (or had been) but I am pretty sure it was the body of a species of tiny cricket that is common here during summer. These little critters are small enough to climb through fly screens and often come into the house in hot weather looking for water. Certainly, they are small enough to get into the STB through its ventilation holes. In this case, the little body had been lodged between the motherboard’s ground plane and one of the tuner’s pins. Guess which pin . . . yes, it was the tuning voltage pin! There was a nice film of corrosion where the body had been and with this cleaned up, there was no sign of signal breakup, so I set it up for a soak test. The Beyonwiz STB performed faultlessly for several days and so was put back into service. It has continued working for without fault for several months now. Evidently, the leakage path caused by the dead cricket was enough to kill the VCO. Ironically, the cricket itself was probably killed by the VCO in the first place. If you’re that small, maybe 33V is more than enough to do the job! And the reason for the intermittent nature of the fault? It seems that the resistance of the leakage path fluctuated with humidity. Sherwood CDC-5090R/G CD player A simple fault could have led to an expensive CD player being ditched. Instead, J. W., of Hillarys, WA fixed it for just a few dollars. A friend rang and asked if I could fix his Sherwood 5-disc CD player. When I got it, I plugged it in and found that although the display was working and the disc was being loaded and “played”, no audio was coming from the rear RCA sockets. I searched the net for a circuit diagram to no avail and then I remembered a business called High Country Service Data. I left a request on their website and Steve (the owner) rang me a short time later with the news that he had a circuit diagram but no service manual. This was certainly better than nothing and so I purchased a copy from them ($4) and it arrived five minutes later via email. The circuit showed that the RCA sockets were fed from op amp IC701 which was supplied with ±8V. So the first step would be to check the voltages around this IC. I removed the covers and found that I was able to stand the CD carousel on its end to get to the main PCB. I quickly identified IC701 and found that the -8V supply rail measured only -5V, so I then moved on to the power supply section of the circuit. This revealed that IC102, a 7908 voltage regulator, was supposed to supply the -8V rail. It looked OK and wasn’t getting hot due to overload so I replaced it with one from my box of spares. That solved the problem and I now I had a clean audio signal at the RCA sockets. My friend was delighted as a replacement for this particular unit would cost about $500. SC February 2017  63 High Power DC Motor Speed Controller Part 2 Design by JOHN CLARKE Continuing on from last month’s introduction, here are all the construction and setup details. Because this circuit is such a high power design, it made sense for us to split the circuit into two sections and two PCBs. O ne PCB accommodates the control section, mainly involving the PIC16F88 microcontroller IC1 and the high-side driver, IC2. The second board is the switching or power side of the circuit, involving two or three (optional) Mosfets and all the linking options to take care of highside or low-side switching. In fact, this second board can be thought of as a single high-power Mosfet which can be wired for high or lowside switching. Construction Hence, construction of this project simply involves assembling the two PCBs and connecting them together inside the compact diecast aluminium box which measures 119 x 94 x 57mm. The control PCB is coded 11112161 and measures 107 x 82mm and it is installed on the bottom of the diecast case. The power PCB is coded 11112162 and measures 111 x 85mm. It is installed on the lid of the diecast case and the two boards are connected together with five wires. No heavy cur64  Silicon Chip rents flow between the two PCBs so we don’t need heavy-duty wiring for the interconnections. Nor is there any heavy duty wiring between the power PCB and the various terminals for the DC supply and the motor. Instead, all the heavy duty currents flow in the tracks of the PCB which is manufactured using “2-ounce” copper, twice as thick as normally used. In addition, the four 50A rated terminals are mounted directly on the PCB, with substantial tin-plated “lands” to provide low resistance connections. Furthermore, since six of the “links” on the power PCB also carry heavy currents, they each have four paralleled tinned copper wire links, ie, LK1, LK2 & LK3 for high-side switching or LK4, LK5 & LK6 for low-side switching. The component overlays for the two PCBs are shown in Fig.4, with the power board at top and the control board below. Start by assembling the control board and install IC2 first, as it is the only surface mount component used in this project. Align the IC onto the pads and solder one corner lead to the PCB. Check that the IC is aligned correctly before soldering the remaining pins. You can re-align the IC easily by melting the solder joint and readjusting the position. Check that none of the IC leads are shorted with solder. Any excess solder can be removed with solder wick. Next, you can install the resistors. We recommend that you use a digital multimeter to check the values of each resistor, as you install them. Note that the values for R1 and R2 are dependent upon the battery supply, as shown in Table 1, which is slightly modified from that in last month’s issue. Diodes D2 and D3 and ZD2 and ZD3 can be installed next. These need to be inserted with the correct polarity, with the striped end (cathode, k) oriented as shown in the overlay diagram. Zener diode ZD4 is only used when the battery voltage is higher than 12V; Table 1 shows the required zener for 24V, 36V or 48V batteries. For a 12V battery, when ZD4 is not required, JP1 is installed instead. Only if you are using low side switching, siliconchip.com.au install JP2 at the same time, otherwise it must be omitted. There are five test points, at TP1, TP2, TP GND, TPS & TPV. To make them easy to use, we suggest that you install a PC stake at each point. Next, install the 18-p in DIL socket for IC1. Ensure it is oriented correctly. Then you can install the capacitors, noting that the electrolytic types must be installed with the polarity shown on the overlay diagram. Note that the 10F capacitor located just to the left of REG1 has a 63V rating, as shown on the diagram. REG1 and REG2 mount horizontally on the PCB with their leads bent at 90° to allow them to be inserted into the holes. The metal tab is secured to the PCB using an M3 x 6mm screw and M3 nut. Secure each tab before soldering the leads. Trimpots VR1 to VR7 come next. VR1 to VR6 are 10k and may be marked as 103. VR7 is 50k and may be marked as 503. Switch S2 is installed directly onto the PCB. Terminal strips and LEDs Terminal strips CON7 and CON8 are made by first dove-tailing two sections together. CON7 comprises a 3-way terminal with a 2-way section secured on each side. Similarly, CON8 is made by dovetailing a 3-way and 2-way terminal. Orient these with the wire entry side adjacent to the edge of the PCB. LED1-LED4 need to have their leads bent so they can protrude through the side of the diecast box. Each LED is mounted so the inside of the top lead is 15mm above the PCB. Drilling the case Now insert the control PCB inside the case. Mark the mounting hole positions and drill the required four 3mm holes. Final PCB preparation involves attaching an M3 tapped x 9mm standoff to each corner mounting position. The other holes in the side and lid of the case are shown in the diagram of Fig.5 on page 67. The required holes for the LEDs are 5mm in diameter and 25mm up from the outside base of the case. Do not forget to drill the hole at the CON7 end of the box for the cable gland. Drill this hole 25mm down from the top edge. Mount the PCB onto the spacers with the M3 x 6mm screws. If using siliconchip.com.au This photo shows the two-board construction of the DC Motor Speed Controller. All the heavy current wiring is kept to the upper PCB; indeed, all point-to-point wiring can be made with ordinary duty hookup wire. countersunk screws on the base, countersink the holes first. Secure to the base of the box with the M3 screws. Power PCB assemby Assembly of the PCBs can begin by installing the 4.7 gate resistors for Mosfets Q1 and Q2 and 15V zener diode ZD1. As already noted, the high current links for low or high side switching each consist of four sections of tinned copper wire. And we now repeat: only install LK1, LK2, LK3 and LK7 for high side switching (HSS) or LK4, LK5, LK6 and LK8 for low side switching (LSS). These links are shown in red for HSS and blue for LSS. Do not install both sets otherwise you will provide a complete short circuit which will vaporise the fuse! Note that each set of HSS or LSS links must be soldered on both the top and bottom of the PCB. Q1 and Q2 are mounted directly on the PCB and secured with M3 screws and nuts. Bend the leads to insert into the Mosfet holes on the PCB and solder the leads to the top and bottom of the PCB. Diode D1 is mounted in the same manner. Note that it was installed differently on our prototype but this has now been fixed. Fuse and fuse clips And now some notes about the fuse clips and fuse. The fuse holder clips February 2017  65 Nominal R1 R2 supply voltage JP1 Inserted? ZD4 12V 22k 10k Yes None 24V 56k 27k No 10V 1W 36V 82k 47k No 20V 1W 48V 91k 68k No 30V 3W Table 1: resistor, zener and jumper settings for various battery voltages. Fig.4: component overlays for the two PCBs – the power board at top and the control board at bottom. Again, we must reiterate that only one set of links (LK1LK6) for either high-side switching (pink) or low-side switching (blue) can be fitted, otherwise the life-span of the fuse can be measured in milliseconds! are rated for a continuous current of up to 30A although it is possible to fit a 40A fuse. If the motor you intend to use with this controller is rated for a continuous current up to 30A, then there is no problem. Solder the fuse clips on both sides of the PCB. On the other hand, if your motor has a continuous current of up to 40A or more, the PCB-mount fuse clips will not be adequate. 66  Silicon Chip In this case, the correct approach is to fit an in-line 5AG fuseholder in place of the 30A blade fuseholder (eg, Jaycar SZ-2065) together with a 40A 5AG fuse. The holes in the PCB which housed the 30A fuseholder may need to be enlarged slightly to fit heavycurrent wires for the 5AG fuseholder. Terminals CON1 and CON2 are mounted with the wire entry toward the outside of the PCB. Install the two 12mm spacers on the underside of the PCB using two M3 screws. The banana connectors/binding posts are unscrewed and the insulating bush arrangement fitted on top and the underside of the lid, then the nut is attached. The second nut goes on after the PCB is attached to the terminals. Use red for the Motor + and Battery + and black for the Motor – and Battery – terminals. Fig.6 shows the wiring connections between the two PCBs. Make sure there is sufficient length for each wire so the terminal side of the “power” PCB can sit over the CON8 terminals. The wires are secured with cable ties. For the main control PCB, there are holes available on the PCB in front of the screw terminals that allow cable ties to secure the wiring to the PCB for strain relief. For our prototype, we installed the power switch on the side of the box adjacent the Power LED and wired it to CON7. Similarly, the throttle can be installed in the box. However, the switch and throttle would generally be used separate to the box, with the wires passing through the cable gland from CON8 and to a potentiometer or throttle. The emergency shut down switch wiring would also pass through this gland. Wiring to a motor Unless the motor is to run at a full 30A load current continuously, 25A rated wire could be used to make the battery and motor connections. Typically, this wire comprises 41 strands of 0.3mm tinned copper wire. These wires will fit through the binding post wire hole. For higher current, use 56A wire (7 x 95 x 0.12mm wire). This wire won’t fit through the post wire hole. However, you can crimp the wires first to 8mm ID crimp eyelets and secure these to the terminals. siliconchip.com.au Testing With IC1 out of its socket, apply power between the Battery + and Battery – terminals. Check that there is approximately 12V at the output of REG1 and 5V at the REG2 output. Rotate VR2 and VR3 fully clockwise and VR1, VR4, VR5 and VR6 fully anticlockwise. Set VR7 mid way. If you are using a Hall Effect throttle, monitor the voltage at TP1 as the throttle is rotated from minimum to maximum. Take note of the minimum and maximum voltage. Then set VR1 to the minimum voltage and VR2 to the maximum voltage. Check that these settings are within the allowable range. See the specifications published in Part 1 last month for the reference voltage settings. Now turn the power off and insert IC1. Shut down You can use the shut down feature in one of two modes. Mode 1 is where normal motor speed control operation is restored once the throttle is returned to zero. The second mode is where motor speed control operation is only restored when power is switched off and on again. Emergency shut down is indicated by LED4. At every power up, this LED also lights up momentarily to indicate which mode is set. For the first mode, the LED blinks once and it blinks twice for the second mode. To change the mode, press and hold the limit switch (S2) during at power up. (Note that it is not the shut down switch that is pressed at power up). The mode will then change from one to the other. The shut down LED will also flash once if it is the first mode that’s selected or twice for the second mode. The selected mode is stored in IC1 to be used subsequently. Throttle limit Press S2 and adjust the throttle for the maximum speed required from the motor. Release the switch at this speed. In use, bringing the throttle beyond the speed limit will be indicated by the shut down/limit LED lighting. Low battery threshold The low battery threshold is set by adjusting VR3 and measuring the voltage at test point TPV. To make the adjustment, firstly desiliconchip.com.au 10mm 13.5mm A 22mm ALL DIMENSIONS IN MILLIMETRES 16mm 22mm 22mm A C 18mm B B B BOX LID 10mm 15 B 15 10 A A 10 10 A 13.5mm 25 20 A D FRONT SIDE OF BOX DIMENSIONS SUIT JAYCAR HB5064 DIECAST BOX HOLES HOLES HOLES HOLES HOLES A: 3mm DIAMETER B: 12 mm DIAMETER C: 5mm DIAMETER D: 10 mm DIAMETER E: 14 mm DIAMETER 27 E LEFT-HAND END OF BOX CL Fig.5: drilling detail for the diecast box. You may find it easier to place the unassembled “power” PCB on the lid (underside) and use it as a template to mark out the lid holes – they’re the only ones that are really critical. cide on the low battery cutout voltage required; typically around 11.5V for a 12V lead-acid battery. Then measure the voltage at the switch S1 terminals or at the CON7 switch terminals when the switch is on and make a note of it. Finally, measure the actual 5V supply (at the out terminal of REG2 – while the regulator has a nominal 5V output, it could be anywhere from 4.95 to 5.05V out). Divide the voltage measured at S1 by the required low voltage threshold value. Then multiply the result by one half of the actual 5V supply. The formula is TPV = (voltage at S1÷low battery voltage value) x (the actual 5V supply÷2). Say, for example, the measured voltage at S1 is 13V and the required low battery shut-down voltage is 11.5V. Now divide 13V by 11.5V. The result of the calculation is 1.13. If the actual 5V supply is 4.95V, then half its value is 2.475V. Multiplying this by 1.13 gives a result of 2.80V. Note that if you decide to change the low battery threshold, the voltage February 2017  67 F1 LK4 LK1 4.7 4.7 30 40A DC Motor Speed Controller © 2017 MOSFET Board RevB CON2 Q1 CON3 BATTERY + LSS NOTE: THIS PCB IS MOUNTED BEHIND LID OF CASE, UPSIDE DOWN LK7 HSS VCC HSS GND D1 LK2 HSS Feedback CON5 MOTOR + CABLE TIES LK8 HSS Q2 MOTOR − CON6 CUT ALL OF THESE WIRES TO A LENGTH OF 100mm LK5 15V LK3 LSS HSS LK6 LSS CON1 Source Gate (Q3) 4.7 BATTERY − CON4 ZD1 11112162 Rev.B THIS PCB IS MOUNTED IN BASE OF CASE 4.7V 4004 POWER SWITCH S1 CABLE TIES +5V CON8 SPEED POT 0V SHUT DOWN SOURCE FB HALL EFFECT 0V or FUSED + THESE WIRES MAY BE TWISTED TOGETHER 4.7V 1 A POWER SWITCH S1 POWER A SPEED A A IC2 GATE CON7 DC MOTOR CONTROLLER 16121111 CABLE TIES C 2016 11112161 Rev.A LOW BATT. SHUTDOWN CABLE TIES THROTTLE/SPEED POT (VR8) Fig.6: the wiring diagram for connections between the power PCB and the control PCB. As mentioned earlier, none of this wiring has heavy currents through it so ordinary hookup wire (not rainbow cable!) can be used. at S1 needs to be re-measured and the TPV voltage recalculated and reset. Adjusting feedback Rotate the gain trimpot fully anticlockwise if you don’t want motor speed feedback. Otherwise, set the feedback control VR6 fully clockwise for high-side op68  Silicon Chip eraton (and fully anti-clockwise for low side operation) and the gain control VR5 about one-third back from its fully anticlockwise position. Then with the motor running rotate the feedback control anticlockwise (clockwise for low side operation) until the motor just starts to increase in speed. Rotate slightly clockwise (anti- clockwise for low side operation), until the motor speed slows again. The gain control is then adjusted for the required amount of speed regulation when the motor is under load. You can adjust the soft start control VR4 and the frequency control VR7 to suit your particular motor and apSC plication. siliconchip.com.au 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. Simple Motion Detection Alarm This circuit board is impossible to move once armed without triggering a flashing red LED. Once triggered, the LED will flash continuously for a considerable period of time (weeks), providing indication of disturbance well after the event. A +4V signal output is provided to trigger external devices such as a siren. The circuit was designed to operate with minimal overall current consumption (around 1-2mA in the armed state), so that the battery will last a long time even when it’s a small type, such as two series CR2016 3V Lithium cells housed in a CR2032 holder (eg, Jaycar PH9238). If you do take this approach, place a 3 x 10mm strip of insulation tape on the underside of the positive terminal retaining clip to prevent the edges of the two cells from being shorted to each other. Alternatively, you could use four AA or AAA cells for a much longer battery life. LED1 is a red flashing LED (Jaycar ZD0240) which indicates when the alarm is powered, while green LED2 indicates when it is armed. Red LED3 flashes when the alarm has been triggered. Use the highest brightness LEDs you can obtain for LEDs 2 & 3 to reduce power consumption. IC1, half of a standard LM358 op amp, provides the arming de- lay. When power is first applied via switch S1, the 47µF capacitor at pin 3 of IC1 is initially discharged and so that pin is at 0V while pin 2 is at around 0.9V due to the 470kW/82kW divider across the 6V rail. After about 15 seconds, the 47µF capacitor charges to 0.9V via its 470kW series resistor and output pin 1 of IC1 goes high. The 560kW positive feedback resistor prevents oscillation during this transition. A 100kW resistor across the 47µF capacitor provides a fast discharge path when the circuit is switched off. With pin 1 high, LED2 is lit with around 60µA current due to its 47kW series resistor. The emitter of Q1 is also pulled up to around 5V when pin 1 of IC1 goes high. Transistors Q1 and Q2 are connected to form a gate-triggered SCR, with the emitter of Q1 being the anode, the emitter of Q2 being the cathode and the junction of the base of Q2 and collector of Q1 the gate. The two 1MW resistors keep it switched off until it has been triggered by a positive gate pulse. This gate pulse is delivered from the output of IC1 by motion detecting switch S2 (Radio Spares RS 2357566). This is rated at 120VAC, 1A but in this case, only has to deliver a fraction of a milliamp at a few volts DC to trigger the “SCR”. The gate current is limited to around 300µA by the 15kW resistor. Basically, when S2 closes, the base of Q2 is pulled high via a 15kW resistor, switching on Q2 which in turn switches on Q1 and they keep each other on as long as the circuit is powered. We’ve used two bipolar transistors rather than an SCR because most SCRs require several milliamps to remain in conduction. While some SCRs will in practice latch with a much lower current, this isn’t guaranteed to always work. And readers are more likely to have a couple of general purpose transistors on hand than a sensitivegate SCR anyway. When the “SCR” is triggered, the 33kW resistor provides a load of some 50µA, to ensure it remains in conduction even when LED3 is off. LED3 is not a flashing type but since it’s connected in series with LED1, it does flash and a current limiting resistor is not needed as the forward voltage of both LEDs is close to 4V. When the alarm is triggered, battery drain increases to around 2-3mA. The circuit will continue to operate with the battery down to around 4.8V. Colin O’Donnell, Adelaide, SA. ($45) S1 1MΩ POWER 1kΩ 470kΩ 2 6V BATTERY 3 LED1 (FLASHING) λ K Q2 BC547B 8 IC1 LM358 1 4 A 82kΩ 47µF 100kΩ E Q1 BC557B B 470kΩ 560kΩ 47kΩ C C λ LED2 15kΩ B E 1MΩ A K S2 MOTION DETECTING SWITCH (RS COMPONENTS 235-7566) +4V SIGNAL OUT A λ LED3 33kΩ K 0V LEDS K A siliconchip.com.au BC547, BC557 B E C February 2017  69 Circuit Notebook – Continued “Squash” and “Ping-Pong” two-player games using 16 LEDs My circuit for an 8-LED ping-pong game, published in the May 2015 issue, used discrete components; primarily, a 74HC299 8-bit shift register and 4013B CMOS flip-flop. This new version has twice as many LEDs, a piezo for sound and uses a microcontroller, greatly simplifying the circuit and allowing two different variations of the game to be played. The software is written in BASIC (using BASCOM-AVR) so it’s quite simple to modify if required. The basic idea of both games is that one LED is lit at a time, representing the ball as it travels across the display until it reaches the opposite end. At the appropriate time, the player must press their button to “hit the ball” and send it back to the other side. This must be timed correctly or else a point is lost. If the ball is hit, it returns to the other player and the game continues until one player misses, at which point the other player gains a point. Points go towards winning sets and the point and set tallies are shown on a 2-line alphanumeric LCD. The game speed can be varied using potentiometer VR1 and it becomes more challenging as it goes faster. Switch S3 is used to select the game to be played. The difference is that in ping-pong mode, player 1 must hit the ball when it reaches the left edge and player 2 must hit it when it reaches the right edge. In squash mode, OUT RESET 100nF 100nF VR1 10k 32 9 GAME SELECT PING PONG RESET 36 S3 37 SQUASH 38 12 SCORE RESET 13 S4 33 34 AVcc S6 9V BATTERY Vcc 35 ADC5/PA5 ADC4/PA4 PC6 ADC3/PA3 PC4 ADC2/PA2 PC5 XTAL2 PC3 XTAL1 PC2 ADC7/PA7 PC1 ADC6/PA6 PC0 PC7 OC2/PD7 PB0 2 3 S5 100nF 15 BLa 2 28 4 26 Vdd RS 16 x 2 LCD MODULE 27 6 25 24 EN CONTRAST D7 D6 D5 D4 D3 D2 D1 D0 GND R/W 23 14 13 12 11 10 9 8 7 LCD CONTRAST 1 5 VR2 10k 3 BLk 16 22 ADC1/PA1 1 PLAYER 1 A 150 IC1 ATMEGA 40 16A ADC0/PA0 39 PLAYER 2 470nF 10 30 Aref K IN GND 470nF S1 D1 1N4004 REG1 7805 10k S2 players must alternate hitting the ball when it reaches the left edge; the right edge represents the wall, off which the “ball” automatically bounces. Normally, before starting a game, VR1 is set to minimum (fully anticlockwise) for the slowest speed and switch S3 is set to select the game you want to play. Either player can then start the game by pressing their pushbutton switch (S5 for player 1 or S6 for player 2). Note, that at the slowest setting, the “ball” takes around eight seconds to traverse the display, whereas, at the maximum setting, it is ten times faster, ie, traversal takes around 800ms. Assuming you are playing the 4 5 6 7 8 PB1/T1 OCP1/PD6 PB2/INT2 OC1A/PD5 PB3/OC0 OC1B/PD4 PB4 INT1/PD3 PB5/MOSI INT0/PD2 PB6/MISO TXD/PD1 PB7/SCK RXD/PD0 GND GND 29 21 PIEZO SOUNDER 20 19 18 17 16 1N4004 15 A 14 K 7805 31 11 GND IN GND OUT LEDS A LED1 A K A   K 70  Silicon Chip A  K A  K A  K A  K A K A   K A K A   K A  K A  K A  K A  K A  LED16  K K K A 150 siliconchip.com.au ping-pong version, if player 1 is serving then LED1 lights up and stays lit until S1 is pressed again. At this point, the piezo will generate a beep, to simulate the ball being hit by a racket, and the ball starts moving, lighting LED2, LED3, etc in turn. By contrast, if S2 is pressed initially, LED16 lights up first and upon a second press of S2, LED15 lights up, followed by LED14 and so on. The other player (ie, the one who didn’t “serve”) must press their button (S5 or S6) when their closest LED is lit (LED1 for player 1 or LED16 for player 2). Another sound will be made and the ball will then travel back towards the other end. If you are playing squash instead, LED1 is lit first regardless of who serves and the ball travels towards LED16. When LED16 lights, a beep will automatically sound as the ball hits the wall and the light will then travel back towards LED1. When LED1 lights, whichever player didn’t serve must then press their button to send the ball back towards the wall. The next time LED1 lights, the serving player must then press their button and so on, alternating until one player misses. Regardless of the game being played, at the end of each point, the microcontroller reset button (S2) is used to prepare for the next point and the ball will then need to be served again. Points are stored in IC1’s EEPROM so resetting the micro doesn’t erase the scores. It is also possible to reset the micro in the middle of playing, in which case no point is scored. When a player reaches 11 points, they win one set, with the number of sets won is shown to the right of the number of points won for each player. When a set is won, both players start the next set with zero points. To reset the scores to zero, first press S2 to reset the micro, then press the score reset button, S4. The circuit itself is quite simple, with the sixteen LED anodes driven from the micro’s two 8-bit output ports, port B and port D. The LEDs share a single 150Ω cathode resistor as only one is lit at a time. Power comes from a 9V battery with reverse polarity protection diode D1 and a 5V regulator, REG1, to provide power to IC1 and the LCD. The self-oscillating piezo buzzer is also driven directly from the microcontroller, via output pin PC7 (pin 29). The two-line LCD is driven from IC1’s PC0-PC5 output pins, with PC0-PC3 driving the four-bit data bus (D4-D7 on the LCD) while PC4 and PC5 control the RS (reset) and E (enable) pins respectively. All other LCD digital inputs are tied to ground while a 150Ω resistor limits the backlight LED current and trimpot VR2 sets the LCD contrast bias voltage. The software, “squash and pingpong games with scoreboard.bas” can be downloaded from the Silicon Chip website (free for subscribers) and compiled into a HEX file using BASCOM-AVR (a free download; see www.siliconchip.com.au/l/aaan). This can then be uploaded to the ATmega16A microcontroller (IC1) using a suitable programming interface. Mahmood Alimohammadi, Tehran, Iran. ($50) Using GPS Modules for surveying and distance measurement This circuit was developed for recording the location of leaks in long water pipes but it could be useful in any situation where you need to measure large distances; for example, the size of a large block of land, where the typical GPS error of around one metre may not be significant. It’s substantially easier than using a long tape measure, and a lot less messy if the ground is muddy. The most accurate results will be obtained by using a (more expensive) precision GPS receiver such as the Neo-6P with a proper external antenna. With such a module, the error will typically be well under one metre, assuming a sky clear of obstacles or heavy cloud. Having said that, adequate results (to within a couple of metres or less) can be obtained with a cheaper GPS receiver with an external (nonpatch) antenna. The D2523T shown here, with an onboard helical antenna, is a reasonable compromise besiliconchip.com.au tween performance, price and availability for this application. The circuit is quite simple and is powered by a single Lithium-IronPhosphate (LiFePO4) cell. The ATmega328 microcontroller (IC1) periodically reads position data from the GPS receiver and logs it to a microSD card via the SparkFun adaptor module for later analysis. When the unit is first powered up, it waits to receive valid GPS data and then shows your current latitude, longitude and the UTC date/ time on the screen (see photo). Once this data is displayed, you can hold down the Waypoint button, S3, for a short period and it stores the current position to RAM. When you then move, it shows the distance in metres from that initial position to your present position. In fact, two distances are shown; one from the very first point stored in this manner and the other from the most recent position stored. So if you subsequently press S3, the second distance measurement will be reset to zero, while the first measurement will be unchanged. If you want a new initial point, press Stop pushbutton S4 and IC1 will close the current log file on the microSD card. Once the LCD indicates this is complete, press pushbutton S2 to reset the micro and then use S3 to set the initial position again. This also starts a new log file on the microSD card. Each time S3 is pressed, the LCD backlight is powered for three seconds. To reduce circuit complexity and power consumption, IC1’s internal clock is generated using its internal 8MHz oscillator, as opposed to the external 16MHz crystal normally used in Arduino boards. However, the chip can still be programmed using the Arduino IDE (see below). The distance between locations is calculated using a “Haversine” forcontinued next page February 2017  71 Circuit Notebook – Continued S1 3.3V LiFePO4 CELL 100µF S2 RESET 21 1 2 (HELICAL ANTENNA) 3 4 RxD TxD D2523T GPS RECEIVER MODULE GND Vin B/UV 1PPS 1 5 PB1/PWM RXD/PD0 ADC3/PC3 TXD/PD1 ADC2/PC2 PD2 PD5 PD3 PD4 IC1 ATMEGA 328P 328P 3 5 6 9 10 12 13 14 WAYPOINT S3 RESET/PC6 2 4 Vcc AVcc Aref ADC0/PC0 ADC1/PC1 PC4/SDA XTAL1/PB6 PC5/SCL PB5/SCLK XTAL2/PB7 PB4/MISO PD6 MOSI/PB3 PD7 PB2 15 26 25 11 4 6 Vdd RS 4-LINE X 16 CHAR LCD MODULE EN mula, which assumes that the Earth is a sphere. It isn’t quite, but it’s close enough for this calculation to be accurate over short distances (up to a few kilometres). Current drain (with power switch S1 closed) is around 65mA, giving an operating time in excess of 12 hours with a sufficiently large (>1Ah) cell. The whole circuit runs off the unregulated output of this cell, which is generally pretty close to 3.3V, satisfying the requirements of all components. IC1 switches the power to the LCD module backlight, to save power when it isn’t needed. VR1 allows the LCD contrast to be adjusted. Information on how to program an ATmega chip from the Arduino IDE while running it off its internal oscillator can be found here: www. arduino.cc/en/Tutorial/ArduinoToBreadboard Once you’ve installed the bootloader as instructed, download the source code for this project from the Silicon Chip website (GPS_ CONTRAST D7 D6 D5 D4 D3 D2 D1 D0 GND R/W 14 13 12 11 10 9 8 7 1 5 VR1 10kΩ 3 BLk 16 6 23 24 27 28 19 18 17 16 PB0 STOP S4 15 BLa 2 7 20 CS SCK MOSI MISO VCC SPARKFUN MICRO SD CARD MODULE GND GND 8 GND 22 Distance_Measurement_Arduino. zip) and unzip it. Four Arduino libraries are required: LiquidCrystal, SPI, TinyGPS and SdFat. The first two are included with the Arduino IDE while the last two are included in the ZIP file. Install them in the Arduino IDE by using the Sketch → Include Library → Add .ZIP Library menu option. You can then open the sketch (.ino) file in the Arduino IDE, compile it and upload it to the chip. The unit should then be ready to go. Bera Somnath, Vindhyanagar, India. ($80) 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 72  Silicon Chip siliconchip.com.au DC IN +15V LK1 220Ω 3 AC IN 1µF GND LK3 CON1 INPUT LK2 LK4 2 100nF 8 IC1a LM833 1 4 LK5 100nF 3 8 2 IC2a LM833 VR1 100kΩ OUT1÷10 1.8kΩ LK7 VR2 100kΩ LK8 5.1kΩ 2kΩ -15V 100µF λ LED1 100µF λ LED2 LK9 GND CON4 POWER IN -15V 5.1kΩ OUT1÷100 180Ω 16kΩ 20Ω 16kΩ -15V CON2 OUTPUT 1 GND 1MΩ +15V 220Ω OUT1 4 LK6 +15V 1 LK10 LK11 18kΩ 5 LEDS 2kΩ K A 6 IC2b LM833 7 220Ω CON3 OUTPUT 2 OUT2 OUT2÷10 1.8kΩ OUT2÷100 GND Signal Generator Buffer for testing stereo and bridged amplifiers This circuit increases the utility of a simple single-output function generator. These can usually produce a few different waveforms (sine, triangle, square etc) over a range of frequencies but often only have a single output with a limited amplitude, eg, up to 1V RMS or so. The buffer can also be used in conjunction with mobile phones and PC sound outputs with similar advantages. By connecting such a device to this circuit, you then have multiple outputs including one which is inverted compared to the other two, with the possibility of an increased signal of up to about 5V RMS, as well as the ability to easily access signals at 1/10th and 1/100th of the nominal output level. Even if your signal generator has more than one output (eg, a stereo audio output), you may find that the matching between levels on each channel is poor. This circuit provides much more closely matched outputs for more accurate testing. It works as follows. The audio signal is fed into CON1. The AC input can be used to remove any DC offset from the signal generator whereas the DC input is used if you need to pass very low frequency signals or you purposefully want to retain the DC offset of the signal. The signal can pass to gain stage op amp IC1a via three different paths; either directly, if LK1 is fitted, or via multi-turn trimpot VR1 siliconchip.com.au (if LK2 and LK3 are fitted) or regular pot VR2 (if LK4 and LK5 are fitted). This gives you the option of no attenuation, accurately set attenuation or the convenience of adjusting the level with a simple knob, respectively. You could in theory bring both VR1 and VR2 in-circuit and use VR1 for fine adjustment and VR2 for coarse adjustment. The possibly attenuated signal then passes to the non-inverting input of IC1a which is set up as a Programmable Gain Amplifier (PGA). You can select a gain of 1x with LK6, 2x with LK7, 5x with LK8 or 10x with LK9. Select the gain based on the maximum output signal that you want and use VR1/VR2 to set the exact output level. The output of IC1a is then fed to the non-inverting inputs of the remaining three op amp stages, IC2a, IC2b and IC1b. The first two provide a signal that’s in-phase with the input as they are configured as unitygain buffers while IC1b is set up as an inverting amplifier with no gain, due to the equal values of the resistors connected between the inverting input (pin 6) and the output/the signal source. A 5.1kW resistor from pin 5 to ground equalises the source impedance of the two inputs which reduces the rate at which the input offset voltage varies with ambient temperature (among other benefits). All three outputs are fed to identical connectors CON2, CON3 and 180Ω 10kΩ 20Ω 5.1kΩ LK12 5 6 IC1b LM833 7 220Ω CON4 INV. OUTPUT OUT3 OUT3÷10 10kΩ 1.8kΩ OUT3÷100 GND 180Ω 20Ω CON4. In each case, the output of the buffer/inverter op amp is fed to one pin via a 220W isolation resistor which can be shorted out with a link if not required. The two other outputs provide signals that are attenuated by a factor of 10 or 100 compared to the normal output. This could be useful, for example, for testing the music power of an amplifier, where you may want to toggle between a high amplitude and a reduced amplitude signal to simulate source material with a wide dynamic range. The circuit runs off a ±15V split supply, although other voltages such as ±12V or ±17V could be used. This can be provided by a tracking bench supply or a small module such as the 4-Output Universal Voltage Regulator (published in the May 2015 issue) or the Universal Voltage Regulator (March 2011). Petre Petrov, Sofia, Bulgaria. ($50) February 2017  73 Sale ends February 28th 2017. www.altronics.com.au 1300 797 007 Build It Yourself Electronics Centre® February Best Buys. T 2163 NEW! Get started in electronics with this handy 20pc kit. D 5584 NEW! 169 $ 109 Add Wi-Fi audio streaming to any amplifier! M 8195 $ Simply plugs into your existing amplifier’s RCA/3.5mm input and pairs with your smartphone or tablet for instant high quality audio streaming. These units can also be networked into a multi-zone system which can be controlled by one or multiple devices. Can be used in conjunction with C 0870 Opus-One Wi-Fi speakers. 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. It also has a super bright 1W LED torch. Dimensions: 178L x 84W x 45Dmm. JUST ARRIVED! YOU SAVE 25% *Dimensions external No More Eye Strain! 39.95 $ X 0432 This jumbo 5x loupe with LED lighting provides a crisp clear view of fine print, circuit boards, small parts etc. USB rechargeable. Includes carry case. Universal Aircon Remote Lost your aircon remote? Or has your enthusiastic toddler destroyed it? This replacement works with hundreds of aircons. Re- HANDY! quires 2xAAA .95 $ batteries. 24 A 1014 NEW! 199 $ Great for monitoring in remote locations, trail scouting etc. Weatherproof unit contains camera, movement detector, DVR, LCD screen, SD card slot & battery pack (requires 8xAA S 4955B 4pk, $3.95). W 2140 $72.50 60 159 $ M 8882 Great for families, classrooms and businesses. Massive 19A charging output. Rapid charging 2.4A output on each port. Includes adjustable dividers & power supply. ‘Learn To Solder’ Zoo Animals Kit Contains everything you need to create simple circuits & learn to solder. Play with LEDs, battery & bring each of the six animals to life! Ages 6+. S 9444 Covert CCTV Camera DVR NEW! Charge up to 10 USB devices at once! 720p + 8mp stills NEW! *Devices & charging leads not included A jam packed starter kit including soldering iron, multimeter, solder sucker, wire stripper, cutters, pliers and more! Ideal for the beginner or up and coming enthusiast. JUST ARRIVED! SAVE $30 69.95 $ $33.95 K 2546 Extra Tough Equipment Cases! IP67 rated for the ultimate waterproof protection for your precious equipment. Ideal for storing test gear, cameras, sensors etc. Foam inner can be customised to suit your equipment. Latches can be padlocked. T 5052-65 include shoulder strap. $ Size (mm) Part Normally NOw a roll 365x266x165 T 5050 OFC Whopper Cable 465x365x185 T 5052 Top quality cable for use in home theatre & car audio. Full 50m rolls only. 515x435x199 T 5054 650x430x250 T 5065 $132 $235 $299 $635 $99 $175 $220 $475 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 29 $ $195 170 $ SAVE $25 K 5192* Silicon Chip Stereo Hifi Valve Preamplifier Kit Very low distortion for a valve pre-amp with very high SNR of 105dB. Easy to build, with the preamp & power supply on one board. Includes 12VDC 1A plug pack. *Clear acrylic box available to suit (K 5193 $34.95). Uses Electro-Harmonix 12AX7. Follow <at>AltronicsAU www.facebook.com/Altronics C 0993 10” 180W $299 250 $ C 0991 8” 100W Biema® Power Amplifiers. Stunning performance! The latest release from Biema® with several key enhancements in cooling, efficiency and circuit protection. High power non-bridgeable design is perfect for DJs, bands, function venues using foreground sound reinforcement. 3 pin XLR and 6.35mm inputs. Speakon and binding post outputs. 2 year warranty. 525 $ 199 175 $ A 4157 2x250W $625 A 4159 2x350W $675 Price breakthrough! Ideal for clubs & organisations. NEW! $230 A 4155 2x150W $139 109 $ $ C 0392 SAVE $30 C 8884 Address Large Crowds With Ease! Top Quality Entertainers Mic One of our all time best selling units, with superb reproduction and outstanding value for money. Full diecast body silent on/off switch. Includes 6m XLR cable. UHF Wireless Handheld Microphone Package WOW, a professional grade package with two handheld transmitters for under $200! Offers up to 60m range in ideal conditions. Offers speakers wireless freedom without sacrificing speech reproduction. Balanced XLR or unbalanced 6.35mm output. Requires 4xAA batteries (long life lithium AA 2pk $4.95ea S 4906). SAVE UP TO $55 $79.90 An all in one portable PA unit with amp 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! Plus, new 12” 450W model just arrived! C 0995 RRP $625. with adjustable bass & treble! 2 for 60 C 0866 Rect. $ $349 269 $ C 0520A SAVE $100 C 0855 Round $299 $299 199 $ A 2554 Top Value Redback Five Channel Audio Mixer Compact & easy to use mixer. 5 channels accept up to 11 inputs. 3 band EQ, channel volumes, crossfader & VU meters. Great for schools and small venues. ® A 2620 $42.50 33 $ Portable Mini Mixer Powered by 9V battery or plugpack (M 9237B $17.95) this tiny mixer is perfect for small productions. Mixes four 6.35mm mics. 240 $ Amazingly light! SAVE 20% Opus One® Platinum 6.5” Speakers Compact Speaker Stands Study folding design. Ideal for use with the stage speakers & portable PAs. Adjustable 1-2m. Max 40kg. The perfect partner for our A 1115 Bluetooth amplifier (see below). Ideal way to add sound to the kitchen or study. Amazing hi-fi clarity! Can be installed yourself, fliplock brackets secure each speaker for flush mount screwless finish. $50 OFF! Add Bluetooth® audio to your favourite speakers! NEW! NEW! 79.95 $ A 3042 79 $ A 3044 Mini Stereo Line Pre-Amp Provides a boost for line level sources that need a bit more oomph. RCA in and out. Includes power supply. .95 2 Channel Mixer Pre-Amp Why pay for new bluetooth speakers when you can add this 2x20W RMS module to your existing speakers? A 1115 Streams music direct from your phone! $199 149 $ Accepts two mic inputs and outputs to RCA line level. Channels can be mixed or dedicated. Includes power supply. $129 64 $ C 0844 HALF PRICE! SAVE $74 Weatherproof Speakers for the 4WD or Boat! Maintenance free outdoor sound. These weatherproof 6x9” speakers are designed for long life in marine or tropical areas. Also great for caravans. 30W RMS. 4Ω. $329 255 $ $189 H 8126B Suits flat TVs up to 84” 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. Suits 450 & 600mm stud walls. A 2451 150 $ D-I-Y Active Subwoofer Module The same high performance as our popular C 5201 cinema subwoofer! D-I-Y subwoofer amp equipped with volume, frequency control, phase switch, high & low level outputs. 120W RMS, stable into 4 ohms. Quality outdoor sound for entertaining. A great addition to any alfresco area these wall speakers offer high performance music reproduction for an affordable price! 5.25” 45W RMS drivers. 8Ω input. C 0910 White C 0911 Black Shop online 24/7 <at> www.altronics.com.au $269 SAVE $70 199 $ 1300 797 007 Ideal for 4wDs & Caravans NEW! $19.95 279 $95 15 $ 70 $ $ P 1926 M 8528 3 Socket Extension Leads USB In-line Voltage & Current Meter This handy little gadget allows you to keep an eye on the output voltage and current from your USB port when charging devices. M 8539 Powerhouse® 7 Stage 12V High Output 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! $59.95 No power board required! Great for tradies or even around the office. P 8467 is orange heavy duty model. Compact Sealed Lead Acid Battery Charger Easy to use, with trickle charging function to ensure long battery life. Multi-stage charge control ensures long life from your batteries. 6 or 12V batteries up to 60Ah Model Length Normally NOw P 8460 3m P 8461 5m P 8462 10m P 8467 25m $11.95 $14.95 $32.95 $59.95 $10 $12 $26 $48 with laser pointer! D 0507 45 $ NEW! $37.95 SAVE 24% 29 A 0287 $ D 0505 .95 Lithium/NiMH Cell Charger With 5V USB output (use charged cells as a power bank). Car & mains use. Suits AAA/AA/C NiMH & 10440 to 26650 lithium. Super Slim Battery Banks - Stay charged up while out and about! Instant recharge for your phone. Slimline design, fits easily in your pocket. D 0507: Dual USB 1A and 2A outputs, 5600mAH. D 0505: Single USB 1A output, 3500mAH. $67 49 $ D 0508 $29.50 55 $ 24 $ M 8894 Rugged Waterproof Battery Bank Must have for tradies, travellers and hikers. Water and dust proof battery bank to recharge your phone on the go! 5V 1A output, 5600mAH. USB Mains Double Adaptor 3.5A dual USB output. Mains surge circuitry protects your appliances from damaging power fluctuations. UP TO 50% OFF QUALITY LIGHTING GEAR... Get Creative with EL Wire! SAVE 20% A favourite of e-textile builders providing a way to light up costumes, decorations and DIY signs. All sold in 3m rolls. Works with X 4101 controller which is powered by 2xAA batteries (S 4906 long life lithium AA $4.95 2pk). NEw! Stylish 14W LED Downlight & Transformer All new design has the transformer built into the fitting! Stunning light clarity and dispersion from the array of SMD LEDs mounted in to a low profile 4” enclosure. 1250 lumens. Includes 3 pin mains plug. 120Ømm cutout. Non-dimmable. n X 4105 Green n X 4106 Blue n X 4107 Red X 4108 White X 2093 Cool White X 2094 Natural White 24.95 $ 40% PIR Activated LED Floodlights Part Normally NOw 10W 240V X 2340A 20W 240V X 2344A 50W 240V X 2346A $69.95 $104 $197 $40 $62 $118 Model 129 $ X 2321 20W $129 X 2320 10W 24 $ .95 X 0199A 90 $ Brilliant Battery Powered Work Lights LED floodlamps coupled with a rechargeable battery offering up to 6 hours use away from mains power. Includes work stand, car charger & plugpack. Great for work sites & service vans. X 2902 Flood X 2904 Spot 64.50 Super Bright Head Torch Great for work or play this high brightness 1 Watt LED torch features 7 modes. Requires 3 x AAA (S 4904 $4.95 4pk) Bargain Dual Lamp LED Pen Torch With flood and spot beam. Fitted with magnetic clip - great for the glovebox. Requires 3xAAA batteries (S 4904 long life lithium $4.95 2pk). Shop online 24/7 <at> www.altronics.com.au 40W Genuine CREE® LED Lamps IP68 weatherproof vehicle lamps housed in a diecast case. 2800 lumen output. 304 grade stainless hardware with durable UV stabilised flyleads. 9-40V DC. Size: 125Wx155Hx88D mm. Sold individually. HALF PRICE! $ NEW! 3m Roll X 4101 Controller $9.95 Great for added security around the house, back shed or garage. Fitted with bare end mains lead (for connection by electrician). PIR range 12m. IP54 rated. Fully approved. 30% OFF! $185 11.95 $ YOU SAVE NEW! VALUE! X 0220 9 $ .95 1300 797 007 NEW! NEW! NEW! K 1134 39 $ .95 .95 59.95 $ K 1137 115 $ K 2610 Built your own mozzie trap! Combat zika and other mosquito borne viruses with this cheap and easy to build inaudible tone generator. Lures male mozzies to their doom! NEW! 39 $ *Sensor housing not included 8 Digit Frequency Meter Kit A compact high resolution meter capable of reading up to 55MHz (even more with an external pre-scaler!) Ideal for technicians, general servicing and lab use. Can be USB powered. Universal Temperature Alarm Kit 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. K 6049 Induction Motor Brownout Protector Kit Protect valuable motor driven appliances and pumps from damaging brownouts (where power dips to very low levels). Easy in-line hookup! PROJECTS, PARTS & DIY DESIGN DEALS... Make your own PCBs & save $$$ $145 T 3201 95 $ Great for classrooms! Get first class results for your one-off PCBs with this easy to use etchant tank. Includes pump, tank and clips for suspending PCBs. Works great with press-n-peel PCB film H 0770 ($40/pk). Z 6393 NEW! 9 $ .95 Lightweight SG90 Servo High Torque MG995 Servo A great micro servo for lightweight robotics applications. 180 degree rotation (±90°). 3.5-6V operation. A high speed metal geared servo with 12kg/cm torque. Weighs 55 grams. 120 degree rotation (±60°) 9 $ .95 NEW! Z 6366 Prototyping Base For Pi & Arduino UNO 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. Z 6344 Run 5V circuits from two AA batteries! Boosts the voltage output of two AA batteries to 5V - suitable for powering shields, sensors and controllers. NEW! 4 5V DC USB Boost Module Accepts 1-5V DC input and outputs 5V DC <at> 600mA. Great for getting 5V DC from a 3.6V lithium cell. 12 $ .95 14 27.45 Z 6522 P 1030 NEW! 5 7 Pk of Mini Breadboards $ .95 55 hole bradboards for instant solderless component connection. Z 6544 FTDI USB Lead A simple way to connect TTL serial devices to USB inputs. Sale Ends February 28th 2017 B 0090 289 $ LattePanda® Windows 10 Development Board Featuring 2GB of RAM, 32GB on board memory and full Windows 10 pre-installed. Powered by an Intel Atom processor it is capable of running Windows 10, Linux or Android. It also integrates with Arduino! Features: • Bluetooth 4.0 • WiFi • HDMI out • USB 2.0/3.0 • Touch sensor and display connectors • Sensor headers • Micro SD expansion and much more! Case to suit H 6415 $16.95. SAVE $40 Phone: 1300 797 007 Fax: 1300 789 777 Mail Orders: mailorder<at>altronics.com.au $115 $9.95 75 $ 7 18650 Lithium Batteries 3.7V 2600mAh. As used in many high power LED flashlights, e-cigarettes etc. Unprotected. 18.6Ø x 65mmL. NEW! $ USB Lithium Charging Module Provides 1A charging current to a single lithium cell from a 5V DC input. $ .95 NEW! 4 $ .95 Z 6388 Z 6562 $19.50 22 $ NEW! $ .95 S 4732 With Tags S 4736 Standard Raspberry PI GPIO Breakout Breaks out the 40 pin GPIO bus of the R-Pi and connects it to a 500 pin breadboard for development. 19.95 $ NEW! K 9610 NEw! NEW! Z 6392 Strip Vero Board for prototyping. Easiest way to build up quick circuit prototypes or DIY add on boards. 160x100mm. $24.75 5 for 20 $ H 0712 14500 Lithium $ Batteries S 4979 Standard 3.7V 800mAh. Build it into a project $10.95 or convert a device to long life lithium! $ Unprotected. 14Ø x 50mmL. S 4980 With Tags 8 Z 6313 Arduino Display & Sensor DIY Kit Includes a UNO compatible dev board, 16x2 LCD module, breadboard & an array of sensors for experimenting! TOP SELLER! $115 SAVE $40 75 $ HANDY! 7 $ .95 T 2980 5mm Z 6312 HANDY! 45 $ T 2982 50mm Conductive Copper Tape A multitude of electronic uses - create low-profile component traces, RF-shielding, antennas etc. 0.07mm thick. 15m length. Arduino Building Blocks DIY Kit Includes a UNO compatible dev board and 19 breakout sensor boards for experimenting! 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 2016. 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. All major credit cards accepted. Build the SC200... SC2 00... our new high performance amplifier module • 200W into 4Ω 4Ω • 0.001% distortion • a worthy successor to the popular SC480 Last month, we introduced the SC200 Amplifier Module. It’s our replacement for the venerable SC480 and it is better in every respect. It’s a low-cost amplifier module with more power than the SC480, lower distortion, lower noise and it really does make the SC480 look, well, obsolete! This month we’re presenting the construction details. I n the first article, we described the circuit of the SC200 field and components on the PCB. Luckily, we designed the PCB with two slots for a cable audio amplifier, which is basically a cut-down, lowercost version of the Ultra-LD Mk.2/3/4 series of ampli- tie in case we found this to be necessary. So no changes are required to the circuit or board; simfiers. While we’ve stripped it back slightly, the performance is ply mount the inductor as shown in the photos and diastill very good and in fact, it has virtually identical power grams this month, rather than flat as shown in the photos last month. delivery figures. We have also made provision for the SMD resistor which We also provided a parts list in the first article and described the optional clip detection circuitry, which is was previously fitted inside the hole in the middle of the bobbin to be mounted on the underside of the board, so housed on the same PCB. This month, we’ll go through the construction proce- it won’t interfere with the now vertical inductor. More on dure, which is quite straightforward. It basically involves that later. mounting the smaller components on the PCB, drilling the heatsink, then mounting the power devices on the heatsink Heatsink selection The SC200 Amplifier module is built on a double-sidand soldering their leads onto the PCB. Before getting into the construction, there’s one minor ed PCB coded 01108161 and measuring 117 x 84mm. The change in the design since we presented the circuit last seven main power transistors are arranged in a row along month. As with the Ultra-LD Mk.4 (July-September 2015), the top (back) edge and these are mounted on a diecast alafter testing we found that the best performance is obtained uminium heatsink. The power figures given last month (135W into 8Ω, 200W with the main filter inductor, L2, mounted on its side, rather into 4Ω) can be obtained with entirely than horizontally on the PCB, as shown passive cooling (ie, no fans), provided in the photos last month. This reduces By NICHOLAS VINEN there is sufficient ventilation where the the interaction between its magnetic 78  Silicon Chip siliconchip.com.au The inductor mounting shown in this close-up is a modification to that shown in the prototype (left). heatsink(s) are mounted. Having said that, it would be possible to add fan-forced cooling should that be desired, but we won’t go into details here. The heatsink used on our prototype and pictured this month and last month measures 150 x 75 x 46mm (Jaycar HH8555) but we used that one primarily because we already had a partially drilled example in our workshop. We recommend that you use a slightly larger 200 x 75 x 48mm heatsink (Altronics H0536) instead. This will keep the transistors cooler when the amplifier is operating at higher power levels. There’s also a 300mm-wide version of the same heatsink available for only a couple of dollars more (Altronics H0545) and if you have room for it in your chassis, the amplifier will run even cooler. But the following instructions will assume you’re using the 200mm type which was specified in the parts list. Construction Start by fitting the smaller components to the PCB. Use the overlay diagram, Fig.4, as a guide. Note the area in the lower right-hand corner with the dotted outline. The components in this area form the optional clip detection circuitry. If you don’t need that, you may omit all the components within to save time and money. There are five 3W SMD resistors on the board and it’s best to start by soldering them while the PCB will still sit flat on your bench. They are quite large so it’s fairly easy to install them although you will find it even easier if you spread a thin layer of flux paste on each associated pad before you do so. Solder the four 0.1Ω resistors first. There are pads on either side of the board to which the 6.8Ω 3W resistor can be soldered. As mentioned earlier, we suggest you solder it to the pads on the underside so it does not interfere with the mounting of air-cored inductor L2, later. In each case, you can clamp the resistor in place over the appropriate pads and then apply solder at each end if you have suitable tools. Otherwise, the simplest method is to apply solder to one of the pads and then heat it with your iron while you slide the resistor in place and allow the solder to flow onto it. You can hold the resistor with a pair of tweezers while doing this. Once you’ve removed the heat, make sure it can’t move before soldering the opposite end, then add a little fresh solder to the first pad to ensure the joint has formed properly. When finished, it’s a good idea to inspect the joints under good light and magnification to ensure they have formed proper fillets. By the way, we’re using SMD 3W resistors since they are a lot more compact than 5W wirewound resistors and also have much tighter tolerances. And even though it is largely of academic interest as far as the circuit performance is concerned, these SMD resistors are non-inductive. Through-hole components You can now solder the two small through-hole diodes, D1 and D2. Don’t get these mixed up as they may look similar and ensure they have their cathode stripes orientated as shown in Fig.4[a]. If building it with the clip detector, fit diodes D5-D7 now as well. Follow with all the quarter-watt resistors, using a DMM to check the resistance of each batch before installing them, as the coloured bands can be ambiguous. Don’t forget to slip a ferrite bead over one end of the 100Ω resistor near CON1 before soldering it into place. As stated earlier, you can leave out the nine small resistors in the clip detector circuit if you don’t need it. Alternatively, if you are building it with the clip detector, fit zener diodes ZD1 and ZD2 now, with their cathode stripes as shown in the overlay diagram. Then mount the two 1W resistors, followed by the larger diodes D3 and D4, again referring to Fig.4 for the correct orientation. This is most important as they will short out the amplifier output if reversed! Now attach medium power transistors Q8 and Q9 using 6mm M3 machine screws and nuts, having bent their leads at right angles to fit through the mounting holes on the PCB. Don’t get them mixed up; Q8 must be a KSC2690A (NPN) while Q9 is a KSA1220A (PNP). Once their mounting screws have been done up We used the 150mm-wide Jaycar HH8555 heatsink (left) on our prototype but recommend the larger 200mm Altronics H0563 (right) instead. There’s also an even larger (300mm wide) Altronics heatsink available (H0545) if maximum cooling is important. siliconchip.com.au February 2017  79 tightly, solder and trim their leads. You can now fit the LEDs to the board. In each case, the anode (longer) lead goes in the mounting hole closer to the bottom of the board, with the flat side of the lens (cathode) towards the top. You must fit LED1; LEDs2-5 are optional but highly recommended as they indicate the presence of the two power rails and the state of fuses F1 and F2. LED6 can be fitted if you are building the clip detection circuitry, or you can leave it off and use an offboard LED connected via CON4, which you will solder in place later. You may fit PCB pins for TP1-TP7 now. Note that there are two positions marked at TP7; they are connected to the same copper trace and are provided merely for convenience, as it’s necessary to measure between TP7 and TP3-6, the latter of which are spread across the board. If you have alligator clip leads for your DMM, we recommend fitting PC stakes for one of the TP7 points along with either TP4 or TP5 (whichever is closer) but leaving the others as bare pads, since it’s easier to connect to bare pads with standard pointed PCB probes. Trimpots VR1 and VR2 are next on the list. VR1 must be a 1kΩ multi-turn trimpot and it is installed with its screw towards the centre of the board as shown. VR2 may be a mini horizontal trimpot, however, we found it quite fiddly to use this type to zero the output offset voltage so we’ve made provision for a multi-turn trimpot which is a bit more expensive but less sensitive. If using a multi-turn type, mount it with the same orientation as VR1, ie, with the screw towards the bottom of the board. You can now fit the smaller capacitors. There are six MKT capacitors plus three which can be either ceramic or MKT (or in the case of the 150pF type, MKP). Polarity is not important for any of these. Follow with the small signal transistors but don’t get the different types mixed up. You will likely need to crank the leads out slightly to fit the PCB pads (use small pliers). Three of these transistors are for the clip detection circuitry and may be omitted; note that one of these three is a 2N5551 high-voltage NPN type. The other seven (Q1-Q7) must be installed. Now you can solder the four M205 fuse clip holders in place. Make sure each is pushed all the way down on the PCB before soldering and that 80  Silicon Chip Fig.4: two versions of the PCB component layout (the PCB itself is identical). The top (Fig.4[a]) is for those who don’t like SMD components – only five are used and they’re all quite large and easy to solder. The alternative (bottom) layout (Fig.4[b]) uses rather more SMDs – mainly semiconductors and capacitors. See the alternative parts list opposite. the retaining clip is facing towards the outside of the fuse, otherwise you will not be able to install the fuses later. Note that soldering these parts requires quite a bit of heat as they are on large copper pads. Now install the electrolytic capacitors. The orientation is important; in each case, the longer (positive) lead should go into the pad closer to the left side of the PCB. If in doubt, refer to the + symbols shown in Fig.4. Note that the 47F capacitor closest to Q5 must have a voltage rating of at least 35V (shown in the overlay diagram) but the others may be rated at 25V. siliconchip.com.au the panel below and the mounting locations are shown in Fig.4(b). Of course, you may choose to substitute some of these parts but not all, depending on what you have on hand. Most of the parts listed are either direct equivalents to the through-hole versions or have superior performance. They are all mounted in place of the through-hole components, on the top of the board, with two exceptions. One is D3 and D4, which if substituted, are fitted on the underside because there are too many tracks on the top side. And while Q8 and Q9 are not listed in the parts list, nor shown in (Fig.4[b]), it is possible to substitute these with FZT696B (NPN; Q8) and FZT796A (PNP; Q9) which were used in these roles in the Ultra-LD Mk.4 amplifier. We haven’t actually tested it, but there is provision for them on the underside of the PCB (under the through-hole mounting locations) and should work in theory. This completed PCB matches the “through hole” version opposite (Fig.4[a]). In the surface-mount version (Fig.4[b]) the SMD components are in the same positions as the through-hole versions above – but watch the polarity! Now it’s time to fit pluggable terminal blocks CON2 and CON3. Make sure you orientate these so that the wire entry holes are on the outside. The easiest way to do this is to temporarily attach the plugs, place the sockets on the PCB and then remove the plugs before soldering the sockets. Make sure the socket pins are pushed all the way down before soldering them. You can now also fit the input connector. There are three possibilities: either a horizontal RCA socket (CON1), vertical RCA socket (CON6) or polarised pin header to go to an off-board socket (CON5). If you wish, you can fit CON1 along with one of the other two, although you will only be able to use one at any given time. With those in place, fit the 100nF 250V MKP capacitor which goes next to L2. There are a few different mounting holes, to suit capacitors with different pin spacings. Now would also be a good time to mount CON4 for the clip detector circuit, if you are using it with an off-board LED. Alternative SMD components We won’t go into a lot of detail on this topic as most constructors will probably be happy to build the amplifier using mostly through-hole components, as detailed above. siliconchip.com.au But since it was easy, we made provision on the PCB for a number of the components to be substituted with SMD equivalents. This includes small signal transistors Q1-Q7, Q17 and Q18, diodes D1, D2 and D5-D7, zener diodes ZD1 & ZD2, the 1W resistors and the non-electrolytic capacitors. The main reason for using optional SMD equivalents is primarily cost. It probably isn’t worthwhile to go out and buy the optional SMDs for this project but if you already have them, they would have cost you very little. The alternative parts are shown in Alternative SMD parts Semiconductors 3 BC846 transistors (Q3,Q4,Q7) 4 BCM856DS transistors (Q1,Q2,Q5,Q6) 1 blue SMD 3216/1206 LED (LED1) 2 red SMD 3216/1206 LED (LED2,4) 2 green SMD 3216/1206 LED (LED3,5) 1 LL4148 or similar small signal diode (D1) 1 BAV21W-TP schottky diode (D2) 2 VS-3EJH02 hyperfast rectifiers (D3,D4) Winding inductor L2 This is easiest if you make up a winding jig. See the accompanying panel for details on how to do it. You only need a few cheap and easy-to-obtain items (that you may already have), and it will come in handy any time you need to wind a small air-core choke so we recommend that you build one if you haven’t already. The inductor is wound using a ~1m length of 1.25mm diameter enamelled copper wire on a 10mm wide, 13mm inner diameter plastic former bobbin. Fit the bobbin to the jig, or if you don’t have a jig, wind some electrical tape around a bolt or dowel so that it is a firm fit through the centre of the Resistors 1 470Ω 1W 5% SMD 6332/2512 1 100Ω 1W 5% SMD 6332/2512 Capacitors 1 47µF X5R 6.3V SMD ceramic 3216/1206 2 220nF X7R 50V SMD ceramic 3216/1206 or 2012/0805 1 100nF 250V C0G SMD ceramic 5652/2220 or 4532/1812 4 100nF X7R 100V SMD ceramic 3216/1206 or 2012/0805 2 1nF C0G 100V SMD ceramic 3216/1206 or 2012/0805 1 150pF C0G 250V SMD ceramic 3216/1206 or 2012/0805 February 2017  81 Making A Winding Jig For The 2.2μ 2.2μH Inductor  START  Wind wire on bobbin clockwise  The winding jig consists of an M5 x 70mm bolt, two M5 nuts, an M5 flat washer, a piece of scrap PCB material (approximately 40 x 50mm) and a scrap piece of timber (approximately 140 x 45 x 20mm) for the handle. In use, the flat washer goes against the head of the bolt, after which a collar is fitted over the bolt to take the bobbin. This collar should have bobbin, to prevent the plastic breaking while winding on the copper wire. For a neat result, the wire can first be straightened by securing one end in a vice and pulling hard on the other end with a large pair of pliers. This requires a fair bit of strength so be careful in case the pliers or vice let go. Make a right-angle bend in the wire 25mm from one end, then insert this end through one of the slots in the bobbin and wind on seven closepacked turns, which should fill the 82  Silicon Chip These photos show how the winding jig is used to make the 2.2m mH inductor. First, the bobbin is slipped over the collar on the bolt (1), then an end cheek is attached and the wire threaded through the exit slot (2). The handle is then attached and the coil tightly wound onto the bobbin using 13.5 turns of 1.25mm-diameter enamelled copper wire (3). The finished coil (4) is secured using one or two bands of heatshrink tubing around the outside. a width that’s slightly less than the width (height) of the bobbin and can be wound on using insulation tape. Wind on sufficient tape so that the bobbin fits snugly over this collar without being too tight. Next, drill a 5mm hole through the centre of the scrap PCB material, followed by a 1.5mm exit hole about 8mm away that will align with one of width of the bobbin. In case the winding direction affects performance, we recommend that you wind in the same direction as we did, as shown in the photo. Once that layer is complete, wind another 6.5 turns on top, again close packed and in the same direction, then bend the wire through the opposite slot it started through and cut it off 25mm from the bobbin. To holding the windings in place, cut a 10mm length of 20mm diameter  the slots in the bobbin. The bobbin can be slipped over the collar, after which the scrap PCB “end cheek” is slipped over the bolt (ie, the bobbin is sandwiched into position between the washer and the scrap PCB). Align the bobbin so that one of its slots lines up with the exit hole in the end cheek, then install the first nut and secure it tightly. The handle can then be fitted by drilling a 5mm hole through one end, then slipping it over the bolt and installing the second nut. heatshrink tubing and slip it over the bobbin, then shrink it down gently using a hot air gun on a low setting. Trim the two protruding wires to exactly 20mm from the base of the bobbin then strip 5mm of the enamel from each end using either emery paper or a hobby knife/scalpel and tin the leads. To get the specified performance, you must mount the inductor as shown in Fig.4 and in the photos. Two slots are provided for a cable tie to hold it in place. Bend its leads to fit through the siliconchip.com.au Drilling & Tapping The Aluminium Heatsink CL (SCALE 50%) 50.75 50.75 30.5 A 30.5 A A A A 75 A 42 A 30 25 10.25 10.25 100 200 HOLES A: DRILL 3mm DIAMETER OR DRILL 2.5mm DIAMETER & TAP FOR M3 SCREW. DEBURR ALL HOLES. Fig.5: this half-size diagram shows the heatsink drilling details. The holes can either be drilled and tapped (using an M3 tap) or can be drilled to 3mm and the transistors mounted using machine screws, nuts & washers. Fig.5 above shows the heatsink drilling details. If tapping the holes, they should be drilled to 2.5mm diameter right through the heatsink plate and then tapped to 3mm. Alternatively, the holes can be drilled through using a 3mm drill and the transistors mounted using screws, nuts and washers. It’s somewhat more work to tap the holes but it makes mounting the transistors quite a bit easier (no nuts required) and gives a neater appearance. Before drilling the heatsink, you will have to carefully mark out the hole locations using a very sharp pencil. Then use a small hand-drill fitted with a 1mm bit to start the location of each hole. This is important as it will allow you to accurately position the holes (the locations are critical) before stepping up to larger drills in a drill press. Be sure to use a drill press to drill the holes (there’s no way you’ll get the holes perfectly perpendicular to the mounting face without one). Use a small pilot drill to begin with (eg, 1.5mm), then carefully step up the drill size to either 2.5mm or 3mm. The holes have to go between the fins so it’s vital to accurately position them. In addition, you can drill (and tap) three holes in the base of the heatsink so that it can later be bolted to a chassis. Be sure to use a suitable lubricant MAIN PLATE OF HEATSINK MAIN PLATE OF HEATSINK SILICONE INSULATING WASHER (HEATSINK FINS) SILICONE INSULATING WASHER M3 FLAT WASHER M3 FLAT WASHER M3 x 10mm SCREW M3 x 10mm SCREW M3 TAPPED HOLE KSC2690A OR KSA1220A TRANSISTOR (TO-126) AMPLIFIER PCB M3 TAPPED HOLE FJA4313 OR FJA4213 TRANSISTOR (TO-3P) A AMPLIFIER PCB B Fig.6: here’s how the driver (left) and power (right) transistor are secured to the heatsink. Ensure there is no short between the collectors and heatsink. siliconchip.com.au when drilling the holes. Kerosene is the recommended lubricant for aluminium but we found that light machine oil (eg, Singer or 3-in-1) also works well for jobs like this. Don’t try drilling the holes in one go. When drilling aluminium, it’s important to regularly remove the bit from the hole and clear away the metal swarf. If you don’t do this, the aluminium swarf has a nasty habit of jamming the drill bit and breaking it. Re-lubricate the hole and the bit with oil each time before you resume drilling. Tapping To tap the holes, you will need an M3 intermediate (or starting) tap (not a finishing tap). The trick here is to take it nice and slowly. Keep the lubricant up and regularly wind the tap out to clear the metal swarf from the hole. Re-lubricate the tap each time before resuming. Do not at any stage apply undue force to the tap. It’s easy to break a tap in half if you are heavy-handed and if the break occurs at or below the heatsink’s face, you can scratch both the tap and the heatsink (and about $25). Similarly, if you encounter any resistance when undoing the tap from the heatsink, gently rotate it back and forth and let it cut its way back out. In short, don’t force it. Having completed the tapping, deburr all holes using an oversize drill to remove any metal swarf from the mounting surface. The mounting surface must be perfectly smooth to prevent punch-through of the transistor insulating washers. Finally, the heatsink should be thoroughly scrubbed cleaned using water and detergent and allowed to dry. Fig.6 (left) shows the mounting of the amplifier to the heatsink once all the above drilling and tapping is completed. Note differences between the driver (left) and power (right) transistors. It is imperative that silicone insulating washers are used to isolate the transistors from the heatsinks; you can easily check this with your multimeter on a high “Ohms” range between the collectors and heatsink. ANY reading will mean there is a problem – sort it out before continuing or the transistor life can be measured in milliseconds when you apply power. February 2017  83 KEEP YOUR COPIES OF SILICON CHIP AS GOOD AS THE DAY THEY WERE PRINTED! 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 Available in Aust only ORDER NOW AT www.siliconchip.com.au/shop appropriate pad, then fit and tighten the cable tie before soldering and trimming the leads. Note the way we’ve orientated it; each wire from the PCB runs up and over the top of the bobbin. Drilling & tapping the heatsink The mounting locations for the power devices on the heatsink are the same as for the Ultra-LD Mk.3 and Mk.4 amplifiers; while the actual output devices have changed, and the driver transistors are in the slightly smaller TO-126 package (rather than TO-220), the output configuration is essentially the same so we decided not to make any changes in this area. See the accompanying panel on drilling and tapping the heatsink, which incorporates a drilling diagram. As explained in that panel, you have the option of either tapping the seven holes, which is the neatest solution, or offsetting the holes by around 5mm in either direction (left or right, to clear the heatsink fins) and then drilling them all right through the heatsink. You can then attach the power devices using longer (~15mm) machine screws fed between through the fins. This is the approach we took for the prototype as it’s a lot less work, however, you do have to be very accurate in drilling the holes, both in terms of the initial position and in making sure that they are drilled at right angles to the heatsink face. If any of the holes are off by more than about half a millimetre, you will find it between tricky and impossible to fit the nuts to the screw shafts. If you decide to tap the holes instead, while this is more work and requires some patience, the exact hole positions are no longer quite so critical. 84  Silicon Chip After you have drilled and possibly tapped the transistor mounting holes, you will also want to do something about mounting it in the chassis. Our preferred method is to drill and tap three additional holes along the bottom of the heatsink to hold it in place. However, it’s also possible to fit right-angle brackets to the fins at either end of the heatsink by drilling right through them and using screws and nuts to hold them in place. Once all holes have been drilled, deburr them using an over-sized drill bit and clean off any aluminium particles or swarf. Check that the areas around the holes are perfectly smooth to avoid the possibility of puncturing any of the insulating washers. Final assembly Now it’s time to mate the PCB with the main heatsink but first, re-check the face of the heatsink. All holes must be deburred and it must be perfectly clean and free of any grit or metal swarf. Start the heatsink assembly by mounting transistors Q10, Q11 & Q12 (see Fig.6). A silicone rubber washer goes between each of these transistors and the heatsink. If you can’t get TO126/TO-225 insulating washers, you can carefully cut down some TO-220 washers to fit the devices. Make sure they’re small enough to fit side-byside on the heatsink but not so small that you risk any contact between the metal pad on the rear of each device and the face of the heatsink. If the holes are tapped, these three transistors can be secured using M3 x 10mm machine screws. Alternatively, if you have drilled non-tapped holes, use M3 x 15mm or 20mm machine screws, with the screws coming through from the heatsink side (ie, the screw heads go between the heatsink fins). Make sure the three transistors and their insulators are properly vertical, then do the screws all the way up but don’t tighten them yet; ie, you should still just be able to rotate the transistors. The next step is to fit an M3 x 9mm (or 10mm) tapped spacer to each of the four mounting holes on the PCB. Secure these using M3 x 6mm machine screws. Once they’re on, sit the board down on the spacers and lower the heatsink so that the transistor leads pass through the appropriate holes. The four output transistors (Q13- Q16) can now be fitted. Two different types are used so be careful not to mix them up (check the layout diagram). As shown in Fig.6(b), these devices must also be insulated from the heatsink using silicone insulating washers. Start by fitting Q13. The procedure here is to first push its leads into the PCB mounting holes, then lean the device back and partially feed through its mounting screw with a flat washer. Hang the insulating washer off the end of the screw and then loosely screw the assembly to the heatsink. The remaining three devices are then installed in exactly the same way but take care to fit the correct transistor type at each location. Once they’re in, push the board down so that all four spacers (and the heatsink) are in contact with the benchtop. This automatically adjusts the transistor lead lengths and ensures that the bottom of the board sits 9-10mm above the bottom edge of the heatsink. Now adjust the PCB assembly horizontally so that the transistor leads are as vertical as possible. If you have tapped the holes, and assuming you’re using the specified 200mm-wide heatsink, this will be when each side of the PCB is 41.5mm in from its adjacent heatsink end. Once you are sure it is properly positioned, tighten all the transistor screws just enough so that they are held in place while keeping the insulating washers correctly aligned. The next step is to lightly solder the outside leads of Q13 & Q16 to their pads on the top of the board. The assembly is then turned upside down so that the heatsink transistor leads can be soldered. Before soldering the leads, though, it’s important to prop the front edge of the board up so that the PCB is at right-angles to the heatsink. If you don’t do this, it will sag under its own weight and will remain in this condition after the leads have been soldered. A couple of cardboard cylinders cut to 63mm can be used as supports (eg, one at each corner). With these in place, check that the board is correctly centred on the heatsink, then solder all 21 leads. Make sure the joints are good since some can carry many amps at full power. Once the soldering is completed, trim the leads and remove the two supports near the heatsink, as these are no longer required; the transistors siliconchip.com.au should be mounted to the chassis via the heatsink only, otherwise, thermal cycling could crack their solder joints. Now turn the board right way up again and tighten the transistor mounting screws to ensure good thermal coupling between the devices and the heatsink. Don’t over-tighten the mounting screws, though. Remember that the heatsink is made from aluminium, so you could strip the threads if you are too ham-fisted. (collector) lead and the heatsink. In either case, you should get an open-circuit reading. If you do find a short, undo each transistor mounting screw in turn until the short disappears. It’s then simply a matter of locating the cause of the problem and remounting the offending transistor. Be sure to replace the insulating washer if it has been damaged in any way (eg, punched through). Checking device isolation The power supply requirements for this module are the same as the UltraLD Mk.2, Mk.3 and Mk.4 amplifiers, with optimal supply rails of ±55-60V, nominally ±57V, from a 40-0-40 transformer. This power supply was last described in the October 2015 issue although we will present the details again next month for those who may have missed it. A single 300VA transformer is sufficient to power a stereo amplifier for amplifying normal program material, although it will not allow continuous full power output from both channels simultaneously. For that, you would need either one transformer rated for at least 500VA, or a separate 300VA transformer and power supply per channel. For lower power applications, a 160VA 45-0-45 transformer is availa- You must now check that the transistors are all electrically isolated from the heatsink. That’s done by switching your multimeter to a high ohms range and checking for shorts between the heatsink mounting surface and the collectors of the heatsink transistors (note: the collector of each device is connected to its metal face or tab). For transistors Q11-16, it’s simply a matter of checking between each of the fuse clips closest to the heatsink and the heatsink itself (ie, on each side of the amplifier). That’s because the device collectors in each half of the output stage are connected together and run to their respective fuses. Transistor Q10 (the VBE multiplier) is different. In this case, you have to check for shorts between its centre Power supply ble (Altronics M5345A). We wouldn’t recommend using this for stereo applications, but it would be suitable for a single channel amplifier if continuous full power delivery is not required. If you don’t need the full 135W/200W rating, there’s also the possibility of using a smaller transformer with lower voltage secondaries, for example, a 160VA 30-0-30 transformer (eg, Altronics M5330A). Some components would need to be changed; we’ll have more details on that next month. Note that a complete amplifier also requires a speaker protection module. This is important since a fault in the amplifier PCB can easily destroy your speaker(s) and even set them on fire! We published a suitable design in the October 2011 issue and there is an Altronics kit, cat K5167. This module will protect one or two speakers, so a stereo amplifier only requires one to be built. Next month Well, that’s a lot to devour in one month – but at least we’ve given you all the construction details so if you want to get stuck into construction, you can do so! Next month, we will provide full performance graphs, including frequency response, THD vs power and THD vs frequency. We will also describe the construction of a suitable power supply (see below) and will go through the set-up and testing procedure. In addition, we will describe how to modify the module to run off a lower power supply voltage for lower power application. SC The SC200 requires a nominal ±57VDC supply rail. This power supply, in conjunction with a 40-0-40VAC transformer, is ideal for the task. We’ll describe its construction next month when we conclude the SC200 Amplifier series. siliconchip.com.au February 2017  85 New Battery-Powered Soldering Iron by Ross Tester In last month’s “Product Showcase” we featured a new batterypowered soldering iron from Aussie Rechargeable Irons and Master Instruments. We thought the product had much more to it than a few paragraphs in Showcase could reveal . . . and we were right! M ost of us – from hobbyists through to design engineers and developers – have battled with portable soldering irons over the years. And battled is arguably the right word. While the developers of this new iron claim it is the first rechargeable cordless soldering iron on the market, it isn’t: I (like many others) suffered with one perhaps 20 or 30 years ago. In fact, I’m pretty sure it’s still floating around the bottom of the junk box, its “AA” nicad battery (yep, just one) having long since given up the ghost and due to the iron’s overall shortcomings, was not worth replacing! I’d hazard a guess to say that the vast majority of those battery-powered irons have ended up the same way. While they appeared to be a really good idea for those times when mains power was unavailable, most of the battery-powered irons in the past have been little more than toys – grossly underpowered and with a very short battery life. So much so, that many people who need remote soldering capabilities have switched over to gas-powered irons (butane in the main). But these are also not without their drawbacks. One is that on a gas iron, temperature regulation can be difficult, if not impossible, to set and maintain. Most of the time, you risk component damage because they run too hot. But possibly the most important one has been the high flammability of the gas used. Butane gas is heavier-than-air so any leakage, from either iron or gas container, would tend to set86  Silicon Chip tle in the bottom of the tool box, just waiting for a spark . . . And I don’t know about you, but every gas-powered iron I’ve ever owned (and there have been quite a few over the years!) appeared to have less-than-perfect valves. They were always empty when you came to use them (usually after some idle period) and required refilling from, you guessed it, a gas container . . . which was also empty! Not only that, but when in use they often blow out if it’s at all windy. So it hasn’t been a happy choice for many people. Of course, some will say they love their gas or battery-powered irons – and if so, congratulations. Enter the ARI lithium-ion iron This new battery-powered iron from Aussie Rechargeable Irons (ARI) should be an order of magnitude (or more) better than what you are currently using. The ARI iron is unashamedly aimed at the professional market – everything about it suggests “heavy duty” including its size – at just on 250mm long (including tip) and 45mm diameter, it’s certainly no lightweight. But strangely enough, despite its 370g weight, it sits very nicely in the hand, wellbalanced for long periods of use. New kid on the block We first came across Aussie Rechargeable Irons at last siliconchip.com.au year’s Electronex show in Sydney. We weren’t the only ones impressed by their product – and their tenacity – as Master Instruments (also an exhibitor at the show) were to leave Electronex with an agreement to become ARI’s exclusive distributor. How this came about is an interesting story in itself: Master Instruments imports a range of rechargeable batteries and they approached Aussie Rechargeable Irons to see if they could become their supplier. At the time, ARI was importing their own pre-made battery packs but limited volumes meant they couldn’t achieve the economies of scale that Master Instruments enjoyed. You don’t have to be Einstein to figure out where this was heading! After some horse-trading (they call it negotiations), both parties saw the sense in Master Instruments’ much wider distribution network, along with their volume importing discounts, to take on the ARI Iron. Until that time, ARI had achieved sales of 300-400 per month, most of which were from word-of-mouth referrals from happy users. Unfortunately, this didn’t allow ARI to invest in a sales and marketing campaign. But Master Instruments could piggy-back the rechargeable iron onto their existing, and successful, marketing efforts. So while it wasn’t a new birth, it was a rebirth. About the Iron Aussie Rechargeable Irons, import the battery, switch and tip. Otherwise it is an Australian-made product, manufactured in Sydney. The rugged 6061-grade aluminium body has a two-year warranty. The body also has a tough, durable powder-coating in fluoro colours (for safety) and has a number of raised “dimples” to prevent it rolling around. From flat, its lithium-ion battery can be charged in 2-3 hours. It’s hard to give an “on” time because of the very intermittent nature of soldering. ARI give a guide time of about a month for general use and perhaps a week or so for heavyduty use. Suffice to say battery life is “more than adequate”, unless you’re the type who likes to have the iron heating permanently. In fact, you really can’t do that with the Aussie Rechargeable Iron because it has a push-to-heat switch conveniently set into the body – and from cold, you’re ready to solder in well under 10 seconds (obviously, depending on the tip in use). It can be as low as four seconds! The nonlock-on switch is actually a safety feature – you simply cannot leave the iron turned on, gradually destroying tips like a mains-powered iron does. Speaking of tips, there are 22 available – and they’re very easy to swap. The largest tips are capable of soldering a ten gauge wire; the smallest fine enough for the most delicate solder jobs. The tips contain a specially coated copper core for long tip life. The battery The battery is the most important advance in this iron. It’s a high-quality lithium-ion type, rated at 11.1V, 2.5Ah. Panasonic cells are used for longest life and longest time between charges. ARI claim a one-month-between-charge period – something we couldn’t verify in the time available but it doesn’t sound unreasonable. The iron can be left plugged in indefinitely to its (supplied) 17V/1A plug pack 230VAC charger. This switch-mode supply plugs into a socket on the end of the iron. The internal siliconchip.com.au Who are Aussie Rechargeable Irons? Terry Hewitt, an automotive electrician for nearly 40 years, was frustrated with the various soldering irons and guns available, so he set out to invent his own. One of his goals was to not only have battery power but have it heat up within 5 seconds from when he pressed the button. While Terry’s early prototypes worked, they didn’t meet the 5s goal. That’s where his friend Brett Hoy joined in. Brett has been a motor mechanic almost as long and also recognised the failures of currently available gear. Being something of an inventor, the two men put their heads together and came up with the Aussie Rechargeable Iron. They switched the power source to lithium ion packs, which store a great deal more energy than do nickel cadmium or nickel-metal-hydride cells. The switch to lithium-ion achieved their 5s objective and enabled the iron to be used for weeks without recharging. Terry and Brett have been using their Aussie Rechargeable Irons for some time now, ironing out any bugs as they went. And now Aussie Rechargeable Irons have started producing these irons in Australia, they’re ready to demonstrate just how efficient, effective and productive they can be. automatic charging circuit not only regulates charging and over-heating but will disconnect the charger when the iron is fully charged. So you can be assured that the iron is always ready for work . . . just in case you forget! The cells in the battery are protected (with PCM – a Protection Circuit Module), so you don’t need to worry about unequal charge/discharge. Batteries carry a 12 month warranty, while the tips are warranted for 90 days. The body has a 2-year warranty. Like any rechargeable battery, the cells will deteriorate over time. How long? A very long time, according to ARI. (They also advise against leaving them in discharged state, again to prolong battery life). But even when they do eventually run out of puff, ARI have a cell-replacement service available. You don’t have to buy a new iron – but by that stage you may well want another! Three models Along with the model we looked at (the ARI200Y, which we believe will be far and away the most popular), ARI also have a slightly larger, more powerful model, the ARI250G; and a smaller imported iron, the ARP160R, suited to very fine work. Recommended retail prices range from $189.95 for the ARP160R to $319.95 for the ARI200Y and $349.95 for the ARI250G – all prices plus GST. The ARI200Y as supplied for review came with a soft carry case, a 4mm (4D) tip and plug-pack charger. A range of accessories is currently being added, including a 12V car charger, wall or van-mounting carry tube and other cases. Organisations can also have their company colours supplied or their own logos laser-etched onto the case at extra cost. Aussie Rechargeable Irons are distributed by Master Instruments (www.master-instruments.com.au) and should be available now through better electronics/electrical wholesalers and retailers, battery suppliers, hardware stores and the like. There is also a demo youtube video accessible via www. aussieirons.com.au SC February 2017  87 Vintage Radio By Associate Professor Graham Parslow Hotpoint 1954 4-Valve Model P64MEX The Hotpoint Model P64MEX is a 4-valve superhet receiver from 1954 which featured a 6BV7 multi-function valve. Because of this valve the set was claimed to have “super sensitivity and improved performance under all conditions”. T his Hotpoint was ostensibly a 4-valve superhet receiver but it used a 6BV7 multi-function valve which would have allowed the manufacturers to claim that it was a “5-valve function” set. Instead, they claimed “super sensitivity and improved performance under all conditions”. But was that claim really justified? The following text comes from an advertisement in the Australian Women’s Weekly, October 1953: “Close to a station or far distant, even in so-called weak signal areas the new Hotpoint P6 comes into its own. With the amazing 6BV7 valve this Hotpoint receiver gives super sensitivity and improved performance under all 88  Silicon Chip conditions – not only for distant stations but also in city dead spots where tall buildings stand in the way. Choose the new Hotpoint P6 for greater clarity and purity of tone everywhere. Tops in tone the new Hotpoint P6 is tops in looks too. The lustrous moulded cabinet has a striking dual colour scheme in a variety of combinations. Although the cabinet is average size, the dial is exceptionally large and easy to read. Fitted with a continuously variable tone control – you pick the tone you want – and completely new AVC circuit, the new model P6 is a super addition to the complete line of outstanding Hotpoint Radio Receivers.” That an advertisement for such a “state-of-the art” product (at the time) would appear in Australia’s largest circulation women’s magazine seems most unusual more than six decades later. The general public at the time would have been familiar with valves as the major components in wireless sets, as they were then known, and they would also understand the concept of sensitivity, as being important for long distance reception. But does the radio match the copywriter’s hyperbole? Certainly, in an urban high strength signal region, the Hotpoint radio featured here sounds as good as other comparable valve radios. All local stations give good performance using only the internal ferrite rod aerial. However, there is no RF amplifying stage for extra sensitivity and the 6BV7 has no role to play in generating “amazing” performance. In fact, the 6BV7 is precisely described as a “double diode, output pentode” and would provide the functions of AM detection, AVC (automatic volume control or automatic gain control) and the single-ended audio amplifier. Circuit configuration A glance at the circuit diagram shows a superheterodyne that is remarkable for its use of only four valves and relatively few other components. The impression of a low component count is reinforced when you look under the chassis and that also means that it is easy to service this radio. Note that it could have been done even more economically, as Ian Batty described for the Astor DLP two valve receiver, in the October 2016 issue of Silicon Chip. The chassis is clearly marked with “model P64MEX”. The P6 prefix, as seen in the advertisement, designates the moulded case. What follows P6 in the model type is often not useful in tracking down a particular radio in siliconchip.com.au published circuits, particularly the annual Australian Official Radio Service manuals (AORSM). In the case of Hotpoint, it can also be useful to check AWA circuits since these radios came off the same production line. However, this is usually more than simple “badge engineering”. Incidentally, Hotpoint is a brand proprietary to Australian General Electric (AGE). This radio is a P64MEX and the circuit of the P64MEC appears in the 1954 AORSM compilation. That set was a clock radio so I assumed that the C suffix represented clock but other Hotpoint clock radios do not have a C suffix, so this was not a systematic naming convention. The P64MEC circuit did have the same valve line-up as the set featured here but it had no ferrite rod antenna and no tone circuit. The circuit diagram shown in Fig.1 was cobbled together from other Hotpoint circuits and then modified after tracing out to see how the radio was wired but it should not be regarded as definitive. Not all radio circuits had the valves drawn with functional depictions of the internal valve connections. That made life easier for the draftsman but more challenging to users. The valve pinout diagram of Fig.2 has been included here to show the internal structure of the valves; H stands for heater, f for filament, G is a grid, K is a cathode, P is the plate (anode) and D is for diode. From 1952 onwards, reliable supplies of new generation miniature valves were allowing manufacturers to produce radios like this one, with all miniature valves. The original valves for this radio would have been made in Australia by Amalgamated Wireless Valves (AWV), a subsidiary of AWA. Looking at the circuit of Fig.1, the first valve is a 6BE6 mixer-oscillator. It was referred to as a converter by Hotpoint, and it mixes the incoming signal from the antenna with its local oscillator to generate the IF signal of 455kHz. The ferrite rod allowed the design to move away from previously needed aerial coils that coupled the antenna signal to the first tuned circuit. The control grid of the 6BE6 also receives a variable negative bias signal from one of the diodes in the 6BV7 to generate the AVC (automatic volume siliconchip.com.au Reproduced from the October 14, 1953 issue of the Australian Women’s Weekly, this advertisement for the Hotpoint radio trumpeted its outstanding performance due to the inclusion of the “amazing 6BV7 valve”. Actually, the performance was more the result of the designer’s careful work. control), depending on signal strength. The second valve, a 6AU6, is a pentode IF amplifier driving the second IF transformer, L7 and its output goes direct to the first diode pin (D1) on the 6BV7. Both the 6BE6 and 6AU6 were developed by RCA America, a partner company to AWA and were common choices for the RF sections of radios. Both of these RF valves were registered at the end of 1945 so they were conservative choices in the 1950s. Arguably more radical is the “amazing” 6BV7 which was an Australian design registered by AWV in August 1951. As already noted, it houses two diodes for recovering the audio signal and for generating the AGC voltage. The high-gain pentode section is capable of an audio output up to 4W; see the data in Fig.2. Note the figure for harmonic distortion! So the 6BV7 eliminated the need for a separate valve that packaged diodes with an audio preamplifier, eg, 6N8 or 6AV6. However, the 6BV7 is rarely seen in radios other than those made by AWA or its subsidiaries. Did they have first “dibs”? Chassis layout & case With only four valves, a simple linear arrangement of components is easily February 2017  89 An AWA Radiola M67A set at left and next to it a Hotpoint clock radio. The case used in these sets is from the same mould as the Hotpoint P64MEX. accommodated. The original radio had a five-inch Rola speaker but a modern speaker had been substituted in this one by a previous owner. The introduction of thermo-mouldable plastics in the 1950s allowed complex shapes to be achieved using relatively cheap feed-stock and inexpensive moulds. By contrast, the thermo-setting Bakelite was far more expensive in every way, including the time required to form a case. Bakelite was also easily shattered. An advertisement for the P6 series appeared in the 1952 AORSM circuits extolling the virtues of the plastic case. “It comes in lustrous brown, burgundy, grey or ivory shatter-proof plastic. Customers can choose between a cream or red fret.” The shatter-proof claim is dubious because when I acquired it, the radio had the right front section broken away. Nor did the advertisements make any mention of the need to be cautious to avoid damage by heat. My radio had a section at the top deformed by being too close to a heat source. As Confucius rightly observed, a journey of a thousand leagues begins with a single step. This radio was my first step to becoming a collector. It was Fig.1: the 4-valve circuit is fairly unremarkable except for the ferrite rod antenna and its inclusion of the 6BV7 double-diode output pentode which was introduced in 1952. 90  Silicon Chip siliconchip.com.au At left, the front view with the chassis out of the case shows the relatively simple stringing of the dial pointer. At right, the rear view of the chassis, the 6BV7 valve is the second valve from the right. purchased in 1993 at a country market for $10. I used some masking tape to moderate the appearance of the hole in the case but otherwise it remained on a shelf for 23 years. My long-term intention was to restore the case by adding car filler to the hole and moulding it to shape. In the meantime, many other radios distracted me. By chance I was able to purchase a recycled case from an AWA variant of the radio. The replacement could be identified as from AWA due to a Radiola badge. The case consists of separate front and rear halves that slot into each other. The halves are held together by mounting brackets retained by screws at the rear. An accompanying photo shows a burgundy AWA Radiola 467MA from my collection that is included here to illustrate how AWA used the same outer case with the addition of a Radiola badge. The cases come from the same mould because both AWA and Hotpoint cases are stamped internally as AWA 28103 – AGE 28105. The AWA fret is a different moulding that is glued into the front of the case. The AWA dial glass is similar, but Fig.2: this diagram shows the pinouts of the four valves used in the Hotpoint circuit plus brief specifications for the 6BV7. Note the rated harmonic distortion at maximum signal. siliconchip.com.au distinguishable from the Hotpoint by different colours of the lettering. Restoration Radiola is proprietary to AWA and RCA, so it is inappropriate on a Hotpoint radio. I removed the badge, which was retained by tags pushed into three holes in the case. The badgeholes were drilled after the case was moulded and they can be seen in the leading image for this article. One feature of this radio is the cursive-script logo of AGE at the two sides of the dial, back lit by the two dial globes. The original logo was printed on plain paper and each small square of paper fits into a recess at the back of the fret. As purchased, the AGE logos in the fret had faded, so a new logo was created with photo editing software and printed as a replacement. Hotpoint also had an alternative fret for the case for the clock radio series. The Hotpoint clock radio, shown on the previous page, from my collection and has a five-valve line-up, quite different to the P64MEX. It has no tone control, so as to simplify the knob layout. The rear half of the case comes in two variants, with and without a hole to mount a mains 3-pin socket. The original Hotpoint case of the radio featured here had no installed socket but did have the socket mounting hole. The transplanted AWA case on the radio is the variant without the socket hole. In the early 1950s, there were generally few power sockets in houses and a common solution was a proliferation of double adaptors. An extra socket at February 2017  91 On the left is the rear of the replacement case for the Hotpoint P64MEX (which was taken from an old AWA radio), while to its right is the alternative rear case which had clearance to mount a 3-pin mains power socket. This was quite popular as double adaptors were becoming increasingly common, letting people connect a reading lamp at the same time. the back of a radio was a selling point and meant that a reading lamp could be run from the radio. Apart from work on the case, relatively little needed to be done to the chassis. The electrolytic capacitors were changed and all the “moulded mud” encapsulated paper capacitors were also eventually replaced, along with some of the carbon composition resistors. The cotton-covered 3-core mains cord also had to be replaced and correctly anchored – not easily done, given the way the case clamps together in two halves. After warm-up, this radio draws only a modest 30W at 240VAC and generated 205V DC at the first filter electrolytic and 187V at the second HT filter electrolytic. These are conservative HT voltages for this valve line-up. The IF cores needed a slight tweak to give correct alignment. If you would like to have a valve radio as an item of functional nostalgia then an AWA or Hotpoint radio of the early 1950s is a reasonable buy. They are not in the highly collectable category and they are relatively common due to the market dominance by AWA. Should you acquire a radio in one of these cases, you may find four or five valves, with or without a ferrite rod aerial inside. SC Compared to the Pye 1951 5-valve Model APJ-Modified from last month’s Vintage Radio, the underside of the P64MEX’s chassis is much cleaner due to the lower component count, making servicing of this radio much easier. 92  Silicon Chip siliconchip.com.au Icom VE-PG3 RoIP Gateway: Expand your two-way radio network across town . . . or across the world Whether you use professional “land mobile” two-way radio equipment, or your operation is based on low-cost UHF CB handhelds, you can significantly expand your network, using the internet, to cover as much of the planet as you want to! by Ross Tester I n December 2014 we brought you the details of the (then) new Icom “IP” two-way radios – radios designed to operate in conjunction with your local-area network and the Internet to dramatically lower your communications costs – at the same time offering significant coms advantages. Icom have now asked us to have a look at their VE-PG3 Radio-over-IP (RoIP) Gateway, designed to further enhance the communications coverage of a radio network. It has two operational modes: one is used to interconnect two or more RoIP networks, allowing a radio user to communicate to other radio group users over that or those networks. The second mode allows interconnection between radio systems and the public telephone network and/or external devices such as public address systems. We’ll look at both these modes shortly. Physically The VE-PG3 is not too dissimilar to a modem in appearance, with a row of indicators on the front and an array of connectors on the rear. Indeed, some of the labelling is somewhat like a modem and the rear panel has sockets for WANs (wide-area networks) and LANs (local-area networks) plus phone and line sockets. But there the similarity ends! The VE-PG3 uses the SIP (Session Initiation Protocol) to communicate, via the ‘net, with similarly-setup equipment “elsewhere”. As you would no doubt realise from your own use The VE-PG3 doesn’t look too dissimilar to a modem – of course, many of its functions are much the same or similar. Essentially, it’s a Radio over IP (RoIP) and Session Initiation Protocol (SIP) box rolled into one . . . with a few extra wrinkles of its own! siliconchip.com.au February 2017  93 of the ‘net, that “elsewhere” could be in a building next door, or at a plant a few kilometres away . . . or even many thousands of kilometres away on the other side of the world. As long as there is an internet connection available, “two-way radio” communication is available. But even more than that, using the capabilities of the VE-PG3, you’re not limited to one-on-one (or radioto-radio) communication. Some twoways use various schemes to control who can talk to whom – an individual, a certain group, or even everyone within range. The VE-PG3 RoIP gateway puts this control on steroids – and radio range simply becomes a non-issue! Want a “conference call” with group members spread around the state, country or even the world? No problem. Want to call certain people without the possibility of anyone else eavesdropping? No problem. Want some information disseminated to everyone in the organisation? No problem. Want to interrupt a conversation or conversations with emergency information? No problem. Need password protection? No problem. Want to call a phone from an analog radio? No problem – (as long as it has a DTMF keypad and encoder/decoder capability). If you think about this for a moment, you can imagine just how valuable this would be to business, to emergency services, to education facilities, to government departments . . . in fact, there is no end to the possible users of Radio-over-IP. Over the years, for example, we’ve heard many reports about the incompatibility of radio communication equipment between emergency services. It’s one area where coroners have been quite critical when needless deaths have occurred due to this incompatibility. But that could all be a thing of the past with RoIP. It simply doesn’t matter that twoway radios belonging to different services are on different frequencies. Or use different communication protocols. Or even different channels. In its simplest mode, the VE-PG3 links a radio or group of radios over the internet (or more correctly, an IP network) allowing each to talk to each other as if they were in the same radio coverage area. 94  Silicon Chip RoIP can make them all appear to be the same. Back to SIP Before we get back to the VE-PG3, a quick word about SIP, because it may be a protocol you haven’t come across. But the chances are you use it every day without knowing! That’s because SIP is also used in voice-over-IP The radios don’t even need to be the same – not even the same type or even in the same band. Again, each can talk to each, or if required, talk to a group or even every handheld (eg, emergency calls). siliconchip.com.au The rear panel of the VE-PG3 gives an inkling to its versatility. From the left, sockets for either transceivers or external signal sources; phone and two external lines; network (WAN and LAN) sockets; DC supply and an earth terminal. (VoIP), which is becoming more and more the method by which standard telephone calls are made. Users (by and large) are completely unaware of this – as long as the call gets through, what does it matter? Now SIP has made the progression to Radio-over-IP. In a nutshell, it has the same purpose as in VoIP – to negotiate, set up and tear down sessions. It doesn’t even control the communication itself – that is carried out by other protocols. The VE-PG3 contains both the SIP controller along with the RoIP controller, making advanced interconnection not only possible but relatively simple! and up to four remote comunicator stations. Two modes Price: Most of what we have talked about above was possible with the IP100H Advanced Radio System we talked about back in December 2014. Where the VE-PG3 comes into its own is that not only has a “bridge” mode, which interconnects two or more radio systems over IP network in a “unicast” transmission, allowing great flexibility in the radios used but it also has a “converter” mode, which interconnects calls between connected IP phones, analog phones and radio systems. Radio users can dial a PSTN (standard) phone number (eg, 02 1234 5678) or an IP phone number (eg, 168.5.10.3). In addition, external equipment such as a public address system, warning lights and sirens, etc can be connected and called (or activated) direct from any hand-held radio (with appropriate permissions). In converter mode, there are two Ethernet ports (for connecting to public [WAN] or private [LAN] networks; two FXO analog connections; up to four analog transceivers; up to two external devices which share the same ports as analog transceivers; and one FXS analog phone station. The system can handle up to 12 IP phone numbers, up to four IP phone stations, up to four digital transceivers The VE-PG3 has a RRP of $2145, supplied with a 120240V AC supply and a utility disc CD. A wide range of accessories and peripherals is available – including, if you need them, the two-way radios to drive the system! External equipment As mentioned earlier, the VE-PG3 has (two) external equipment connectors. These can be used for audio input/ output (eg, a public address system) and other switching (eg, lights, sirens, etc). The virtual serial port software allows you to control an external device via its RS-232C interface. Note that the VE-PG3 is compatible with the IDAS NXDN multi-site conventional/multi-site trunking system and the dPMR mode 2 system. More information We have barely skimmed the surface in this all-too brief look at the VE-PG3. ICOM have a great deal more information available . . . and they’ll be glad to talk to you and explain how the VEPG3 can bring about efficiencies you only dreamed about! Icom (Australia) Pty Ltd are at Unit 1, 103 Garden Rd, Clayton, Vic 3168. Tel: (03) 9549 7500. Website: www.icom.net.au SC And finally, you can start out with just a basic system – and keep adding the equipment you require. You may already have much of this! If you require warning signals or public address announcements, the VE-PG3 can supply these too. It must be used in “converter” mode for these functions to operate. siliconchip.com.au February 2017  95 SILICON CHIP .com.au/shop ONLINESHOP Looking for a specialised component to build that latest and greatest SILICON CHIP project? Maybe it’s the PCB you’re after? Or a pre-programmed micro? Or some other hard-to-get “bit”? The chances are they are available direct from the SILICON CHIP ONLINESHOP. As a service to readers, SILICON CHIP has established the ONLINESHOP. No, we’re not going into opposition with your normal suppliers – this is a direct response to requests from readers who have found difficulty in obtaining specialised parts such as PCBs & micros. • • • • • PCBs are normally IN STOCK and ready for despatch when that month’s magazine goes on sale (you don’t have to wait for them to be made!). Even if stock runs out (eg, for high demand), in most cases there will be no longer than a two-week wait. One low p&p charge: $10 per order, regardless of how many boards or micros you order! (Australia only; overseas clients – email us for a postage quote). Our PCBs are beautifully made, very high quality fibreglass boards with pre-tinned tracks, silk screen overlays and where applicable, solder masks. Best of all, those boards with fancy cut-outs or edges are already cut out to the SILICON CHIP specifications – no messy blade work required! HERE’S HOW TO ORDER: 4 Via the INTERNET (24 hours, 7 days): Log on to our secure website – All prices are in AUSTRALIAN DOLLARS ($AU)     siliconchip.com.au, click on “SHOP” and follow the links 4 Via EMAIL (24 hours, 7 days): email silicon<at>siliconchip.com.au – Clearly tell us what you want and include your contact and credit card details 4 Via MAIL (24 hours, 7 days): PO Box 139, Collaroy NSW 2097. Clearly tell us what you want and include your contact and credit card details 4 Via PHONE (9am-5pm EADST, Mon-Fri): Call (02) 9939 3295 (INT 612 9939 3295) – have your order ready, including contact and credit card details! YES! You can also order or renew your SILICON CHIP subscription via any of these methods as well! 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. PIC12F675-I/P PIC16F1507-I/P PIC16F88-E/P PIC16F88-I/P PIC16LF88-I/P PIC16LF88-I/SO PIC16LF1709-I/SO PIC16F877A-I/P PIC18F2550-I/SP 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) 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) 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) Batt Capacity Meter (Jun09), Intelligent Fan Controller (Jul10) GPS Car Computer (Jan10), GPS Boat Computer (Oct10) USB Data Logger (Dec10-Feb11) Digital Spirit Level (Aug11), G-Force Meter (Nov11) 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) 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 VVA Thermometer/Thermostat (Mar10), Rudder Position Indicator (Jul11) ATTiny2313 Remote-Controlled Timer (Aug10) PIC18F4550-I/P PIC18F27J53-I/SP PIC18LF14K22 PIC32MX795F512H-80I/PT When ordering, be sure to nominate BOTH the micro required AND the project for which it must be programmed. SPECIALISED COMPONENTS, HARD-TO-GET BITS, ETC NEW THIS MONTH: ULTRA LOW VOLTAGE LED FLASHER (FEB 17) - kit including PCB and all SMD parts, LDR and blue LED      $12.50 P&P – $10 Per order# RASPBERRY PI TEMPERATURE SENSOR EXPANSION Two BSO150N03 dual N-channel Mosfets plus 4.7kΩ SMD resistor: (MAY 16) $5.00 $10.00 (JAN 17) $35.00 hard-to-get parts: IC2, Q1, Q2 and D1      MICROWAVE LEAKAGE DETECTOR - all SMD parts: (APR 16) BOAT COMPUTER - (REQUIRES MICROMITE LCD BACKPACK – $65.00 [see below]) (APR 16)   VK2828U7G5LF TTL GPS/GLONASS/GALILEO module with antenna & cable:   VK16E TTL GPS module with antenna & cable: COMPUTER INTERFACE MODULES ULTRASONIC PARKING ASSISTANT (REQUIRES MICROMITE LCD BACKPACK – $65.00 [see below] SC200 AMPLIFIER MODULE (JAN 17) $35.00 hard-to-get parts: Q8-Q16, D2-D4, 150pF/250V capacitor and five SMD resistors      60V 40A DC MOTOR SPEED CONTROLLER CP2102 USB-UART bridge microSD card adaptor (JAN 17) $5.00       $2.50 TOUCHSCREEN VOLTAGE/CURRENT REFERENCE (DEC 16)   MICROMITE LCD BACKPACK KIT (programmed to suit) PLUS UB1 Lid $70.00    LASER-CUT MATTE BLACK LID (to suit UB1 Jiffy Box) $10.00       SHORT FORM KIT with main PCB plus onboard parts (not including BackPack module, jiffy box, power supply or wires/cables) MICROMITE PLUS LCD BACKPACK **COMPLETE KIT** $99.00 (NOV 16) $70.00 (Includes PCB, micro, 2.8-in touchscreen, all SMD parts & lid) PASSIVE LINE TO PHONO INPUT CONVERTER - ALL SMD PARTS (NOV 16) $5.00 MICROMITE PLUS EXPLORE 100 **COMPLETE KIT (no LCD panel)** (SEP 16) $69.90 (includes PCB, programmed micro and the hard-to-get bits including female headers, USB and microSD sockets, crystal, etc but does not include the LCD panel) DS3231-BASED REAL TIME CLOCK MODULE with two 10mm M2 spacers & four 6mm M2 Nylon screws (JUL 16) $5.00 100dB STEREO AUDIO LEVEL/VU METER All SMD parts except programmed micro and LEDs (both available separately) (JUN 16) $20.00 Ultrasonic Range Sensor PLUS clear lid with cutout to suit UB5 Jiffy Box $25.00 $20.00 (MAR 16) $7.50 (MAR 16) $50.00 BATTERY CELL BALANCER ALL SMD PARTS, including programmed micro MICROMITE LCD BACKPACK ***** COMPLETE KIT ***** (FEB 16) *$65.00 includes PCB, micro and 2.8-inch touchscreen AND NOW INCLUDES LID (specify clear or black lid) VALVE STEREO PREAMPLIFIER - 100µH SMD inductor, 3x low-profile 400V capacitors & 0.33Ω resistor MINI USB SWITCHMODE REGULATOR Mk II all SMD components ARDUINO-BASED ECG SHIELD - all SMD components ULTRA LD Mk 4 - plastic sewing machine bobbin for L2 – pack 2 VOLTAGE/CURRENT/RESISTANCE REFERENCE - all SMD components# (JAN 16) $30.00 (SEP 15) $15.00 (OCT 15) $25.00 (OCT 15) $2.00 (AUG 15) $12.50 MINI USB SWITCHMODE REGULATOR all SMD components (JUL 15) BAD VIBES INFRASOUND SNOOPER - TDA1543 16-bit Stereo DAC IC (JUN 15) BALANCED INPUT ATTENUATOR - all SMD components inc.12 NE5532D ICs, 8 SMD $10.00 # includes precision resistor. Specify either 1.8V or 2.5V $2.50 diodes, SMD caps, polypropylene caps plus all 0.1% resistors (SMD & through-hole) (MAY 15) $65.00 THESE ARE ONLY THE MOST RECENT MICROS AND SPECIALISED COMPONENTS. FOR THE FULL LIST, SEE www.siliconchip.com.au/shop *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 01/17 PRINTED CIRCUIT BOARDS NOTE: The listings below are for the PCB only – not a full kit. If you want a kit, contact the kit suppliers advertising in this issue. For more unusual projects where kits are not available, some have specialised components available – see the list opposite. 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! PRINTED CIRCUIT BOARD TO SUIT PROJECT: PUBLISHED: PCB CODE: Price: CAPACITANCE DECADE BOX JULY 2012 04106121 $20.00 CAPACITANCE DECADE BOX PANEL/LID JULY 2012 04106122 $20.00 WIDEBAND OXYGEN CONTROLLER MK2 JULY 2012 05106121 $20.00 WIDEBAND OXYGEN CONTROLLER MK2 DISPLAY BOARD JULY 2012 05106122 $10.00 SOFT STARTER FOR POWER TOOLS JULY 2012 10107121 $10.00 DRIVEWAY SENTRY MK2 AUG 2012 03107121 $20.00 MAINS TIMER AUG 2012 10108121 $10.00 CURRENT ADAPTOR FOR SCOPES AND DMMS AUG 2012 04108121 $20.00 USB VIRTUAL INSTRUMENT INTERFACE SEPT 2012 24109121 $30.00 USB VIRTUAL INSTRUMENT INT. FRONT PANEL SEPT 2012 24109122 $30.00 BARKING DOG BLASTER SEPT 2012 25108121 $20.00 COLOUR MAXIMITE SEPT 2012 07109121 $20.00 SOUND EFFECTS GENERATOR SEPT 2012 09109121 $10.00 NICK-OFF PROXIMITY ALARM OCT 2012 03110121 $5.00 DCC REVERSE LOOP CONTROLLER OCT 2012 09110121 $10.00 LED MUSICOLOUR NOV 2012 16110121 $25.00 LED MUSICOLOUR Front & Rear Panels NOV 2012 16110121 $20 per set CLASSIC-D CLASS D AMPLIFIER MODULE NOV 2012 01108121 $30.00 CLASSIC-D 2 CHANNEL SPEAKER PROTECTOR NOV 2012 01108122 $10.00 HIGH ENERGY ELECTRONIC IGNITION SYSTEM DEC 2012 05110121 $10.00 1.5kW INDUCTION MOTOR SPEED CONTROLLER (NEW V2 PCB)DEC 2012 10105122 $35.00 THE CHAMPION PREAMP and 7W AUDIO AMP (one PCB) JAN 2013 01109121/2 $10.00 GARBAGE/RECYCLING BIN REMINDER JAN 2013 19111121 $10.00 2.5GHz DIGITAL FREQUENCY METER – MAIN BOARD JAN 2013 04111121 $35.00 2.5GHz DIGITAL FREQUENCY METER – DISPLAY BOARD JAN 2013 04111122 $15.00 2.5GHz DIGITAL FREQUENCY METER – FRONT PANEL JAN 2013 04111123 $45.00 SEISMOGRAPH MK2 FEB 2013 21102131 $20.00 MOBILE PHONE RING EXTENDER FEB 2013 12110121 $10.00 GPS 1PPS TIMEBASE FEB 2013 04103131 $10.00 LED TORCH DRIVER MAR 2013 16102131 $5.00 CLASSiC DAC MAIN PCB APR 2013 01102131 $40.00 CLASSiC DAC FRONT & REAR PANEL PCBs APR 2013 01102132/3 $30.00 GPS USB TIMEBASE APR 2013 04104131 $15.00 LED LADYBIRD APR 2013 08103131 $5.00 CLASSiC-D 12V to ±35V DC/DC CONVERTER MAY 2013 11104131 $15.00 DO NOT DISTURB MAY 2013 12104131 $10.00 LF/HF UP-CONVERTER JUN 2013 07106131 $10.00 10-CHANNEL REMOTE CONTROL RECEIVER JUN 2013 15106131 $15.00 IR-TO-455MHZ UHF TRANSCEIVER JUN 2013 15106132 $7.50 “LUMP IN COAX” PORTABLE MIXER JUN 2013 01106131 $15.00 L’IL PULSER MKII TRAIN CONTROLLER JULY 2013 09107131 $15.00 L’IL PULSER MKII FRONT & REAR PANELS JULY 2013 09107132/3 $20.00/set REVISED 10 CHANNEL REMOTE CONTROL RECEIVER JULY 2013 15106133 $15.00 INFRARED TO UHF CONVERTER JULY 2013 15107131 $5.00 UHF TO INFRARED CONVERTER JULY 2013 15107132 $10.00 IPOD CHARGER AUG 2013 14108131 $5.00 PC BIRDIES AUG 2013 08104131 $10.00 RF DETECTOR PROBE FOR DMMs AUG 2013 04107131 $10.00 BATTERY LIFESAVER SEPT 2013 11108131 $5.00 SPEEDO CORRECTOR SEPT 2013 05109131 $10.00 SiDRADIO (INTEGRATED SDR) Main PCB OCT 2013 06109131 $35.00 SiDRADIO (INTEGRATED SDR) Front & Rear Panels OCT 2013 06109132/3 $25.00/pr TINY TIM AMPLIFIER (same PCB as Headphone Amp [Sept11])OCT 2013 01309111 $20.00 AUTO CAR HEADLIGHT CONTROLLER OCT 2013 03111131 $10.00 GPS TRACKER NOV 2013 05112131 $15.00 STEREO AUDIO DELAY/DSP NOV 2013 01110131 $15.00 BELLBIRD DEC 2013 08112131 $10.00 PORTAPAL-D MAIN BOARDS DEC 2013 01111131-3 $35.00/set (for CLASSiC-D Amp board and CLASSiC-D DC/DC Converter board refer above [Nov 2012/May 2013]) LED Party Strobe (also suits Hot Wire Cutter [Dec 2010]) JAN 2014 16101141 $7.50 Bass Extender Mk2 JAN 2014 01112131 $15.00 Li’l Pulser Mk2 Revised JAN 2014 09107134 $15.00 10A 230VAC MOTOR SPEED CONTROLLER FEB 2014 10102141 $12.50 NICAD/NIMH BURP CHARGER MAR 2014 14103141 $15.00 RUBIDIUM FREQ. STANDARD BREAKOUT BOARD APR 2014 04105141 $10.00 USB/RS232C ADAPTOR APR 2014 07103141 $5.00 MAINS FAN SPEED CONTROLLER MAY 2014 10104141 $10.00 RGB LED STRIP DRIVER MAY 2014 16105141 $10.00 HYBRID BENCH SUPPLY MAY 2014 18104141 $20.00 2-WAY PASSIVE LOUDSPEAKER CROSSOVER JUN 2014 01205141 $20.00 TOUCHSCREEN AUDIO RECORDER JUL 2014 01105141 $12.50 THRESHOLD VOLTAGE SWITCH JUL 2014 99106141 $10.00 MICROMITE ASCII VIDEO TERMINAL JUL 2014 24107141 $7.50 FREQUENCY COUNTER ADD-ON JUL 2014 04105141a/b $15.00 TEMPMASTER MK3 AUG 2014 21108141 $15.00 44-PIN MICROMITE AUG 2014 24108141 $5.00 OPTO-THEREMIN MAIN BOARD SEP 2014 23108141 $15.00 OPTO-THEREMIN PROXIMITY SENSOR BOARD SEP 2014 23108142 $5.00 ACTIVE DIFFERENTIAL PROBE BOARDS SEP 2014 04107141/2 $10/SET MINI-D AMPLIFIER SEP 2014 01110141 $5.00 COURTESY LIGHT DELAY OCT 2014 05109141 $7.50 DIRECT INJECTION (D-I) BOX OCT 2014 23109141 $5.00 PRINTED CIRCUIT BOARD TO SUIT PROJECT: PUBLISHED: PCB CODE: Price: DIGITAL EFFECTS UNIT OCT 2014 01110131 $15.00 DUAL PHANTOM POWER SUPPLY NOV 2014 18112141 $10.00 REMOTE MAINS TIMER NOV 2014 19112141 $10.00 REMOTE MAINS TIMER PANEL/LID (BLUE) NOV 2014 19112142 $15.00 ONE-CHIP AMPLIFIER NOV 2014 01109141 $5.00 TDR DONGLE DEC 2014 04112141 $5.00 MULTISPARK CDI FOR PERFORMANCE VEHICLES DEC 2014 05112141 $10.00 CURRAWONG STEREO VALVE AMPLIFIER MAIN BOARD DEC 2014 01111141 $50.00 CURRAWONG REMOTE CONTROL BOARD DEC 2014 01111144 $5.00 CURRAWONG FRONT & REAR PANELS DEC 2014 01111142/3 $30/set CURRAWONG CLEAR ACRYLIC COVER JAN 2015 - $25.00 ISOLATED HIGH VOLTAGE PROBE JAN 2015 04108141 $10.00 SPARK ENERGY METER MAIN BOARD FEB/MAR 2015 05101151 $10.00 SPARK ENERGY ZENER BOARD FEB/MAR 2015 05101152 $10.00 SPARK ENERGY METER CALIBRATOR BOARD FEB/MAR 2015 05101153 $5.00 APPLIANCE INSULATION TESTER APR 2015 04103151 $10.00 APPLIANCE INSULATION TESTER FRONT PANEL APR 2015 04103152 $10.00 LOW-FREQUENCY DISTORTION ANALYSER APR 2015 04104151 $5.00 APPLIANCE EARTH LEAKAGE TESTER PCBs (2) MAY 2015 04203151/2 $15.00 APPLIANCE EARTH LEAKAGE TESTER LID/PANEL MAY 2015 04203153 $15.00 BALANCED INPUT ATTENUATOR MAIN PCB MAY 2015 04105151 $15.00 BALANCED INPUT ATTENUATOR FRONT & REAR PANELS MAY 2015 04105152/3 $20.00 4-OUTPUT UNIVERSAL ADJUSTABLE REGULATOR MAY 2015 18105151 $5.00 SIGNAL INJECTOR & TRACER JUNE 2015 04106151 $7.50 PASSIVE RF PROBE JUNE 2015 04106152 $2.50 SIGNAL INJECTOR & TRACER SHIELD JUNE 2015 04106153 $5.00 BAD VIBES INFRASOUND SNOOPER JUNE 2015 04104151 $5.00 CHAMPION + PRE-CHAMPION JUNE 2015 01109121/2 $7. 50 DRIVEWAY MONITOR TRANSMITTER PCB JULY 2015 15105151 $10.00 DRIVEWAY MONITOR RECEIVER PCB JULY 2015 15105152 $5.00 MINI USB SWITCHMODE REGULATOR JULY 2015 18107151 $2.50 VOLTAGE/RESISTANCE/CURRENT REFERENCE AUG 2015 04108151 $2.50 LED PARTY STROBE MK2 AUG 2015 16101141 $7.50 ULTRA-LD MK4 200W AMPLIFIER MODULE SEP 2015 01107151 $15.00 9-CHANNEL REMOTE CONTROL RECEIVER SEP 2015 1510815 $15.00 MINI USB SWITCHMODE REGULATOR MK2 SEP 2015 18107152 $2.50 2-WAY PASSIVE LOUDSPEAKER CROSSOVER OCT 2015 01205141 $20.00 ULTRA LD AMPLIFIER POWER SUPPLY OCT 2015 01109111 $15.00 ARDUINO USB ELECTROCARDIOGRAPH OCT 2015 07108151 $7.50 FINGERPRINT SCANNER – SET OF TWO PCBS NOV 2015 03109151/2 $15.00 LOUDSPEAKER PROTECTOR NOV 2015 01110151 $10.00 LED CLOCK DEC 2015 19110151 $15.00 SPEECH TIMER DEC 2015 19111151 $15.00 TURNTABLE STROBE DEC 2015 04101161 $5.00 CALIBRATED TURNTABLE STROBOSCOPE ETCHED DISC DEC 2015 04101162 $10.00 VALVE STEREO PREAMPLIFIER – PCB JAN 2016 01101161 $15.00 VALVE STEREO PREAMPLIFIER – CASE PARTS JAN 2016 01101162 $20.00 QUICKBRAKE BRAKE LIGHT SPEEDUP JAN 2016 05102161 $15.00 SOLAR MPPT CHARGER & LIGHTING CONTROLLER FEB/MAR 2016 16101161 $15.00 MICROMITE LCD BACKPACK, 2.4-INCH VERSION FEB/MAR 2016 07102121 $7.50 MICROMITE LCD BACKPACK, 2.8-INCH VERSION FEB/MAR 2016 07102122 $7.50 BATTERY CELL BALANCER MAR 2016 11111151 $6.00 DELTA THROTTLE TIMER MAR 2016 05102161 $15.00 MICROWAVE LEAKAGE DETECTOR APR 2016 04103161 $5.00 FRIDGE/FREEZER ALARM APR 2016 03104161 $5.00 ARDUINO MULTIFUNCTION MEASUREMENT APR 2016 04116011/2 $15.00 PRECISION 50/60HZ TURNTABLE DRIVER MAY 2016 04104161 $15.00 RASPBERRY PI TEMP SENSOR EXPANSION MAY 2016 24104161 $5.00 100DB STEREO AUDIO LEVEL/VU METER JUN 2016 01104161 $15.00 HOTEL SAFE ALARM JUN 2016 03106161 $5.00 UNIVERSAL TEMPERATURE ALARM JULY 2016 03105161 $5.00 BROWNOUT PROTECTOR MK2 JULY 2016 10107161 $10.00 8-DIGIT FREQUENCY METER AUG 2016 04105161 $10.00 APPLIANCE ENERGY METER AUG 2016 04116061 $15.00 MICROMITE PLUS EXPLORE 64 AUG 2016 07108161 $5.00 CYCLIC PUMP/MAINS TIMER SEPT 2016 10108161/2 $10.00/pair MICROMITE PLUS EXPLORE 100 (4 layer) SEPT 2016 07109161 $20.00 AUTOMOTIVE FAULT DETECTOR SEPT 2016 05109161 $10.00 MOSQUITO LURE OCT 2016 25110161 $5.00 MICROPOWER LED FLASHER OCT 2016 16109161 $5.00 MINI MICROPOWER LED FLASHER OCT 2016 16109162 $2.50 50A BATTERY CHARGER CONTROLLER NOV 2016 11111161 $10.00 PASSIVE LINE TO PHONO INPUT CONVERTER NOV 2016 01111161 $5.00 MICROMITE PLUS LCD BACKPACK NOV 2016 07110161 $7.50 AUTOMOTIVE SENSOR MODIFIER DEC 2016 05111161 $10.00 TOUCHSCREEN VOLTAGE/CURRENT REFERENCE DEC 2016 04110161 $12.50 SC200 AMPLIFIER MODULE JAN 2017 01108161 $10.00 60V 40A DC MOTOR SPEED CON. CONTROL BOARD JAN 2017 11112161 $10.00 60V 40A DC MOTOR SPEED CON. MOSFET BOARD JAN 2017 11112162 $12.50 NEW THIS MONTH GPS SYNCHRONISED ANALOG CLOCK FEB 2017 04202171 $10.00 ULTRA LOW VOLTAGE LED FLASHER FEB 2017 16110161 $2.50 LOOKING FOR TECHNICAL BOOKS? YOU’LL FIND THE COMPLETE LISTING OF ALL BOOKS AVAILABLE IN THE SILKS & DVDs” PAGES AT SILICONCHIP.COM.AU/SHOP 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 GPS-Based Frequency Reference baud rate I've built the GPS-Based Frequency Reference project published in EPE magazine, April 2009 (Silicon Chip, March-May 2007). Because the Garmin GPS 15L is expensive, I want to use a different, cheaper GPS module (GYGPS6MV2). This module uses a supply under 3.3V so I used a level converter between the PIC and GPS RX line (a simple voltage divider). I've derived a 1PPS signal from the 1PPS led pin (pin 3 of the U-BLOX LEO 6M module). 1PPS is OK but there is no data on the LCD (no satellites, no UTC, no altitude etc). I think this is because the Garmin module defaults to 4800 baud but the GY-GPS uses 9600 baud. I can't find any setting that I can change for the baud rate. How do I change the software to suit the GY-GPS6MV2 module? (R. A., via email) • You're right that the main problem is due to the PIC being programmed to expect the GPS module to communicate at 4800 bps (as did the Garmin GPS-15L), whereas your module apparently communicates at 9600 bps. Fixing this problem involves editing the PIC's assembly language program (“GPSFreqRef.asm” on the Silicon Chip website), then reassembling it and using it to reprogram the PIC. Here are the changes: 1. Find the comment line reading: ; now program begins 2. Five lines down from there is the label reading: Initialise: 3. The 18 lines further down you will find the line reading: MOVLW h81 ; now set SPBRG reg for 4800 baud async ..... 4. Change this line to read: MOVLW h40 ; now set SPBRG reg for 9600 baud async ..... 5. Use MPASM (installed with MPLAB from Microchip) to reassemble the file and generate the new HEX file. Note the PIC supply is higher than the GPS and so it is the PIC output that should be attenuated before being applied to the RX input of the GPS module. So the positive clamping diode in the PIC are not clamping. It is the input to the GPS module that needs to be clamped or limited to its supply via the attenuator resistors. 230VAC timer for aquaponics pump I have been trawling the Silicon Chip website (plus everywhere else online) looking for a 230VAC timer which will switch a load on and off cyclically with adjustable on-off durations. I need to switch a pump on for two minutes, then off for 30 minutes and have the cycle repeat ad infinitum. This is for an aquaponics project; do you have a project designed that can accomplish this? There may be a commercial timer available somewhere but quite frankly after operating several of your designs for many years I feel they are more reliable than mass-produced junk. (B. K., Kleinton, Qld) • Silicon Chip has published such a timer in the Programmable Mains Timer With Remote Switching in the November 2014 issue. Altronics supply a kit; Cat. K6130. Obsolete GPS receiver in Circuit Notebook I am hoping to build the Arduinobased Analog & Digital LCD Clock from the Circuit Notebook section in the August 2016 issue. I have the Arduino (ATmega328P) base unit. I also ordered the ILI9488-based LCD module. I did a Google search for the u-blox D2523 GPS receiver module shown on the design but didn't get any results. Do you know where to get it from? Is the part number given correct? (M. L., Glenroy, Vic) • Googling the part number in the article takes us to the following website: www.sparkfun.com/products/ retired/9566 which reads "50 Channel D2523T Helical GPS Receiver. Description: Replacement: None. Unfortunately, the supplier for these helical GPS Receiver is no longer in business.” SC200 Amplifier is essentially a high-power op amp I just received my copy of the January 2017 issue of Silicon Chip. I love the new SC200 amplifier module. It is a big improvement on the old SC480 amplifier. I would like to make a comment about how the feedback gives a gain of 25.5. Maybe this could be demonstrated by drawing the circuit as if the amplifier is an inverting op amp. With Rin and Rf resistors, 12kW ÷ 470W = 25.5 times gain. Q1 and Q2 98  Silicon Chip could be shown inside the op amp with the Inverting (-) and Non-inverting (+) symbols. Maybe this could be described in part two of the article. It really is a big powerful op amp. (R. W., Mount Eliza, Vic) • You are correct in describing SC200 amplifier as a big op amp. Virtually all semiconductor amplifiers with a feedback network can be described in the same way. Howev- er, it is not an inverting op amp; it is non-inverting. The text of page 34 of the article regarding the figure for gain is incorrect; the gain is 26.5, not 25.5, although the gain figure of 28.4dB is correct. The measured gain is very close to 26. The discrepancy could be ascribed to losses in the 1000µF feedback capacitor and in the input RC network to the amplifier. G = 1 + 12kW ÷ 470W siliconchip.com.au “The D2523T is a compact GPS smart-antenna engine board, which comes equipped with a Sarantel GeoHelix high-gain active antenna and GPS receiver circuits. The module is based around the high performance 50-channel u-blox 5 platform.” “The omni-directional antenna provides great sensitivity, even when you don’t have a clear view of the sky. Whether this receiver is in your pocket or under your car seat, you are likely to pick up a rock solid GPS signal." So it seems that they are no longer available. We suggest using a VK2828U7G5LF instead. We can supply this from our Online Shop. While it lacks the helical antenna, it is a modern, high-performance GPS/ Galileo/GLONASS receiver. 12V speed/dimmer control modification My hobby is model trains and the club I belong to is the Western Australian branch of AMRA, probably the largest model rail club in Australia. As I am a retired electrician, all the members turn to me for repairs and modifications to the various model rail electrics and electronics around the club. This include a huge amount of very old Hamant and Morgan power supplies and speed controllers and at the moment, I'm using the Altronics K6008 kit for the 12V Speed Controller/Lamp Dimmer (November 2008) to replace the older controllers with great success. I have replaced the fuse with a 1.5A thermal circuit breaker and am supplying them with 12V regulated plugpacks. We have three layouts which we call “You Drives”. And we get calls from various charities for us to take and set up these layouts and all the money collected goes to the various charities. Well, to say these layouts get a hammering is an understatement. So they are always under repair with either scenery or electrics needing work. But these three layouts are different than the normal layouts because the only control we give to the children is the speed control, with no direction control. We want to have a master speed control hidden under the layout so we can set the top speed. Currently, these layouts use Pace controllers which are now 20 years old and badly need a replacement. siliconchip.com.au Low-voltage train controller for kids Is it possible to build a low-voltage (0-20V) AC controller, like a light dimmer? I do model railway shows for charities and would like a simple controller for the kids to run the trains. I currently use a 240VAC light dimmer to control the primary of my transformers but don't want the kids touching anything that is connected to mains voltage. (K. D., via email) • We have not published a low voltage AC speed controller. However, we have published many train controllers and possibly the simplest and most popular one is the 12V Speed Controller/Lamp Dimmer from November 2008 that simply provides a pulse width modulated drive voltage. For this to work, your AC voltage will need to be rectified and filtered for a DC voltage supply for the controller. Other train controllers we have Can you suggest a modification to the 12V Speed Controller that may let us limit the top speed to a more realistic speed with say an extra potentiometer or switch that we use when we take them out to the venues? (B. P., via email) • You can easily modify the 12V Speed Controller to include a maximum speed limit. Simply connect a second 100kW potentiometer, wired as a rheostat, between the anode of diode D4 and potentiometer VR1. This will allow you to limit maximum speed to somewhere between 33% and 100% of normal. Note that when the maximum speed is reduced, the switching frequency will drop too. This may or may not have an effect on motor smoothness. If the drop in frequency has a drastic effect, you could try to compensate by reducing the 220nF capacitor to say 100nF, however, the unit will then run at higher-than-normal frequencies at higher speed settings. Using Water Tank Gauge with Raspberry Pi Thanks for a great magazine. I want to use a Raspberry Pi as a data logger on a home concrete water tank (we are reliant on rain water). The RPi would published include: • July 2013: Li'l Pulser Model Train Controller, Mk.2 • December 2011, Circuit Notebook: Model Train Controller Uses a PIC and a Full-Bridge Motor Drive IC • September-October 2008: Railpower Model Train Controller • November 2007, Circuit Notebook: Simple Model Train Controller If you are using one of the rare train systems which requires AC, we suggest you avoid using a light dimmer since they tend to chop up the AC waveform and so do not produce a proper sinewave. The Deluxe 230VAC Fan Speed Controller from the May 2014 issue may do a better job. We can supply the PCB, coded 10104141, along with the high-voltage Mosfet; see our online shop for details. read the level and store the data for later analysis. Would it be possible to modify the Ultrasonic Water Tank Level Gauge in the September 2011 issue to interface to the GPIO pins on the Raspberry Pi? (A. L., Kangaroo Valley, NSW) • The microcontroller in the Ultrasonic Water Level Gauge does not have any free pins to provide a serial connection to a Raspberry Pi. However, you may be able to connect to the outputs that drive the LEDs. These are RA0-RA4, RA6 & RA7, RB4, RB5 and RB6 on IC1. A common ground would also be required between the Pi and water level gauge circuitry. A 0V level on a pin means that LED is switched on. A 5V level means it is off. The RPi could infer the water tank level from the LED states. Parabolic microphone reflector wanted About 15 years ago, I built a parabolic microphone reflector based on an Electronics Australia design from November 1983 and it worked pretty well. I would like to build another reflector but the plans I had have long-since disappeared. Do you have copies of that article, coded 1/MA/59 and with a PCB code of 83ma11? The reason I ask, apart from needing to re-build my February 2017  99 Modifying the speed signal for power-assisted steering I have been using the Speedo Corrector Mk.2 (December 2006) to modify the speed signal for an Electrical Power Assisted Steering on my MG RV8 (the EPAS is from a MG F). By changing the speed signal, I am able to change the speed at which the EPAS does not have any effect. I use this for different driving conditions, eg, club competition, daily driving etc. I normally drive with the Speedo Corrector setting on 50%, thinking that this setting would double the speed at which the EPAS would cut out. However upon checking, I found the following (all readings with an input frequency of 270Hz): SWITCH SETTING 0 20 40 50 60 80 99 OUTPUT FREQUENCY 270 235 192 180 168 150 136 reflector, is that I think it could make a good project for those interested in wildlife sound recording. A store-bought reflector and microphone set-up starts at over $1,000 on Amazon, not including delivery. A reflector of proven quality and reputation costs even more. Based on the last dish I built, the EA design could be built from materials found at Bunnings and Jaycar for less than $100. (D.H., Beechwood, NSW) • We published an Electronic Stethoscope project in the August 2011 issue of Silicon Chip which had an additional section on using an empty CD-R case as a "parabolic" dish for amplifying remote sounds. While that approach works better than you might expect, a genuine parabolic dish would be even better. It may be possible to use a satellite dish intended for Internet/Foxtel/ Austar etc. These are not prime focus parabolas but that does not matter and the aiming direction could be easily found. The microphone would be mounted in place of the receiver LNB. SportSync software and SRAM interface While working on the design of a digital delay module for a synthesiser restoration, I remembered Nicholas' SportSync Audio Delay design, published in the May 2011 issue. 100  Silicon Chip I would have thought that with a switch setting of 50, the reading would have been 50% of 270, ie, 135 and that at 99 (100) it would be zero (or near to zero). I have checked the BCD codes at IC1 pins and they are correct. Am I missing something? (J.T., via email) • The original idea for the Speedo Corrector was to be able to adjust the signal over a range of 2:1, with the logic being that normally the error in the signal would be less than this, and thus the full range of adjustment either doubles or halves the signal frequency. If you want the setting to correspond to the percentage reduction in frequency through the unit, we can supply revised software (HEX file) to do this. You would either need to reprogram the PIC yourself, or else order a programmed PIC from us and specify that you want us to program it with this revised software which expands the adjustment range. My intended circuit would have been very close to his (albeit with SMT components) so I decided to build the SportSync to gauge what sort of performance I could expect from my own. The ADC-DAC loop-back test of my own circuit seemed OK. I have not started on the external memory interface, however, on page 28-29 of the May 2011 issue, he writes that the audio input and SRAM data input each have two DMA buffers. I can see in his code that the DMA buffer addresses have been set for the ADC input but not changed for use with SRAM data. I have to admit I'm not a C programmer and may have missed something. My understanding is that Parallel Master Port (or PMP), which I'd considered using, can work with a DMA input buffer but not on the PORTB pins. So, does the SportSync use DMA for SRAM data input or is it simply copied from port to internal RAM and then to the DAC? I've read several DMA tutorials but don't recall any that mentioned changing the addresses in DMA1STA/B to repurpose a channel. That's not to say it's not possible; I've done my fair share of colouring outside the lines with PICs. Any clarification would be appreciated. (J. C., Auckland, NZ) • We can't see on pages 28 or 29 where the article says that the SRAM interface uses DMA. DMA is used for the ADC (two buffers) and DAC (two buffers). Data is moved to/from the SRAM one word at a time while the ADC and DAC continue to operate via interrupts and DMA. The dsPIC33 used in this project does not have a Parallel Master Port interface and therefore its DMA unit can not be used for external SRAMs or other devices with parallel interfaces. The SRAM interface in this project just uses the GPIO pins (ie, it “bit bangs” them). Other PICs do have PMP and we've taken advantage of this in the Audio Delay for PA Systems and related projects (November 2013, February 2014, October 2014). We haven't checked whether the PMP was used with DMA in those projects, though. 50A Battery Charge Controller queries I have a few questions concerning the circuit for the 50A Battery Charge Controller, featured in the November 2016 issue. Firstly, why not simply use a 27kW resistor between AN0 (pin 7 of IC1) and ground and adjust VR2 to give 4.4V at AN0? This will be the same for 12V and 24V as the voltage on AN1 is selected via JP1. Secondly, if relay RLY1 pulls in when the battery voltage is 9V or more (as mentioned in the text), how does 12V regulator REG2 function with such a low input? This is before the siliconchip.com.au Some walkie-talkies illegal in Australia I've been seeing a lot of pop-up ads on Facebook for “Heider” brand PMR two-way radios which operate on 446MHz. They're quite small and reasonably cheap. And they have said that you don't need a licence to use them in Australia. I'd like to buy some for when we go hiking (they claim 15km range) but I am confused – someone has commented on Facebook that these are illegal to use in Australia. (R. P., via email) • They are definitely illegal! PMR radios are made for Europe where most countries have a <1MHz-wide charger is connected to the battery via RLY1. Thirdly, could you not replace RLY1 with an SSR comprising of a discrete optocoupler and power Mosfet? The 12V regulator would then not be required. One possible Mosfet might be AUIRL7732S2TR (40V/58A/5mW). What do you think? Finally, could this circuit be used with Ross Tester's Rugged Battery Charger from the April 2013 issue? I ask this because I think it would be a good idea to incorporate some form of auto cutoff. (T. B., Queenstown, Tas) • Yes, you could dispense with the resistors for TP2 and TP1 and use a single resistor. The extra resistors were band on 446MHz called the Personal Mobile Radio band. It is available for unlicenced people to use for the types of activities you mention. The same does not apply within Australia – 446MHz is part of the “70cm” amateur radio band and they (along with the authorities) don't take too kindly to unauthorised users dropping in. If you want a hand-held radio to legally use without a licence, check out UHF CB hand-helds on the Australian-approved 476-477MHz UHF CB band (there are many brands available). included to give a convenient way to measure what you have set the full charge threshold to while making the adjustment. The 4.4V quoted is only for a full charge voltage of 14.4V for a 12V battery and 28.8V for a 24V battery. Anything other than this would need to be calculated and that is not as convenient as simply measuring the voltage at TP2 and TP1 and multiplying by ten in your head. The cost of the four resistors which provide that convenience seems reasonable at around $0.21 (retail). REG2 is a low drop-out type which gives an output voltage just below the input when the input is below 12V. So for a 9V input, the regulator output will be similar and this will be enough to switch on RLY1 (its specified pick-up voltage is 8.4V) until the charger brings the battery voltage up. If your battery is so flat that it can't even power RLY1, you will need to manually connect a trickle-charge resistor, but chances are that it is already dead if it is that weak. The relay could be replaced by a Mosfet and suitable driving circuitry. But the relay has proven to be very rugged for this application and is not damaged by incorrect polarity connections made to the battery or charger or momentary shorting of the battery terminal connections, any of which might blow up a Mosfet. The battery charge controller is ideal for use with the Rugged Battery Charger. Calculating zener clamp resistor value I am using a 16V 1W zener diode clamping circuit to protect a 555 timer with buzzer which has a load current of 22-31mA at 14V in an automotive environment. How large a voltage spike should I assume can occur in order to calculate the required value of the series limiting resistor? (G. G., Paringa, SA) • The 555 timer has a maximum supply of 16V and so it would be better to use a 15V zener diode (1N4744A). The automotive supply can range from around 10V when starting to 14.8V when the battery is charging. Radio, Television & Hobbies: the COMPLETE archive on DVD YES! A MORE THAN URY NT CE R TE AR QU ONICS OF ELECTR HISTORY! This remarkable collection of PDFs covers every issue of R & H, as it was known from the beginning (April 1939 – price sixpence!) right through to the final edition of R, TV & H in March 1965, before it disappeared forever with the change of name to EA. For the first time ever, complete and in one handy DVD, every article and every issue is covered. If you’re an old timer (or even young timer!) into vintage radio, it doesn’t get much more vintage than this. If you’re a student of history, this archive gives an extraordinary insight into the amazing breakthroughs made in radio and electronics technology following the war years. And speaking of the war years, R & H had some of the best propaganda imaginable! Even if you’re just an electronics dabbler, there’s something here to interest you. Please note: this archive is in PDF format on DVD for PC. Your computer will need a DVD-ROM or DVD-recorder (not a CD!) and Acrobat Reader 6 or above (free download) to enable you to view this archive. This DVD is NOT playable through a standard A/V-type DVD player. Exclusive to: SILICON CHIP siliconchip.com.au ONLY 62 $ 00 +$10.00 P&P Order now from www.siliconchip.com.au/Shop/3 or call (02) 9939 3295 and quote your credit card number. February 2017  101 Effect of distributor gap in motorcycles I have three questions: 1. Regarding your Spark Energy Meter for Ignition Checks (FebruaryMarch 2015), can you comment on the effect of the distributor gap (between rotor tip and cap pins)? When doing tune ups and diagnostics, before and after replacement of the cap and rotors over the years, I've measured that gap (worn or new) to be as much as 1mm and often more, rarely less. Given that the spark plug gap is commonly about 1mm also, surely the distributor gap must have a significant impact on the spark energy and voltage available at the plug tip upon firing? Why is there a gap at all in the distributor? Wouldn't it be more effective to actually contact the pins or almost contact them? I modified a used rotor to do just that (ie, contact the pins) and found that misfiring disappeared and the engine performed satisfactorily for a long time after. 2. Many 4-cylinder motorbikes of the 1980s (with 12V CDI systems, eg, Suzuki GS bikes) used one coil for each pair of cylinders, for a total of two ignition coils. Both plugs fire but only one of the two cylinders is in the compression stroke, the other plug fires on the exhaust stroke and does nothing. Voltage spikes can rise to over 100V but are short in duration, typically less than 1ms. The zener should be bypassed with a capacitor so high voltage transients are attenuated. This will keep the maximum peak voltage to the 555 below 16V. The series limiting resistor forms a voltage divider with the effective resistance of the zener. So the higher the limiting resistor value, the better. For a current of 31mA and assuming you can accept a 2V drop, the series limiting resistance would be 62W. A 0.25W resistor is suitable. With the 14W zener impedance, 22mA current, 14.8V supply and a 15.75V zener voltage, the zener will protect for a sustained input voltage of up to 8.75V above the 14.8V supply, clamping to below 16V. 8.75V sustained is equivalent to very high transient voltage (875V) for 10ms. 102  Silicon Chip A crankshaft sensor, either points, rotating magnet or hall effect, sends a signal to the CDI black box which in turns signals the coils and then the plugs fire. When replacing the ignition coils with non-OEM coils, it seems the coil resistance is important, but can you explain why? Wouldn’t most 12V ignition coils do the same job? You can readily buy coils from later era (~2000s) bikes with similar ignition systems and likely better coils. I wonder what, if any, downside there would be. There are also 12V, 2-coil, 4-cylinder electronic ignition systems available. 3. Would the High-Energy MultiSpark CDI for Performance Cars (December 2014 and January 2015) work on a 4-cylinder motorbike (eg, the Suzuki GS from above)? The coils (from the early 1980s) were notoriously weak and hence the desire to upgrade the coils and/or try multispark. (P. H., via email) • The distributor comprising a conventional rotor and contacts does introduce some spark energy loss and some 500V is dropped. The distributor gap is there to prevent physical contact between the rotor and contacts that could otherwise cause the distributor cap to break or at best crack and then cause the high voltThe use of the bypass capacitor is important to keep the transient voltage to a low DC level. Tweaking the Valve Preamp power supply I have two questions relating to the design of the Stereo Valve Preamplifier unit (January & February 2016). I had been contemplating utilising the HT and heater supply section from this project to run a set of three (maybe four) 12AX7s in a two-channel guitar preamp stage. Could a 100µH 3A ferrite core choke (eg, Jaycar LF1272) be used in place of the Murata SMD unit? And how critical is the value of the 0.33W shunt resistor? Could a 0.22W or 0.47W resistor be used in its place? (G. A., Lancefield, Vic) • As presented, the circuit does not have enough grunt to do what you want it to do, however it may be pos- age to track down to the earthed distributor body. The gap size is a compromise between spark loss and reliability. There needs to be allowance for some movement off-centre of the rotor button as bearings wear and for dimensional tolerance of the distributor cap itself and how it fits onto the distributor body. Many motorbikes do have what is called a "wasted spark" ignition where sparking also occurs at near to bottom dead centre for a two-stroke and on the exhaust stroke for a fourstroke engine. The ignition coil primary resistance is only one parameter of an ignition coil. It does to some extent determine the final current drain of a fully charged ignition coil. Inductance, leakage inductance, capacitance and turns ratio are other factors. More details are in the article you mentioned, “How to Measure Spark Energy in an Ignition System” in the February 2015 issue. Additional information is available at www.worldphaco.net The multi-spark CDI ignition would work on a four cylinder motorbike. Make sure there is sufficient space to install such a unit as the housing is large for a motorcycle. sible to modify it to provide enough current for three or four 12AX7s. The circuit was deliberately limited to the current required for two 12AX7s so that it would run continuously at full power, avoiding the harmonics involved with modulating the switching duty cycle. In short, a toroidal inductor could be used in place of the Murata SMD unit but note that the SMD inductor is shielded so this may result in more EMI. Toroidal inductors do have quite low leakage so you may get away with this. The LF1272 almost certainly has a powdered iron core as a ferrite inductor of this size would not handle 3A. The 0.33W resistor value was chosen mainly to limit the power and voltage delivered by the power supply. To run three or four valves using this supply, you may well need to change siliconchip.com.au MARKET CENTRE Cash in your surplus gear. Advertise it here in SILICON CHIP 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 - 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 WANTED WANTED: EARLY HIFIs, AMPLIFIERS, Speakers, Turntables, Valves, Books, Quad, Leak, Pye, Lowther, Ortofon, SME, Western Electric, Altec, Marantz, McIntosh, Tannoy, Goodmans, Wharfe­ 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. KEEP YOUR COPIES OF SILICON CHIP AS GOOD AS THE DAY THEY WERE BORN! SILICON CHIP On-Line SHOP www.siliconchip.com.au/shop dale, radio and wireless. Collector/ Hobbyist will pay cash. (07) 5471 1062. johnmurt<at>highprofile.com.au 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. 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 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 ADVERTISING IN MARKET CENTRE Classified Ad Rates: $32.00 for up to 20 words 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. its value, perhaps to 0.22W or possibly even lower. You may want to consider building the HT power supply PCB from the valve preamplifier described in the November 2003 issue instead. That particular circuit was over-designed for the task but it would comfortably drive the number of valves you are contemplating. You can see a free 2-page preview of the article at www.siliconchip.com. siliconchip.com.au au/Issue/2003/November/A+12AX7+ Valve+Audio+Preamplifier You can order the PCB at www. siliconchip.com.au/Shop/8/691 Low-voltage audio amplifier module I built a small headphone amplifier circuit using a TDA2822 running off a single Lithium-ion cell (3-4.2V). Would it be a good candidate for Circuit Notebook? • While the TDA2822 is rated to work down to 3V, even at 4.5V it would be delivering very little power into a 32W load and what power was delivered would not be particularly clean. It seems that much better results could be obtained from a purposedesigned chip such as the TDA7266D as used in the One-Chip 2 x 5W Mini Stereo Amplifier in the November 2014 issue. SC February 2017  103 Next Month in Silicon Chip Advertising Index Getting Started with the Micromite, Part Two Allan Warren Electronics............ 103 Geoff Graham's programming tutorial continues. In this issue, we'll show you how to use graphics commands to draw full colour images on the LCD BackPack's touchscreen. You'll also learn some new and very useful BASIC commands. Altronics.................................. 74-77 How to use LTspice to simulate circuits Digi-Key Electronics....................... 3 SPICE is a powerful tool which allows you to use a computer to simulate how a simple or complex circuit will behave without actually having to build it. This makes it much easier to experiment with different configurations and examine the internal operation of the circuit before building it, saving you a lot of time and effort. It can also be used to analyse and understand how a given circuit operates. This is the first in a series of easy-to-follow, step-by-step tutorials on using the free LTspice Windows circuit simulation software from Linear Technology. Aussie Rechargeable Irons............ 9 Digilent Inc................................... 11 Emona Instruments.................... IBC Hare & Forbes.......................... OBC High Profile Communications..... 103 Adding Tyre Pressure Monitors to your vehicle Icom............................................. 13 Your tyres are the interface between your vehicle and the road and proper inflation is vital for correct handling and a long service life. If you get a nail or screw in your tire, how soon will you notice the deflation? By the time it's obvious, it may already be too late. We review two affordable wireless tyre pressure monitoring systems which can give you peace of mind. Jaycar .............................. IFC,49-56 Pool Lap Counter LEDsales.................................... 103 This revised Pool Lap Counter design is easy to build, has a large, bright lap display, is battery powered and uses a pressure sensor to make for a convenient, waterproof unit. If you're at all serious about swimming and don't already have a lap counter, you will want to build this one. Master Instruments........................ 9 Automotive Electronic Fuse Keith Rippon Kit Assembly ...... ..103 LD Electronics............................ 103 Microchip Technology................... 19 Mouser Electronics......................... 5 Sick of having to replace blown fuses? This electronic fuse works the same was as a standard fuse except that it's based on one or two ICs and can be reset by simply pressing a button. You can change its trip current easily by subsituting a different low-power resistor. It gives your circuit the protection of a fuse without the hassle. Ocean Controls............................ 12 Note: these features are prepared or are in preparation for publication and barring unforeseen circumstances, will be in the March issue. Sesame Electronics................... 103 The March 2017 issue is due on sale in newsagents by Thursday February 23rd. Expect postal delivery of subscription copies in Australia between February 23rd and March 7th. SC Radio & Hobbies DVD.......... 101 Notes & Errata High Power DC Motor Speed Control, January-February 2017: the top of trimpots VR1, VR2 and VR7 should connect to 5V, not Vbat. The top of R1 should go to theSC switched side of S1, ie, the anode of D3. The connections on the PCB are correct. Also in the parts list, the Altronics S6040 blade fuse holder is rated at 30A, not 40A. Pakronics....................................... 6 Phillips Monitors............................. 7 SC Online Shop................. 27,96-97 Silicon Chip PCBs........................ 10 Silicon Chip Subscriptions........... 45 Silicon Chip Wallchart.................. 57 Silvertone Electronics.................. 10 Tronixlabs................................ 8,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