Silicon ChipInsomnia and Tinnitus killer - November 2018 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Are electronic medical records privacy concerns overblown?
  4. Feature: Which tiny country is about to launch a lunar lander? by Dr David Maddison
  5. Project: Oh Christmas tree, oh Christmas tree... by Tim Blythman
  6. Project: USB digital and SPI interface board by Tim Blythman
  7. Feature: Australians develop a "supercomputer" by Geoff Graham
  8. Serviceman's Log: It's torture having a broken phone by Dave Thompson
  9. Project: Insomnia and Tinnitus killer by John Clarke
  10. Feature: El cheapo modules, part 20: two tiny compass modules by Jim Rowe
  11. Project: GPS-synched, lab-quality frequency reference (Part 2) by Tim Blythman and Nicholas Vinen
  12. Product Showcase
  13. Subscriptions
  14. Vintage Radio: The 1939 HMV 904 5-inch TV set and 3-band radio receiver by Dr Hugo Holden
  15. PartShop
  16. Market Centre
  17. Advertising Index
  18. Notes & Errata: Super Digital Sound Effects Module, August-September 2018
  19. Outer Back Cover: Trio Test & Measurement - Siglent test equipment

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

You can view 41 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 "Oh Christmas tree, oh Christmas tree...":
  • Software for Amazing Light Patterns for the LED Christmas Tree (Free)
  • Stackable LED Christmas Tree PCB [16107181] (AUD $5.00)
  • Kit for the Stackable LED Christmas Tree (Component, AUD $10.00)
  • Kit for the Digital Interface Module (Component, AUD $15.00)
  • Arduino sketch (.ino) files and sample Python software for the LED Christmas Tree (Free)
  • LED Christmas Tree PCB pattern (PDF download) [16107181] (Free)
Articles in this series:
  • Oh Christmas tree, oh Christmas tree... (November 2018)
  • Oh Christmas tree, oh Christmas tree... (November 2018)
  • Amazing light display from our LED Christmas tree... (December 2018)
  • Amazing light display from our LED Christmas tree... (December 2018)
