Silicon ChipLure & Liquidate Lovelorn Zika Virus Mozzies - October 2016 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: El cheapo electronics modules - the new standard components
  4. Order Form
  5. Feature: China's Gigantic Telescope: Scanning Deepest Space by Ross Tester
  6. Feature: Implantable Medical Devices by Dr David Maddison
  7. Feature: El Cheapo Modules From Asia - Part 1 by Jim Rowe
  8. Project: Lure & Liquidate Lovelorn Zika Virus Mozzies by John Clarke
  9. Subscriptions
  10. Project: A New Transformer For The Currawong Valve Amplifier by Leo Simpson
  11. Project: Touchscreen Appliance Energy Meter, Pt.3 by Jim Rowe & Nicholas Vinen
  12. Project: Two Micropower LED Flasher Modules by John Clarke
  13. Serviceman's Log: How I got trapped inside my MG by Dave Thompson
  14. Project: Voltage/Current Reference With Touchscreen, Pt.1 by Nicholas Vinen
  15. Project: Micromite Plus Explore 100 Module, Pt.2 by Geoff Graham
  16. Vintage Radio: The valve mantel’s last hurrah: Astor’s DLP 2-valve receiver by Ian Batty
  17. Product Showcase
  18. Market Centre
  19. Notes & Errata: Stereo LED Audio Level/VU Meter (June & July 2016); Touchscreen Appliance Energy Meter (August - October 2016)
  20. Advertising Index
  21. Outer Back Cover

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

