Silicon ChipGiving the Ultrasonic Theremin A Volume Control - January 2017 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Pumped hydro storage is no panacea for renewables & Airbags could kill your daughter
  4. Subscriptions
  5. Feature: Pumped Storage Hydroelectricity by Dr David Maddison
  6. PartShop
  7. Feature: Viewing Radio Waves In Colour by Ross Tester
  8. Project: New SC200 Audio Amplifier by Nicholas Vinen & Leo Simpson
  9. Project: High Power DC Motor Speed Control by John Clarke
  10. Serviceman's Log: When spare parts aren't around by Dave Thompson
  11. Project: Programming the ATtiny85 With An Arduino by Lawrence Billson
  12. Product Showcase
  13. Project: El Cheapo Modules From Asia - Part 3 by Jim Rowe
  14. Project: Giving the Ultrasonic Theremin A Volume Control by Bao Smith
  15. Feature: Real-Time System Modelling by Karthik Srinivasan
  16. Feature: Set-Top Boxes Make Great (Cheap!) PVRs by Jim Rowe
  17. Vintage Radio: Pye 1951 5-Valve Model APJ-Modified by Associate Professor Graham Parslow
  18. PartShop
  19. Market Centre
  20. Advertising Index
  21. Outer Back Cover

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

You can view 40 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 "New SC200 Audio Amplifier":
  • 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)
Items relevant to "High Power DC Motor Speed Control":
  • 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 "Programming the ATtiny85 With An Arduino":
  • Firmware (.ino) files for the Programming the ATtiny85 With An Arduino (Software, Free)
Items relevant to "El Cheapo Modules From Asia - Part 3":
  • 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)
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 "Giving the Ultrasonic Theremin A Volume Control":
  • Firmware (.ino and .c) files for Giving the Ultrasonic Theremin a Volume Control (Software, Free)
Articles in this series:
  • Arduino-Based Digital Theremin (December 2016)
  • Arduino-Based Digital Theremin (December 2016)
  • Giving the Ultrasonic Theremin A Volume Control (January 2017)
  • Giving the Ultrasonic Theremin A Volume Control (January 2017)

Purchase a printed copy of this issue for $10.00.

Improving your Arduino-based Theremin By BAO SMITH Last month we had a short article on building an Arduino-based digital Theremin which may have left some a bit wanting. This month we show how to add a second sensor onto the Theremin which is used to control volume. Y ou can’t really call something a Theremin if all it does is alter pitch. So, we decided to improve on the Theremin kit from Jaycar by adding a second ultrasonic sensor which is used to alter volume. This extra HC-SR04 ultrasonic sensor is cheap – it can be bought from Jaycar for $7.50 (Cat. XC4442). Adding the second sensor The second sensor is aimed perpendicular relative to the first and moving your hand closer to it increases the volume, decreasing it if you move away. While the physical change to this kit is very simple, there is much more that needs to be altered on the software side to provide the volume-altering effect. Because of the lack of space around the DIGITAL pins due to the pitch-controlling sensor being located there, we opted to plug the second sensor into the ANALOG pins. 80  Silicon Chip The second ultrasonic sensor is fitted so that VCC goes to ANALOG pin 2, while Trig goes to pin 3. Note that the amplifier power lead has been bent slightly so that there is better spacing between parts. siliconchip.com.au Conveniently, the ANALOG pins on the Arduino Uno can be used as digital pins, however, when manipulating them, the pin number needs to be prefixed with 'A', ergo A2 corresponds to ANALOG pin 2 on the board. We have placed the addition sensor with VCC on ANALOG pin 2, Trig on pin 3, Echo on pin 4 and GND on pin 5. We also slightly bent the 2-pin male header that the amplifier power supply connection was attached to so the lead does not come into contact with the sensor. As detailed in last month’s article, the pin locations of the new sensor can be altered (if necessary) by changing what is defined in the software. But it’s easiest to use the same pins we have. Then all that needs to be done is upload the new software to the board. The new software will still work with just one sensor, as shown last month, and can be downloaded for free from our website www.siliconchip.com.au Software Once again, the software details are left to an interested reader. Instead, we will just go over some of the more important points. At the top of the Ultrasonic_Theremin.ino file there is a new macro called VOL_SENSOR which is set to 1 by default. When set to 1, the software will act as if both sensors are attached, and thus attempts to request data from both sensors. If set to 0 the software functions as if only the pitch-controlling sensor is attached and thus only polls one sensor. The amplifier’s audio signal level is determined by the value of the 8-bit OCR2B register, which can range between 0 to 255 inclusive. Now that we have the additional sensor, a second distance measurement is computed (simultaneously with the first, to avoid slowing down the feedback loop). This distance measurement is then used to scale the sinewave value written to the OCR2B register, effectively attenuating the sound level depending on how far your hand is from the new sensor. By default, the software uses the same MAX_DIST setting for both sensors to set their maximum detection range. If for some reason you wanted to use a different value for each sensor, you would need to modify the software. The trickiest part of modifying the software to handle two sensors was the code to measure the distance for each simultaneously. This involves sending simultaneous trigger pulses, then waiting for both echo pulses to be received while separately timing the start and end of each echo, so that we can later subtract them and calculate the distance measured. We recommend that interested readers take a close look at this part of the source code to see how we did it. Of course, one of the great things about Arduino is that you can download our software and easily experi- Projects with SIZZLE! Two high-voltage projects which use the same PCB: High Energy Electronic Ignition for Cars Use to replace failed ignition module or to upgrade a mechanical ignition system Published in Nov/Dec 2012 (siliconchip.com.au/project/ high-energy+igniton) Jacob's Ladder A spectacular (and noisy! ) display of crackling, menacing sparks as they mysteriously climb the “ladder” Published in Nov/Dec 2013 Parts available from PCB, IGBT SILICON CHIP On-Line Shop: programmed PIC, siliconchip.com.au/shop Look for all the details at siliconchip.com.au/project/jacob ment with making changes to see what effect they have. More Arduino projects If you’re interested in building other Arduino projects, check out Jaycar’s guides at: www.jaycar.com.au/ arduino SC Are Your S ILICON C HIP Issues Getting Dog-Eared? Are your SILICON CHIP copies getting damaged or dogeared just lying around in a cupboard or on a shelf? Can you quickly find a particular issue that you need to refer to? REAL VALUE AT $16.95 * PLUS P & P Keep your copies of SILICON CHIP safe, secure and always available with these handy binders Order now from www.siliconchip.com.au/Shop/4 or call (02) 9939 3295 and quote your credit card number. *See website for overseas prices. siliconchip.com.au January 2017  81