Items relevant to "USB digital and SPI interface board":
  • USB Digital and SPI Interface PCB [16107182] (AUD $2.50)
  • PIC16F1455-I/P programmed for the USB Digital and SPI Interface Module [1610718A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Kit for the Digital Interface Module (Component, AUD $15.00)
  • Firmware (HEX and C) files for the USB Digital and SPI Interface Module (Software, Free)
  • USB Digital and SPI Interface PCB pattern (PDF download) [16107182] (Free)
Items relevant to "Insomnia and Tinnitus killer":
  • Tinnitus/Insomnia Killer PCB (Jaycar version) [01110181] (AUD $5.00)
  • Tinnitus/Insomnia Killer PCB (Altronics version) [01110182] (AUD $5.00)
  • Tinnitus/Insomnia Killer PCB (Jaycar version, manufacturing fault) [01110181] (AUD $2.50)
  • PIC12F617-I/P programmed for the White Noise Generator [0910618A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Hard-to-get parts for the Tinnitus/Insomnia Killer (Component, AUD $12.50)
  • Firmware (ASM and HEX) files for the White Noise Source and Steam Train Whistle/Diesel Horn [0910618A/M.HEX] (Software, Free)
  • Tinnitus/Insomnia Killer PCB patterns (PDF download) [01110181/2] (Free)
  • Tinnitus and Insomnia Killer panel label artwork and drilling templates (PDF download) (Panel Artwork, Free)
Items relevant to "El cheapo modules, part 20: two tiny compass modules":
  • Sample BASIC source code for interfacing a Micromite with an eCompass module (Software, Free)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
Items relevant to "GPS-synched, lab-quality frequency reference (Part 2)":
  • GPS-synched Frequency Reference PCB [04107181] (AUD $7.50)
  • PIC32MX170F256B-50I/SP programmed for the GPS-Synched Frequency Reference [0410718A.hex] (Programmed Microcontroller, AUD $15.00)
  • VK2828U7G5LF TTL GPS/GLONASS/GALILEO module with antenna and cable (Component, AUD $25.00)
  • Micromite LCD BackPack V2 complete kit (Component, AUD $70.00)
  • SMD parts for the GPS-Synched Frequency Reference (Component, AUD $80.00)
  • Firmware (HEX) files and BASIC/C source code for the GPS-Synched Frequency Reference [0410718A.hex] (Software, Free)
  • GPS-Synched Frequency Reference PCB pattern (PDF download) [04107181] (Free)
  • GPS-synched Frequency Reference drilling and cutting diagrams (PDF download) (Panel Artwork, Free)
Articles in this series:
  • GPS-synched Frequency Reference Pt.1 (October 2018)
  • GPS-synched Frequency Reference Pt.1 (October 2018)
  • GPS-synched, lab-quality frequency reference (Part 2) (November 2018)
  • GPS-synched, lab-quality frequency reference (Part 2) (November 2018)

Purchase a printed copy of this issue for $10.00.

Tinnitus & Insomnia Killer by John Clarke Do you – or someone you know – suffer from Tinnitus? How about Insomnia? We can’t make any therapeutic promises but pink and/or white noise is widely recognised as easing or even eliminating those problems! This device produces either pink or white noise so you can experiment to your ears’ content – and maybe get some relief! I f you have never suffered from Tinnitus, consider yourself fortunate! Tinnitus is the perception of sound when no external sound is present. Commonly referred to as “ringing in the ears”, Tinnitus may sound like humming, clicking, buzzing, ringing, hissing, roaring, whistling or even the sound of crickets. It’s especially maddening for those who suffer from it constantly. Tinnitus may be intermittent or constant and may vary in loudness depending on stress, blood pressure, tiredness, medications and the surrounding environment. Some people who experience Tinnitus are not really bothered by it. But others find that it seriously disturbs their 62 Silicon Chip sleep. In the worst case, it can be debilitating. For those people who are severely affected, Tinnitus Retraining Therapy (TRT) can provide an effective treatment. Developed by Dr Jawel Jastreboff, TRT involves the use of low-level broadband noise. TRT does not cure Tinnitus but it does make it manageable for people who are severely affected. If you want to know more, there are many websites devoted to Tinnitus. Just call up “Tinnitus” in your favourite search engine and you will find lots of information. Even if you don’t suffer from this affliction, there are times when a low-level noise source can be really helpful Australia’s electronics magazine siliconchip.com.au in masking extraneous noise – such as when you can’t get to sleep and lie there tossing and turning, getting even more worked up and even less likely to find that elusive sleep! Features and Specifications Insomnia • Onboard volume control Perhaps a nearby neighbour is having a boisterous pool party and counting sheep or hiding your head under your pillow simply doesn’t work! Switch on the Tinnitus and Insomnia Killer and you can effectively blank out the noise that’s keeping you awake. Or maybe you are trying to study and someone else in the family has swapped their ballet shoes for hob-nail boots. Again, switch on this unit and mask it. Our only warning is that if you’re trying to study, you may instead fall asleep. Oh well, can’t win ‘em all! • Drives headphones, earbuds or a loudspeaker (up to 750mW into 8) How does it do this? The Tinnitus and Insomnia Killer masks external sounds by increasing the ambient noise level so that the unwanted noise is much less obtrusive. The “noise” from this unit is something you can live with – in fact, it is often quite soothing. It has been likened to what you hear from light rain on a tin roof, a soft waterfall or a stream cascading down rocks. Babies experience constant noise like this in the womb, which is why “shushing” them often calms them down and helps them get to sleep. We’re all accustomed to this sort of noise when we are very young. So it can be especially effective at helping babies to sleep, even when they are in a quiet environment. To them, a quiet environment is quite an alien concept! Finally, another use for white/pink noise: relaxation. There might be no doof-doof noise from the neighbour’s party – in fact, it might be too quiet for you to relax. Just add a little noise (of the right type!) and you’ll probably find you can relax much easier. . . • Produces white or pink noise • Powered from a 9V battery or 6-12V DC plugpack • Power-on and low battery indicator • Small and light portable (handheld) unit • Current draw with headphones: 4.6mA quiescent, 8-9mA# at medium volume, 20-25mA# at full volume • Current draw with speaker: 8.6mA quiescent, 47-80mA# at full volume • 9V battery life: typically around 48 hours with headphones or 7 hours with speaker # lower figure is for white noise, slightly higher for pink noise However, the PCB for that design is no longer available and this new version is much more portable, has a longer battery life, more output power and is easier to build. So the 2001 version can now be considered truly obsolete. White noise, pink noise: what’s the difference? White noise has equal energy at all frequencies across its entire bandwidth. So for example, the 1kHz band from 1-2kHz will have the same total energy as the 1kHz band from 10-11kHz. In practice, this means that white noise has a 3dB rise in amplitude for each higher octave. It sounds similar to steam escaping or when an FM radio is tuned off-station. Pink noise, on the other hand, has an equal energy level for each octave. So for example, the total energy in the 20-40Hz band (ie, 20Hz bandwidth) is the same as from 10-20kHz (10kHz bandwidth). Therefore, it has an identical amplitude for each octave. In effect, this means that pink noise sounds more subdued and less harsh than white noise and has more apparent bass. For Tinnitus suffers or those simply looking to mask out unwanted noise, whether you use white or pink noise comes down to your preference. Try them both out and see which one you prefer and which is more effective in your situation. All-new 2018 design The Tinnitus and Insomnia Killer can drive headphones or a loudspeaker. And it can be powered from a 9V battery or a DC plugpack (from about 6-12V). It’s built into a small plastic case and it includes a volume control to set the level that suits YOU! By the way, we published a similar Tinnitus and Insomnia Killer in the September 2001 issue. We still get enquiries about that project. The Tinnitus & Insomnia Killer, housed in a Jaycar handheld instrument case. (The Altronics case version is similar). siliconchip.com.au Other uses for pink noise Besides helping those with Tinnitus or as a sleep aid, pink noise is often used in the Australia’s electronics magazine November 2018  63 Fig.1: the circuit for the Tinnitus and Insomnia Killer. White noise is produced by IC1 at its pin 7 output. It is attenuated and buffered by op amp IC2b and then fed to IC3, when switch S2 is in the down position. The white noise is also converted to pink noise and buffered by IC2a and this is instead fed to IC3 if S2 is in the up position. IC3 amplifies the chosen signal and feeds it either to headphones at CON3, or to a speaker at CON2 if nothing is plugged into CON3. laboratory – for measuring and testing loudspeaker systems, for example. It can be used when positioning and adjusting speakers to compensate for sound “colouration” due to objects in the room and the shape of the room. It may also be used as a guide to get consistent sound throughout a room. The pink noise is used as a signal source to drive the loudspeaker(s) via an amplifier. The resulting sound is monitored using a calibrated microphone, ie, one with a flat response, or a known response that can be compensated for. The microphone drives a spectrum/frequency analyser to show how the sound changes as the microphone is moved around the room. For room equalisation, an equaliser can be used to adjust the levels in each frequency band so that the overall frequency response is flat. Our 10-band Graphic Equaliser design from the June and July 2017 issues would be a good 64 Silicon Chip choice (see siliconchip.com.au/Series/313). However, you don’t need an expensive spectrum analyser for this job as there are many computer software-based options to display the audio spectrum from a microphone. For example, there is a program called Wavespectra (http://nice.kaze.com/av/wavespectra.html). Another you might be familiar with is Audacity (www.audacityteam. org/). There are many others: Dr Google is your friend! Circuit description Refer now to the circuit diagram (Fig.1, above). IC1 is a PIC12F617 microcontroller which is programmed to produce white noise using a 31-bit pseudo-random noise sequence implemented in its software. It’s called pseudo-random because it’s not truly random – the sequence repeats after about eight hours. So the repetition is not noticeable nor even statistically relevant in 99.9% Australia’s electronics magazine siliconchip.com.au Here’s how the PCB fits inside the case (in this instance it’s the Jaycar case; the Altronics version actually mounts to the lid). Fig.2: the yellow trace shows the white noise output at pin 7 of IC1 with a spectrum analysis below, showing the distribution of energy across various frequencies from a few hertz up to 10kHz. As you can see, its frequency distribution is effectively flat. of cases. IC1’s output signal passes to two different filters, one of which converts the white noise to pink (via IC2a) and one of which merely conditions the white noise further (via IC2b). Switch S2 determines which of these two signals is fed to amplifier IC3, allowing you to choose white or pink noise. The internal 8MHz oscillator of the PIC12F617 is used, which gives a 2MHz instruction rate, so the 13 instructions in the software results in a sampling rate of 153.846kHz (2MHz÷13). The noise frequency distribution is therefore up to about half that, ie, 76.923kHz. Because the output is a square wave, it will have harmonic components at higher frequencies than 76.923kHz but they will have a decreased amplitude and power level. The measured spectrum from IC1 is shown in Fig.4. It extends over the entire audio spectrum (20Hz-20kHz) and well beyond at both the low-frequency and high-frequency ends. Compare this to the spectrum of the pink noise produced by this unit, shown in Fig.3, to that of the white noise, shown in Fig.4. This is different to that shown in Fig.2 because of the extra filtering and attenuation in the analog signal path. Most of the supersonic and subsonic frequencies are filtered out. For more information on how IC1 produces white noise, see the White Noise Generator article published in the September 2018 issue (siliconchip.com.au/Article/11225). Fig.3: now the yellow trace shows the pink noise output at pin 1 of IC2a and the spectrum analysis below. We’ve “zoomed in” to the 0-10kHz frequency range so you can see how the intensity falls off with increasing frequency in a logarithmic manner. Filters The white noise from IC1 is reduced in level using a resistive divider comprising 10k and 270 resistors. This is so that the white noise is at a similar level to the pink noise, so that switching between the two will not cause a noticeable jump in perceived volume. The supersonic (above 20kHz) signal components are then siliconchip.com.au Fig.4: the raw white noise output at pin 7 of IC2b with spectrum analysis for 0-200kHz. Its amplitude is quite flat up to about 50kHz, rolling off to around -15dB at about 150kHz before increasing again, due to the harmonic content. Australia’s electronics magazine N November ovember 2018  65 2018  65 filtered out by a low-pass filter which consists of these two resistors plus a 33nF capacitor. The signal is then AC-coupled to non-inverting input pin 5 of buffer IC2b via a 22nF capacitor. This input pin is DC biased to half supply (around 2.5V) via the 1M resistor, which connects to the junction of a voltage divider consisting of two 10kresistors across the 5V supply. This half supply rail is decoupled to ground with a 10µF capacitor, so that supply noise is not injected into the signal via this path. This DC biasing arrangement allows IC2b to produce a symmetrical swing within the 5V supply rail and thus the amplifier output will not clip. lished more than forty years ago in the National Semiconductor Audio Handbook, 1976 (see page 2-56 of siliconchip. com.au/link/aals). This filter is accurate to within ±0.25dB from 10Hz to 40kHz when close-tolerance components are used. The resulting signal is AC-coupled via a 22nF capacitor to the non-inverting input of buffer IC2a and biased with a 1Mresistor using the same arrangement as for IC2b. The selected signal (ie, white or pink noise) at the common terminal of switch S2 is applied to the input of an LM4865 audio amplifier (IC3) via a 220nF AC-coupling capacitor. Pink noise filter Amplifier operation In the other signal path, the white noise signal becomes pink noise. It is first reduced in level by the 1k and 2.2kresistors. This reduction is not as great as that of the white noise signal path because the following filter also provides some attenuation. The initial attenuation from these two resistors prevents clipping in the following buffer stage (IC2a). The pink noise filter provides a -3dB per octave roll-off. That roll-off rate is difficult to achieve because an RC filter using a resistor and capacitor provides a higher roll-off rate, of 6dB per octave. To get the -3dB per octave roll-off, a complex network of passive step filters is used. These combine to provide an overall response with the required roll-off rate. This filter is based on one first pub- When headphones are connected, IC3 drives them via a 100µF electrolytic coupling capacitor from output pin 5. The capacitor removes any DC bias from the amplifier’s output. The headphone socket (CON3) tip and ring connections are joined together so that both sides of the headphones/earphones are driven in parallel. A 150resistor ensures that the headphone side of this capacitor is DC-biased to ground even if the headphones are not plugged in, so that when they are plugged in, there isn’t a loud thump as the capacitor charges. When headphones are not used, IC3 will instead drive a loudspeaker in a bridge-tied-load (BTL) arrangement. The BTL configuration means Fig.5 (left): use this PCB overlay diagram as a guide when building the board that fits into the Jaycar case. Be careful with the polarity of D1, D2, ICs1-3 and the electrolytic capacitors. Make sure that these capacitors are sitting low on the board before soldering the leads or else they may not fit in the case. Fig.6 (right): the PCB overlay diagram for the board that fits into the Altronics case, which is slightly narrower and has different mounting hole locations. The component arrangement and interconnections are otherwise identical. Be sure to do up REG1’s screw before soldering its leads to prevent damage. 66 Silicon Chip Australia’s electronics magazine siliconchip.com.au siliconchip.com.au Australia’s electronics magazine November 2018  67 Parts list – Tinnitus/Insomnia Killer 1 double-sided PCB coded 01110181 (63.5mm x 86mm)    [to suit Jaycar case] or 1 double-sided PCB coded 01110182 (58.5 x 86mm)    [to suit Altronics case] 1 remote control case, 135 x 70 x 24mm [Jaycar HB5610] or 1 remote control case, 130 x 68 x 25mm [Altronics H0342] and 1 remote control belt clip [Altronics H0349] (optional) 1 front panel label, to suit case 1 8-pin DIL socket (for IC1) 2 SPDT PCB-mount toggle switches [Altronics S1421] 1 9V battery and battery snap 1 2.1mm or 2.5mm ID switched DC socket (CON1) [Jaycar PS0519, Altronics P0620 or P0621A] 1 2-way right-angle pluggable terminal block socket (CON2) [Altronics P2592, Jaycar HM3102] 1 2-way pluggable screw terminal block (CON2) [Altronics P2512, Jaycar HM3122] 1 3.5mm PCB-mount stereo jack socket (CON2) [Jaycar PS0133, Altronics P0092] 1 M3 x 6mm screw and M3 hex nut (for mounting REG1) 4 No.4 self-tapping screws (for Jaycar case only) 1 knob to suit VR1 Semiconductors 1 PIC12F617-I/P microcontroller programmed with 0111018A.HEX (IC1) 1 LMC6482AIN dual rail-to-rail op amp (IC2) 1 LM4865M audio power amplifier, SOIC-8 (IC3) 1 LF50CV low dropout, low quiescent current 5V regulator (REG1) [element14 Cat 1094240] 1 3mm blue LED (LED1) 1 1N5819 1A schottky diode (D1) 1 1N4148 signal diode (D2) Capacitors 3 100µF 16V PC electrolytic 3 10µF 16V PC electrolytic 1 1µF 16V PC electrolytic 1 220nF MKT polyester 3 100nF MKT polyester 1 33nF MKT polyester 1 27nF MKT polyester (or 22nF and 4.7nF in parallel) 2 22nF MKT polyester 1 10nF MKT polyester 1 4.7nF MKT polyester Resistors (all 0.25W, 1% metal film) 2 1M 1 100k 1 68k 1 30k 4 10k 1 4.7k 1 3k 2 2.2k 1 1k 1 270 1 150 1 9mm 10k linear potentiometer (VR1) [Jaycar RP8510] when the voltage at the pin 8 output goes positive, the voltage at the pin 5 output goes negative and vice versa. This results in twice the voltage across the speaker compared to that at either output pin, giving up to four times the output power (V2 x R). It also eliminates the need for a coupling capacitor, since both ends of the speaker are driven with the same DC bias level. 68 Silicon Chip When headphones are plugged into CON3, the internal switch is open and so the HP-sense input (pin 3) of IC3 is pulled to +5V by the connected 100kresistor. This shuts down the pin 8 output, making it high impedance and thus muting any speaker connected via CON2. It also reduces IC3’s power consumption when driving headphones, since the second internal amplifier is also shut down and not drawing any current. With headphones not plugged in, the switch contact closes and the 150resistor pulls pin 3 below 50mV. This enables the BTL drive arrangement for the speaker. IC3 has a DC volume control input at pin 4. Potentiometer VR1 is used to adjust the voltage at this pin between 0V, for minimum volume, through to about 4.1V for maximum volume, when wound fully clockwise. The 4.1V maximum level is achieved using a 2.2kpadding resistor between VR1 and the +5V supply. Power supply Both IC1 and IC3 need a 5V supply so the entire circuit is powered from the 5V supply rail. This is provided by linear regulator REG1, which is fed by 9V from the battery or 6-12V DC from a plugpack connected via CON1. REG1 has a low quiescent current and a low dropout voltage, meaning it won’t drain the battery too fast and it can provide a steady 5V output even when the battery voltage is barely above 5V. Schottky diode D1 provides protection in case either supply is connected with incorrect polarity. Also, the switch within DC barrel socket (CON1) disconnects the battery when a DC plug is inserted. The unit is powered on or off using toggle switch S1. Blue LED1 lights up when it is on. This LED has a 3V voltage drop and diode D2, which is connected in series, has a forward voltage of around 0.7V. This means that the LED will only light if the regulator output is above about 3.7V. In fact, the LED will be very dim unless the supply is close to 5V. So LED1 is not only a power indicator but it also works as a battery voltage indicator, showing when REG1 drops out of regulation as the battery becomes discharged. So when LED1 becomes very dim or goes out entirely even when S1 is on, you know it is time to replace the battery. Construction The Tinnitus and Insomnia Killer is designed to be housed in one of two similar (but slightly different size) cases. There are two different PCB designs. One is coded 01110181 and measures 63.5mm x 86mm, which suits the Jaycar HB5610 case (135 x 70 x 24mm). The other is coded 01110182 and measures 58.5 x 86mm; this one suits the Altronics H0342 case (130 x 68 x 25mm). We have also produced panel labels to suit both boxes. Before starting assembly, make sure you have the correct PCB to suit your chosen case. They are shaped to fit inside the respective case and mount onto the integral plastic posts. Use the appropriate PCB overlay diagram, either Fig.5 (01110181) or Fig.6 (01110182) and the matching photo (built into the Jaycar case) as a guide during assembly. Start by fitting surface-mount IC3. This is soldered directly to the PCB. First, check the overlay diagram for the correct orientation, then tack solder one pin to the board. Australia’s electronics magazine siliconchip.com.au Some constructors find that using a wooden clothes peg (not plastic – it melts!) helps to hold small SMD components in place while soldering the first pin. Re-check the orientation and that all the pins are positioned correctly over their pads before soldering the remaining pins. If it is misaligned, remelt the solder on the first pin and adjust its position. Any solder bridges Fig.7: drilling and cutting patterns for the end panels of the two cases. The between the leads can be cleared by reason they are different is that the Jaycar PCB is mounted normally in the adding a small amount of flux paste case, whereas the Altronics PCB is “hung” upside down from its case lid (which and then using solder wick to draw becomes the front panel). The rectangular cut-outs can be made by drilling a series of small holes around the outside, then carefully filing the hole to shape. up excess solder. Next, mount the resistors. Use the resistor colour code table as a guide, but we still recom- PCB surface, so their height above the PCB is no more than mend that you measure each value using a digital multime- 12.5mm; otherwise, the lid of the case will not fit correctly. ter before fitting them because some colours can be easily The potentiometer (VR1) and PCB-mounted switches S1 confused, especially under low light. and S2 can now be fitted, along with the DC socket (CON1), You can then install the diodes. These must be mounted the terminals for the loudspeaker (CON2) and the 3.5mm with the orientation as shown. D1 is a 1N5819 type while jack socket (CON3). D2 is a smaller 1N4148 type. Finally, solder LED1 in place. It’s mounted with its lens IC1 should preferably be mounted in an IC socket, while horizontal, centred at a height of 6mm above the PCB. Bend IC2 can be soldered directly to the PCB. When installing the its leads at 14mm back from the base of the lens through socket and ICs, take care to orientate them correctly. The 90°, making sure the longer anode lead is to the left. small dimple marking pin 1 must be positioned as shown Testing in the relevant overlay diagram. REG1 mounts horizontally on the PCB with the leads Apply power (either from a 9V battery or plugpack) and bent down 90° to insert into the holes. The metal tab is se- check that LED1 lights and that REG1 provides a 5V outcured to the PCB with an M3 screw and nut. put, measured between its metal tab and the right-hand Make sure you bend the pins down and tighten the screw lead (nearest the edge of the PCB). before soldering the leads; otherwise, when you do it up, Also, check for 5V at pin 1 of IC1, pin 8 of IC2 and pin 1 you could crack the solder joints. of IC3. Pins 3 and 5 of IC2 should be at around 2.5V. The capacitors can be mounted next, starting with the Turn volume control VR1 down to zero (maximum antiMKT types. There are two options for the 27nF capacitor, clockwise) then plug in a pair of headphones or earbuds. as mentioned in the parts list. It’s easiest to use a single Put them on – you should hear nothing – then slowly turn 27nF capacitor but if you can’t get one, you can solder a VR1 up and check that you can hear the sound output. 22nF capacitor in its place on the top of the PCB and add Unplug the headphones and repeat the above check with a 4.7nF capacitor mounted on its side under the PCB (so an external speaker connected to CON2 now. You should they’re soldered in parallel). be rewarded with an increase in noise as you increase VR1. The electrolytic types should go in next and once again, For both earphones or speakers, pink noise is produced they must be orientated with the polarity shown, ie, with when switch S2 is in the up position and white noise when the longer (positive) lead through the hole nearest the + it is down. symbol on the PCB. The stripe on the can indicates the Preparing the case negative lead. Make sure these capacitors are mounted hard down in the Because all the controls and sockets are mounted directly Resistor Colour Codes            No. Value 2 1MΩ 1 100kΩ 1 68kΩ 1 30kΩ 4 10kΩ 1 4.7kΩ 1 3.0kΩ 2 2.2kΩ 1 1kΩ 1 270Ω 1 150Ω siliconchip.com.au 4-Band Code (1%) brown black green brown brown black yellow brown blue grey orange brown orange black orange brown brown black orange brown yellow violet red brown orange black red brown red red red brown brown black red brown red violet brown brown brown green brown brown 5-Band Code (1%) brown black black yellow brown brown black black orange brown blue grey black red brown orange black black red brown brown black black red brown yellow violet black brown brown orange black black brown brown red red black brown brown brown black black brown brown red violet black black brown brown green black black brown Australia’s electronics magazine Small Capacitor Codes Qty. Value o o o o o o o 1 3 1 1 2 1 1 220nF 100nF 33nF 27nF 22nF 10nF 4.7nF F Code EIA Code IEC Code 0.22F 0.1F 0.033F 0.027F 0.022F 0.01F 0.0047F 224 104 333 273 223 103 472 220n 100n 33n 27n 22n 10n 4n7 November 2018  69 case and mark out the positions for the holes required. The Jaycar case has a removable end panel which makes drilling a little easier. But the Altronics case does not have such a panel – in this case the PCB mounts upside-down on the lid. Therefore the holes are in a different position to those in the Jaycar case. Also, you will need to remove the retaining clip from the plug for CON2 with side cutters, as this will foul the panel and case if left intact, preventing its insertion. Final assembly End-on view of the controls of the Tinnitus & Insomnia Killer – again, this is the Jaycar case version. No label is needed as markings are on the front panel . on the PCB, it is essential that they are drilled/cut out in the proper position. Use Fig.7 as a guide for locating and sizing these holes. You can also download this diagram as a PDF file from the www.siliconchip.com.au website, print it and use it as a template. Most holes can simply be drilled (with care) but the 12.5 x 9mm rectangular hole (for the speaker terminal block) is made by drilling a circular hole or series of holes within the perimeter and then filing it to shape. Holes are also required in the sides of the case for the DC socket and 3.5mm jack socket. Place the PCB in the For the Jaycar case, the battery snap is inserted from the battery compartment side and the leads pass through to the PCB. They are routed through two 3mm holes for strain relief, as shown in Figs. 5&6. Solder the ends directly to the plus and minus pads, ensuring that the red lead goes to the pad marked plus. The PCB is secured to the base of the case using four self-tapping screws for the Jaycar version and using three screws for the Altronics version, into the integral mounting bushes. If you purchased the optional belt clip for the Altronics case, attach it now, then attach the lid to the case using the four screws supplied with the case. Front panel label To produce a front panel label, you have several options. Easiest and quickest is to simply photocopy (or download and print) a label on bond paper, cut it out and glue it to the panel. However, this will not last long without protection – self-adhesive clear plastic film will help. The labels can be downloaded from siliconchip. com.au/Shop/2018/11 Or you could print onto clear overhead projector film with a flipped image (using film suitable for your type of printer) and attach to the lid with white or grey silicone sealant, with the printing on the underside. The label will then read correctly from the outside, while protecting the label from damage. Alternatively, you can print onto a synthetic “Dataflex” sticky label that is suitable for inkjet printers or a “Datapol” sticky label for laser printers. After fixing the label to the panel, cut out the required holes with a hobby knife. For more information on making this type of label, see siliconchip.com.au/Help/FrontPanels Which speaker to use? Fig.8: 1:1 front panel artwork for the Jaycar case (left) and the Altronics case (right). They are slightly different sizes to match the different case sizes.These can also be downloaded from siliconchip. com.au for you to print. 70 Silicon Chip Just about any 4 or 8-ohm speaker can be pressed into service. Maximum power is only 750mW so you’re not likely to blow anything up! And contrary to popular belief, larger speakers generally do not require more power to drive than smaller speakers, as they are (usually!) more efficient. Therefore, the larger one will usually sound “louder” than a smaller one for a given power input. So if you want to use that old speaker box gathering dust in the cupboard, go right ahead! SC Australia’s electronics magazine siliconchip.com.au