You can view 39 of the 104 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "El Cheapo Modules From Asia - Part 1":
  • DS3231-based Real Time Clock & Calendar module with mounting hardware (Component, AUD $6.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 "Lure & Liquidate Lovelorn Zika Virus Mozzies":
  • Mosquito Lure PCB [25110161] (AUD $5.00)
  • PIC12F675-I/P programmed for the Mosquito Lure [2511016A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Mosquito Lure SMD parts: TPA2005D1DGNR (MSOP-8) Class-D 1.45W amplifier IC and microUSB socket (Component, AUD $7.50)
  • Firmware (ASM and HEX) files for the Mosquito Lure [2511016A.HEX] (Software, Free)
  • Mosquito Lure PCB pattern (PDF download) [25110161] (Free)
  • Mosquito Lure trap details, cutting diagrams and panels (PDF download) (Panel Artwork, Free)
Items relevant to "A New Transformer For The Currawong Valve Amplifier":
  • Currawong 2 x 10W Stereo Valve Amplifier main PCB [01111141] (AUD $55.00)
  • Currawong Remote Control PCB [01111144] (AUD $5.00)
  • PIC16F88-I/P programmed for the Currawong Remote Volume Control [0111114A.HEX] (Programmed Microcontroller, AUD $15.00)
  • Front & rear panels for the Currawong 2 x 10W Stereo Valve Amplifier [01111142/3] (PCB, AUD $30.00)
  • Currawong 2 x 10W Stereo Valve Amplifier acrylic top cover (PCB, AUD $30.00)
  • Currawong 2 x 10W Stereo Valve Amplifier top cover cutting diagram (Software, Free)
  • Firmware and source code for the Currawong Remote Volume Control [0111114A.HEX] (Software, Free)
  • Currawong 2 x 10W Stereo Valve Amplifier main PCB pattern [01111141] (Free)
  • Currawong 2 x 10W Stereo Valve Amplifier panel artwork (PDF download) (Free)
Articles in this series:
  • Currawong Stereo Valve Amplifier: A Preview (October 2014)
  • Currawong Stereo Valve Amplifier: A Preview (October 2014)
  • Currawong 2 x 10W Stereo Valve Amplifier, Pt.1 (November 2014)
  • Currawong 2 x 10W Stereo Valve Amplifier, Pt.1 (November 2014)
  • Currawong 2 x 10W Stereo Valve Amplifier, Pt.2 (December 2014)
  • Currawong 2 x 10W Stereo Valve Amplifier, Pt.2 (December 2014)
  • The Currawong 2 x 10W Stereo Valve Amplifier, Pt.3 (January 2015)
  • The Currawong 2 x 10W Stereo Valve Amplifier, Pt.3 (January 2015)
  • Modifying the Currawong Amplifier: Is It Worthwhile? (March 2015)
  • Modifying the Currawong Amplifier: Is It Worthwhile? (March 2015)
  • A New Transformer For The Currawong Valve Amplifier (October 2016)
  • A New Transformer For The Currawong Valve Amplifier (October 2016)
Items relevant to "Touchscreen Appliance Energy Meter, Pt.3":
  • Touchscreen Appliance Energy Meter PCB [04116061 RevI] (AUD $15.00)
  • PIC32MX170F256B-50I/SP programmed for the Micromite-based Touchscreen Energy Meter v1.01 [0411606A.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)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (clone version) (Component, AUD $3.00)
  • DS3231-based Real Time Clock & Calendar module with mounting hardware (Component, AUD $6.00)
  • ACS718 20A isolated current monitor (Component, AUD $15.00)
  • Firmware (HEX) file and BASIC source code for the Micromite-based Touchscreen Appliance Energy Meter [v1.01] (Software, Free)
  • Touchscreen Appliance Energy Meter PCB pettern (PDF download) [04116061 RevG] (PCB Pattern, Free)
  • Touchscreen Appliance Energy Meter lid panel artwork (PDF download) (Free)
Articles in this series:
  • Touchscreen-Controlled Energy Meter, Pt.1 (August 2016)
  • Touchscreen-Controlled Energy Meter, Pt.1 (August 2016)
  • Touchscreen Appliance Energy Meter, Pt.2 (September 2016)
  • Touchscreen Appliance Energy Meter, Pt.2 (September 2016)
  • Touchscreen Appliance Energy Meter, Pt.3 (October 2016)
  • Touchscreen Appliance Energy Meter, Pt.3 (October 2016)
Items relevant to "Two Micropower LED Flasher Modules":
  • Micropower LED Flasher PCB [16109161] (AUD $5.00)
  • Mini Micropower LED Flasher PCB [16109162] (AUD $2.50)
  • PIC12F675-I/P programmed for the Micropower LED Flasher [1610916A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Firmware (ASM and HEX) files for the Micropower LED Flasher [1610916A.HEX] (Software, Free)
  • Micropower LED Flasher PCB patterns (PDF download) [16109161/2] (Free)
Items relevant to "Voltage/Current Reference With Touchscreen, Pt.1":
  • Touchscreen Voltage/Current Reference PCB [04110161] (AUD $12.50)
  • PIC32MX170F256B-50I/SP programmed for the Micromite-based Touchscreen Voltage/Current Reference v1.00 [0411016A.HEX] (Programmed Microcontroller, AUD $15.00)
  • Short Form Kit for the Touchscreen Voltage/Current Reference (Component, AUD $120.00)
  • Translucent Blue UB1 Lid for the Precision Voltage & Current Reference with Touchscreen Control (PCB, AUD $10.00)
  • Firmware (HEX) file and BASIC source code for the Micromite-based Touchscreen Voltage/Current Reference v1.00 [0411016A.HEX] (Software, Free)
  • Touchscreen Voltage/Current Reference PCB pattern (PDF download) [04110161] (Free)
Articles in this series:
  • Voltage/Current Reference With Touchscreen, Pt.1 (October 2016)
  • Voltage/Current Reference With Touchscreen, Pt.1 (October 2016)
  • Voltage/Current Reference With Touchscreen, Pt.2 (December 2016)
  • Voltage/Current Reference With Touchscreen, Pt.2 (December 2016)
Items relevant to "Micromite Plus Explore 100 Module, Pt.2":
  • Micromite Plus Explore 100 PCB [07109161 RevC] (AUD $15.00)
  • PIC32MX470F512L-120/PF programmed for the Micromite Plus (Programmed Microcontroller, AUD $25.00)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (Component, AUD $5.00)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (clone version) (Component, AUD $3.00)
  • DS3231-based Real Time Clock & Calendar module with mounting hardware (Component, AUD $6.00)
  • MCP120-270GI/TO Supply Supervisor IC (TO-92) (Component, AUD $2.00)
  • Short Form Kit for the Micromite Plus Explore 100 (Component, AUD $75.00)
  • Firmware (HEX) file and documents for the Micromite Mk.2 and Micromite Plus (Software, Free)
  • Micromite Plus Explore 100 PCB pattern (PDF download) [07109161 RevC] (Free)
Articles in this series:
  • Micromite Plus Explore 100 With Touchscreen, Pt.1 (September 2016)
  • Micromite Plus Explore 100 With Touchscreen, Pt.1 (September 2016)
  • Micromite Plus Explore 100 Module, Pt.2 (October 2016)
  • Micromite Plus Explore 100 Module, Pt.2 (October 2016)

Purchase a printed copy of this issue for $10.00.

A lure for lovelorn male MOZZIES! By JOHN CLARKE There has been a lot of recent news about the Zika mosquitoborne virus but the carrier, the Aedes aegypti mosquito, is a nasty little beast that also carries dengue and yellow fever. Now you can reduce the chances of these mosquitoes breeding in your locality by building this audio lure for the male mosquitoes. kill ‘em before they have any fun! I t’s not fair, really! Female mosquitoes do the biting while the males are just there to make up the numbers. Well, they’re just for breeding; male mozzies don’t bite people. And now along comes this electronic gizmo from SILICON CHIP with the potential to kill the males before they have any fun! This project was produced in response to a recent news bulletin where two Australian Institute of Tropical Health and Medicine researchers (Brian Johnson and Scot Ritchie) discovered that a 484Hz tone attracted male mosquitoes of the Aedes aegypti species in large numbers. The Aedes aegypti is the main species which carries and spreads the Zika 36  Silicon Chip virus (other species that can carry it are the Aedes albopictus [in the USA] and Asian Tiger types). But why, you may ask, is that frequency of 484Hz important? Well, Just in case you were wondering, this is a real, live, pregnant, female Aedes aegypti mosquito, busily biting a victim to get blood for her eggs. it so happens that the female Aedes aegypti flaps her wings at precisely this rate – so any . . . ahem . . . virile male Aedes aegypti hearing this immediately thinks he’s on a sure thing. Male mosquitoes only live for about a week or so, so he’s got to get his jollies while he can, so to speak. See www.abc.net.au/news/201601-19/scientists-discover-frequencytraps-male-yellow-fever-mosquitoes /7084434 So this little project produces a 484Hz tone to attract the sex-crazed males. Because it’s so loud compared to a single female, it attracts them from a wide area. And if you don’t live in an area where the Aedes aegypti mosquito siliconchip.com.au Specifications PWM OUT Supply: USB standard of 4.75V to 5.6V Current: 220mA at 911mW (<at>5V supply) output power, 120mA <at> 500mW, 70mA <at> 250mW Standby current: 6.8µA during night Output power: 911mW maximum into 8Ω with 5V supply Frequency: 484Hz sinewave (accurate to within 50ppm ) 484Hz SINEWAVE B A PWM GENERATOR (IC1) LDR1 LC FILTERS VOLUME CONTROL LIGHT DETECTOR  LOUDSPEAKER CLASS-D POWER AMPLIFIER (IC2) LOW PASS FILTER SHUTDOWN Fig.1: block diagram of our Mozzie Lure. The width of the 15.488kHz pulses is varied at exactly 484Hz. The low-pass filter removes the 15.488kHz to provide a 484Hz sinewave which is amplified and fed to the speaker. is present, you can build a version to work with other mozzies instead. Our lure comprises a mosquito trap with a sound generator inside. Once the male mosquito is lured into the trap, it finds it difficult to escape (in fact, it doesn’t want to – he is still searching for the elusive, albeit noisy female!) and eventually drowns in beer, insecticide or is immobilised using sticky fly paper strips. If you use beer, at least he will die happy! The good thing to know about this lure is that if you can stop the males doing their thing, the females will not be fertilised. And if they are not fertilised, they have no reason to bite us humans (pregnant females are the only ones which bite, to gain sustenance for their fertilised eggs). Win-win for us, never mind the mozzies! (More seriously, a Zika-infected Aedes mosquito can pass the virus to its eggs so the possibility of spreading the virus is very strong). The Aedes aegypti mosquito is most active during the day, so we have designed the lure to only run in daylight. At night, the sound generator is switched off (it would drive you mad in the dead of night) and the circuit draws minimal current. pulse-width-modulated waveform to a low pass filter. This removes the 15.488kHz and what remains is a smooth 484Hz sinewave. The scope waveforms in Scope1 and Fig.4 show the general operation. The yellow trace at the top shows the PWM signal generated at pin 6 of IC1 while the green trace shows the signal after filtering, at the input to trimpot VR1. The resulting 484Hz sinewave is delayed with respect to the PWM signal by the 2-stage filter network We feed the 484Hz sinewave to a tiny class-D (ie, switching) amplifier which is normally used in mobile (cell) phones so it is designed to be highly efficient. It drives the small loudspeaker in bridge mode, to maximise the power output from the limited 5V DC supply. Its operation is demonstrated in Scope2, showing the 484Hz sine waveform across the 8Ω loudspeaker. The amplifier is delivering 911mW into 8Ω. What’s in it? The SILICON CHIP Mozzie Lure circuit comprises a microprocessor tone generator to produce the 484Hz tone, along with a tiny class-D amplifier which drives a small loudspeaker. It can be powered from any 5V source, such as a USB output on a computer or even a power bank for mobile phones. Block diagram The Mozzie Lure block diagram is shown in Fig.1. Microcontroller IC1 uses a light dependent resistor (LDR1) to monitor the ambient light. If daylight is detected, IC1 runs as a pulse generator at 15.488kHz. Its pulse width is varied at 484Hz, producing a waveform which has an average value that varies between 0V and 5V at 484Hz. We then feed that Circuit details The full circuit is shown in Fig.2. CON1 +5V +5V 1F 1k 22k 1M 4 LIGHT DETECT GP2 LDR1  1nF 2 X1 4MHz 3 Vdd IC1 PIC12F675 -I/P GP1 PWM GP0 Vss 22pF 22pF 10k 6 OSC1/GP5 OSC2/GP4 100F 16V 1F MICRO-B USB SOCKET 484Hz 1 MCLR/GP3 5  OPTIONAL – FOR VERSION B ONLY 1 2 3 X 4 8 7 33nF 100k 3.3nF 6 LEVEL VR1 100k L2 100H Vdd 100nF 24k 3 IN+ 100nF 24k 4 IN– VO+ 5 470nF L1 100H IC2 TPA2005D1 LOW PASS FILTER 2 VO– NC 1 SDWN GND 50mm 8 SPEAKER 8 470nF 7 SC 2016 MALE MOZZIE LURE siliconchip.com.au AMPLIFIER Fig.2: compare this circuit diagram with the block diagram above. Power can be provided by any USB (5V) source. October 2016  37 Scope1: the yellow trace shows the pulse-width-modulated 15.488kHz signal and the green trace shows the 484Hz sinewave, which remains after filtering. Power is applied via an SMD micro USB connector and is bypassed with a 1µF capacitor. The PIC12F675 microcontroller, IC1, has its master clear input, pin 4, tied to the 5V supply rail via a 1kΩ resistor to provide a power up reset function. The light dependent resistor LDR1 is monitored by the GP2 input of IC1, at pin 5. This is connected via a 1MΩ resistor to the +5V supply. When the LDR is high resistance (in darkness), GP2 is pulled high toward 5V and IC1 detects this and stays mute. When exposed to light, the LDR’s low resistance pulls the GP2 input low, so IC1 produces the PWM signal from its GP1 output, at pin 6. IC1 uses a 4MHz crystal to ensure the generated 484Hz is precise. The PWM signal is then fed the 2-stage RC filter. The first stage comprises a 10kΩ resistor and 33nF capacitor to give a -3dB rolloff at 484Hz. The second stage has the same -3dB rolloff but uses a 100kΩ resistor with a 3.3nF capacitor. These components give an impedance which is 10 times the impedance of the first stage filter and minimises any loading effect of the second stage on the first. The filtered output signal is fed to trimpot VR1 and then to the noninverting input, pin 3 of amplifier IC2 via a 100nF capacitor. IC2 is a TPA2005D1 class-D (ie, switching) amplifier in a tiny SMD package, measuring only 3 x 5mm. It is specifically designed for use in mobile (cell) phones where its high 38  Silicon Chip Scope2: the top two traces show the anti-phase signals fed to the loudspeaker in bridge mode. The pink trace shows the summed waveform across the speaker. efficiency is crucial. We show the block diagram of the TPA2005D1 in Fig.3. As can be seen, it has differential inputs to an internal amplifier which drives the PWM section which has a switching frequency of 250kHz, set by the internal oscillator. The PWM section then drives an H-bridge circuit which drives an external loudspeaker. We should note that the datasheet for the TAP2005 highlights two interesting points. Its high CMRR (common mode rejection ratio) is supposed to eliminate input coupling capacitors and it is supposed to be able to run without an output filter (to remove the 250kHz switching signal), if the output leads are short. So do we need those two 100nF input capacitors and the output filter components? The high CMRR only applies if the amplifier is used in balanced mode, with both inputs at the same DC level. But in our circuit we are using it in unbalanced mode, with the inverting input grounded (via the 100nF capacitor) and so we end up having to use two input capacitors. The 24kΩ resistor for the noninverting input, in conjunction with the internal 150kΩ feedback resistor, sets amplifier gain at about 6.25 times. Since the amplifier is a bridge type, the overall gain is double that at 12.5 times. And as far as eliminating the output filter is concerned, that is really only VDD INTERNAL OSCILLATOR + IN – VO+ – DIFFERENTIAL INPUT PWM H-BRIDGE VO– + – SHUTDOWN TO BATTERY IN + GND BIAS CIRCUITRY TPA2005D1 Fig.3: the internal workings of the TPA2005D1, taken from its data sheet. siliconchip.com.au RED WAVEFORM = PWM (PULSE WIDTH MODULATION) SIGNAL GREEN WAVEFORM = SYNTHESISED SINEWAVE (AFTER LOW-PASS FILTERING) Fig.4: the red waveform represents the PWM output from the microprocessor, IC1, while the green waveform shows its average value which happens to be a sinewave. The green wave also shows the signal that actually appears after the low pass filter has removed all of the higher frequencies. Note that the PWM signal is a representation only, because it is not shown here as 32 times the sinewave frequency. At right is the Mozzie Lure fitted inside the bottom third of a two-litre PET juice bottle, photographed against a dark background to show detail. The top third is cut off and inverted and slips inside the main body to make it difficult for mozzies to find their way out again. possible if the output leads to the loudspeaker are very short, implying that radiated electromagnetic interference won’t be a problems. Even then, the datasheet makes a number of output filter suggestions, involving two ferrite beads and two 1µF capacitors at the simplest. Our PCB has provision for a 3.5mm output jack socket which means that the circuit could be used with a remote speaker, connected via long leads. Accordingly, our circuit has an output filter using two 100µH inductors and two 470nF capacitors. The first step in assembly is to position the PCB in the plastic case and mark out the position for each of the four mounting points on the bottom of the case. The board is a tight fit inside the corner pillars so the holes are very much determined for you – but marking with a fine felttipped pen now is easier than doing it later. Now we move onto the PCB itself. Fig.5 shows the PCB component overlay. Begin construction by install- Construction The Mozzie Lure itself is constructed on a double-sided, plated-through PCB, coded 25110161 and measuring 79 x 44.5mm. It is housed in a semitransparent UB5 case, 83 x 54 x 31mm. This box is then mounted inside a mosquito trap that can be made using a PET bottle. SPEAKER 22pF 1nF 1k + 1M 1 nF 470 LOOP SPEAKER WIRES THROUGH HOLES FOR STRAIN RELIEF IC2 TPA2005 1F L2 100mH otiuqsoM eruL 100F 16101152 nF X1 4MHz #22k UNDER BOARD – REQUIRED ONLY FOR VERSION ‘B’ (SEE TEXT) 470 IC1 PIC12F675 + 1F 100nF 24k VR1 3.3nF 100k 22k# 1 CON1 LDR1 22pF 100mH L1 C 2016 25110161 10k 100kW – 100nF 24k Rev.B 33nF Fig.5: here’s the component layout of the PCB. The 22kΩ resistor shown in red above is required for the alternative “B” version which has a slightly lower frequency and should attract different types of mozzies. siliconchip.com.au October 2016  39 An extra close-up of the end of the PCB, mainly to show the location of the micro-USB socket (centre) and the LDR (right side, mounted at a right angle). Note our comments in the text regarding the use of any box which is not at least semi-transparent. The LDR needs to “see” daylight/darkness to work. ing the SMD class-D amplifier, IC2. It requires a very fine soldering iron and, ideally, a lit gooseneck or desktop magnifier (a good LED headband magnifier also works well). Position IC2 carefully then tacksolder pin 4 to its pad. (Many hobbyists find a wooden clothes peg handy to keep it in place while soldering). Before proceeding, carefully check that the IC is still aligned to the IC pads on the PCB – remelt the solder if required. If all is OK, solder the remaining corner pins and then pins 2, 3, 6 and 7. Use solder wick to remove any solder that bridges between the IC pins. IC2 also has a ground pad that needs to be soldered to the PCB. This can be done by feeding solder through from the underside of the PCB through the hole positioned central to the under- side of the IC. Use minimal solder to prevent the solder spreading out and shorting to the IC leads. The USB connector can be installed now. It too must be carefully aligned in position and the side wing locating tabs are soldered to the PCB, making sure the tabs are heated sufficiently for the solder to adhere. Solder one tab and check alignment of the five connecting pins to the PCB pads before soldering the other tab and then the pins. Again, reheat the solder and realign the connector if it is not quite right. Now install the resistors, using a multimeter and the resistor colour code table to check the value of each before inserting into the PCB, followed by the capacitors (note that the 100µF electrolytic must be laid over as shown in the photo). We used a socket for IC1 – just in case we ever want to remove it for reprogramming, etc. Take care to orient the socket correctly (notch AWAY from the crystal). Next is the LDR. We mounted ours with the wires bent over 90°, so that when the PCB is installed in the semi-transparent box, the LDR faces to the side. If you use anything but a semi-transparent box, you will need to drill a hole in the box so that the LDR “sees” daylight. Enough light passes Parts List – Mozzie Lure 1 PCB, coded 25110161, 79 x 44.5mm 1 UB5 transparent box 83 x 54 x 31mm 1 panel label, 75 x 47mm 1 50mm 8Ω Mylar cone loudspeaker (Altronics C0604B) 1 SMD micro-USB connector (Jaycar PS0922, Altronics P1309) [CON1] 1 4MHz crystal [X1] 2 100µH inductors (Jaycar LF1102, Altronics L6222) [L1,L2] 1 LDR 10kΩ light dependent resistor [LDR1] (Altronics Z1621, Jaycar RD-3480) 1 DIL8 IC socket 1 50mm x 50mm square of flyscreen wire 4 M3 tapped x 9mm spacers 8 M3 x 6mm machine screws 4 M3 x 10mm machine screws 4 3mm shake proof washers 4 M3 nuts 2 PC stakes (not used if CON2 is installed) 1 200mm length of light duty hookup wire (or 100mm figure-8) Optional parts for wiring a remote speaker 1 3.5mm PCB mount stereo jack socket [CON2] (Jaycar PS0133, Altronics P0092) 1 3.5mm mono jack plug 1 suitable length of light duty figure-8 wire (for wiring remote speaker to jack plug) 40  Silicon Chip Semiconductors 1 PIC12F675-I/P programmed with 2511016A.hex [IC1] 1 TPA2005D1DGN mono class D amplifier [IC2] (SILICON CHIP; www.siliconchip.com.au/shop) Capacitors 1 100µF 16V PC electrolytic 2 1µF monolithic ceramic (Code 105 or 1u0) 2 470nF MKT or ceramic (Code 474 or 470n) 2 100nF MKT or ceramic (Code 104 or 100n) 1 33nF 63V or 100V MKT polyester (Code 333 or 33n) 1 3.3nF 63V or 100V MKT polyester (Code 333 or 3n3) 1 1nF 63V or 100V MKT polyester (Code 102 or 1n0) 2 22pF ceramic (code 22p or 22) Resistors (0.25W, 1%) 1 1MΩ 1 100kΩ 2 24kΩ 1 10kΩ 1 100kΩ multiturn top adjust trimpot [VR1] 1 1kΩ Mosquito trap parts 1 commercially available flytrap (ensure it has enough space to mount the Mozzie Lure box) or 1 2-litre PET juice drink bottle (nominally 90 x 90mm square but with rounded corners) 3 M3 tapped x 6mm Nylon standoffs 3 Nylon washers 6 M3 x 5mm Nylon screws siliconchip.com.au This clearly shows the three threaded standoffs on the end of the box used for mounting, along with the cutouts for the microUSB socket (on end) and the multiple hole cutouts for the speaker. through the semi-transparent box to activate the LDR. Note that if you do not want the circuit to switch off in the night (you must be a real heavy sleeper!), then use a wire link instead of LDR1. Neither the 1MΩ resistor nor 1nF capacitor are required in this case. You may notice that provision is made on the PCB for a 3.5mm jack socket. This is if you wish to have the loudspeaker located remotely from the Mozzie Lure (eg, outside the case). Otherwise, install the two PC stakes for later connection to the loudspeaker. Connect two wires, about 80mm long, to the two PC stakes under the PCB, thence up through the strain relief holes (see photo) and out ready to solder to the miniature 8-ohm speaker. (We actually used two wires stripped from a length of rainbow cable; mini figure-8 would also work well). At this stage, don’t plug in the PIC microprocessor (IC1) – we’ll test the PCB first. Incidentally, if you purchase your PIC12F675-I/P for this project from the SILICON CHIP online store it will already have the firmware 2511016A. hex programmed. But if you wish to do this yourself, the file can be downloaded from the SILICON CHIP website. Housing The PCB is mounted on four feet made up using 9mm tapped spacers at each corner of the PCB. Before mounting, however, attach the four spacers to the PCB using 5mm screws and place it in position in the box. Now mark the position for the micro USB connector on one end – when the PCB is removed, this is drilled out siliconchip.com.au and shaped using a very fine file. See the cutout diagram for more detail. Drill out the four 3mm corner mounting holes in the base of the case where marked previously. When mounting the loudspeaker in the same box, first place the loudspeaker on the underside of the box lid and centre it in position. Mark out the corner mounting holes and holes within the cone area. The grid on the box lid can be used to form a neat grid of holes (See Fig.8). If your box does not have the grid, then the panel artwork, with a grid, can be downloaded from the SILICON CHIP website. You can either make a 40mm diameter cut out for the loudspeaker cone or a series of smaller holes within the 40mm diameter area. To stop the mozzies trying to attack the loudspeaker itself and possibly clogging it (who knows what frame of mind they’re in with this loud 484Hz super female in there!), it is mounted behind a 50mm x 50mm square of flyscreen wire “sandwiched” between it and the back of the lid using four M3 x 10mm screws, 3mm shake proof washers and M3 nuts. Chamfer the corners of the flyscreen so it doesn’t foul the speaker mounting screws. Now solder the two wires from the PCB to the terminals on the loudspeaker. If you are not installing the loudspeaker in the same box as the PCB wire the loudspeaker to a suitable length of figure-8 cable and solder the other end to the tip and sleeve of a 3.5mm mono jack plug. This plugs into an installed 3.5mm jack socket on the PCB. Testing Connect a 5V supply to the micro USB connector using the USB supply from a PC, a 5V plugpack or 5V powerbank. Check there is about 5V between pins 1 and 8 of the IC1 socket. If this is correct (remember that USB supplies can range from between 4.75V to 5.6V), disconnect power and insert the programmed IC1 in its socket, making sure it is oriented correctly (the notch matching the socket). Reapply power and the speaker should start making a tone. If not make sure there is light on the LDR and that VR1 is adjusted at least partly clockwise. Adjust further clockwise for more sound. The current drawn by the Mozzie Lure will depend on the sound level set with VR1 (see the specifications). If using a 2200mAh powerbank, the Mozzie Lure should run for 10 hours at full volume (near 1W) before recharging. How loud you set the sound level depends on you. The sound will travel further with more volume but there is the current drain to consider and battery life. And, of course, you don’t want to scare off any male mozzies in the neighbourhood, thinking that the high level of sound is coming from some Amazon of a female. Then again, because of the Zika Virus, maybe an Amazon is exactly what you want! Making the lure As you can see from our photos, we built a mosquito trap using a recycled PET fruit juice container, cutting the top off with a knife or scissors and inverting this top piece then inserting it into the base. This is shown in the diagram of Fig.6. The Mozzie Lure is attached to the inside of the PET container about half-way up using screws and washers into 6mm tapped standoffs attached to the box. Resistor Colour Codes      No. 1 1 2 1 1 Value 1MΩ 100kΩ 24kΩ 10kΩ 1kΩ 4-Band Code (1%) brown black green brown brown black yellow brown red yellow orange brown brown black orange brown brown black red brown 5-Band Code (1%) brown black black yellow brown brown black black orange brown red yellow black red brown brown black red brown brown black black brown brown October 2016  41 ~ 1/3 Top section Inverted top partly inserted into base CUT TOP OFF an 8-pack of “Buzz Fly Paper Glue Trap” from Bunnings sells for $5.40 You can mount the trap on a pole or similar using cable ties. The power supply can also be attached using cable ties, or power can be run to the trap from an even more protected area (eg, inside!). There are several commercial flytraps available and you could try one of these – they have the advantage of being easier than making your own and can normally be used out in the weather. The fly attractor supplied with the flytrap is not used and instead the Mozzie Lure box is fitted inside. Of course, you need to ensure that any commercial flytrap you consider will do just that: fit the Mozzie Lure inside! Wot about other mozzies? ~ 2/3 2 Litre PET “square” juice bottle 3mm + + Cutout to suit micro USB ++ “POISON” – KEEP TOP LEVEL BELOW LURE BOX Fig.6: here’s how to make a lure from an empty(!) PET juice bottle. Ours measured (roughly) 275 x 100 x 100mm and was cut with a sharp knife at about 90mm down from the top. After mounting the Mozzie Lure and putting some liquid in the bottom, we simply pushed the upside-down top part way into the bottom. Presto – one cheap lure! Two of the 6mm long standoffs are located 4mm up from the outside bottom edge of the box. These are low enough in the box for the screw heads to clear the PCB when installed and in far enough to clear the internal pillars The third standoff is 5mm down from the top edge of the box. None of these positions are critical, as long as they clear the PCB and pillars. Our photos show the positions we used. Cut holes in the PET container for the screw mounts and USB plug matching the 6mm standoffs and USB cutout. Note that the trap is not suitable for use out in the weather. It needs to be under cover (eg, under an eave) to prevent it becoming a rain gauge collecting water instead of mosquitoes! What’s your poison? Many liquids have been tried – from plain water, to commercial pest killers, to soft drinks and even beer . . . and we’ve found that just about anything works! Some things might attract mozzies better than others but we believe that the secret is more in the mozzies getting exhausted flying around trying to find the (very loud!) female and eventually falling into the liquid and drowning. You could also try sticky fly traps instead of liquid – eg, 42  Silicon Chip If you don’t live in Queensland (beautiful one day; perfect the next), you probably won’t be too worried about the Aedes aegypti mosquito because it’s more of a tropical pest. But Australia has over 80 species of mozzie and most (not all) bite humans and most bite around or after dusk. We haven’t forgotten those little nasties and we have produced a version (B) which works at night. The only modification required in order to build version B is to add a 22kΩ resistor between pin 1 & 6 of IC1. We show this on the circuit and PCB overlay in red – you can solder it to the underside of the PCB as shown in Fig.5. The microcontroller has two software routines. If you build the Zika version (A), the circuit will only work in daylight and will produce a frequency of 484Hz to attract male Aedes mosquitos. If you build version (B), the micro will sense the presence of the 22kΩ resistor and will only work at night. In this case, it will produce a frequency of 400Hz to attract a range of mosquito species. You could even try putting in a switch to vary between the two frequencies (ie, switching the resistor in and out) to perhaps rid your whole area of all of the little pests! Note that you will have to power off (ie, remove the USB plug) to switch to the different mode. SC + + + + Loudspeaker grid Fig.7: same-size templates for drilling the loudspeaker holes in the box lid and the end cutouts for the three end cut outs mounting holes plus Holes 3mm diameter the slot required for the micro USB socket. You + can download these (and the front panel artwork) from www.siliconchip.com.au + + siliconchip.com.au