Silicon ChipJanuary 2024 - Silicon Chip Online SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Subscriptions
  5. Back Issues: Hare & Forbes Machineryhouse
  6. Publisher's Letter: Teach-In 2024
  7. Feature: Cheeky chiplets by Max the Magnificent
  8. Feature: Net Work by Alan Winstanley
  9. Project: Active Mains Soft Starter by John Clarke
  10. Project: Raspberry Pi Pico W BackPack by Tim Blythman
  11. Project: Active Subwoofer For Hi-Fi at Home by Phil Prosser
  12. Feature: Max’s Cool Beans by Max the Magnificent
  13. Feature: Circuit Surgery by Ian Bell
  14. Feature: MITCHELECTRONICS by Robin Mitchell
  15. Project: Audio Out by Jake Rothman
  16. PCB Order Form
  17. Advertising Index: Bush MB60 portable radio by Ian Batty

This is only a preview of the January 2024 issue of Practical Electronics.

You can view 0 of the 72 pages in the full issue.

Articles in this series:
  • (April 2020)
  • (April 2020)
  • Techno Talk (May 2020)
  • Techno Talk (May 2020)
  • Techno Talk (June 2020)
  • Techno Talk (June 2020)
  • Techno Talk (July 2020)
  • Techno Talk (July 2020)
  • Techno Talk (August 2020)
  • Techno Talk (August 2020)
  • Techno Talk (September 2020)
  • Techno Talk (September 2020)
  • Techno Talk (October 2020)
  • Techno Talk (October 2020)
  • (November 2020)
  • (November 2020)
  • Techno Talk (December 2020)
  • Techno Talk (December 2020)
  • Techno Talk (January 2021)
  • Techno Talk (January 2021)
  • Techno Talk (February 2021)
  • Techno Talk (February 2021)
  • Techno Talk (March 2021)
  • Techno Talk (March 2021)
  • Techno Talk (April 2021)
  • Techno Talk (April 2021)
  • Techno Talk (May 2021)
  • Techno Talk (May 2021)
  • Techno Talk (June 2021)
  • Techno Talk (June 2021)
  • Techno Talk (July 2021)
  • Techno Talk (July 2021)
  • Techno Talk (August 2021)
  • Techno Talk (August 2021)
  • Techno Talk (September 2021)
  • Techno Talk (September 2021)
  • Techno Talk (October 2021)
  • Techno Talk (October 2021)
  • Techno Talk (November 2021)
  • Techno Talk (November 2021)
  • Techno Talk (December 2021)
  • Techno Talk (December 2021)
  • Communing with nature (January 2022)
  • Communing with nature (January 2022)
  • Should we be worried? (February 2022)
  • Should we be worried? (February 2022)
  • How resilient is your lifeline? (March 2022)
  • How resilient is your lifeline? (March 2022)
  • Go eco, get ethical! (April 2022)
  • Go eco, get ethical! (April 2022)
  • From nano to bio (May 2022)
  • From nano to bio (May 2022)
  • Positivity follows the gloom (June 2022)
  • Positivity follows the gloom (June 2022)
  • Mixed menu (July 2022)
  • Mixed menu (July 2022)
  • Time for a total rethink? (August 2022)
  • Time for a total rethink? (August 2022)
  • What’s in a name? (September 2022)
  • What’s in a name? (September 2022)
  • Forget leaves on the line! (October 2022)
  • Forget leaves on the line! (October 2022)
  • Giant Boost for Batteries (December 2022)
  • Giant Boost for Batteries (December 2022)
  • Raudive Voices Revisited (January 2023)
  • Raudive Voices Revisited (January 2023)
  • A thousand words (February 2023)
  • A thousand words (February 2023)
  • It’s handover time (March 2023)
  • It’s handover time (March 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • Prophecy can be perplexing (May 2023)
  • Prophecy can be perplexing (May 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • How long until we’re all out of work? (August 2023)
  • How long until we’re all out of work? (August 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • Holy Spheres, Batman! (October 2023)
  • Holy Spheres, Batman! (October 2023)
  • Where’s my pneumatic car? (November 2023)
  • Where’s my pneumatic car? (November 2023)
  • Good grief! (December 2023)
  • Good grief! (December 2023)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (February 2024)
  • Cheeky chiplets (February 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk (July 2024)
  • Techno Talk (July 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk (November 2024)
  • Techno Talk (November 2024)
  • Techno Talk (December 2024)
  • Techno Talk (December 2024)
  • Techno Talk (January 2025)
  • Techno Talk (January 2025)
  • Techno Talk (February 2025)
  • Techno Talk (February 2025)
  • Techno Talk (March 2025)
  • Techno Talk (March 2025)
  • Techno Talk (April 2025)
  • Techno Talk (April 2025)
  • Techno Talk (May 2025)
  • Techno Talk (May 2025)
  • Techno Talk (June 2025)
  • Techno Talk (June 2025)
  • Techno Talk (July 2025)
  • Techno Talk (July 2025)
Items relevant to "Active Mains Soft Starter":
  • Active Mains Soft Starter PCB [10110221] (AUD $10.00)
  • PIC12F617-I/P programmed for the Active Mains Soft Starter [1011022A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Firmware for the Active Mains Soft Starter [1011022A] (Software, Free)
  • Active Mains Soft Starter PCB pattern (PDF download) [10110221] (Free)
  • Active Mains Soft Starter lid panel artwork (PDF download) (Free)
Articles in this series:
  • Active Mains Soft Starter, Part 1 (February 2023)
  • Active Mains Soft Starter, Part 1 (February 2023)
  • Active Mains Soft Starter, Part 2 (March 2023)
  • Active Mains Soft Starter, Part 2 (March 2023)
  • Active Mains Soft Starter (January 2024)
  • Active Mains Soft Starter (January 2024)
  • Active Mains Soft Starter (February 2024)
  • Active Mains Soft Starter (February 2024)
Items relevant to "Active Subwoofer For Hi-Fi at Home":
  • Bookshelf Speaker Passive Crossover PCB [01101201] (AUD $10.00)
  • Bookshelf Speaker Subwoofer Active Crossover PCB [01101202] (AUD $7.50)
  • Bookshelf Speaker Passive and Active Crossover PCB patterns (PDF download) [01101201-2] (Free)
  • Bookshelf Speaker System timber and metal cutting diagrams (PDF download) (Panel Artwork, Free)
Articles in this series:
  • Easy-to-build Bookshelf Speaker System (January 2020)
  • Easy-to-build Bookshelf Speaker System (January 2020)
  • Building the new “bookshelf” stereo speakers, Pt 2 (February 2020)
  • Building the new “bookshelf” stereo speakers, Pt 2 (February 2020)
  • Building Subwoofers for our new “Bookshelf” Speakers (March 2020)
  • Building Subwoofers for our new “Bookshelf” Speakers (March 2020)
  • Stewart of Reading (October 2023)
  • Stewart of Reading (October 2023)
  • Stewart of Reading (November 2023)
  • Stewart of Reading (November 2023)
  • ETI BUNDLE (December 2023)
  • ETI BUNDLE (December 2023)
  • Active Subwoofer For Hi-Fi at Home (January 2024)
  • Active Subwoofer For Hi-Fi at Home (January 2024)
  • Active Subwoofer For Hi-Fi at Home (February 2024)
  • Active Subwoofer For Hi-Fi at Home (February 2024)
Articles in this series:
  • Audio Out (January 2024)
  • Audio Out (January 2024)
  • Audio Out (February 2024)
  • Audio Out (February 2024)
  • AUDIO OUT (April 2024)
  • AUDIO OUT (April 2024)
  • Audio Out (May 2024)
  • Audio Out (May 2024)
  • Audio Out (June 2024)
  • Audio Out (June 2024)
  • Audio Out (July 2024)
  • Audio Out (July 2024)
  • Audio Out (August 2024)
  • Audio Out (August 2024)
  • Audio Out (September 2024)
  • Audio Out (September 2024)
  • Audio Out (October 2024)
  • Audio Out (October 2024)
  • Audio Out (March 2025)
  • Audio Out (March 2025)
  • Audio Out (April 2025)
  • Audio Out (April 2025)
  • Audio Out (May 2025)
  • Audio Out (May 2025)
  • Audio Out (June 2025)
  • Audio Out (June 2025)
  • Audio Out (July 2025)
  • Audio Out (July 2025)
Practical Electronics The UK’s premier electronics and computing maker magazine Circuit Surgery Mixing and tuning in the superheterodyne receiver MitchElectronics Our new series on electronics basics for beginners: using the 555 Audio Out Discrete op amp update Raspberry Pi Pico W BackPack WIN! Check quality factor with our Q Meter Microchip PIC-IoT WA Development Board WIN! Superb Active Subwoofer MitchElectronics New learning series! 555/4017 circuits PLUS! Techno Talk – Oscillating onions, Batman!? Cool Beans – Arduino: switching with transistors Net Work – Celebrating the magnificent UK mains plug! www.electronpublishing.com <at>practicalelec Jan 2024 £5.99 01 9 772632 573030 practicalelectronics Reduce Noise in Analog Signals Analog-Focused PIC18-Q71 MCUs With Flexible Peripherals The PIC18-Q71 family of microcontrollers broadens the PIC18 product portfolio with an extensive list of analog features to simplify sensor interfacing and analog measurements, optimize system performance and reduce BOM cost. This product family is available in package and memory options for a variety of applications including LED lighting, predictive maintenance, medical, home automation, industrial process control, automotive and Internet of Things (IoT). Key Features • 12-bit Differential ADC with Computation and Context Switching • Two Op Amps with programmable gain settings using on-chip resistor ladder • Two 8-bit buffered DAC • One 10-bit buffered DAC • Two Analog Comparators • Analog Peripheral Manager for optimized power consumption • 8-bit Signal Routing Port for inter-peripheral connections microchip.com/PIC18-Q71-family The Microchip name and logo and the Microchip logo are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. All other trademarks are the property of their registered owners. © 2023 Microchip Technology Inc. All rights reserved. MEC2533A-UK-11-23 Practical Electronics Volume 53. No. 1 January 2024 ISSN 2632 573X Contents Projects and Circuits Q Meter by Charles Kosina 18 We’ve published numerous LC meters that can measure inductance and capacitance, but you might need to know the quality factor (Q) of an inductor, not just its inductance. This Q Meter uses a straightforward circuit to measure Q up to values of about 200. Raspberry Pi Pico W BackPack by Tim Blythman 26 Our Raspberry Pi Pico BackPack from March 2023 has a powerful dual-core 32-bit processor, 480 × 320 pixel colour touchscreen, onboard real-time clock, SD card socket, stereo audio output and infrared receiver. Now, for about £5 more, it has Wi-Fi too! Active Subwoofer – Part 1 by Phil Prosser 32 This subwoofer is designed to be a no-compromise approach to a ‘sub’, making it a perfect match for a high-quality home theatre system, or as part of a high-fidelity stereo system. Series, Features and Columns Techno Talk by Max The Magnificent Oscillating onions, Batman! 8 Net Work by Alan Winstanley Reports on wasteful electrical devices; insight into the mysteries of the British mains plug; plus more uses for the Ecowitt Wi-Fi weather station. 10 The Fox Report by Barry Fox Project challenges for inventive PE readers 16 Max’s Cool Beans by Max The Magnificent Arduino Bootcamp – Part 13 42 Circuit Surgery by Ian Bell Frequency shifting and superheterodyne receivers – Part 2 48 NEW SERIES! MitchElectronics by Robin Mitchell The 555 Timer IC – Part 2: Enter Logic 54 Audio Out by Jake Rothman Discrete audio op amp – Part 4 64 Regulars and Services Made in the UK. Written in Britain, Australia, the US and Ireland. Read everywhere. © Electron Publishing Limited 2023 Copyright in all drawings, photographs, articles, technical designs, software and intellectual property published in Practical Electronics is fully protected, and reproduction or imitation in whole or in part are expressly forbidden. The February 2024 issue of Practical Electronics will be published on Thursday, 4 January 2024 – see page 72. Practical Electronics | January | 2024 Wireless for the Warrior Subscribe to Practical Electronics and save money NEW! Practical Electronics back issues DOWNLOADS – 2022 now available! Reader services – Editorial and Advertising Departments Editorial A big thank you to the PE writers!... Wireless for the Warrior...The perfect Christmas present! Exclusive Microchip reader offer Win a Microchip PIC-IoT WA Development Board PE Teach-In 9 Teach-In bundle – what a bargain! PE Teach-In 8 Practical Electronics PCB Service PCBs for Practical Electronics projects Classified ads and Advertiser index Next month! – highlights of our next issue of Practical Electronics 2 4 6 7 7 9 14 41 47 68 71 72 1 WIRELESS FOR THE WARRIOR by LOUIS MEULSTEE THE DEFINITIVE TECHNICAL HISTORY OF RADIO COMMUNICATION EQUIPMENT IN THE BRITISH ARMY The Wireless for the Warrior books are a source of reference for the history and development of radio communication equipment used by the British Army from the very early days of wireless up to the 1960s. The books are very detailed and include circuit diagrams, technical specifications and alignment data, technical development history, complete station lists and vehicle fitting instructions. Volume 1 and Volume 2 cover transmitters and transceivers used between 1932-1948. An era that starts with positive steps taken to formulate and develop a new series of wireless sets that offered great improvements over obsolete World War I pattern equipment. The other end of this timeframe saw the introduction of VHF FM and hermetically sealed equipment. Volume 3 covers army receivers from 1932 to the late 1960s. The book not only describes receivers specifically designed for the British Army, but also the Royal Navy and RAF. Also covered: special receivers, direction finding receivers, Canadian and Australian Army receivers, commercial receivers adopted by the Army, and Army Welfare broadcast receivers. Volume 4 covers clandestine, agent or ‘spy’ radio equipment, sets which were used by special forces, partisans, resistance, ‘stay behind’ organisations, Australian Coast Watchers and the diplomatic service. Plus, selected associated power sources, RDF and intercept receivers, bugs and radar beacons. ORDER YOURS TODAY! JUST CALL 01202 880299 OR VISIT www.electronpublishing.com Quasar Electronics Limited PO Box 6935, Bishops Stortford CM23 4WP, United Kingdom Tel: 01279 467799 E-mail: sales<at>quasarelectronics.co.uk Web: quasarelectronics.co.uk All prices include 20% VAT. Free UK mainland delivery on orders over £60. Postage & Packing Options (Up to 1Kg gross weight): UK Standard 2-5 Day Delivery - £4.95 : UK Mainland Next Day Delivery - £9.95 : Please order online if you reside outside the UK (our website will calculate postage for you). Payment: We accept all major credit/debit cards. Make UK cheques/PO’s payable to Quasar Electronics Limited and include P&P detailed above. !! Order online for reduced price postage and fast despatch !! Please visit our online shop now for full details of over 1000 electronic kits, projects, modules and publications. Discounts for bulk quantities. Solutions for Home, Education & Industry Since 1993 NEW! Mr Robot Kit A fun, wearable electronic gadget that you can pin to your clothes. Easy to solder beginners kit. Two flashing bicolour LEDs resemble the eyes. 65 x 40 x 15 mm. CR2032 battery powered (not included). Order Code: WSL108 - 6.68 Great Brands - Official Main Dealer Electronic Kits & Modules We have a massive selection of selfassembly electronic kits and preassembled modules. Please see the full range on our website or call for details. LED Buddy / LED Tester Kit Hold any type of LED to the contact pads to see it's polarity, forward voltage & the recommended series resistor value. Adjustable target current & forward voltage. Great design aid. Order Code: WSMI198 - £16.66 12-in-1 Solar Hydraulic Construction Kit Solar & hydraulic powered robot can be transformed into twelve different animals and mechanical robots (monkey, T-Rex, scorpion, excavator, etc). Moves easily. Provides great interaction with kids. Teaches the benefit of alternative energy. Aged 14+. Order Code: KSR17 - £29.95. Stereo Ultrasonic Bat Detector Kit Educational & fun kit converts high frequency sounds (20 - 90kHz) normally imperceptible to humans like bat signals into audible noise. Can also help detect failures in machines, engines, etc. Stereo feature adds the possibility to pinpoint the source. Frequency range 20-90kHz. 3.5mm jack output. 129x60x40mm. Requires 3x AA batteries and stereo headphones (not included). Order Code: WSAK8118 - £20.39 LED Electronic Dice Kit Still popular! A must-build soldering kit for all beginners. Dice slowly rolls to stop on a random number when the push button is released. 9V battery (not included). Ideal for educational courses. Wide selection of component types. Order Code: MK109 - £7.08 Digitally Controlled FM Radio Kit Build your own modern, high quality FM receiver project with excellent sensitivity powered by a simple 9V PP3 battery (not included. Auto-seeking button. 4 station presets. Volume control. Excellent learning project for schools and colleges. Order Code: WSAH194 - £20.39 Audio Analyser Display Kit 3 Channel RGB LED Light Organ Kit 3 outputs react to different sound frequencies. On-board microphone picks up surrounding sound or music and drives the low, mid & high frequency outputs. Connect 1224Vdc RGB or separate colour LED strips or LEDs (not included). Master & separate channel sensitivity adjustment. 1.25 A max. per channel. Panel mountable facia 127 x 44mm. Terminal block or jack power supply connection. Control knobs included. Order Code: WSL209 - £14.10 Signal Generator Kit Sine wave, triangle, square wave and integrator (selectable through jumper) with 0 - 100Vrms adjustable output level. 1kHz (approx.) fixed signal frequency. 9V battery (not included). Order Code: WSAH105 - £6.12 Bidirectional DC Motor Speed Controller Control the speed of most common DC motors (rated up to 28Vdc/5A) from fully OFF to fully ON in both directions. Single potentiometer controls speed & direction. Screw terminal block connectors. PCB: 90x42mm. Not suitable for use with lead acid batteries! Kit Order Code: 3166KT - £19.96 Assembled Order Code: AS3166 - £29.95 Card Sales & Enquiries Small, compact LCD display, ideal for panel mounting. Give your homemade audio gear a high-tech look. Upgrade existing equipment. Provides Peak Power, RMS Power, Mean dB, Peak dB, Linear Audio Spectrum And 1/3 Octave Audio Spectrum. Auto / Manual range selection. Peak-hold function. Speaker impedance selection. Order Code: K8098 - £38.39 Electronic Component Tester Kit Build your own versatile component tester. Shows value and pin layout information for resistors (0.1 Ohm resolution, max. 50M Ohm), coils (0.01mH - 20H), capacitors (28p - 100mF), diodes, BJT, JFET, E-IGBT, D-IGBT, E-MOS & D-MOS. Order Code: WSMI8115 - £44.15 LCD Oscilloscope Educational Kit Build your own LCD oscilloscope with this exciting new kit. Learn how to read signals. See the electronic signals you learn about displayed on your own LCD oscilloscope. Despite the low cost, this oscilloscope kit has a lot of features found on expensive units like signal markers, frequency, dB, true RMS readouts and more. A powerful autosetup function will get you going in a flash! Order Code: WSEDU08 - £48.54 Practical Electronics UK readers SAVE £1 on every issue SUBSCRIBE NOW! Practical Electronics The UK’s premier electronics and computing maker magazine Circuit Surgery Understanding and using gyrators Make it with Micromite Finishing the PicoMite smart light controller software GPS-Synchronised Analogue Clock Audio Out Designing a practical discrete audio op amp PicoMite smart light Controller WIN! Microchip Integrated Graphics and Touch Curiosity Evaluation Kit Practical Electronics The UK’s premier electronics and computing maker magazine Kick Start <at>practicalelec A practical discrete audio op amp Gyrators and parametric equalisers Electronic Building Blocks Building a long-distance remote-control switch Microchip MPLAB PICkit 5 WIN! WIN! Sep 2023 £5.99 09 practicalelectronics PLUS! Multi-Stage Buck-Boost Battery Charger PIC/AVR Breakout Boards Techno Talk – Holy Spheres, Batman! Cool Beans – Arduino Bootcamp: resistors and pots Net Work – AI-powered image processing www.electronpublishing.com Circuit Surgery MitchElectronics Frequency shifting and superheterodyne receivers A brand new series on electronics basics for beginners Dual-Channel PSU for Breadboards KickStart Legacy logic revisited Practical Electronics The UK’s premier electronics and computing maker magazine Circuit Surgery Mixing and tuning in the superheterodyne receiver MitchElectronics Our new series on electronics basics for beginners: using the 555 Audio Out Discrete op amp update Raspberry Pi Pico W BackPack Digital Boost Regulator WIN! WIN! 9 772632 573030 Audio Out Constructing the discrete audio op amp DC Supply Filter for Vehicles Microchip MPLAB ICD 5 Techno Talk – My truth, your truth and AI Cool Beans – Arduino Bootcamp: new boards update! Net Work – Routers, power supplies, TEMU and more www.electronpublishing.com Circuit Surgery Audio Out Using colour LCD displays with the Raspberry Pi Pico Model Railway Auto Level Crossing & Signal Control Completing the Wide-range Ohmmeter PLUS! Practical Electronics The UK’s premier electronics and computing maker magazine 01202 087631 Circuit Surgery Using gyrators to build equalisers Superb audio discrete operational amplifier Mini LED Driver Practical Electronics The UK’s premier electronics and computing maker magazine <at>practicalelec Oct 2023 £5.99 10 9 772632 573030 practicalelectronics InductanceCapacitance Meter Mk3 Panel upgrades: learn to anodise aluminium at home Interfacing dust and particulate sensors to the Arduino Uno PLUS! Techno Talk – Where’s my pneumatic car? Cool Beans – Arduino ‘gazintas’ and ‘gazoutas’ Net Work – Logitech mice and the ORA Funky Cat BEV www.electronpublishing.com <at>practicalelec Nov 2023 £5.99 11 9 772632 573030 practicalelectronics WIN! MitchElectronics New learning series! Discover Astable and Monostable circuits PLUS! Microchip PIC24F LCD and USB Curiosity Development Board Display Adaptor for Breadboards Techno Talk – Good grief! Is that the time? Cool Beans – Arduino buzzers, ‘musical’ notes and LDRs Net Work – Low-power UPS systems for electronics www.electronpublishing.com <at>practicalelec Dec 2023 £5.99 12 9 772632 573030 practicalelectronics WIN! Check quality factor with our Q Meter Microchip PIC-IoT WA Development Board WIN! Superb Active Subwoofer MitchElectronics New learning series! 555/4017 circuits PLUS! Techno Talk – Oscillating onions, Batman!? Cool Beans – Arduino: switching with transistors Net Work – Celebrating the magnificent UK mains plug! www.electronpublishing.com <at>practicalelec Jan 2024 £5.99 01 9 772632 573030 practicalelectronics Take out a one-year subscription and save more than £10 over the year. Even better – save over £1 per issue if you subscribe for two years – a total saving of £26. Overseas rates represent exceptional value You also: • Avoid any cover price increase for the duration of your subscription • Get your magazine delivered to your door each month • Guarantee a copy, even if your local newsagent sells out Order by: • Phone or post with a cheque, postal order or credit card • Or order online at: www.electronpublishing.com Practical Electronics SUBSCRIPTION PRICES Subscriptions for delivery direct to any address in: UK: 6-months £33.99, 12-months £59.99, 24-months £114.99 Europe Airmail: 6-months £38.99, 12-months £69.99, 24-months £129.99 Rest Of The World Airmail: 6-months £46.99, 12-months £84.99, 24-months £164.99 Cheques (in £ sterling only) payable to Practical Electronics and sent to: Practical Electronics Subscriptions, PO Box 6337, Bournemouth BH1 9EH, United Kingdom Tel: 01202 087631 Email: pesubs<at>selectps.com Also via our online shop at: www.electronpublishing.com Subscriptions start with the next available issue. We accept MasterCard or Visa. (For past issues see the Back Issues page.) SUBSCRIPTION ORDER FORM  6 Months:.UK £33.99, Europe £38.99 (Airmail), Rest of the World £46.99 (Airmail)  1 Year: UK £59.99, Europe £69.99 (Airmail), Rest of the World £84.99 (Airmail)  2 Years: UK £114.99, Europe £129.99 (Airmail), Rest of the World £164.99 (Airmail) To: Practical Electronics Subscriptions PO Box 6337 Bournemouth BH1 9EH United Kingdom Tel: 01202 087631 Email: pesubs<at>selectps.com I enclose payment of £ .............. (cheque/PO in £ sterling only) payable to Practical Electronics  Please charge my Visa/Mastercard My card number is: ....................................................................... Please print clearly, and check that you have the number correct Card Security Code .................. Valid From Date........................ (The last 3 digits on or just under the signature strip) Card Ex. Date ...................................... Name ............................................................................................ Address ........................................................................................ DIGITAL SUBSCRIPTIONS Electronic subscriptions are available from £29.99 for 12 months, more details at: www.electronpublishing.com 4 Post code .................................. Tel. ........................................... Email ............................................................................................ Subscriptions start with the next available issue. Practical Electronics | January | 2024 Subscribe to MAY 2023 ISSN 1030-2662 05 The VERY BEST DIY Melbourne Exhibition Centre, Projects! 9 771030 266001 $1150* NZ $1290 May 10-11 Australia’s International Airsho All the newest tech Australia’s top electronics magazine Silicon Chip is one of the best DIY electronics magazines in the world. Each month is filled with a variety of projects that you can build yourself, along with features on a wide range of topics from in-depth electronics articles to general tech overviews. 6 months 1 year 2 years • • • • Print Combined Online $100 $110 $50 ≈₤53 ≈€62 ≈₤59 ≈€68 ≈₤27 ≈€31 $195 $215 $95 ≈₤105 ≈€120 ≈₤115 ≈€132 ≈₤51 ≈€58 $380 $415 $185 ≈₤205 ≈€234 ≈₤223 ≈€255 ≈₤100 ≈€114 Combined subscriptions include both the printed magazine and online access. Prices are in Australian dollars (AUD) unless otherwise specified. Prices listed are for everywhere in the world except Australia and New Zealand. View siliconchip.com.au/Shop/SubRates for a full list of current prices. Price estimates are just that and should only be used as a guide, we primarily take payment in the form of Australian dollars. Try our Online Subscription – now with PDF downloads! An online issue is perfect for those who don’t want too much clutter around the house and is the same price worldwide. Issues can be viewed online, or downloaded as a PDF. INC GST INC GST w in Avalon Airpor t Published in Silicon Chip The History of Computer Memory; Jan-Feb 2023 Raspberry Pi Pico W BackPack; January 2023 Wideband Fuel Mixture Display; April to June 2023 Silicon Chirp; April 2023 Advanced SMD Test Tweezers; February & March 2023 To start your subscription go to siliconchip.com.au/Shop/Subscribe DOWNLOAD YOUR PE/EPE BACK ISSUES COMPLETE-YEAR collections – all 12 issues for each year! From just £5.95 each VOL 28 – January to December 1999 – £5.95 VOL 40 – January to December 2011 – £12.95 VOL 30 – January to December 2001 – £7.95 VOL 42 – January to December 2013 – £15.95 VOL 32 – January to December 2003 – £7.95 VOL 44 – January to December 2015 – £17.95 VOL 29 – January to December 2000 – £6.95 VOL 31 – January to December 2002 – £7.95 VOL 33 – January to December 2004 – £7.95 VOL 34 – January to December 2005 – £8.95 VOL 35 – January to December 2006 – £8.95 VOL 36 – January to December 2007 – £8.95 VOL 37 – January to December 2008 – £8.95 VOL 38 – January to December 2009 – £10.95 VOL 39 – January to December 2010 – £11.95 VOL 41 – January to December 2012 – £14.95 VOL 43 – January to December 2014 – £16.95 VOL 45 – January to December 2016 – £19.95 VOL 46 – January to December 2017 – £22.95 VOL 47 – January to December 2018 – £27.95 VOL 48 – January to December 2019 – £27.95 VOL 49 – January to December 2020 – £29.95 VOL 50 – January to December 2021 – £32.95 VOL 51 – January to December 2022 – £34.95 – NEW! FIVE-YEAR collections – 60 issues! From just £14.95 each PE2832: Jan 99 to Dec 03 – £14.95 PE2933: Jan 00 to Dec 04 – £14.95 PE3034: Jan 01 to Dec 05 – £14.95 PE3135: Jan 02 to Dec 06 – £14.95 PE3236: Jan 03 to Dec 07 – £14.95 PE3337: Jan 04 to Dec 08 – £14.95 PE3438: Jan 05 to Dec 09 – £19.95 PE3539: Jan 06 to Dec 10 – £25.95 PE3640: Jan 07 to Dec 11 – £25.95 PE3741: Jan 08 to Dec 12 – £25.95 PE3842: Jan 09 to Dec 13 – £33.95 PE3943: Jan 10 to Dec 14 – £33.95 PE4044: Jan 11 to Dec 15 – £33.95 PE4145: Jan 12 to Dec 16 – £35.95 PE4246: Jan 13 to Dec 17 – £37.95 PE4347: Jan 14 to Dec 18 – £38.95 PE4448: Jan 15 to Dec 19 – £39.95 PE4549: Jan 16 to Dec 20 – £42.95 PE4650: Jan 17 to Dec 21 – £44.95 – NEW! 20 YEARS OF PE! PE2832: Jan 99 to Dec 03 AMAZING BUNDLE OFFER Every issue from 1999 – 2018 PE3337: Jan 04 to Dec 08 PLUS! PLUS! 240 magazines for just PE3842: Jan 09 to Dec 13 £59.95 PE3447: Jan 14 to Dec 18 PLUS! Do you have the 15-year bundle? Upgrade to the new 20-year bundle for just £14.95 with: PE15to20 Download your collections at: www.electronpublishing.com Practical Electronics Editorial offices Practical Electronics Tel 01273 777619 Electron Publishing Limited Mob 07973 518682 1 Buckingham Road Fax 01202 843233 Brighton Email pe<at>electronpublishing.com East Sussex BN1 3RA Web www.electronpublishing.com Advertisement offices Practical Electronics Adverts Tel 01273 777619 1 Buckingham Road Mob 07973 518682 Brighton Email pe<at>electronpublishing.com East Sussex BN1 3RA Editor Matt Pulzer General Manager Louisa Pulzer Digital subscriptions Stewart Kearn Tel 01202 880299 Online Editor Alan Winstanley Web Systems Kris Thain Publisher Matt Pulzer Print subscriptions Practical Electronics Subscriptions PO Box 6337 Bournemouth BH1 9EH Tel 01202 087631 United Kingdom Email pesubs<at>selectps.com Technical enquiries We regret technical enquiries cannot be answered over the telephone. We are unable to offer any advice on the use, purchase, repair or modification of commercial equipment or the incorporation or modification of designs published in the magazine. We cannot provide data or answer queries on articles or projects that are more than five years old. Questions about articles or projects should be sent to the editor by email: pe<at>electronpublishing.com Projects and circuits All reasonable precautions are taken to ensure that the advice and data given to readers is reliable. We cannot, however, guarantee it and we cannot accept legal responsibility for it. A number of projects and circuits published in Practical Electronics employ voltages that can be lethal. You should not build, test, modify or renovate any item of mains-powered equipment unless you fully understand the safety aspects involved and you use an RCD (GFCI) adaptor. Volume 53. No. 1 January 2024 ISSN 2632 573X Editorial A big thank you to the PE writers! It’s the end/beginning of another year, and so it’s time for my annual salute to the PE contributors. I’ve said it many times before, and I’ll say it again, Practical Electronics is nothing without its magnificent writers. They work hard every month to bring you the best in original content. So – in absolutely no particular order – a great big ‘thank you’ to Alan Winstanley, Mike Tooley, Ian Bell, Mike Hibbett, Clive ‘Max’ Maxfield, Phil Boyce, Julian Edgar, Barry Fox, Jake Rothman, and new kid on the block, Robin Mitchell. Also, a well-earned round of applause for the hard-working ‘back-office boys’, Stewart Kearn, Alan Winstanley and Kris Thain, who keep the shop and website ticking over. Wireless for the Warrior Many of you have been asking when the quartet of Wireless for the Warrior books will be back in stock – well, the answer is right now. All four are available, but selling at quite a brisk trot. They really are unique books and the perfect gift for anyone fascinated by vintage military communications equipment. One important point for international purchasers – they have become very expensive to ship, so please send us an email before placing an order so that we can quote you the correct postage. The online shop cannot do that – it’s just too complicated to implement accurately. The perfect Christmas present! ‘What would you like for Christmas?’ We all dread that question. But lucky you – for PE readers the answer is easy – ‘I just want a subscription to my favourite magazine.’ You can choose paper or online, and as a subscriber you can be sure that you will never miss a copy. Component supplies Already subscribed? We are about to receive a huge pile of PCBs from the manufacturer, so if a design you’ve been keen to build has been ‘out of stock,’ then do visit the website. Advertisements From all of us at Practical Electronics, thank you for your support over 2023, have a very happy Christmas and a healthy 2024! We do not supply electronic components or kits for building the projects featured, these can be supplied by advertisers. We advise readers to check that all parts are still available before commencing any project in a back-dated issue. Although the proprietors and staff of Practical Electronics take reasonable precautions to protect the interests of readers by ensuring as far as practicable that advertisements are bona fide, the magazine and its publishers cannot give any undertakings in respect of statements or claims made by advertisers, whether these advertisements are printed as part of the magazine, or in inserts. The Publishers regret that under no circumstances will the magazine accept liability for non-receipt of goods ordered, or for late delivery, or for faults in manufacture. Matt Pulzer Publisher Transmitters/bugs/telephone equipment We advise readers that certain items of radio transmitting and telephone equipment which may be advertised in our pages cannot be legally used in the UK. Readers should check the law before buying any transmitting or telephone equipment, as a fine, confiscation of equipment and/or imprisonment can result from illegal use or ownership. The laws vary from country to country; readers should check local laws. Practical Electronics | January | 2024 7 Oscillating onions, Batman! Techno Talk Max the Magnificent The thought that we are now capable of creating multi-billion-transistor semiconductor devices with structures whose sizes are measured in billionths of a meter makes my eyes water. I’m too young for all this excitement! I n my previous Techno Talk column (PE, December 2023), I cogitated on the concept of Precision Time Protocol (PTP), a.k.a. IEEE 1588, used to synchronise the nodes forming a packetbased network with an accuracy in the sub-microsecond range. The way this works is that somewhere in the network is a grandmaster clock – which typically obtains its time from some GNSS (global navigation satellite system) source – that propagates its concept of time throughout the network. One thing we didn’t discuss was the fact that each node in the network maintains its own local time-of-day (ToD) value, as part of which it employs an oscillator, but what sort of oscillator might it employ? Oscillating onions, Batman! To be honest, there are more layers to this onion than you might imagine. We start with a resonator, which is a passive device, such as a quartz crystal, that vibrates at a fixed frequency (its resonant frequency). The next step up is an oscillator, which is an active device that combines a resonator with an oscillation circuit to generate a clock signal. The first quartz-based crystal oscillator (XO) was built by Walter Cady in 1921, more than 100 years ago as I pen these words. Now, this is where things get interesting. The typical frequency stability variation over temperature of quartzbased XOs is between ±10 and ±100 parts-per-million (ppm). This isn’t too shabby and will satisfy a wide variety of use cases, but it’s insufficient for many of today’s more demanding applications. The next step up are TCXOs (temperature-compensated crystal oscillators), which typically have frequency stability of ±0.05 ppm to ±5 ppm over their operating temperature range. For those who demand even more, we have OCXOs (oven-controlled crystal oscillators) that achieve high stability by encasing the crystal along with temperature-sensing and compensation circuits inside a heated metal enclosure to create a miniature ‘oven’ with a relatively constant temperature. In this case, we can achieve frequency stability in the range of ±0.5 to ±20 parts per billion (ppb). 8 Ovens don’t cool things down When you think about it, an oven can only heat things up (it can’t cool things down). This means the inside of the OCXO’s oven must be maintained at a higher temperature than the outside ambient temperature (‘duh’). What does this mean in these days of climate change in which a temperature of 40.3°C was recorded at Coningsby, Lincolnshire, on 19 July 2022 (a temperature of 53.9°C was recorded in Death Valley, California, on 16 July 2023)? Well, fear not, because we are talking about oven temperatures around 75°C. If the outside temperature ever exceeds this value, keeping accurate time will be the least of our problems. A rose by any other name The first quartz-based OCXO was created in 1929 and this legacy technology is still ticking along (pun intended) to this day. Having said this, although quartz resonators remain the mainstay of the oscillation industry, devices using other materials – such as ceramic resonators or MEMS (micro-electromechanical systems) – are becoming increasingly common. Theoretically, oven-controlled MEMSbased oscillators should be called OCMOs, but that’s one battle no one in the industry appears prepared to fight. Instead, they refer to these bodacious beauties as MEMS OCXOs, and I cannot find it in my heart to fault them. The reason I’m waffling on about all this is that I was recently chatting with the folks at SiTime. These little scamps have just introduced their Epoch MEMS OCXOs, which are truly OCXOs for the 21st Century. These silicon-based devices – which have a frequency stability of 1 ppb and an internal oven temperature of 95°C – are claimed to be eight-times more consistent, two-times more resilient, use three-times lower power, 30-times more reliable, and 25-times smaller than their legacy quartz-based OCXO counterparts. How low can we go? The term ‘technology node’ (a.k.a. ‘process technology,’ ‘process node,’ or just ‘node’) refers to a specific semiconductor manufacturing process. The first ASIC I designed deep in the mists of time we used to call 1980 was a device at the 5-micron (5µm) technology node. In those days, depending on who you were talking to, the numerical qualifier referred to the width of a track or the length of the channel between the source and drain diffusion regions of a field-effect transistor (FET). I typically think of this number as reflecting the size of the smallest structure that can be created in or on the surface of the silicon chip. Every time we move to a new technology node, we either reduce the area used or increase the number of transistors that can be squeezed into the same area. We also increase the speed of the transistors while reducing the amount of power they consume. We started creating devices at the 1µm technology node circa 1985, where 1µm is 100th the diameter of a human hair (assuming a human hair has a diameter of 0.1mm). At that time, the naysayers started to proclaim that we were reaching the limits of what was possible. But we kept on overcoming problems and coming up with new solutions, and we started to describe nodes in terms of nanometres (nm). I remember the progression well: 800nm in 1987, 600nm in 1990, 350nm in 1993, 250nm in 1996, 180nm in 1999, and 130nm in 2001. Surely this was as low as we could go… but no! We saw 90nm in 2003, 65nm in 2005, 45nm in 2007, 32nm in 2009, 22nm in 2012, 14nm in 2014, 10nm in 2016, 7nm in 2018, and 5nm in 2020. Apple’s latest processor, the M3 is built with 3nm technology – it’s most advanced version, the M3 Max, boasts 92 billion transistors. TSMC, the Taiwanese world leader in chip fabrication plans on introducing its 2nm node in 2025/2026, and pundits are predicting the 1nm node in 2028. (For comparison’s sake, the atomic radius of silicon is 0.132nm, so we are talking about structures just a few times bigger than the atoms used to build them.) All I can say is the thought that we are now capable of creating multi-billiontransistor devices with structures whose sizes are measured in billionths of a metre makes my eyes water. Practical Electronics | January | 2024 Exclusive offer Win a Microchip PIC-IoT WA Development Board Practical Electronics is offering its readers the chance to win a Microchip PIC-IoT WA Development Board (EV54Y39A) – and even if you don’t win, receive a 15%-off voucher, plus free shipping for one of these products. Out of the box, the MCU is preloaded with firmware that enables you to quickly connect and send data to the AWS platform using the on-board temperature and light sensors. Once you are ready to build your own custom design, you can easily generate code using the free software libraries in MPLAB Code Configurator (MCC). The PIC-IoT WA Development Board combines a powerful The PIC-IoT WA Board is supported by MPLAB X IDE PIC24FJ128GA705 MCU, an ATECC608A and features the following elements: CryptoAuthentication secure element IC and • The on-board debugger (PKOB nano) supplies the fully certified ATWINC1510 Wi-Fi network full programming and debugging support controller, which provides the simplest and through MPLAB X IDE. It also provides access to most effective way to connect your embedded a serial port interface (serial-to-USB bridge) and application to Amazon Web Services (AWS). one logic analyser channel (debug GPIO). The board also includes an on-board (approx £37.50) •The on-board debugger enumerates on debugger and requires no external hardware the PC as a mass storage interface device to program and debug the MCU. for easy ‘drag and drop’ programming, Wi-Fi configuration, and full access to the microcontroller The PIC24FJ128GA705 is a 16-bit microcontroller application Command Line Interface (CLI). featuring up to 128KB of ECC Flash, 16KB of RAM •A mikroBUS socket allows expanding the board capabilities and eXtreme Low Power. It has a 12-bit ADC operating from a selection of 450+ sensor and actuator options. at 200ksps with up to 14 analogue inputs, 3 comparators and • A light sensor used to demonstrate published data. CTMU for touch applications. • Microchip MCP9808 high-accuracy temperature sensor used to demonstrate published data and MCP73871 Li-Ion/LiPo battery Available in 28-pin, 44-pin and 48-pin packages. This family is charger with power path management. ideally suited for general-purpose applications. Worth $45.50 each Free-to-enter competition Microchip EV54Y39A Microchip PIC-IoT WA Development Board How to enter For your chance to win a Microchip PIC-IoT WA Development Board or receive a 15%-off voucher, including free shipping, enter your details in the online entry form at: https://page.microchip.com/PE-WA.html Closing date The closing date for this offer is 31 December 2023 Practical Electronics | January | 2024 September 2023 winner Ben Woods He won a Microchip Integrated Graphics and Touch (IGaT) Curiosity Evaluation Kit 9 Net Work Alan Winstanley This month’s column goes in search of vampires – not the blood-sucking variety, but the electrical power-consuming type. For the enlightenment of our many overseas readers there’s an insight into the mysteries of the British mains plug, plus Alan discovers more uses for his Ecowitt Wi-Fi weather station. L ast month’s Net Work column had a power-related theme, suggesting a compact power supply in the form of a 12V mains adaptor that, thanks to its built-in Li-Ion battery, would enable a router, IP camera or similar smaller device to continue operating during mains power cuts. I also explained how the UK’s electricity distribution network is divided into ‘Rota Load Blocks’ and how you could check the coverage of your own block using an interactive map on the 105 website: www.powercut105.com In today’s economic climate, saving energy (and money) is more important than ever, so I’ve been using a plugin power meter to check the energy consumption of various electrical appliances dotted around the house. As I explained last month, I’ve already unplugged or discarded some legacy electricals which will knock £100 or more per year off the fuel bill, and I’ve been surprised to find how some supposedly benign electrical appliances are actually wasteful ‘money sinks’, sometimes called ‘vampire appliances’ because they silently sink their teeth into electricity and cost you hard cash even when they’re not in use. As a rule of thumb, something consuming six watts on standby 24 x 7 will swallow one UK electrical unit or kWh a week, costing about 30p, adding up to £15 a year at current UK prices. In electronics, we’re often eager to know a circuit’s quiescent current but when it comes to household electrical appliances, something that’s rarely highlighted by manufacturers is a product’s standby power. It’s typically buried on the back page of a user manual or PDF somewhere, so you have to dig deep to discover how much electricity an appliance is using when it’s doing nothing useful at all – just being ‘on’, even if it’s only ‘standby mode’. Some empirical tests with my digital power meter uncovered a few surprises: I found a remote-controlled tower fan, when on standby (which is most of the year), silently consumed nine watts of electricity or £23 a year; an old clockradio cost about the same, as did an ultrasonic pest repeller as well as a coffee pod machine. Disconnecting or scrapping these items will save about £100 a year alone at current prices. I found a 300W electric blanket still drew 12 watts on standby (£30 a year, pro rata), while a small 1kW kettle with digital controls was found to use 7-9W on standby, or another £20 or so annually for doing absolutely nothing. That’s entertainment On the home entertainment front, I was gratified to find a Humax PVR only drew a watt or two on tickover, while TP-Link’s Tapo smartphone app displays power and usage data for electrical equipment connected to their TP110 smart socket. 1556 FR ABS IP54 enclosures Learn more: hammfg.com/1556 uksales<at>hammfg.com • 01256 812812 10 Practical Electronics | January | 2024 (not tested by the author) would be the upgraded backlit version of the pricier KETOTEK Power Meter Plug (Amazon UK, item B0BZYN6544) which also shows VA, frequency and power factor and other data. Finding and clobbering those ‘vampire appliances’ is quite a rewarding exercise, for ourselves if not the utility companies – and furthermore, no vampire-repelling garlic, silver crosses or wooden stakes are required! Getting plugged in A plug-in power meter like this Ketotek model offers an insight into an electrical appliance’s running costs. Available from Amazon. a Panasonic Blu-Ray DVD player drew negligible standby power provided I disabled the ‘Quick Start’ option. I found a Chromecast dongle used 3W (say £8 a year) while a Devolo PLC Wi-Fi/Ethernet adaptor supposedly has an auto power saving mode that switches it down from 9W to 1W, but it seems pretty warm all the time; perhaps the Chromecast keeps it awake, hence it consumes more power. Meanwhile the TV set is connected to the mains through a TP-Link Tapo smart socket that’s on extended test (see Net Work, December 2022), and an Amazon Echo Show 8-inch LCD display (itself using a 30W power supply) controls this with a few voice commands. Usefully, an energy monitoring feature is included with the Tapo P110 smart socket. It can also be managed through an app, and by tapping in your electricity tariff, the running costs and usage of connected equipment can be displayed. The app tells me that the TV has used 67kWh so far this year (£20). Incidentally this smart socket also has a useful time switch and an ‘Away’ mode, that switches, for example, a light on and off randomly. Choose carefully as other Tapo sockets (the Tapo P100) come without this energy monitoring feature. Plug-in power meters are readily available from the usual websites for as little as £6. A backlit LCD type makes life easier, but reviews of cheap identicallooking white-label Chinese devices are very mixed, so maybe treat those as consumable items. Worth considering Practical Electronics | January | 2024 Still on the topic of connecting electrical equipment and saving money, one everyday piece of hardware familiar Inside a typical British ‘Type G’ mains to us all, or so I thought, is the mains plug, fitted with a ceramic cartridge fuse plug. I discovered in a forum that many and cable grip. American constructors and electricians which needs no earth, sometimes comes had never come across the British mains fitted with a 3-pin plug that has a plastic plug and, when compared with US twoearth pin! prong types, the British one seemed The British mains wall outlet also huge, clunky and grossly over-engineered has two key design features: a sprung (all true). Our so-called ‘Type G’ plugs shutter that only opens when the plug (also called ‘plug tops’ in Britain) also is pushed in (which is why the plug’s appear in a few overseas countries, and earth pin is longer), and (often a surprise it’s generally recognised that the British for visiting Americans) wall outlets BS1363-standard 13A plug design is that have an on-off switch. Some of my the best mains plug in the world, bar outlets, located in dark corners, also have none. It has several key safety features power-on neon lights. A deep freezer or including sleeved live and neutral pins aquarium might be connected to an outlet to safeguard against fingers curling that has no switch, though, to prevent underneath when it’s being inserted, and it from being accidentally switched off. a longer earth (ground) pin that ensures To d a y ’s g e n e r a t i o n m i g h t b e that the apparatus is grounded before dumbfounded to learn that, until the the mains supply itself is connected. 1990s, hardly any electrical gear bought Every British plug has a hidden in Britain came with a mains plug, so surprise because it contains a 1-inch you had to fit your own, stripping the colour-coded ceramic cartridge fuse, insulation to the right lengths and wiring red for 3A, black for 5A and a brown them correctly to the three terminals, one denoting a 13A fuse, suitable for sorting out the cable grip and fuse along appliances consuming up to 3kW. My the way. Until factory-fitted plugs were photo shows the interior of a typical plug. mandated by law, householders grappled What’s less obvious is the reason for the with P = IV to figure out which fuse fuse in the first place. It ‘oversees’ the mains power cord rather than simply protecting against appliance faults or overloads. Such a fuse is needed because of the British way of installing ‘ring’ mains wiring, daisy-chaining one outlet to the next as part of a loop, rather than using a radial design. The plug’s fuse will disconnect the mains supply if, say, you slice through the cable accidentally; without a fuse, consumers would rely on the main circuit breakers (say 32A) in the residential fuse box, creating a fire hazard. Believe it or not, double- Fake UK moulded mains plug supplied with IT gear sourced insulated equipment, on the web. Note unsafe shrouded earth pin and lack of fuse. 11 This traditional good-quality Britishmade mains plug had a built-in neon indicator. The BSI ‘Kitemark’ logo signifies testing and compliance with relevant British Standards. rating to use, mindful of the product’s power consumption. No doubt there were countless instances of electrical fires or accidents (or worse) caused by the incompetent fitting of electrical plugs. False economies Another reason that fitted plugs became compulsory was that poor quality, counterfeit types were sold that were clearly hazardous. Unfortunately, fake plugs are still seen today on low-grade imported goods sold online, often bundled with mains power packs. They are instantly recognisable as being small mouldings with no fuse, or having insulation covering the ground pin as well as live/neutral. The cable insulation can sometimes be stripped off between finger and thumb, the wire cores themselves may be steel wire, and any BS 1363 (British Standard) or CE marks will be fake as well. They should be thrown away in electrical waste, after cutting off the plug. One thing you won’t find anywhere these days is a mains plug with a simple neon or LED pilot light, such as the traditional BSI ‘Kitemarked’ type shown in my photo. These were handy reminders that something was switched on, but they fell by the wayside many years ago. Back to my energy-saving topic: to save electricity, vampire devices can be unplugged or switched off at the wall socket, but if they share, say, an extension lead (power strip) with other always-on equipment instead, then one option is to use a mains plug with builtin rocker switch and, usually, a neon or LED indicator. A large plug, moulded in black or white, seems to be the only one widely available and these are sold online. They are onerous to wire up but they just about do the job. Surfing around, I spotted a neaterlooking UK-style plug with built-in 12 Two types of foreign-made UK plugs with rocker switches and power indicator, sourced online. The one on the right looks neater, but it does not have a compliant 1-inch ceramic fuse. rocker switch and LED, originating from An alphabet of storms China. They seem impossible to come With winter firmly upon us, Britain’s by as far as UK sales are concerned, so weather system has entered its stormy I suspect they are intended for Asian season as Atlantic weather fronts batter markets such as Singapore. One reason the country with gales, rain and floods. might be that the fuse carrier holds a In 2015 the UK’s Meteorological Office 20mm type rather than a standard 1-inch joined their Irish and Dutch counterparts cartridge fuse. Even so, I’m tempted in giving major storms some beguiling to use them on small appliances – names, and an A-Z list of names is agreed my photo shows examples of both of upon annually. You can suggest a name these plugs. yourself, and the full list and timetable Another option is to find a power strip is published by the Met Office at: having individually switched sockets https://bit.ly/pe-jan24-met for ultimate control and, unusually, a Storm Babet in October caused a few small number made by Brennenstuhl problems in Britain, including at the also have cable exits at either end for non-working isolated farm where the convenience – see the data sheet at: author lends its owner a helping hand. https://bit.ly/pe-jan24-bren Babet blew down an overhead power line Last, an interesting energy-saving socket is produced by Ansmann that isolates an appliance completely one minute after it goes into standby mode. The Ansmann AES-3 uses zero standby power and can be restarted by pressing a 1.8m corded button. A zerowatt countdown timer, the Ansmann AES-1 switches off after 15m / 30m / 1hr / 2hrs /4hrs or 8hrs in case you forget to switch an appliance off. These money-saving products are sold by all the major online electronic retailers. Readers who would like to learn more about the evolution of British plugs and sockets will find lots of interesting details at: https://bit.ly/pe-jan24-ukplug There’s an excellent explanation of worldwide electric plug standards at: The Ansmann AES-3 is a zero-power standby shutdown https://bit.ly/pe-jan24-plug switch with a restart button on a 1.8m cord. Practical Electronics | January | 2024 which blacked out the farm, taking the farm’s telephone system with it. As the farm relies on cordless big-button phones that have no battery backup, when the power goes off, the base station stops working so the phones are cut off as well. For reasons explained in earlier columns, the farm’s residents have no need for broadband and can’t be expected to use a mobile phone either, let alone grapple with a smartphone full of apps. Forget all about email, WhatsApp or even text messaging! Eventually, another cottage owner called me, and I duly headed out in the rain, only to find live power lines strewn across rainsoaked hedgerows on both sides of the country lane. I could think of better ways of spending my milestone birthday, I mused, but I set about calling the power authorities on ‘105’ and we were grateful to have power safely restored later that evening. As a workaround in the farm’s ‘digital desert’, I returned with an old analogue phone and plugged it into the farm’s BT phone socket as a standby, which can only help in case the power goes off again. An LPG cooker is also installed so we’ll get by somehow, as we run through the alphabet of storms. Action weather stations! As I write this piece, Storm Debi has just been announced by the Met Office and regular readers will recall that I’ve been using an Ecowitt HP2551 weather station since the start of the year. I’ve enjoyed comparing weather forecasts with actual events recorded by my own set-up. I can also tell if there’s been a frost or whether it’s rained in the night, at what time and how much. The indoor TFT colour display is crystal clear and the outdoor 868MHz-based sensor array, lashed firmly to a concrete post in the garden, has performed perfectly so far. I’ve had no problems with communications apart from a brief interruption caused by my own Wi-Fi going down, and the Ecowitt website and smartphone app have been commendably troublefree too, uploading and displaying the data captured by the various weather sensors. Overall, I’ve found it a very rewarding experience so far, with nothing to dislike at all. Bundled with the weather station is a single stand-alone transmitter (type WH32A) that displays temperature, humidity and barometric pressure on its LCD. This data is the ‘Indoor’ readings seen on the main console, while the outdoor array transmits wind, rain, s o l a r, t e m p e r a t u r e and humidity data. This model also has a multi-channel o p e r a t i o n w h i c h The Ecowitt WN30 sensor has a waterproof temperature a c c e p t s d a t a f r o m probe on a 3m cable, designed for their Wi-Fi weather up to eight external stations or gateways. Its dip switches have been set to show wireless sensors that °C and use channel 4. can monitor conditions in various locations. The main display sensors are not weatherproof though, and can scroll through these sensor readings should be sheltered from the elements. automatically, in a multiplexing fashion, Unfortunately, the dip switch settings and data can be read on the smartphone printed in the manual are actually upside app or uploaded to the cloud. (You can down compared with the correct ones keep your Ecowitt website data and shown on the plastic case! location private, or share it using links The multi-channel feature of the Ecowitt or a QR code: this works really well.) weather station gave me another idea – how about an in-home monitoring system as well? Some time ago, the author’s Freezer meltdown Samsung deep freezer suffered a calamity A wireless transmitter (type WH31 or when the refrigerant leaked – while the WN31A – same thing) is sold separately freezer’s digital display showed −18°C which displays temperature, humidity on the door as normal, it turned out that and channel number on its LCD. Adding this was only the ‘set point’, and the a new sensor is commendably hassle-free: freezer interior was silently thawing out, it merely involves setting the desired reaching +5°C, resulting in an expensive channel (1-8) and scale (°C/°F) and fitting total loss. Apart from the self-contained some batteries. The main console detects WN31A transmitter already mentioned, the new sensor without a problem. These Terrington Components • Project boxes designed and manufactured in the UK. • Many of our enclosures used on former Maplin projects. • Unique designs and sizes, including square, long and deep variaaons of our screwed lid enclosures. • Sub-miniature sizes down to 23mm x 16mm, ideal for IoT devices. MADE IN BRITAIN www.terrington-components.co.uk | sales<at>terrington-components.co.uk | Tel: 01553 636999 Practical Electronics | January | 2024 13 transmitters to monitor refrigerators, attics, loft spaces and basements this way. You can rename the various sensors to something more meaningful on the main console (eg, ‘Pond’, ‘Freezer’, ‘Attic’, ‘Greenhouse’ and so on) and the weather station can ultimately be set up to send email alerts or sound an alarm, though the console’s built-in piezo alarm is quite timid. I now have five wireless transmitters monitoring their environment, but if you don’t need an allsinging and dancing Ecowitt’s GW1100 Wi-Fi weather station gateway uses LCD weather station, their range of wireless sensors to display data on a web page or smartphone app instead of an LCD console. Ecowitt offers a smaller Wi-Fi gateway, the Ecowitt produces one with a waterproof GW1100 which uses a smartphone (IP65) wire probe sensor (WN30) that is app instead. It is 5V USB rechargeable. fitted with a 3 metre cable terminated in The comprehensive accessory range a probe. The temperature range is quoted includes a floating pool thermometer (for as −40°C to +60°C (−40°F to +140°F). fishpond keepers), a soil moisture probe, This offers the prospect of wirelessly a pricey PM2.5 particle sensor, lightning monitoring, say, a fridge or deep freezer, detector, water leakage sensor and a leaf checking a horticultural propagator, water wetness sensor – all equally compatible tank, aquarium or terrarium, or measuring with the larger weather station. A very soil or water temperature. I learned that useful sensor compatibility table is at: other customers are indeed using Ecowitt https://bit.ly/pe-jan24-eco GET T LATES HE T CO OF OU PY R TEACH -IN SE RIES AVAILA BL NOW! E Order direct from Electron Publishing PRICE £8.99 (includes P&P to UK if ordered direct from us) Many of these items are sold online by Amazon, but the prices do vary wildly; I recently spotted the HP2551 for just over £170 all in, but I have seen it listed at £100 more than that, so my previous advice remains – monitor prices very closely and use the ‘Cameliser’ web browser plug-in to alert you to price drops. Ecowitt accessories are also sold on AliExpress, and I recently bagged a WN30 and WN31 transmitter, a spare anemometer wind cup and a debris guard for the rain gauge, all at less than half price. It seems that AliExpress and China’s Temu are slugging it out for trade: if you have an AliExpress account, try logging into AliExpress using a different email address and see if new-user discount offers pop up. Remember that VAT will be added to the dollar prices shown. The UK website is also worth a look: https://weatherspares.co.uk That’s all for this month – remember that the above hyperlinks are readymade for you to click on in the Net Work blog on our advert-free website at electronpublishing.com, which also has a special page for each month’s free-toenter Microchip competition. See you next time! The author can be reached at: alan<at>epemag.net EE FR -ROM CD ELECTRONICS TEACH-IN 9 £8.99 FROM THE PUBLISHERS OF GET TESTING! Electronic test equipment and measuring techniques, plus eight projects to build FREE CD-ROM TWO TEACH -INs FOR THE PRICE OF ONE • Multimeters and a multimeter checker • Oscilloscopes plus a scope calibrator • AC Millivoltmeters with a range extender • Digital measurements plus a logic probe • Frequency measurements and a signal generator • Component measurements plus a semiconductor junction tester PIC n’ Mix Including Practical Digital Signal Processing PLUS... YOUR GUIDE TO THE BBC MICROBIT Teach-In 9 – Get Testing! Teach-In 9 A LOW-COST ARM-BASED SINGLE-BOARD COMPUTER Get Testing Three Microchip PICkit 4 Debugger Guides Files for: PIC n’ Mix PLUS Teach-In 2 -Using PIC Microcontrollers. In PDF format This series of articles provides a broad-based introduction to choosing and using a wide range of test gear, how to get the best out of each item and the pitfalls to avoid. It provides hints and tips on using, and – just as importantly – interpreting the results that you get. The series deals with familiar test gear as well as equipment designed for more specialised applications. The articles have been designed to have the broadest possible appeal and are applicable to all branches of electronics. The series crosses the boundaries of analogue and digital electronics with applications that span the full range of electronics – from a single-stage transistor amplifier to the most sophisticated microcontroller system. There really is something for everyone! Each part includes a simple but useful practical test gear project that will build into a handy gadget that will either extend the features, ranges and usability of an existing item of test equipment or that will serve as a stand-alone instrument. We’ve kept the cost of these projects as low as possible, and most of them can be built for less than £10 (including components, enclosure and circuit board). © 2018 Wimborne Publishing Ltd. www.epemag.com Teach In 9 Cover.indd 1 01/08/2018 19:56 PLUS! You will receive the software for the PIC n’ Mix series of articles and the full Teach-In 2 book – Using PIC Microcontrollers – A practical introduction – in PDF format. Also included are Microchip’s MPLAB ICD 4 In-Circuit Debugger User’s Guide; MPLAB PICkit 4 In-Circuit Debugger Quick Start Guide; and MPLAB PICkit4 Debugger User’s Guide. ORDER YOUR COPY TODAY: www.electronpublishing.com 14 Practical Electronics | January | 2024 Create Fantastic Electronic systems using VERSION 10 10% off your first Flowcode purchase using code: EPE20 Use code at checkout: flowcode.co.uk/buy • NOW FREE FOR HOBBYISTS • The Fox Report Barry Fox’s technology column Project challenges for inventive PE readers T his month, I humbly offer creative readers two practical test problems which are crying out for DIY project solutions. The suggestions flow from my recent experience of rebuilding a home AV system, by replacing the main amplifier. This involved ripping out and re-connecting a jungle of wires, while simplifying the set-up by removing redundant components. Check cables Flat digital HDMI and Ethernet cables are now available. They hide neatly under rugs, but they love to twist themselves and treading on the twist can cause faults. A £10/20 battery-powered two-part continuity tester is an essential tool for checking if a digital cable has gone bad. Avoid the ‘touch’ test Rebuilding any AV system is a lot easier if you follow a few simple practical guidelines, not all of which will be as egg-suckingly obvious to others as they are to some. Some of these guidelines date back to invaluable tech training I received in the RAF. Optical SP/DIFs can be identified by looking for the telltale red laser light. Checking and identifying low-voltage audio cables can of course be done by touching to induce mains hum. But if the amplifier volume is up, there’s a risk of blowing speaker cones. Touching wires is always best avoided. You never know when a dangerous voltage may have crept through. Take your time – one labelled wire at a time Build a cable tester Wherever possible, disconnect only one wire or pair of wires at a time. Identically label each end of each wire. There are not enough colours in the rainbow to colour code every connection path. I use a Dymo label computer printer with Dymo software (but cheaper compatible label cartridges bought on line) to print simple stick-on labels for each end of each cable run. Connecting a meter to small phono and coax plugs is tricky and for years I have been happily using an analogue cable test kit from Vision Products of Northampton. This uses a low-voltage transmitter and receiver that plug into cable ends to show a red LED for short circuits and beep for successful connection. These handy testers came with an assorted collection of plugs and sockets that connect to almost every imaginable analogue cable. That’s the good news – the bad news it that Vision Products informed me that unfortunately these kits are no longer available, and I can’t find any other source. Perhaps someone would like to make this a construction project? It shouldn’t too difficult. A few simple rules... Use cable ties – gently Modern ‘handcuff’ cable ties are great for tidily binding cables together, to stop self-tangling. But don’t over tighten or you won’t be able to identify troublesome wires by gently tugging one end and watching for movement elsewhere. (left) Testing a flat cable; these are vulnerable to folding/ kinking, so lay them carefully (right) Using the excellent, but sadly discontinued Vision Test Kit to check AV cables and plugs – can clever PE readers come up with a viable alternative? 16 Practical Electronics | January | 2024 Failing OLEDs Whole batches of radios and Internet radios (for example, from British DAB pioneers Pure and Roberts) were built with OLED displays which are now failing. Without a means to see the settings and tuning options, otherwise perfectly good radios become unusable. This frustration is compounded by the fact that ‘simply’ replacing the display turns out to be tricky, expensive and more trouble than it is worth. However, by chance I discovered that pointing a smartphone camera at the failing OLED display provides a much more readable image on the smartphone screen. With so many old smartphones now languishing in drawers, perhaps someone might rise to the challenge of designing an ageing-OLED viewer for equipment troubleshooting? NEW! 5-year collection 2017-2021 All 60 issues from Jan 2017 to Dec 2021 for just £44.95 PDF files ready for immediate download See page 6 for further details and other great back-issue offers. Ethernet testers are not just for computer/network troublshooting. Ethernet crops everywhere, including home AV systems. Make sure you have one of these handy testers to check cables. Purchase and download at: www.electronpublishing.com tekkiepix pic of the month Mavica – Sony’s pioneering digital camera standard for ‘electronic still video’. Based on the NTSC TV standard. It gave either 25 fully interlaced picture frames, or 50 half-scan pictures of lower resolution. But the technology remained too expensive to rival film, so most companies shelved the idea. Beaten by Fuji Sony’s pioneering digital SLR Mavica offered a range of lenses. S ony obviously liked the name Mavica. In 1974 the company announced the Mavica video recorder, which captured moving pictures on flexible magnetic cards that measured 15 by 20cm, and curved slowly past a scanning video head. Each card could store 10 minutes of colour TV with stereo sound. Sony promised higher density cards with increased recording time, but Mavica was killed by the arrival of Sony’s own Betamax, with several hours recording time from a small cassette. Practical Electronics | January | 2024 Each Mavipak 5cm floppy disc stored up to 50 colour pics. A sony digital first In 1981, Sony dusted off the name and shocked the photographic world by demonstrating a camera, which looked like a conventional SLR (single-lens reflex), but contained an electronic image sensor and miniaturised computer disk recorder. The SLR Mavica recorded analogue TV stills on a 5cm floppy disc coated with pure metal powder and spinning at 3,600 rpm. The pictures replayed through a home TV. In July 1988, 42 electronics and photographic companies agreed a In December 1988, Sony tried to go it alone, launching a consumer version of Mavica in Japan. The full kit cost around £500 and it bombed. By then Fuji had developed a prototype digital camera which used a solid-state memory card instead of disc, which is of course the way modern digital cameras work. However, since memory cards were still expensive, Sony moved on to using a standard 9cm PC floppy to store 40 digital images at very low cost. Practical Electronics is delighted to be able to help promote Barry Fox’s project to preserve the visual history of pre-Internet electronics. Visit www.tekkiepix.com for fascinating stories and a chance to support this unique online collection. 17 We’ve published numerous LC meters that can measure inductance and capacitance, but you might need to know the quality factor (Q) of an inductor, not just its inductance. This Q Meter uses a straightforward circuit to measure the Q factor over a wide range, up to values of about 200. Q Meter T he history of Q Meters goes back to 1934, when Boonton developed the first Q Meter. The Q Meter is a somewhat neglected piece of test equipment these days. Hewlett Packard bought Boonton in 1959 and produced revised versions of their Q Meter. Does anyone still manufacture them? It seems not. You can find a few on the second-hand market; but they fetch prices up to $3000. The HP 4342-A is an excellent unit and is a more modern version of the original Boonton design. My Q Meter design can’t come near the quality or accuracy of HP equipment. It is not designed as a laboratory instrument, but it will give Q measurements up to a value of about 200 with an accuracy of about 10%. Q&A So, what is Q, and why do we need to measure it? It is a measure of the dissipative characteristic of an inductor. High-Q inductors have low dissipation and are used to make Fig.1: a real inductor does not just have pure inductance; it also has parasitic series resistance (Rl) and parallel capacitance (Cp). 18 finely-tuned, narrow-band circuits. Low-Q inductors have higher dissipation, resulting in wideband performance. It can be expressed as: Q = 2π × (Epk / Edis) Where Epk is the peak energy stored in the inductor and Edis is the energy dissipated during each cycle. Let’s consider two passive components, an inductor and a capacitor. The reactance of the inductor is Xl = +jωL. Here, j = √-1, Xl is in ohms and ω = 2πf (f is the frequency). For example, a 10µH coil at 10MHz will have a reactance of +j628W. A capacitor has a reactance of the opposite polarity, ie, Xc = 1/−jωC. To resonate at 10MHz, the capacitor needs a reactance of −j628W, which equates to 25.3pF. By Charles Kosina But inductors and capacitors are not perfect. A practical inductor can be approximated as an ideal inductor with a series resistor. The coil winding will also add a small capacitance across the inductor, as shown in Fig.1. The capacitor is also not perfect but generally has a much smaller inherent resistance, so for this calculation, we can assume it is. The inductor’s Q is defined as Q = Xl/Rl and the -3dB bandwidth of such a tuned circuit is BW = f/Q. So, a tuned circuit with a 10µH coil and a Q of 100 would have a -3dB bandwidth of 100kHz at 10MHz. The Q is important if you’re trying to design something like a bandpass or notch filter. In Fig.2, we have a series-tuned circuit fed by a variable frequency source with frequency f, voltage VS Fig.2: we can calculate an unknown inductor’s Q (quality factor) using this circuit. It is connected in a series-tuned circuit with a capacitance, and that circuit is excited by a sinewave from a signal generator via a known source resistance. Measuring the input and output AC voltages and calculating their ratios allows us to compute the inductor Q, assuming the Q of the capacitance is high. Practical Electronics | January | 2024 and source resistance Rs. At resonance, Xl = −Xc; in effect, a short circuit, so the load on the generator is Rs + Rl. By having a generator with source resistance Rs much lower than Rl, the voltage measured at Vin will be close enough to VS. The current through the circuit will be Is = VS/Rl. Therefore the voltage at the junction of the inductor and capacitor is Vout = Xl × Is. By measuring Vin and Vout, the Q can be calculated as Ql = Vout / Vin. That assumes that the capacitance has been adjusted to achieve peak resonance with the inductance, ie, Xl = −Xc. That can be done by sweeping the capacitance until the peak Vout voltage is reached. The first design challenge is to have an extremely low generator source resistance. If we have a 10µH coil with a Q of 100, at 5MHz, the effective Rl is 3.14W (314W/100). If our source resistance is 0.1W, that will give an error of about 1%. But at 1MHz, Rl becomes 0.628W, and this error blows out to 15%. So using a higher frequency will generally result in a more accurate Q measurement. Low source resistance Boonton solved the source resistance problem by having the generator heat a thermocouple using a wire with a very low resistance, as shown in Fig.3. The voltage generated by this thermocouple was measured by a DC meter which indicated how much current was applied to a 0.02W resistor in series with the external inductor. I have a Meguro MQ-160 Q Meter, essentially a 1968 version of the original Boonton 260-A design, using such a thermocouple and resistor. No transistors in this one; it’s all valves! But for our design, a thermocouple is not practical. The HP design eliminated the thermocouple and instead used a step-down transformer. The Practical Electronics | January | 2024 transformer is fed by a low impedance source, as shown in Fig.4. If our source resistance is 50W, like the output of a typical signal generator, and the turns ratio is 50:1, the effective source resistance is 0.02W (50W/502), exactly what we want. Unfortunately, it is not so simple as it implies a perfect transformer. Losses in the transformer core plus winding resistance conspire against us and push up the source resistance value. We can improve this by feeding the transformer’s primary from the output of an op amp, which has an impedance close to zero. In this case, a turns ratio of 10:1 is adequate as the resultant 100:1 impedance ratio will give an acceptable load to the op amp. This is what I have used in my design. The transformer is a ferrite toroid of 12mm outside diameter. The primary is 10 turns of enamelled wire, while the ‘one turn’ secondary is a 12mm-long tapped brass spacer through the centre of the toroid. The effective RF resistance of this spacer is extremely low, and the source resistance is then mainly a function of the ferrite material and the primary winding resistance. Table 1 – frequency versus signal source impedance/spacer Frequency Brass Steel 0.1-1MHz ~0.00W 0.02W 2MHz not tested 0.016W 5MHz 0.03W 0.13W 10MHz 0.07W 0.20W 15MHz 0.09W not tested 20MHz 0.15W 0.22W 25MHz 0.10W 0.17W Circuit description The full circuit of my Q Meter is shown in Fig.5. We require a signal generator with an output of about 0dBm (1mW into 50W or 225mV RMS). You can use just about any RF signal generator. There didn’t seem to be much point in building the generator into the Q Meter since, if you’re building a Q Meter, you likely already have an RF signal generator. I’m using my AM/FM DDS Signal Generator that was described in the May 2023 issue of PE. The generator feeds a sinewave into CON1, which is boosted by op amp IC2a. This is a critical item in the design, as it needs to have a high gain bandwidth (GBW) and slew rate, as well as the capability to drive a low impedance. The Texas Instruments OPA2677 has a GBW of 200MHz, a slew rate of 1800V/µs and can drive a 25W load, which gives us enough output voltage swing up to 25MHz. The toroidal transformer core is a critical part of the design. I tested a Fair-rite 5943000301 core which is readily available from several suppliers. I wound it with 10 turns of 0.3mm-diameter enamelled copper wire. A heavier gauge (up to about 0.4mm) may be slightly better, but there has to be enough room in the centre for the spacer to pass through. I then calculated the source impedance by measuring the no-load output voltage followed by a 1W load. I did this for several frequencies, and the results are shown in Table 1. Below 1MHz, there was no measurable difference between no load and a 1W load, so the source impedance must be well below 0.01W. Core losses likely account for the higher source resistance as frequency increases, but the results are quite adequate. Brass spacers are recommended (and will be supplied in kits) due to their superior performance here, at least for the one through the toroid. The DC output of op amp IC2a is zero or very close to zero, so why do Fig.3: one method of measuring Q involves current sensing via monitoring the temperature of a resistance wire. It has the advantage of keeping the source impedance low, and no complicated shuntsensing circuitry is required. Fig.4: we need an RF signal source with an extremely low (but known) source resistance for our Q Meter. Since that is difficult to achieve by itself, feeding the signal through a low-loss stepdown transformer greatly reduces the actual source impedance, as seen by the load. 19 Digital Q Meter Fig.5: eight relays switch capacitors in parallel to vary the resonant circuit capacitance from around 40pF (the stray capacitance) to 295pF. The signal from the RF generator is amplified by op amp IC2a and fed through step-down transformer T1 to the resonant circuit. The input signal level is monitored via precision rectifier IC2b while the output signal is rectified using D3 and amplified by IC3a. we need a 10µF capacitor in series with the transformer? Since the DC resistance of the primary is a fraction of an ohm, the slightest offset 20 voltage in the op amp output could send a high direct current through the toroidal transformer primary and overload the output. IN this design, that possibility is eliminated with AC coupling. The tuning capacitor is another essential part. My Meguro MQ-160 Q Practical Electronics | January | 2024 Meter has a 22-480pF variable capacitor, typical of the tuning capacitors used in valve radios. They are available on sites like eBay, but they do Practical Electronics | January | 2024 tend to be rather large and can be surprisingly expensive. The only easy-to-get variable capacitor is the sort with a plastic dielectric for AM radios. But once you get above the broadcast band, they are very lossy, with a poor Q, and entirely unsuitable. So instead, I designed a ‘digital capacitor’ with eight relays switching in capacitors with values in a binary sequence of 1, 2, 4, …..128pF. As these are not standard values, some are made up of two capacitors in parallel. For example, 32pF is 22pF in parallel plus 10pF. Combining these allows the capacitance to be adjusted in 1pF steps from 0pF to 255pF. The measured stray capacitance due to the tracks, relays and so on amounts to 40pF, so the tuning range is 40-295pF. My LC meter shows that it tracks reasonably accurately. All capacitors are not created equal, so I have used somewhat expensive high-Q RF capacitors, available from element14, Mouser, Digi-Key and other good suppliers. Not all these capacitors have a close tolerance; some are ±2%, which detracts from the accuracy. So it isn’t a ‘real’ variable capacitor but it has the advantage of not needing a calibrated dial and a slow-motion vernier adjustment. Rather than measuring the very low voltage on the secondary side of the transformer, it is more practical to measure the primary side, and for the Q calculation, divide this by 10. I verified this assumption by checking that the voltage ratio corresponded to the turns ratio within measurement accuracy from 100kHz to 25MHz. A precision half-wave rectifier is formed using op amp IC2b in the classic configuration. By placing the rectifier diodes in the negative feedback network of the op amp, their forward voltages are effectively divided by the (very high) open-loop gain of the op amp. On positive excursions of the output pin of IC2b, the 330nF capacitor at TP3 is charged up through diode D1. The extra diode (D2) is needed becuae without it, negative excursions would saturate the op amp and lead to slow recovery, limiting its frequency range. Both diodes are 1N5711 types for fast switching. The output of IC2b is amplified by IC3b, and the resulting filtered DC voltage at TP4 is about 1.9V. The secondary voltage of the transformer is typically 200mV peak-topeak or about 70mV RMS. With a Q of 100, the voltage output at the junction of the inductor and tuning capacitor would be 20V peak-to-peak or 7V RMS. 21 Fig.6: the PCB uses mostly SMD components for compactness, although none are particularly small. The orientations of the following components are important: all relays, ICs and diodes, plus the Arduino Nano. ZD1, IC4, CON3 and associated parts form the optional debugging interface. That is not a suitable voltage to apply to the input of an op amp! So I used schottky diode D3 as a half-wave rectifier feeding a high-­ impedance (10MW/1.5MW) voltage divider. The voltage drop in the diode only introduces a small error in the measurement. The voltage at the junction of this divider is buffered and amplified by IC3a, a TSV912 op amp with an extremely high input impedance – the input bias current is typically 1pA. Switch S1 changes the gain of this op amp for the low and high Q ranges, with the low range giving a gain of 8.3 for Q values of up to 100. 22 On the high range, the gain of this stage drops to 1.7. Power supply and control A MAX660 switched capacitor voltage inverter (IC1) provides a nominally −5V supply to the OPA2677 (IC2). This is needed for proper operation of the half-wave precision rectifier ( IC2b) since the voltage at its input can swing below ground. The MAX660 is not a perfect voltage inverter, and with the current drain of the OPA2677, its output is about −3.6V, but that is adequate. The rest of the circuit operates from a regulated +5V DC fed in externally – for example, using a USB supply. An Arduino Nano module is used as the controller. This is a readily-­ available part from many suppliers at a reasonable price. Two analogue inputs are used for measuring the voltages, eight digital outputs switch relays, the two I2C serial lines drive the OLED, and there are inputs for the control rotary encoder and LOW/ HIGH switch sensing. The rotary encoder (EN1) is used to adjust the ‘digital capacitor’ value; its integral pushbutton switch toggles between steps of 1pF and 10pF. As usual with my designs, I have added a simplified RS-232 interface using hex schmitt-trigger inverter IC4 to aid code debugging. IC4, ZD1 and the two associated resistors can be left out unless you want to use the debugging interface. Eight 2N7002 N-channel MOSFETs (Q1-Q8) drive the relay coils, while eight diodes across the relay coils (D6-D13) suppress any switching transients. The resonant frequency tuning is done by selecting an appropriate frequency from the external signal generator and adjusting the variable capacitance value. Ideally, the peaking should be done with an analogue meter, but I have provided an onboard LED (LED1), the brightness of which depends on the Vout voltage. It’s a simple enough procedure to adjust the capacitance to achieve maximum brightness. The third line of the OLED also shows the output voltage of IC3a, which can be used to accurately achieve resonance too. Connector CON5 drives an optional external 0-5V moving-coil meter. You can add such a meter if a larger-­than-specified enclosure is used to house the PCB. The power supply is a standard 5V USB charger. I have not included reverse polarity protection, but an off-board 1A schottky diode (eg, 1N5819) could be added in series if desired. Construction The construction uses two PCBs (see Figs.6 and 7). The main one has all the electronics while the other has the screw terminals for the DUT and external capacitor. It is also used as a front panel and has a rectangular cutout for the OLED, holes for the controls and lettering. It is designed to fit in a RITEC 125 × 85 × 55mm enclosure (for example, one sold by Altronics as H0324, but plenty of other vendors will have similar boxes). Practical Electronics | January | 2024 The top board/front panel is 98 × 76mm and fits snugly into the recess in the clear lid of the enclosure. This board could be used as a template for accurately drilling the holes in the clear lid. But other enclosures may be used as long as they have the same or slightly greater dimensions as the H0324. For those wishing to add the 0-5V moving-coil meter, this requires an additional width of 45mm. A suitable 158 × 90 × 60mm enclosure is available from AliExpress suppliers at a reasonable price, but do remeber that delivery can take quite a few weeks. Most components on the PCB are surface-mount types, but there are no fine-pitch ones, which simplifies construction. Solder the four SOIC chips first, then all the passives, which are mostly M2012/0805-size devices (2.0 × 1.2mm). The relays take a bit of care to ensure they are square on the board so that it looks neat. On the opposite side of the board are eight 1N4148 equivalent diodes; ensure they are installed with the correct polarity, with the cathode stripes to the side marked ‘K’. After the SMDs, add the throughhole diodes, which have a 7.6mm (0.3-inch) pitch, then the rotary encoder, switch and LED. Use a 5mm plastic spacer for the LED, so it is flush with the back of the front panel. Wind ten turns of the specified enamelled copper wire onto the toroidal core, taking care that the turns are equally spaced around the circumference, to the extent possible, and the ends line up with the two pads marked PRIM on the PCB. Carefully attach the toroid so that it is centred on the mounting hole. Attaching the spacer to the board makes that easier. It may be anchored in place by an insulated wire across the two pads on the opposite side. It is not a shorted turn because only one side of this wire is connected to the ground plane. I recommend fitting socket strips for mounting the Arduino Nano module as they make replacing a faulty module easy (I have blown up a couple in the past!). The OLED screen also plugs into a 4-pin socket strip and is held in place by two 15mm-long M2 or M2.5 screws through 8mm untapped spacers. Carefully slide off the plastic strip on the four pins of the OLED so that it sits lower. The board must be thoroughly cleaned with board cleaner. There are Practical Electronics | January | 2024 high impedances throughout the circuit, so be aware that leakage through flux residue would affect its operation – you must remove that residue. Testing Once the board has been fully assembled, cleaned and inspected, but before it is mounted in the case, attach the four 12mm spacers – but not the front panel board – and connect the 5V supply. The OLED should show an initial message with the firmware version number. Using a coax cable, feed in a sinewave from a signal generator at about 1MHz. An oscilloscope probe on TP1 should show a clean sinewave, with an output of about 2V peak-to-peak. If the output of the signal generator is too high, you will get flattening on the negative half cycle. In that case, back off the level for a clean sinewave. Transfer the ‘scope probe to the top of the spacer that passes through the toroid, and the voltage should be one-tenth of that measured at TP1. Measure TP4 using a DC voltmeter; Only the Arduino Nano, headers and eight diodes are on the underside of the Q Meter PCB. Note how the windings for T1 are spaced evenly around it. 23 That will be influenced by the inductor value and the frequency at which you want to use the inductor. Once you’ve selected a frequency, plug the values into the formula: C = 25330 / (2 × f × L) Almost all the parts mount on the main PCB. The only chassismounting components are the DC input socket and optional power switch. you should get a reading of about 2V. Note that these values will depend on the output of the signal generator and could vary. Rotate the encoder and note that the capacitance value varies by 1pF per detent. Depending on the encoder, it might go backwards. If so, plug a jumper on the Arduino Nano’s programming header between pins 4 and 6; that will correct the direction. Push down the knob to change the resolution, and the capacitance should then change by 10pF per detent. By winding it fully clockwise, the maximum indicated capacitance should show as 295pF on the bottom line of the OLED, with the minimum being 40pF. Connect a 10µH moulded inductor between the two ‘L’ spacers, using 3mm machine screws to hold it in place. Adjust the capacitance to 100pF, switch to LOW Q mode and adjust the signal generator frequency to about 5.5MHz. The LED should light up; tune the capacitance for maximum brightness. The second line of the OLED will then most likely display ‘TOO HIGH’. Switch to HIGH Q mode, which will dim the LED, and re-tune for maximum brightness. Depending on the inductor, a typical Q reading will be about 120. If you get a sensible reading and can peak the LED brightness by varying the capacitance, your Q Meter is most likely functioning correctly, so it can be finished. The front panel is mounted on the front of the case, and the main PCB may now be attached by the four spacers using four 8mm M3 machine screws. To improve the appearance, use black screws or spray the heads flat black. 24 Note that the binding posts must make electrical contact with the bare pads on the front panel PCB; attach them with the supplied nuts and make sure they are making good contact. The tapped spacers connecting the two boards must also make good electrical contact at both ends. Using it The operation of the Q meter requires some initial measurements and calculations. We need to know at least the approximate inductance of the DUT. I use my LC Meter for measuring this, as described in the November 2023 issue of PE. With the inductance known or guessed, we need to determine the frequency at which to measure the Q. Where C is in pF, f is in MHz and L is in µH. If you get a value of C below 40pF, select a lower frequency and redo the calculation; if you get a value above 295pF, choose a higher frequency. Repeat until your calculated capacitance is in the range of 40-295pF. Set the capacitance to that value and adjust the frequency from the signal generator, or the capacitance, for resonance. The resulting Q will be shown on the second line of the OLED. If the switch is set to LOW and the Q exceeds 100, the second line will show ‘TOO HIGH’. In that case, switch to the HIGH position. I find that it is better to start with the switch set to LOW since it is then easier to figure out if you are close to resonance. The ‘C’ terminals allow a capacitor to be placed in parallel with the internal capacitance in case you can’t achieve resonance at a sensible frequency with the available range. So that it doesn’t detract from the Q, make sure you use a high-quality RF capacitor. Accuracy This meter is certainly not as accurate as the HP4342-A meter mentioned earlier. Without any standard coils of known Q, it is difficult to determine the true accuracy. Fig.7: the circuitry on the front panel PCB just consists of one large track connecting the two red terminals and smaller tracks connecting the upper screws to their adjacent binding posts. It also has holes and labels for the controls and screen. Practical Electronics | January | 2024 Parts List – Q Meter 1 RF signal generator (see PE, May 2023; 1 RITEC 125 × 85 × 55mm plastic enclosure [Altronics H0324] 1 double-sided PCB coded CSE220701, 99 × 79mm 1 double-sided PCB coded CSE220704, 98 × 76mm, black solder mask (both PCBs available from the PE PCB Service) 1 chassis-mounting SPST toggle switch with solder tabs (S1) 1 0-5V analogue meter (optional) 1 Arduino Nano (MOD1) 1 0.96in OLED display module with I2C interface and SSD1306 controller (MOD2) 8 G6K-2F-Y SPDT SMD relays (RLY1-RLY8) 1 rotary encoder with integral pushbutton (EN1) 1 knob to suit EN1 1 Fair-rite 5943000301 ferrite toroidal core, 12mm OD, 8mm ID, 5mm thick (T1) 1 30cm length of 0.25-0.4mm diameter enamelled copper wire (T1) 1 SMA edge connector (CON1) 2 2-pin polarised headers (CON2, CON5) 1 3-pin polarised header (CON3) ♦ 1 2.1mm or 2.5mm inner diameter chassis-mount jack socket (CON4) 2 red 4mm chassis-mounting banana socket/binding posts 2 black 4mm chassis-mounting banana socket/binding posts 4 M3 × 12mm brass spacers 4 M3 × 5mm nickel-plated panhead machine screws 4 M3 × 8mm nickel-plated panhead machine screws 2 M2 × 16mm machine screws and nuts 2 8mm-long untapped plastic spacers 1 5mm-long plastic LED spacer 1 20cm length of light-duty figure-8 hookup wire Semiconductors 1 MAX660M switched capacitor voltage inverter, SOIC-8 (IC1) 1 OPA2677 dual ultra-high GBW op amp, SOIC-8 (IC2) 1 TSV912 dual high input impedance op amp, SOIC-8 (IC3) 1 74HC14 hex inverter, SOIC-14 (IC4) ♦ 1 3mm red diffused lens LED (LED1) 8 2N7002 MOSFETs, SOT-23 (Q1-Q8) 1 4.7V 400mW axial zener diode (ZD1) ♦ 3 1N5711 axial schottky diodes (D1-D3) 8 LL4148 75V 200mA diodes, SOD-80 (D6-D13) Capacitors (all SMD M2012/0805 X5R or X7R) 3 10μF 16V 3 330nF 50V 10 100nF 50V RF capacitors (all ±2% 200V SMD M2012 or M1608 C0G/NP0 unless noted) 2 100pF 50V 1 10pF 1 56pF 2 8.2pF 1 27pF 1 3.9pF ±0.1pF 1 22pF 1 2.2pF ±0.1pF 1 15pF 2 1.0pF ±0.1pF Resistors (all SMD M2012/0805 1%) 1 10MW 3 3.3kW 1 1.5MW 1 1.2kW 1 12kW 1 1kW 3 18kW 1 270W 3 10kW 1 51W 4 4.7kW www.poscope.com/epe - USB - Ethernet - Web server - Modbus - CNC (Mach3/4) - IO - PWM - Encoders - LCD - Analog inputs - Compact PLC - up to 256 - up to 32 microsteps microsteps - 50 V / 6 A - 30 V / 2.5 A - USB configuration - Isolated PoScope Mega1+ PoScope Mega50 ♦ optional components only required for debugging interface But even the HP4342-A does not claim any better accuracy than ±7% for frequencies below 30MHz, and considerably worse for higher frequencies – see the PDF manual at: https://bit.ly/pe-jan24-hpq I compared my results with the Meguro meter, but being over 50 Practical Electronics | January | 2024 years old, it is hardly to be trusted! Still, measurements of the same coil with the Meguro and my meter were generally within 10%. Reproduced by arrangement with SILICON CHIP magazine 2023. www.siliconchip.com.au - up to 50MS/s - resolution up to 12bit - Lowest power consumption - Smallest and lightest - 7 in 1: Oscilloscope, FFT, X/Y, Recorder, Logic Analyzer, Protocol decoder, Signal generator 25 Raspberry Pi Pico W BackPack Our Raspberry Pi Pico BackPack from March 2023 has a powerful dual-core 32-bit processor, 480 × 320 pixel colour touchscreen, onboard real-time clock, SD card socket, stereo audio output and infrared receiver. Now, for about £5 more, it has Wi-Fi too! Project by Tim Blythman M icrocontrollers have become so easy to use, cheap and accessible for hobbyists, while chips like the ESP8266 have made it simple to use Wi-Fi. The Raspberry Pi Foundation’s Pico W is an inexpensive, well-documented 32-bit microcontroller board with Wi-Fi that is well-suited to being used with the LCD BackPack. Examining the Pico W, we found that it was mostly interchangeable with the Pico but with added Wi-Fi support. So it was only natural to update the Pico BackPack to include Wi-Fi support using the Pico W. As it turns out, that was not hard to do. From launch, the Pico supported the MicroPython and C languages (using the Raspberry Pi Foundation’s C software development kit). Arduino support in the form of the Arduino Pico board profile came soon after. The Raspberry Pi Foundation has made many inexpensive single-board computers and microcontroller boards available to the masses, even during Features and Specifications ∎ Includes a 3.5-inch LCD touch panel and a dual-core microcontroller with Wi-Fi. ∎ Also includes all the features of the original Pico BackPack. ∎ We provide software demos and examples for the Arduino IDE, C SDK and MicroPython. ∎ Our provided sample code demonstrates practical uses of HTTP, UDP and NTP. 26 Raspberry Pi is a trademark of the Raspberry Pi Foundation the recent electronics component and device shortages. The Pi Pico series are simple but well-thought-out boards, and are attractively priced for what they offer. BackPack hardware We considered whether it was worthwhile to update the Pico BackPack PCB to complement the Pico W, but ultimately, we decided not to make any significant changes. The thing is, the Pico BackPack crams a lot of features into a small area corresponding to the size of the matching LCD touch panel. To add any features would likely mean removing some of the existing features, which we didn’t want to do. The Pico BackPack has a row of I/O pins to make external connections, so it’s easy enough to connect different hardware if necessary. Thankfully, we’d already established that the Pico W didn’t ‘break’ any existing functionality of the Pico BackPack. So the BackPack PCB remains the same for the Pico W, although we will recommend a minor assembly variation to enhance the Wi-Fi capability. The Pico W BackPack The only substantial difference between the Pico BackPack and the Pico W BackPack is the replacement of the Pico module with a Pico W. All the pins on the Pico W are labelled the same as those on the Pico, so none of the signals or I/O pin breakouts need to change. Remember that both the BackPack PCB and LCD touch panel have large solid copper areas that could impede Wi-Fi signal propagation. Therefore, we recommend that the Pico W is mounted slightly away from the BackPack PCB to provide better clearance for its onboard Wi-Fi antenna. We used header strips to provide this spacing. You could also use low-profile socket headers and short pin headers if you wish to make the Pico W pluggable. We tried this and found it worked well, although it was fiddly to assemble. Circuit details Fig.1 shows the circuit diagram for the Pico W BackPack. It is identical to the original Pico BackPack, with the Pico replaced by a Pico W. IRRX1 at top left allows the Pico W to receive IR signals on its GP22 digital input. The LCD touch panel connects to power and the SPI bus at the top, as does the microSD card socket at upper right. The two transistors on the right control the power to the LED backlight on the LCD touch panel. Below this, a DS3231 real-time clock and calendar IC connect to the I2C bus. Finally, the components at the bottom, including the op amps, can deliver line-level audio at CON3. They connect to pins on the Pico W that generate pulse-width modulated (PWM) signals to provide synthesised analogue voltages. For more details and specifics about how the various features work on the Pico BackPack PCB, refer to the March 2023 article which discusses software to interface to the BackPack hardware. Practical Electronics | January | 2024 Pi Pico BackPack Fig.1: the Pico W BackPack circuit is almost identical to the Pico BackPack. It includes an IR receiver, microSD card, real-time clock, audio output and LCD touch panel. A 20-way header provides access to power and spare I/O pins for adding more features. The 1kW resistor at IRRX1’s output is not needed in most cases. Construction While that March 2023 article has more detail on assembling the PCB and fitting it to the LCD touch panel, experienced constructors should have no trouble using the overlay in Fig.2 to assemble the PCB. If you refer to that earlier article, the PCB construction is no different until you get to the Pico W module. Most IR receivers will not need the 1kW resistor; in fact, it will interfere with their weak internal pullup. Hence, it has been omitted from the overlay and is not seen in our photos. Don’t forget the cell holder on the Practical Electronics | January | 2024 reverse of the PCB if you are fitting the real-time clock IC. Lines separate the various sections of the board on the silkscreen. That helps you to omit some components if you wish to reclaim some I/O pins by not using those features. As we mentioned earlier, the Pico W should be spaced away from the main BackPack PCB and also kept clear of the LCD above. Thus, we have added two 20-way pin header strips to the parts list. Solder these to the BackPack PCB, with the plastic carrier sitting above. Then solder the Pico W to the top of the pin headers. The plastic carrier separates the Pico W from the BackPack PCB. Our photos show how the Pico W is spaced above the BackPack PCB by a small distance. The other option requires low-­profile (5mm) header sockets too. Altronics Cat P5398 (for example) can be used but you will need two lengths, cutting them down to 20 pins each. The fiddly part is fitting the pin headers to the Pico W, as this requires removing the metal pins from their plastic carrier to minimise the height. Although 27 The release of the Pico W has allowed us to update the Pico BackPack with Wi-Fi. It’s a powerful combination that we think will be the basis of some diverse and interesting projects. We’re providing several practical Wi-Fi demos to make it easy to pick up and use. the plastic carrier is only 2.5mm high, it’s enough to cause the Pico W to foul the LCD, so it must be removed. After pulling the pins out of the plastic carrier, insert them individually into the socket header entries. You can then place Pico W over the pins and solder them to it. Depending on the length of the pins, they might also need to be trimmed so that the pins do not foul the LCD screen. The only advantage of that more fiddly approach is that the Pico W is removable. We figure it’s inexpensive enough that you are better off saving the effort and just soldering it. Software with Wi-Fi support Of course, we need some sample code that uses Wi-Fi to show off the Pico W’s new feature. Since PicoMite BASIC will not support the Pico W’s Wi-Fi, our software samples do not include PicoMite BASIC. Existing PicoMite BASIC programs should work fine on the Pico W, with the minor exception that the Pico W’s onboard LED is driven differently, so it can’t be controlled as it would be on a Pico. We have updated the Arduino, C SDK and MicroPython examples to add Wi-Fi features. As we noted in our review of the Pico W, a document called ‘Connecting to the Internet with Raspberry Pi Pico W’ explains how to do this with the C SDK and MicroPython. But that guide is quite basic; our sample code does much more. Since the updated demos are based on the earlier versions we made for the original Pico BackPack, we recommend reading the original Pico BackPack article for information on the original features. 28 One of the great features of the Pico and the Pico W is the bootloader which implements a virtual flash drive, allowing software to be uploaded by simply copying a file to the virtual drive. The bootloader is in mask ROM in the RP2040 microcontroller that runs the Pico and Pico W. This makes it practically impossible to ‘brick’ the Pico or Pico W, as the bootloader cannot be overwritten. Bootloader mode is entered by holding down the BOOTSEL button on the Pico or Pico W while powering up or resetting the chip. Since the BackPack provides a reset button, you can start the bootloader by pressing and holding BOOTSEL while pressing S1 on the BackPack. Software images for the Pico and Pico W use the UF2 file type, which is a binary format, unlike the text-based HEX files used for other chips like PIC microcontrollers. If you are simply interested in seeing what the Pico W BackPack is capable of doing, all you need to do is copy the respective UF2 file to it after putting the Pico W into bootloader mode. We’ll go into a bit more detail about the workings of the software later in this article. To simplify entering the Wi-Fi credentials, you can set them using the virtual serial port. You will need a serial terminal program, such as Tera­ Term, minicom or the Arduino Serial Monitor, to communicate with the Pico W. You might notice that the demo .uf2 files are larger than the Pico examples due to the extra libraries needed to communicate with the Wi-Fi chip. The Wi-Fi chip also needs a 300kB binary ‘blob’ to work, which is bundled into the firmware images. Arduino coding The team that created the Arduino-­Pico port for the Arduino IDE has done a good job of aligning the Pico W’s Wi-Fi API (application programming interface) to that used by other Wi-Fi boards, such as those based on the ESP8266 and ESP32 processors. Indeed, it is based heavily on that of the ESP8266. You might remember the D1 Mini BackPack from the October 2021 issue of PE. It uses an ESP8266-based D1 Mini module to drive an LCD touch panel and has many features in common with the Pico W BackPack. We’re using version 2.5.2 of the Arduino-Pico board profile, although versions as old as 2.30 should support the Pico W. You can find more information about the board profile at: https://github.com/earlephilhower/ arduino-pico Fig.2: the lines on the overlay delineate the components that provide the different features of the Pico W BackPack. There is also a cell holder on the rear of the PCB, used by the real-time clock IC to keep time when power is not otherwise available. The Pico W is spaced above the main PCB to improve the performance of its Wi-Fi antenna. Practical Electronics | January | 2024 As well as adding Wi-Fi support, we’ve updated the Arduino sample code to include an infrared receiver decoding library. In our original Pico BackPack article, we mentioned that we expected the IRRemote library to be ported to the Pico (and Pico W), which has now happened. You can find that library online at https://github.com/Arduino-Irremote/ Arduino-Irremote or it can be installed by searching for ‘irremote’ in the Arduino Library Manager. We have also included a copy of the version we’ve used in the software bundle. Screen 1 shows the BackPack running our updated Arduino Pico W sample. We have added some text to the LCD panel to show the status of the Wi-Fi hardware. Setting up the Wi-Fi Since using the Pico W in a meaningful way requires that it connect to a Wi-Fi network, we have added a configuration menu on the virtual serial port. We did it that way, rather than using the touchscreen, because it’s easier to enter Wi-Fi credentials via a computer rather than an on-screen keyboard. Screen 2 shows the menu that is presented over the serial port by the Arduino software. Items are selected by typing the number and pressing the Enter key. Items 2 and 3 will prompt for the SSID name and password, also followed by Enter. This demo can scan for Wi-Fi networks and connect by name and password. It can also connect to a website over HTTP to retrieve data from the internet. In this case, we have used ip-api.com to get some location text to display, along with a timezone offset for that location. This isn’t perfect and would probably be fooled by a VPN (virtual private network), but it will usually give the correct timezone. We think it is a simple and effective way of demonstrating the use of HTTP on the Pico W. We also use NTP (network time protocol) to provide the current time in UTC, adjusted by the timezone offset to provide accurate local time. This can then be saved to the RTC IC on the BackPack. To do all this, you would use menu items 2, 3 and 4 to connect to a Wi-Fi network, followed by 8 to get the offset and 7 to set the RTC. You can set the offset manually using item 6 if item 8 does not work. The IRRemote library is also used to capture and decode IR signals, as displayed in the line beginning ‘NEC’ in Screen 1. This indicates that an NEC code was last received and shows that code. Practical Electronics | January | 2024 Parts List – Pico W BackPack 1 double-sided PCB coded 07101221, 99 x 55mm (from PE PCB Service) 1 Raspberry Pi Pico W Module (MOD1) [Altronics, Core, Digi-Key, Little Bird] 1 3.5in LCD touchscreen [Silicon Chip Shop Cat SC5062] 1 14-pin, 2.54mm pitch socket header (for LCD panel) 3 20-pin, 2.54mm pitch pin header (CON2 & to mount Pico W) 2 20-pin low-profile (5mm tall) 2.54mm pitch socket headers (optional) 2 2-pin, 2.54mm pitch pin headers with jumper shunts (JP1, JP2) 1 6mm x 6mm tactile switch (S1) 8 M3 x 6mm panhead machine screws 4 M3 x 12mm tapped spacers Semiconductors 1 IRLML2244TRPBF/SSM3J372R P-channel MOSFET, SOT-23 (Q1) 1 2N7002 N-channel MOSFET, SOT-23 (Q2) Resistors (all M3216/1206, 1%, ⅛W) 1 10kW 1 1kW Optional Components Reproduced by arrangement with SILICON CHIP magazine 2023. www.siliconchip.com.au SD card 1 SMD microSD card socket (CON1) [Altronics P5717] 1 10μF 10V X7R SMD ceramic capacitor, M3216/1206 size 1 100nF 10V X7R SMD ceramic capacitor, M3216/1206 size Real time clock/calendar 1 surface-mounting CR2032 cell holder (BAT1) [BAT-HLD-001] 1 DS3231 or DS3231M in SOIC-16 (wide) or SOIC-8 package (IC1) 1 100nF 10V X7R SMD ceramic capacitor, M3216/1206 size 2 4.7kW 1% ⅛W M3216/1206 size IR receiver 1 3-pin infrared receiver (IRRX1) [Jaycar ZD1952] 1 10μF 10V X5R SMD ceramic capacitor, M3216/1206 size 1 1kW 1% ⅛W resistor M3216/1206 size (see text) 1 470W 1% ⅛W resistor M3216/1206 size 1 100W 1% ⅛W resistor M3216/1206 size Stereo audio 1 MCP6272(T)-E/SN, MCP6002(T)-I/SN or -E/SN dual op amp, SOIC-8 (IC2) 1 3-pin, 2.54mm pitch pin header (CON3) 2 1nF 25V X7R SMD ceramic capacitors, M3216/1206 size 2 100nF 10V X7R SMD ceramic capacitors, M3216/1206 size 2 10uF 10V X5R SMD ceramic capacitors, M3216/1206 size 4 100kW 1% ⅛W resistor M3216/1206 size 2 47kW 1% ⅛W resistor M3216/1206 size 2 22kW 1% ⅛W resistor M3216/1206 size 2 10kW 1% ⅛W resistor M3216/1206 size 2 100W 1% ⅛W resistor M3216/1206 size Code differences The Arduino code for the updated Pico W BackPack differs from the earlier Pico BackPack example only in the main sketch file, plus the requirement to have the IRRemote library installed. It uses other library files that are part of the Arduino-Pico board profile, including those needed for Wi-Fi. Those who have worked with modules based on the ESP8266 or ESP32 will be familiar with how Wi-Fi works under the Arduino IDE; the Pico W is similar. Three library ‘includes’ are used to implement the Wi-Fi features: #include <WiFi.h> #include <WiFiUdp.h> #include <HTTPClient.h> NTP requires the UDP protocol for communication, hence its inclusion. Fetching web pages uses HTTP. Scanning for networks is done by running a single line of code, as is connecting to a network: WiFi.scanNetworks(); WiFi.begin(ssidname,ssidpass); These calls are blocking (ie, the program doesn’t proceed until the action is completed), and the latter can take up to ten seconds to run. So they may not suit all applications. The C SDK gives better access to the low-level commands and might be more suited if blocking calls are not desired. It is possible to use function calls from the C SDK in the Arduino IDE, 29 ► Screen 1: the Arduino demo for the Pico W has the most features, primarily due to the excellent library support the Arduino community offers. Apart from the new Wi-Fi features, there is now also support for the IR receiver. ► Screen 2 (right): all the demos include a menu system that can be accessed from a serial terminal program. This is to simplify entering the Wi-Fi credentials needed for the demo to work. The Arduino output is shown here. but we preferred to keep the Arduino code consistent with the Arduino way of doing things. NTP is implemented as a background routine that simply needs to be started and then quietly synchronises in the background. Fetching a website using HTTP can be done in a few lines: http.begin(wificlient,URL); httpCode=http.GET(); Serial.print(“Return code:”); Serial.println(httpCode); if(httpCode == 200) { Serial.println( http.getString() ); } We got around some of the longer blocking sections by using the second processor core to do some tasks in the background without interrupting the main program flow. These can be seen in the setup1() and loop1() functions. At the time of writing, we have not seen an official Arduino board profile for the Pico W, so we were unable to try this out as we did for the Pico. But the Arduino-Pico board profile appears to be updated regularly and works well; we have no hesitation in recommending it. Using it with the C SDK Screen 3 shows the LCD panel of the BackPack loaded with the C SDK (software development kit) demo. It includes similar elements to the Arduino example, although the C SDK does not have library support for the IR receiver or RTC chip. There is an RTC feature in the Pico W (and Pico) that can be used by C SDK, but it doesn’t provide the battery backup timekeeping feature that 30 chips like the DS3231 have. It needs the time to be set each time Pico W is reset. Since the Pico W uses a crystal oscillator, it should be pretty accurate once it has been set. The C SDK performs similar tasks to the Arduino demo, using a Wi-Fi connection and NTP to update the RTC. Location and timezone data are also fetched from ip-api.com using HTTP. Several library files are needed for Wi-Fi support. The first file is required to interface with the Infineon CYW43439 chip that provides the Wi-Fi interface, while the others provide library support for HTTP and NTP: #include “pico/cyw43_arch.h” #include “lwip/apps/http_client.h” #include “lwip/apps/sntp.h” To properly use the C SDK with the Pico W, we had to make a few changes to the CmakeLists.txt file, especially in the target_link_libraries and add_definitions sections. Look at our sample project to see what to do before creating your own projects. While the C SDK is primarily intended to be used on a Raspberry Pi computer, we ran it on a Windows PC using the pico-setup tool that can be found at https://github.com/ndabas/ pico-setup-windows This resulted in many minor glitches, especially as some of the commands are subtly different. If you have a Raspberry Pi computer handy, you might find it more straightforward to program the Pico W via the C SDK. Just as for the original Pico BackPack demos, the C SDK software runs very Screen 3: the C SDK demo runs fast, with good access to low-level functions. Support for protocols like NTP and HTTP is very good once you get it working. Practical Electronics | January | 2024 simply left with the tantalising statement from the folks at the Raspberry Pi Foundation that it ‘may be enabled in the future’. Screen 4: the MicroPython demo has similar capabilities to that of the C SDK. It’s possible to use the drawing feature of the demo, but it is not very responsive. fast and some lower-level functions allow more control than we could easily achieve with the Arduino IDE. In most cases, the serial port menu is used to start an action, such as starting a network scan or connecting to a Wi-Fi network. These do not return immediately like the Arduino equivalents. Instead, the main program monitors the status of variables like the Pico W’s IP address and displays information as it gets updated in time. This means that the main program is not blocked from other operations while network activity occurs. Using HTTP requires several callback functions to be set, meaning that using the C SDK can seem a bit more complicated than using the Arduino IDE. Still, if you have the patience to set up and delve into the C SDK, we recommend trying it, especially if you need to get the most performance from your Pico W BackPack. MicroPython The MicroPython version available for the Pico W at the time of writing is tagged as ‘unstable’, although we did not have any issues using it. We have included a copy of this version with our software bundle. Note that there are different MicroPython UF2 files for the Pico and Pico W. Be sure to use the correct version. Our MicroPython demo has much the same features as the C SDK demo, as shown in Screen 4. We haven’t made any changes to the two library files (from the original Pico BackPack demo); only the main.py file has been updated. Just like the Arduino IDE, several libraries must be imported to provide Wi-Fi functionality: Practical Electronics | January | 2024 import network import urequests import ntptime We noted that the original Micro­Python software was barely fast enough to be useful. The addition of the Wi-Fi features does make interacting with the LCD touch panel quite slow. Still, we expect most people would not try to cram in all the features that we have. Like the Arduino code, many MicroPython routines are blocking and may not return for many seconds. The features available are much the same as the C SDK, with options to scan for networks and set the SSID name and password. You can connect, disconnect and make an HTTP request to retrieve data. Is there Bluetooth support? Since the Infineon CYW43439 Wi-Fi chip has support for Bluetooth, many people have been left wondering whether the Pico W will be able to use Bluetooth. At the time of writing, it appears that is not the case. Instead, we are Summary Our demo code does many things you might typically do with a Wi-Fi-­ capable microcontroller: connect to a network, make HTTP requests to fetch data from websites and use NTP to set the time. The Arduino IDE (using Arduino-­ Pico) and MicroPython made this very easy. We found the Arduino IDE more attractive as it has better library support, and the code runs quicker since it uses a compiled rather than interpreted language. The C SDK was a bit more tricky to work with, but the results are fast and responsive. It also gave us much better access to low-level operations. Bluetooth will be a nice feature to have when it arrives, but as it stands, the Pico W is very useful at its current price and works very well with the BackPack hardware. Now that we have Wi-Fi working well with the C SDK, we think the Pico W will be a good choice for future projects needing Wi-Fi. The Arduino IDE will be a handy option when we want to quickly interface with hardware, especially if it needs library support. Availability At the time of writing, the Pico W was available from: ∎ The PiHut https://thepihut.com ∎ Amazon UK https://www.amazon.co.uk/s?k=pico+w ∎ Cool Components https://coolcomponents.co.uk/products/ raspberry-pi-pico-w ∎ Pimoroni https://shop.pimoroni.com Other retailers include Farnell, element14, Digi-Key and Mouser. Expect to pay around £6.50. This shows the spacing needed to give clearance for the Pico W’s Wi-Fi antenna. Short pin headers are the simplest way to achieve this while also keeping clear of the LCD touch panel, which is mounted above. 31 High-Performance Part 1: By Phil Prosser Active Subwoofer For Hi-Fi at Home This subwoofer is designed to be a no-compromise approach to a ‘sub’, making it a perfect match for a high-quality home theatre system, or as part of a high-fidelity stereo system. T he Active Subwoofer uses an SB Acoustics SB34SWNRX -S75-6 346mm (12-inch) driver plus a built-in 200W class-AB amplifier module that can deliver up to 180W of continuous output power in this application. It is a very high-quality sub that you could use in any application. It will provide high-power, extremely low distortion bass for the lower octaves. Subwoofers are all about moving large volumes of air. The deeper you go into bass frequencies, the more of a challenge that becomes. For true high fidelity, we want a -3dB point well below 30Hz and to achieve solid output to 20Hz. Unfortunately, we also need to consider real-world practicalities like the physical volume required. That requires us to set aside exotic approaches such as infinite baffles or horn loading. After modelling quite a few similar drivers, I settled on the SB Acoustics SB34SWNRX-S75-6. When mounted in an 80-litre enclosure tuned to 25Hz, it gives a -3dB point at 25Hz and is only 8dB down at 20Hz in free space. This enclosure is modest for such a hefty driver and for operating to such low frequencies. Fig.1: a top-down ‘X-ray’ view of the Subwoofer complete with its integrated ‘plate amplifier’. 32 Practical Electronics | January | 2024 Parts List – Active Subwoofer 1 assembled plate amplifier – see adjacent panel 1 SB Acoustics SB34SWNRX-S75-6 346mm subwoofer driver [eg, Willys HiFi: I could have opted for a much larger https://willys-hifi.com/products/sb-acoustics-sb34swnrx-s75-6-norex-subwoofer] enclosure and×tuned lower, butorI feel 1 2400 × 1200 18mm it sheet of MDF similar, cut as per Fig.6 that increase in size and(optional) porting 100the 50mm-long 8G wood screws difficulties are8Gnot inscrews line with most 16 35mm-long wood 30 28mm-long 8G wood screws people’s needs. 4This 100mm thick stick-on felt furniture is diameter a serious subwoofer. With foot pads 75mm in driver diameter 28.5mm 1 3m length of running 5-10mm wide foam sealing tape (for the & plateand amplifier) the amplifier flatsoft out, delivlong. That is a very long voice 1 1m × 1m acoustic wadding blanket [eg, Lincraft ‘king size thick wadding’] ering close to 200 watts, this driver 1 250mL tube of PVA within glue operates entirely its linear coil, required to achieve the lin1 tub ofright sandable woodto filler region down 20Hz. I have ear excursion mentioned above. 1 250mL tin of acrylic primer paint built a lot of subs, including profes- One consequence of this is that much 1 350g can of spray primer paint sional audio products, and this is an of the voice coil is outside the mag1 350g can of spray paint (for two or more top coats) netic air gap, which is 6mm high. outstanding result inpaste comparison. 1 small tube of thermal That significantly impacts driver Driven at this power Sub (available large quantity of 120, 240 &level, 400 gritthe sandpaper on 5m reels) will produce over 110dB SPL (sound efficiency, which is the price we pay Plate Amplifier for achieving high output at low frepressure level) right down 30Hz 1 assembled SC200, Ultra-LD Mk.3 to or Mk.4 amplifier module on 200mm-wide finned heatsink quencies. and over 100dB SPL at 20Hz. Those 1 assembled 4-way Speaker Protector with a single It relay (January 2023) from a home thecan be driven figures aretoroidal for free space; 250VA in theorreal 1 40-0-40 transformer, 300VA [Tortech 0300-2-040] atre amplifier’s subwoofer output or world, there is floorinput and usually 1 screw-mount IECamains socket with integral fuse [Altronics P8324, Jaycar PP4004] an active crossover. I recommend that a 1wall two, which will increase yelloworinsulated chassis-mount RCA socket [Altronics P0219] Subwoofer be placed not too far them by up250V to 6dB. fact that 1 miniature AC 6AThe illuminated DPSTwe rockerthe switch with solder lugs from your main speakers, but someJaycar SK0995] are in[Altronics a finiteS3217, volume room means the where that your family members will 1 3-way mains-rated terminal block strip [Altronics P2130A] Subwoofer basically produces a flat accept. 1 5A 250V slow-blow 3AG fuse [Altronics S5685, Jaycar SF2232] response to close to 20Hz. If ZR1324] cost is no object, two subs are 1The 35V 400V bridge [Altronics Z0091A, voice coilrectifier on this driver is Jaycar 4 8000μF 80V electrolytic capacitors [Jaycar RU6710] always better than one. I would place 1 10nF 63V MKT capacitor each Subwoofer in the general prox1 270W 10% 10W wirewound resistor [Altronics R0440, imity Jaycar of oneRR3369] main speaker. To be honHardware est, though, it is not likely that a sin4 M3 × 25mm panhead machine screws gle active subwoofer will ever ‘run 16 M3 × 16mm panhead machine screws out of puff’. 10 M3 × 6mm panhead machine screws 2 M3 × 6mm countersunk head machine screws 2 15mm-long M3 tapped spacers 5 M3 flat washers 25 M3 shakeproof washers 5 M3 hex nuts 1 260 × 210 × 3mm aluminium sheet 1 377 × 150 × 1.5mm aluminium sheet 1 152 × 72 × 1.5mm aluminium sheet 1 20 × 38 × 1.5mm aluminium sheet (resistor bracket) 1 90 × 70mm sheet of Presspahn or similar insulation 4 blue 6.3mm insulated female spade crimp connectors [Altronics H2006B, Jaycar PT4625] 2 3.2-4.3mm solder lugs [Altronics H1503, Jaycar HP1350] OR 2 3.7-4mm crimp eye terminal [Altronics H1520, Jaycar PT4930] Wire and Cables 1 1m length of brown 7.5A mains-rated hookup wire [Altronics W2273, Jaycar WH3050] 1 1m length of blue 7.5A mains-rated hookup wire [Altronics W2275, Jaycar WH3052] 1 10cm length of green/yellow striped 7.5A mains-rated wire (stripped from a mains cord or mains flex) 1 2m length of red heavy-duty hookup wire (0.75mm2/18AWG) [Altronics W2270/83, Jaycar WH3040/45] 1 2m length of black heavy-duty hookup wire (0.75mm2/18AWG) [Altronics W2272/84, Jaycar WH3041/46] 1 2.2m length of green heavy-duty hookup wire (0.75mm2/18AWG) [Altronics W2274/85, Jaycar WH3042/47] 1 2m length of white heavy-duty hookup wire (0.75mm2/18AWG) [Altronics W2271/81] 1 30cm length of red medium-duty hookup wire [Altronics W2260] 1 30cm length of green medium-duty hookup wire [Altronics W2263] 1 40cm length of shielded/screened audio cable [Altronics W3010, Jaycar WB1500] The fantastic thing about this Active Subwoofer is that the very extended frequency response does not come at the expense of power handling, and you can safely drive it at very high levels right down to 20Hz. Yes, it is a significant investment to achieve this, but in use, it is truly impressive. Practical Electronics | January | 2024 IMPORTANT! What you need to build the Active Subwoofer. First and foremost, you need the ‘active’ element – an amplifier. At the time of publication this was more complicated than expected. We intended to use the upgrade to the Ultra LD Mk.2 200W Power Amplifier published back in August 2010 with the Mk.3 (or its surface-mount follow-up, the Mk.4). However, unfortunately, the ‘pandemic silicon shortage’ is still affecting a few critical devices for those designs, so they will be published at a later date. Instead, we suggest you use the SC200 200W Amplifier Module we published back in 2018 (January to March). That circuit incorporates most of the features of modern amplifier modules, but uses easy-to-solder through-hole components. There are no tiny surface-mount components. Do note that just like the Ultra-LD Mk.3 and Mk.4 there are component issues for the SC200. Fortunately, we have found good alternatives – see the box on the next page. You will also need the MultiChannel Speaker Protector (4-CH) from PE, January 2023, timber for the cabinet and acoustic wadding. Vented or passive radiator I have opted to use a slot vent in our Active Subwoofer. Passive radiators exist that can be paired with the Subwoofer, but they are pretty expensive, and you need two of them! The port is as large as I could fit and has flared 33 Fig.2: the modelled response of the SB Acoustics SB34SWNRX-S75-6 365mm driver in an 80.5-litre enclosure with a tuning frequency of 25.03Hz. Fig.3: a measurement of the Subwoofer’s response outdoors, as far away from sound-reflecting objects as was practical (excepting the ground). SC200 Amplifier Module components update Transistors Q8-Q16 may be difficult to source (everything else is standard: small-signal transistors, resistors, capacitors and so on). For the output transistors, Q13-Q16, there are direct equivalents in very similar but not identical packages. FJA4313OTU (TO-3P) is replaced with FJL4315OTU (TO-264) and FJA4213OTU (TO-3P) is replaced with FJL4215OTU (TO-264). The pin spacings are identical and the package sizes are similar, so no changes should be required to the PCB or the heatsink. The only reason those devices weren’t used in the original design is that the TO-3P versions were cheaper and had good enough dissipation for the job (130W for TO-3P; 150W for TO-264). The FJA4313OTU is still available but the FJA4213OTU isn’t, and if you’re going to change one, you might as well change both. For the other transistors, KSC2690AYS (NPN) and KSA1220AYS (PNP), luckily there are also excellent direct substitutes although from a different manufacturer. These are the TTC004B (NPN) and TTA004B (PNP). They should drop right in; they are in the same packages with the same pinouts and with virtually identical ratings. ends to minimise ‘chuffing’ at high outputs. It is made with stacked layers of MDF cut to form flares at both ends, resulting in a 48-50mm-high, 180mm-wide port. The vent configuration is shown in the ‘X-ray’ style overview of Fig.1, along with the amplifier and enclosure, both described below. If you are not expecting to drive the Subwoofer at high levels or very deep, a single 10cm diameter round port of 41cm length will suffice. Still, with the investment this Subwoofer represents, I feel that compromising on the port is missing the point. The amplifier The integrated amplifier takes its input from an RCA line-level input and delivers about 180W. Fig.4: the composite response of the indoor output from the cone (dark blue) and port (red) show they combine to give the predicted response. 34 The amplifier to use is the SC200 200W Amplifier Module (PE, January to March 2018). Compatible future amplifiers include the Ultra-LD Mk.4 Module (or the Ultra-LD Mk.3 Module if you don’t like working with SMDs). Just like the SC200, both are fine performers in this role. I have designed a chassis that will suit each amplifier module as they are the same size. The enclosure The enclosure is made from 18mm-thick MDF. To provide extra strength and reduce vibration, the front and rear panels are double-­ layered, and there is a full brace in the middle of the enclosure. The enclosure is 560mm deep, 470mm wide and 470mm tall. In our loudspeaker system, the Active Subwoofer is crossed over at 80Hz with a very steep 24dB/octave slope, so there is no chance of ‘hearing’ where the Subwoofer is located (unless things are rattling around it). If you use it with a home theatre system, then I expect the crossover to be in the 80-150Hz region, which will work fine. Fig.5: the impedance of the Subwoofer mounted in the enclosure before connecting the power amplifier. The peaks show that our tuning is as predicted. Practical Electronics | January | 2024 This size is at the sweet spot where a subwoofer moves from being ‘disguiseable’ in a home to something you need to work to accommodate. The enclosure is rock solid and capable of both incredible precision and earth-shattering bass. increases the output from a subwoofer. This is mainly seen below the frequency at which the room’s longest dimension is half a wavelength. For a 10m-long room, that is about 17Hz. Our measured response shows greater output at low frequencies than the Thiele-Small modelling suggests we should see, almost certainly due to room gain. Performance Fig.2 shows the modelled (expected) response, while Fig.3 shows the actual measured response. This was made outdoors, about 1.5m from a shed, with the microphone at listening height for the active monitor speakers on 0.8m stands, and at a distance of 1m from the Subwoofer. The measured -3dB point is 27Hz. The subsonic filter for the subwoofer output was active; removing that would extend the bass deeper. There is some ripple in the response, but that is unavoidable without going to great extremes. The frequency response of subwoofers is tough to measure cleanly indoors due to room resonances and the impact of floors and walls on overall gain. One measurement I took indoors is shown in Fig.4. This is a composite measurement about 20cm from the woofer and port. ‘Room gain’ is a phenomenon where the resonance of a room Fig.6: these are the subwoofer panel cuts from 18mm MDF when using the recommended rebated joints. Photo 1: with a router and some MDF off-cuts, you can build a jig to make precisely aligned rebates. Practical Electronics | January | 2024 35 Photo 2: My home-made circle jig allowed me to create a clean circular rebate and cut out the driver hole perfectly. Photo 3: the stack of panels after the rebates and holes have been made. The vent sides are on the top of the pile (and shown below). They are made from three layers of stacked MDF glued together and sanded smooth. Fig.7: details of the rebates routed in the top and bottom panels (all 5mm deep). Other than that, they are simple rectangles of MDF. Photo 5: it’s critical to ‘dry fit’ everything together before applying glue. If you start gluing and find a problem, it will be (much) harder to fix. The Subwoofer’s impedance curve is shown in Fig.5. It is well within the handling capabilities of the amplifiers we are using and low enough to get almost the full 200W available into the driver. 36 The enclosure There are many ways you can build the enclosure. Fig.6 shows how you can cut all the panels from a single 2400 × 1200mm sheet of 18mm-thick MDF while minimising the number of cuts. I did it that way as I don’t have a table saw and wanted to get the sheet cut at the local hardware store where I purchased it. This proved very successful, and in less than 15 minutes, I had all the major panel cuts done and the panels within 1mm of the specified size. The whole lot then fit in the back of the VW Golf to get it home. The tools you will need to finish the raw panels include a router, jigsaw, cordless drill or hand tools and a lot of elbow grease. Review the drawings before you proceed; detailed views of the cut panels are shown in Figs.7-12. I used routed rebates for all panel joints that allow you to simply glue and clamp the enclosure together if you have many Practical Electronics | January | 2024 Fig.8 (left): here’s how to make the internal brace. The sizes and shapes of the holes don’t need to match mine exactly but make them reasonably close to get the specified performance. Fig.9 (below): the rear panel is made of two pieces of MDF glued together, one slightly smaller than the other. sash clamps. This routing can be done very simply using a jig, described below. You will also need to cut out the holes for the port and amplifier module, and rebate the driver hole. If you don’t like the idea of using a router, you could resize the panels and screw them together as butt joints. You will see in the photos that I used screws as well as rebates. That was to make assembly clear and simple for Zak, my 9-year-old helper who was over for the weekend. He really wanted to get involved and, between us, gluing and screwing the rebated panels went very well. My suggested numbered assembly steps are as follows. 1. Purchase the MDF panel and get it cut into the main pieces. This should be a fair stack of timber. Practical Electronics | January | 2024 2. Route the panels as shown in the panel routing figures (Figs.7, 10 and 11). By screwing an off-cut of 18mm MDF to your worktop and a straight-edged off-cut at 90° to it, you can make an extremely effective routing jig into which the 18mm panels fit perfectly, as shown in Photo 1. Using this jig and an end stop, there is no need for measuring and fiddling to route the brace as the rebates are all at the same depth (5mm). Similarly, you can route the rebates on the end panels using this jig to ensure everything is square. 3. Make the driver hole. I used a circle jig made from an aluminium off-cut. I made several holes in it to get the diameter of the rebate hole and driver cut-out just right, Photo 6: installation of the rear panels. I routed straight across the bottom panel, then filled the rebate with wood filler in the port area. testing with the driver to ensure they were correct. The result is shown in Photo 2. The driver rebate is 10mm to ensure the frame sits flush with the front panel. 4. Cut out the vent holes and holes in the brace. I used a jigsaw. 5. Cut out the vent sides and flares, glue them together and fill and sand them smooth. I used some ‘bog’ I found in the shed; any sandable filler will work. Don’t use acrylic filler as it will not sand! It does not need to be super smooth, but I did want to smooth over some of my less spectacular jigsaw cuts. Assembly With the panels made, as shown in Photo 3, it’s time to assemble them 37 Fig.10: similar to the rear panel, the front panel is two pieces of MDF glued together. See our hints on how to make a jig to route the circular rebate and cut the hole neatly. using the following steps. Fig.13 is a side ‘X-ray’ view of the Subwoofer, which might help you understand how it all goes together. 1. Do a ‘dry fit’, as shown in Photo 5. Take all the pieces and assemble the enclosure without glue or screws. Use masking tape to hold the panels together. You need to be sure that everything fits and that there are no unmanageable gaps. If you need to file or trim any panels, now is the time, as a good job is almost entirely in the preparation. 2. If you plan to use screws and glue, drill and countersink the holes to accommodate the screws. A 4mm drill is about the right size. When assembling the box, you will want to use a 3mm drill to make pilot holes for the screws in the end grains. This might seem like a large pilot hole, but the 50mm screws will be totally secure, and you will experience no splitting of the MDF. 3. Install the rear panels. This step requires the rear exterior and interior panels to be attached to the base. First, sit the two rear panels in the rebate and then dry-fit the side panels to ensure the alignment of the rear panels is good. Screw Fig.12: the vent is made from these pieces, but note that you should cut the six side pieces from 16mm MDF to get the required 48-50mm total thickness for three pieces, or use four cut from 18mm MDF and two from 12mm MDF (18mm × 2 + 12mm = 16mm × 3 = 48mm). 38 the rear interior and exterior panels together using 35mm-long 8G screws with PVA adhesive between the panels. Make sure they are held tightly together. Now align this on the base panel, ensuring the two side panels fit perfectly. Screw this to the bottom panel. 4.  Attach the sides and the port braces. To get the left side perfectly aligned, drill pilot holes for the screws in the right spots and screw and glue it in. Then fit the brace pieces so they are flush on the rear exterior panel. Make sure they Photo 7: at this point, all the panels except the top have been attached. Practical Electronics | January | 2024 Fig.11: the two side panels are identical and have a central 5mm rebate (for the interior brace) and one at each end (where the front and rear panels will join). are parallel inside the enclosure and secure them. Finally, install the right-hand panel. 5. Install the internal brace and front panels. First, glue and screw down the panel that forms the top of the port. The internal brace and front panels should slide straight into place in their rebates. If not, adjust them until they are a perfect fit. Glue and screw them in. 6. Finally, attach the top panel (Photos 7 and 8). Make sure any glue that squeezes from the joints is cleaned up as once dry, it is hard to remove. Finishing the enclosure I chose to paint the Active Subwoofer, the key steps being: 1. Rout the corners with a 6mm radius router to make the edges neat, smooth and pleasant to handle. 2.  Seal the enclosures with acrylic primer applied with a roller. 3. Sand the enclosure lightly to get rid of any gross roughness. 4. Fill all screw holes and end grains with filler, ensuring not to put too much. That would be a terrible mistake to make; a thick layer of filler is very hard to sand down. 5. Sand it smooth (Photo 9). Fig.13: an internal side view of the finished Subwoofer without the side panels. Practical Electronics | January | 2024 Photo 8: after installing the top panel, I applied clamps liberally and waited for it to dry. You can see the exit of the port and the flush fit of the brace to the top panel of the port here. 6. Repeat the filling and sanding until the surface is perfect. 7. Prime again, sand and paint for final finish (Photo 10). The subwoofer amplifier I built the amplifier and mounted it with a suitable power supply on an aluminium plate. I chose my amplifier to deliver close to 180W continuous into our 6W subwoofer driver. I fabricated a bracket and panel to accommodate the amplifier and all parts to make a stand-alone module, that slips into a 220 × 170mm cut-out in the Subwoofer’s rear panel. This includes the following: n O ne SC200 (or: Ultra-LD Mk.3 (mostly through-hole) or Mk.4 (mostly SMD) amplifier module) n The Multi-channel Speaker Protector (with one channel used) n A 250-300W power supply n Heatsinking, switching and protection Refer to the January to March 2018 issues of PE for details on the SC200 Amplifier Module. The Multi-channel Speaker Protector we’re using was described in the January 2023 issue of PE. The only change from those instructions is to install just one relay on the Speaker Protector as we are running it from ±57V rails. Using only one relay halves the dissipation in the regulator, and we only have one channel to protect. I used a 3mm-thick panel of aluminium as the main plate for the chassis. To that, I mounted a folded bracket made from 1.5mm-thick 39 aluminium for the transformer and an L-shaped panel for the speaker protector. Next month We don’t have enough space to fit the construction details of the internal amplifier for the Active Subwoofer in this issue. All the remaining construction details will be in the final article next month. In the meantime, if you’re keen to commence construction of the High-Performance Active Subwoofer, you can gather all the parts in the parts list. You can then assemble the Active Subwoofer cabinet using the instructions in this article. After that, you could assemble the SC200 (or Ultra-LD Mk.3/Mk.4) Amplifier Module using the instructions in the January to March 2018 issues of PE (but without installing the output devices yet). It would also be a good idea to build the Four-Channel Speaker Protector module (January 2023) but leave off one of the relays and the associated driving components. We only need to protect a single channel in this application. Do not install the driver in the cabinet yet, although you can prepare to fit it. That’s because you will need to install the acoustic wadding first (to be described next month). You will also need to connect a suitable length of heavy-duty speaker cable to the driver so that it can be connected to the yet-to-be-assembled amplifier module. Next month, we’ll have instructions for building the bracket that the amplifier sits on and that the mains power supply is also mounted on it. The amplifier module sits on one side of the bracket, with the Speaker Protector next to it. The transformer, bridge rectifier and capacitor bank mount on the other side, making for a compact integrated amplifier module. On the rear of this module, outside the subwoofer cabinet, will be the amplifier heatsink, mains input socket, power switch and RCA signal input. Reproduced by arrangement with SILICON CHIP magazine 2023. www.siliconchip.com.au Photo 9: I sanded and primed the active Subwoofer, then sanded it again and added a few filler touch-ups to make the joins perfectly smooth. JTAG Connector Plugs Directly into PCB!! No Header! No Brainer! Our patented range of Plug-of-Nails™ spring-pin cables plug directly into a tiny footprint of pads and locating holes in your PCB, eliminating the need for a mating header. Save Cost & Space on Every PCB!! Solutions for: PIC . dsPIC . ARM . MSP430 . Atmel . Generic JTAG . Altera Xilinx . BDM . C2000 . SPY-BI-WIRE . SPI / IIC . Altium Mini-HDMI . & More www.PlugOfNails.com Tag-Connector footprints as small as 0.02 sq. inch (0.13 sq cm) 40 Photo 10: the Active Subwoofer with the final coat of ‘rattle can’ black paint. It’s supposed to be satin but looks a lot like gloss. Practical Electronics | January | 2024 ETI BUNDLE (1) Teach-In 3, 4 and 5 – all on CD-ROM – only £18.95 ELECTRONICS TEACH-IN 3 – CD-ROM ELECTRONICS TEACH-IN 3 ELECTRONICS TEACH-IN 5 – CD-ROM JUMP START EE M FR -RO CD Mike & Richard Tooley The three sections of the Teach-In 3 CD-ROM cover a huge range of subjects that will interest everyone involved in electronics – from newcomers to the hobby and students to experienced constructors and professionals. £7.99 Mike & Richard Tooley FROM THE PUBLISHERS OF i The how and why of circuit design PRACTICALLY SPEAKING The projects are: n Moisture Detector n Quiz Machine n Battery Voltage Checker n SolarPowered Charger n Versatile Theft Alarm n Spooky Circuits n Frost Alarm n Mini Christmas Lights n iPod Speaker n Logic Probe n DC Motor Controller n Egg Timer n Signal Injector Probe n Simple Radio Receiver n Temperature Alarm. i The techniques of electronic project construction INGENUITY UNLIMITED The first section (80 pages) is dedicated to Circuit Surgery, EPE/PE’s regular clinic dealing with readers’ TeachFREE In nics queries on circuit design problems – from voltage TEACH-IN 1 CD-ROM ro TWO TEACH-INs FOR regulation to using SPICE circuit simulation software. THE PRICE OF ONE! The second section – Practically Speaking – covers hands-on aspects of electronics construction. Again, a whole range of subjects, from soldering to avoiding problems with static electricity and identifying components is covered. Finally, our collection of Ingenuity Unlimited circuits provides over 40 circuit designs submitted by readers. The CD-ROM also contains the complete Electronics Teach-In 1 book, which provides a broad-based introduction to electronics in PDF form, plus interactive quizzes to test your knowledge and TINA circuit simulation software (a limited version – plus a specially written TINA Tutorial). The Teach-In 1 series covers everything from electric current through to microprocessors and microcontrollers, and each part includes demonstration circuits to build on breadboards or to simulate on your PC. © W Pu rne bo im blishing Ltd 20 10 1 Elec t i Over 40 different circuit ideas i The free CD-ROM provides a broad-based introduction to electronics n Program Simulatio Circuit d version) (Limite ramming PIC Prog n) CODE V3 d versio 8 FLOW (Limite Software Quizzes to Test active ledge 8 Inter Your Know 8 TINA i A complete stand-alone tutorial in 11 parts plus free software Teach In 3 Cover.indd 1 ng Ltd. Teach In 4 Cover.indd 1 29/07/2013 10:00:29 ... so that’s another TWO Teach-Ins and The Full Modern Electronics Manual! i In-depth theory ne Publishi In 2 - JUL13.ind PLUS you also get the contents of the free CD-ROM from each issue... i Over 800 PDF pages © Wimbor Plus MikroElektronika, Microchip and L-Tek PoScope software £18.95 FREE CD-RO M WORT H £29.9 5 The essential reference work for everyone studying electronics www The free CD-ROM provides a practical introduction to PIC microcontrollers Three Teach-ins for the great price of THE MODERN ELECTRONICS MANuAL UAL MAN.co.u k BA SE .epe mag Plus: nika, MikroElektro Microchip pe L-Tek PoSco software In 2 TeachLtd nicsorne dsPIC are Publishing PIC and rated Ele©ctro MPLAB, logy Incorpo ogy 2013 Wimb and logo, Techno Technol Teach £8.99 FREE M CD-RO autorun, should This software in Windows if not, open double-click and f Explorer index.pd cal a practi Provides to PIC introduction llers microcontro ws for Windo CD ROM start should This CD y, if not automaticallindex.html double-click 3 09:59:25 i An eleven part tutorial i uses inexpensive circuit simulation software requires This CD-ROM Reader™ from Adobe® dable Free Downloa be.com www.ado FREE M CD-RO TEACH-IN 2 TWO TEACH-INs FOR THE PRICE OF ONE ! 29/07/201 FROM THE PUBLISHERS OF A BROAD-BASED INTRODuCTION TO ELECTRONICS PIC ‘N MIx Starting out with PIC microcontrollers The CD-ROM also contains: n Complete Teach-In 2 book, a practical introduction to PIC microprocessors n MikroElektronika, Microchip and L-Tek PoScope software. 10 13:21:42 The Teach-In 4 CD-ROM covers three of the most important electronics units that are currently studied in many schools and colleges. These include, Edexcel BTEC level 2 awards and the electronics units of the Diploma in Engineering, Level 2. The CD-ROM also contains the full Modern Electronics Manual, worth £29.95. The Manual contains over 800 pages of electronics theory, projects, data, assembly instructions and web links. A package of exceptional value that will appeal to anyone interested in learning about electronics – hobbyists, students or professionals. The techniques of project construction Teach In 5 Cover.indd 1 29/04/20 Mike & Richard Tooley PRACTICALLY SPEAKING PIC’n’ Mix – starting out with the popular range of PIC microcontrollers and Practically Speaking – tips and techniques for project construction. dd 1 ELECTRONICS TEACH-IN 4 15 design and build circuit projects dedicated to newcomers or those following courses in schools and colleges d 1 06/05/2010 16:22:29 EE M FR -RO CD JUMP START ip ip name of Microchip Microch .09 arks 016-02 The Microch s. © 2013 ed tradem countrie 1. MCCD1 register d. Issue and other in the USAAll rights reserve Inc. PLUS CD Cover.in ELECTRONICS TEACH-IN 4 – CD-ROM A BROAD-BASED INTRODUCTION TO ELECTRONICS £8.99 FROM THE PUBLISHERS OF 15 design and build circuit projects for newcomers or those following courses in school and colleges. CIRCUIT SURGERY ELECTRONICS TEACH-IN 5 EE M FR -RO CD i Extensive data tables and web links What a Bargain!! 2011 14/11/2011 20:33:21 ETI BUNDLE (2) Teach-In 6, 7 and 8 – all on CD-ROM – only £18.95 ELECTRONICS TEACH-IN 6 – CD-ROM A COMPREHENSIVE GUIDE TO RASPBERRY Pi Mike & Richard Tooley Teach-In 6 contains an exciting series of articles that provides a complete introduction to the Raspberry Pi, the low cost computer that has taken the education and computing world by storm. This latest book in our Teach-In series will appeal to electronics enthusiasts and computer buffs who want to get to grips with the Raspberry Pi. Teach-In 6 is for anyone searching for ideas to use their Pi, or who has an idea for a project but doesn’t know how to turn it into reality. This book will prove invaluable for anyone fascinated by the revolutionary Pi. It covers: n Pi programming n Pi hardware n Pi communications n Pi Projects n Pi Class n Python Quickstart n Pi World n ...and much more! ELECTRONICS TEACH-IN 6 EE OM FR -R D DV The Teach-In 6 CDROM also contains all the necessary software for the series, so that readers and circuit designers can get started quickly and easily with the projects and ideas covered. £8.99 FROM THE PUBLISHERS OF RASPBERRY Pi ® A ComPREhEnSivE GuidE to RASPBERRY Pi • Pi PRojECt – SomEthinG to Build • Pi ClASS – SPECifiC lEARninG AimS • PYthon QuiCkStARt – SPECifiC PRoGRAmminG toPiCS • Pi woRld – ACCESSoRiES, BookS EtC • homE BAkinG – follow-uP ACtivitiES FREE OM DVD-R RE SOFTWA N6 ALL THE TEACH-I FOR THE RRY Pi RASPBE SERIES ELECTRONICS TEACH-IN 7 – CD-ROM DISCRETE LINEAR CIRCUIT DESIGN ELECTRONICS TEACH-IN 8 – CD-ROM INTRODUCING THE ARDUINO Mike & Richard Tooley Mike & Richard Tooley Teach-In 7 is a complete introduction to the design of analogue electronic circuits. It is ideal for everyone interested in electronics as a hobby and for those studying technology at schools and colleges. The CD-ROM also contains all the circuit software for the course, plus demo CAD software for use with the Teach-In series. n Discrete Linear Circuit Design n Understand linear circuit design n Learn with ‘TINA’ – modern CAD software n Design simple, but elegant circuits nF  ive projects to build: i) Pre-amp ii) Headphone Amp iii) Tone Control iv) VU-meter v) High Performance Audio Power Amp. Hardware: learn about components and circuits Programming: powerful integrated development system Microcontrollers: understand control operations Communications: connect to PCs and other Arduinos. PLUS Audio Out – an analogue expert’s take on specialist circuits Practically Speaking – the techniques of project building. EE M FR -RO CD ELECTRONICS TEACH-IN 7 FROM THE PUBLISHERS OF 02/03/2015 14:59:08 £8.99 SOFTWARE FOR THE TEACHIN 8 SERIES INTRODUCING THE ARDUINO • Hardware – learn about components and circuits • Programming – powerful integrated development system • Microcontrollers – understand control operations • Communications – connect to PCs and other Arduinos n PICkit 3 User Guide AUDIO OUT An analogue expert’s take on specialist circuits PRACTICALLY SPEAKING The techniques of project building Teach In 7 Cover VERSION 3 FINAL.indd 1 ELECTRONICS TEACH-IN 8 nM  icrochip MPLAB IDE XC8 8-bit compiler PLUS... REviEwS – optically isolated AdC and i/o interface boards This book also includes PIC n’ Mix: ‘PICs and the PICkit 3 – A Beginners E guide’ by Mike O’Keefe FCRDE-ROM and Circuit Surgery FREE CD-ROM by Ian Bell – ‘State Machines part 1 and 2’. n Teach-In 8 FREE M -RO CD CIRCUIT ALL THE RE FOR SOFTWA 7 CH-IN THE TEA SERIES intERfACE – a series of ten Pi related features Teach-In 8 is based around a series of practical projects with plenty of information for customisation. The CD-ROM includes the files for: Tone Control, VU-meter, High Performance Audio Power Amp Pi B+ uPdAtE The Arduino offers a truly effective platform for developing a huge variety of projects; from operating a set of Christmas tree lights to remotely controlling a robotic vehicle through wireless or the Internet. FROM THE PUBLISHERS OF DISCRETE LINEAR CIRCUIT DESIGN • Understand linear circuit design • Design simple, but elegant circuits • Learn with ‘TINA’ – modern CAD software • Five projects to build: Pre-amp, Headphone Amp, PluS Teach In 6 Cover.indd 1 £8.99 Teach-In 8 is an exciting series designed for electronics enthusiasts who want to get to grips with the inexpensive, popular Arduino microcontroller, as well as coding enthusiasts who want to explore hardware and interfacing. It will provide a one-stop source of ideas and practical information. 07/04/2016 08:25 PLUS... n Lab-Nation Smartscope software. PIC n’MIX PICs and the PICkit 3 - A beginners guide. The why and how to build PIC-based projects Teach In 8 Cover.indd 1 04/04/2017 12:24 ORDER YOUR BUNDLE TODAY! JUST CALL 01202 880299 – OR VISIT www.electronpublishing.com Max’s Cool Beans By Max the Magnificent Arduino Bootcamp – Part 13 But first… I’ve received several emails from readers saying they remain confused by the concept of forward voltage drop in diodes in general, with light-emitting diodes (LEDs) forming a special case. As you may recall, we introduced this concept as part of calculating the value of an LED’s current-limiting resistor in our first Arduino Bootcamp column (PE, January 2023). In our second Bootcamp column (PE, February 2023), we noted that the data sheet for the 7-segment display we’re using stated that its LED segments had a forward voltage drop (aka VF) of 2V and a maximum allowable forward current (IF) of 20 milliamps (20mA), or 0.02A. As we are working with the Arduino Uno’s 5V supply, and since we are working on the assumption that we want our segments to be as bright as possible, then using Ohm’s Law V = I × R (which we can refactor as R = V/I) we calculated the value of our current-limiting resistors as R = (5V – 2V) / 0.02A = 150Ω. The question remains as to why we subtract V F from our 5V supply. Although the equation is simple, the underlying mechanism is less than obvious to beginners (I know it confused the heck out of me). Well, the way a diode works, it doesn’t start conducting until the potential difference across its input and output is greater than its forward voltage drop value. For any potential greater than this, we are currently assuming the LED acts like a simple piece of wire (apart from it emitting light, of course). The way I describe this if I’m giving a lecture is illustrated in Fig.1. 42 There’s more… Transistors are semiconductor devices that can be used in various roles, including analogue amplifiers and digital switches. The two main classes of transistor with which we (well, you and I) typically come into contact are bipolar junction transistors (BJTs) and field-effect transistors (FETs). For the purposes of this column, we will be experimenting with a BJT. We can dope pure, non-conducting silicon (add impurities into the crystal lattice) to form conducting N-type and P-type silicon. Any interfaces between these different flavours are where most of the magic occurs. BJTs come in two flavours, each with three doped regions ordered as NPN or PNP. The symbol for a generic NPN transistor is shown in Fig.2. Note the arrow pointing out of the heart of the transistor toward the emitter terminal. In the case of a PNP transistor symbol, this arrow would be pointing the other way. Two useful mnemonics are Not Pointing iN (NPN) and Pointing iN Proudly (PNP). The origins of the terminal names (base, collector, and emitter) are too Lake C hannel 2' 2' 2' flow Lake C hannel 0' (a) 2' of water in lake , no barrier, 2' of water flowing in channel 2' (b) 2' of water in lake , 2' barrier, 0' of water flowing in channel 3' flow Lake C hannel 3' Imagine we have a lake, which represents our power source, feeding a channel, which represents a wire. The height of the water in the lake is equivalent to voltage, while any flowing water is equivalent to current. Fig.1a depicts a lake with 2 feet (yes, I’m an Imperial units chap here the US) of water (equivalent to 2V in our electrical circuit) and an unobstructed channel through which the water from the lake flows. By comparison, in Fig.1b we introduce a 2-foot-high barrier, which represents our diode, across our channel, which represents our wire. In this case, assuming the water in the lake is only 2-feet deep, no water will flow through the channel. Finally, in Fig.1c, we increase the depth of the water in the lake to 5 feet. Since the barrier is 2 feet tall, the result will be 3 feet of water flowing through the channel. I know analogies are always suspect, but I must admit to being rather proud of this one. 3' is my current favorite expression.) I can’t believe it’s practically 2024 already. I don’t have a speech prepared and I don’t have anything applicable to wear. What I do know is that we are poised to perform some exceedingly exciting experiments, so let’s make sure we are all dressed appropriately. I’m thinking Monty Python Gumby attire (https://bit.ly/3StpyHL), which – by some strange quirk of fate – means I’m already ready to rock and roll. 2' W TW? (‘What the What,’ (c) 5' of water in lake , 2' barrier, 3' of water flowing in channel Fig.1. A graphical depiction of a diode’s forward voltage drop. befuddling to go into here. Suffice it to say that the base acts as the control terminal. In the case of an NPN transistor wired as shown in Fig.2a, connecting the In signal to 0V will turn the transistor off (making it look like an open circuit or a break in the wire), in which case the Out signal will be pulled-up to 5V by the resistor. By comparison, connecting the In signal to 5V will turn the transistor on, thereby connecting the Out signal to 0V through the transistor. When we consider the operation of this simple circuit (Fig.2b), we see that the transistor is acting as an inverter; that is, the Out signal has the opposite value to the In signal. What’s not obvious from Fig.2 is that only a small amount of current needs to be applied to the base (known as the base current, IB). This small current is amplified into a much larger current flowing between the collector and the emitter (this is known as the collector current, 5V 5V In Out 0V 5V Collector In Out Base 0V Emitter 0V (a) NPN Transistor (b) Operation Fig.2. A generic NPN transistor. Practical Electronics | January | 2024 From Arduino From Arduino From Arduino 150 Ω C B 1kΩ 0V (a) Original circuit 0V (b) Switch on cathode B C 377 E 0V (c) Transistor on cathode Fig.3. Controlling all the segments together. IC). I don’t want to give too much away here, but suppose we wished to control all eight* LEDs on our 7-segment display with a single pin on our Arduino (*in addition to the 7 main segments, there’s also a DP (decimal point) segment). Since each segment has a maximum current of 20mA, we would be talking about 8 × 20mA = 160mA. Unfortunately, the digital pins on an Arduino Uno have a maximum current limit of only 40mA, and they really shouldn’t be asked to handle more than 20mA for extended periods of time. Happily, we can easily find a transistor that can handle an IC current of 160mA between its collector and emitter terminals, and we can control such a transistor by applying a much smaller current – one the Arduino can easily supply – to the transistor’s base. That’s all we need to know to set the stage for the wonders that are to come. If you wish to learn more about fundamental BJT and FET concepts, may I make so bold as to recommend my book, Bebop to the Boolean Boogie: An Unconventional Guide to Electronics – see: https://bit.ly/3u9XIWV Semiconductor switcheroo We introduced the concept of light-dependent resistors (LDRs) in our previous column (PE, December 2023). We finished that column by employing our Arduino to read values from an LDR and display those values on the Serial Monitor. If you wish, you can refresh your memory by downloading a copy of this program (file CB-Jan24-01.txt). As usual, all the files mentioned in this column are available from the January 2024 page of the PE website (https://bit. ly/pe-downloads). If you’ve been following this series, you will be more than familiar with our existing breadboard layout, which – at its heart – has our single-digit common cathode 7-segment display along with eight 150Ω current-limiting resistors (one per segment). However, if you’re new to the party, you might wish to download an image of our current breadboard layout showing our LDR, trimpot, piezoelectric buzzer and 7-segment display – along with various pull-up and current-limiting resistors – coupled with Practical Electronics | January | 2024 the connections to our Arduino Uno (file CB-Jan24-02.pdf). What we want to do now is use the value from an LDR to control the brightness of our 7-segment display. We’re going to keep this simple. In low-light conditions (which we will start off by defining as any LDR reading less than 200), we will assume it’s night time and we will dim our display to a fraction of its full brightness. For any higher ambient light level (an LDR reading of 200+), we will drive our display as brightly as we can. Until now, the way we’ve been controlling the LEDs on our 7-segment display is as illustrated in Fig.3a. In this case, the anode of each LED is controlled by its own digital pin on the Arduino (since we’re using a common-cathode display, all the LEDs’ cathodes are connected and presented as one). In our last-but-one column (PE, November 2023), we noted that Arduinos include special hardware implementations of pulse-width modulation (PWM) functions associated with some of their digital pins. In the case of the Arduino Uno, there are six such pins (3, 5, 6, 9, 10, 11), indicated by ‘~’ characters on the board. The Arduino doesn’t have true analogue outputs but – as discussed in an earlier column (PE, March 2023) – the PWMs provide a pseudo-analogue capability. We access the PWMs using calls to the Arduino’s built-in analogWrite() function, which accepts two arguments – the pin we wish to control and a value between 0 and 255. One of the PWM-equipped pins (pin 6) drives segment D on our 7-segment display. The way we’ve wired our circuit, a PWM value of 0 on Pin 6 will turn that segment fully off (0% brightness), a value of 255 will turn it fully on (100% brightness), and in-between values will result in a corresponding brightness (128 will result in 50% brightness, for example). We experimented with this in PE, November 2023. Let’s suppose we now wish to control the brightness of all the segments on the display using PWM functionality. There are two problems with our current approach. First, we have eight segments on the display but only 6 PWM-equipped pins on the Arduino. Second, it would be painful (figuratively speaking) for us to be obliged to specify the brightness values of the segments individually. What we want is a way to control the brightness of all the segments simultaneously. The only pin that’s shared by all the LEDs is the display’s common cathode. Suppose we added a handcontrolled switch (Fig.3b). Now, we can turn the segments on and off individually using the Arduino’s pins, and we can turn them on and off collectively using our switch. If we could repeatedly turn our switch on and off quickly enough, thereby implementing a clunky PWM function, we could control the brightness of all active segments simultaneously. The solution is to replace our switch with a transistor and to control that transistor using one of the Arduino’s PWM-equipped pins (Fig.3c). (Yes, a ‘Tra-la’ is certainly in order.) Which transistor? This is where things start to get interesting. When turned on, NPN transistors have their own voltage drop. As a rule of thumb, we typically assume this to be 0.7V. Returning to Fig.1c, this is like adding an extra 0.7 feet to our existing 2-foot barrier, resulting in 5 – 2.7 = 2.3 feet of water flowing through the channel. Suppose we stick with our existing 150Ω current-limiting resistors. Returning to Ohm’s law V = I × R, we now know V and R, so refactoring the equation to be I = V/R gives us I = (5 – 2.7) / 150 = ~15mA. This means that if all eight segments are fully on, we will have a total current of 8 × 15mA = 120mA. If we were desperate to achieve the maximum possible brightness, which – as we know – corresponds to an IF of 20mA, we could recalculate the values of our current-limiting resistors using R = V/I, which gives us R = (5V – 2.7V) / 0.02A = 115Ω. Since the closest standard resistor values are 110Ω and 120Ω, we would opt for the higher value of 120Ω, resulting in a slightly lower current of I = (5 – 2.7) / 120 = ~19mA, which is ‘close enough for government work,’ as they say. Are you desperate enough to replace all your 150Ω current-limiting resistors with their 120Ω counterparts? If so, go for it. For myself, I’m going to stick with what we’ve got (for the moment, at least). The internet is a wonderful resource, but it’s not without its problems. For example, if you perform a Google search for something like ‘Controlling the brightness of a common-cathode 7-segment display with a transistor,’ you may run across circuits showing BC547 NPN transistors (for example, https:// bit.ly/49zpYTa). Rather than blindly 43 Fig.4. Removing the two GND wires. F A G B E DP C AREF GND 13 12 ~11 ~10 ~9 8 7 ~6 ~5 4 ~3 2 TX-1 RX-0 D Remove these wires DIGITAL IN/OUT (PWM ~) Listing 3a. Light up all the segments. follow someone else’s circuit, this is the point when you should say to yourself, ‘Let me check the data sheet first’ at: https://bit.ly/479vs5p It doesn’t take long to discover that the BC547 has a maximum IC of only 0.1A, or 100mA, which isn’t sufficient to handle the 120mA associated with our existing 150Ω currentlimiting resistors, let alone the 8 x 19mA = 152mA we would see if we decided to use 120Ω current-limiting resistors. There are two solutions, if we were on a mission-critical assignment to save the world (I’ve been watching too many science fiction films) and all we had at our disposal was a single BC547 transistor that we were determined to use, then we could say that our maximum IC of 100mA equates to 100mA/8 segments = 12.5mA per segment. Using this new intelligence, we could recalculate our current-limiting resistors as R = (5V – 2.7V) / 0.0125A = 184Ω. In this case, the closest standard resistor values are 180Ω and 200Ω, and we would opt for the latter to be on the safe side. However, since we aren’t tasked with saving the world, and as we aren’t pushed for time, a better alternative is to select a transistor capable of meeting our requirements, such as the BC377, for example. Checking its datasheet, we see this little scamp has a maximum IC of 1A, which is more than sufficient to meet our current (no pun intended) and future needs – see: https://bit.ly/3QCc3mo We will be requiring only one BC377 in this column, but we will be using two or three in future experiments, so I’d get at least five (‘just because’). You can obtain these little rascals from any component supplier, but I just found an awesome deal on Amazon for a variety of 20 each of ten types of NPN and PNP transistors (including BC377s), which means a total of 200 transistors, all for only £6.99: https://bit.ly/40xAgyS This is mind-boggling when you think that this would have been the price of a single transistor circa 1960. One step at a time If I’ve taught you anything in this series, I hope it includes taking things one step at a time. This is because it’s a lot easier to verify and debug things in isolation than it is to tackle a bunch of things all at once. So, before we add our transistor 44 into the mix, let’s start by creating a simple program whose task is to light all the segments on the display, including the decimal point (Listing 3a, file CB-Jan24-03.txt). (Remember that, following some confusion in earlier columns, we’re now using a scheme in which the listing number [Listing 3 in this example] corresponds to the associated program file [CB-Jan24-03.txt in this example], after which we use ‘a’, ‘b’, ‘c’… suffixes as appropriate.) There’s nothing here we haven’t seen before. On Lines 4 and 5, we declare an array of integers PinsSegs[], which we initialise with the numbers of the Arduino pins that are driving the LEDs in our 7-segment display. On Lines 12 through 16 in our setup() function, we use a for() loop to cycle through each pin in turn, first defining it as being an OUTPUT, and then assigning it a value of SEG_ON, which will light that segment up. Once all of the segments have been illuminated, the loop() function just cycles round doing nothing. I just ran this program. All my LEDs are glowing furiously, which means we’re now ready to turn our attention to the transistor itself (imagine a roll of drums if you will) ... Adding the transistor Before we add the BC377 transistor to our breadboard, we first need to make some changes. Specifically, we need to remove the two black ground (GND) wires shown in Fig.4. Why two GND wires? Isn’t that a little enthusiastic? Well, as we discussed when we first established our breadboard (PE, February 2023), the display we are using has two pins (3 and 8) that are connected inside the device to form the common cathode. We could have connected either of these to the GND (0V) rails on our breadboard. The reason we connected both is to provide redundancy. If one of our black jumper leads is bad (broken inside), for example, then the other will suffice. As we also discussed, although we don’t need both connections in this instance, we would use both if we were creating a safety-critical or mission-critical system ‘just in case,’ and this is a good mindset to adopt. The BC377 transistor we are using is presented in a TO-92 plastic package (Fig.5). The pin numbers are associated with the package, which means they’re always the same in relation to the package’s ‘D’ shape. However, the association between the pin numbers and the collector, base and emitter signals can vary on a transistor-type-by-transistor-type basis, so be careful and always check the data sheet! Let’s add this transistor to 1 Collector our breadboard, along with associBase 2 ated wires, as illustrated in Fig.6. 3 Emitter If we compare Fig.6 to Fig.3c, 1 2 3 we see that the green wire con(a) Symbol (b) TO -92 Package nects the collector (pin1) on the transistor to pin 3 on the 7-seg- Fig.5. BC377 symbol and ment display. The black wire plastic D-shaped package. Practical Electronics | January | 2024 Fig.6. Adding the BC377 transistor. F A G B DP E D C 1C 2B AREF GND 13 12 ~11 ~10 ~9 8 7 ~6 ~5 4 ~3 2 TX-1 RX-0 B C 377 E 3 DIGITAL IN/OUT (PWM ~) Listing 6a. Definitions and pin assignments. connects the emitter (pin 3) on the transistor to the GND (0V) rail. And the base (pin 2) on the transistor is connected to one side of a 1kΩ (brown, black, red) resistor, the other side of which is connected to pin 11 on the Arduino using a purple wire. As denoted by the ‘~’ character on the Arduino’s board, this pin is equipped with a hardware PWM function inside the Arduino. An image of our full breadboard layout – including the BC377 – is available for your perusing pleasure (file CBJan24-04.pdf). OK, let’s modify our current test program to cause all the segments on the display to cycle around gradually brightening and dimming. We’ll start by adding a new definition, STEP_DELAY, which we will use to control the speed with which the display brightens and dims. We’ll also declare an integer PinTran to which we will assign the number of the Arduino pin (pin 11) that we are using to drive the base of our transistor (via the 1kΩ resistor). The setup() function turning all the segments on individually will remain unchanged. The main modification will be to the loop() function, as illustrated in Listing 5a (file CB-Jan24-05.txt). Since all the segments have been lit up by the setup() function, we commence the loop() function by fading everything down using the for() loop on Lines 28 to 32, after which we fade everything back up again using the for() loop on Lines 35 to 39. To be honest, wrapping our brains around how this works requires some mental gymnastics. We know that we’ve used the setup() function to apply HIGH (5V) to all the segment Listing 5a. Using the transistor to control the brightness. Practical Electronics | January | 2024 anodes to turn the LEDs on. We also know that if we apply the same electrical potential (eg, 5V) to both sides of an LED, then it won’t conduct, so why do we start our for() loop on Line 28 with a value of 255, which equates to 5V on the Arduino’s pin? Allow me to refer you back to Fig.2 and remind you that our transistor acts as an inverter. This means that when we use the Arduino to drive 255 (5V) onto the base of our BC377 transistor at the start of our for() loop on Line 28, this turns the transistor on, which connects the common-cathode pin on the 7-segment display to GND, thereby activating all of the segments. Similarly, when we use the Arduino to drive 0 (0V) onto the base of the transistor at the end of our for() loop on Line 28, this turns the transistor off, which prevents it from conducting, thereby deactivating all of the segments. Upping the ante Just for giggles and grins, I’ve combined a couple of our earlier programs together. I started with the program we created last month (PE, December 2023) that reads the value from the trimpot, maps it into a range of 0 to 9, presents this value on our 7-segment display, and plays a musical note corresponding to that number using our piezoelectric buzzer. I also took parts of the program from last month that reads the value of the LDR, along with parts of the program from this month that uses our transistor to control the brightness of the display. I munged all this together to form a new super-duper program that reads the value from the trimpot, maps it into a range of 0 to 9, presents this value on the 7-segment display, plays a musical note, and reads the value from the LDR. If the value on the LDR is >=200 (greater than or equal to 200), then the value on the 7-segment display is presented at full brightness, otherwise it’s dimmed to a fraction of its full value. You can peruse and ponder this program at your leisure (file CB-Jan24-06.txt). All we need to do at the moment is look at the definitions and pin assignments (apart from the pins driving the segments), as seen in Listing 6a, along with the main loop() function, as shown in Listing 6b. You’ll see we’ve moved things around a bit in the loop() function, but it’s still fundamentally similar to what we’ve seen before. We use the if() test on Line 78 to see if our trimpot has changed. If so, we present the new value on our 7-segment display and we play a tone on our piezo buzzer. We now perform a new if() test on Line 88. If the value read from our LDR is >= NIGHT_LDR (which we’ve tentatively defined as 200), then we use the transistor to drive the display at its full brightness, otherwise, we drive it at a fraction of this value. We’re still using serial commands on Lines 93 to 96 to display the mapped values from the trimpot, along with the 45 Components from Part 1 LEDs (assorted colours) https://amzn.to/3E7VAQE Resistors (assorted values) https://amzn.to/3O4RvBt Solderless breadboard https://amzn.to/3O2L3e8 Multicore jumper wires (male-male) https://amzn.to/3O4hnxk Components from Part 2 7-segment display(s) https://amzn.to/3Afm8yu Components from Part 5 Momentary pushbutton switches https://amzn.to/3Tk7Q87 Components from Part 6 Passive piezoelectric buzzer https://amzn.to/3KmxjcX Components for Part 9 SW-18010P vibration switch https://bit.ly/46SfDA4 Components for Part 10 Breadboard mounting trimpots https://bit.ly/3QAuz04 Components for Part 12 Light-Dependent Resistor https://bit.ly/3S2430m Components for Part 13 BC337 NPN Transistor https://bit.ly/40xAgyS Listing 6b. The main loop() values read from the LDR, on the Serial Monitor to help us to work out what’s happening. For example, I started off with my LDR exposed to roomlevel light, which resulted in my 7-segment display operating at full brightness as expected. However, when I put my finger over the LDR, the 7-segment display continued to operate at full brightness. Looking at the Serial Monitor revealed that although the value from the LDR had fallen, it was still higher than the 200 threshold I’d set. The problem is that light seeps in through the sides of the LDR as well as through its face. Shrouding the LDR with a small piece of cardboard caused its value to fall below 200, at which time the 7-segment display dimmed accordingly (hurrah!). If we were using this technique to control a bedside clock, for example, then we would perform some real-world experiments to determine the ideal threshold value. We might also provide some way for the user to modify the threshold value, but that’s a story for another day. Fig.7. The HC-SR04 ultrasonic sensor (Source: Adafruit) are classed as ‘infrasound.’ Although barely perceptible to humans, various animals – including elephants, hippopotamuses and whales – communicate via infrasonic means. Frequencies above 20kHz are classed as ‘ultrasound.’ Some animals – like dolphins, frogs and tarsiers – communicate using ultrasonic sounds; others, like bats, use ultrasound for echolocation purposes. Have you ever seen bats flying at night? Their ability to use ultrasonic echolocation to navigate through complex three-dimensional terrains while identifying and homing in on prey like moths and mosquitoes is nothing short of phenomenal. It’s so phenomenal that a huge chunk of their little batty brains is devoted to hearing. As Groucho Marx famously said, ‘From the moment I picked your book up until I laid it down, I was convulsed with laughter. Someday I intend reading it.’ The reason I mention this here is that there’s a legendary paper on the topic of consciousness by American philosopher Thomas That’s batty! Nagel titled, What Is It Like to Be a Bat? – someday I intend The hearing ability of a healthy young human typically reading it – see: https://bit.ly/3SyGmgz spans 20Hz to 20,000Hz (20kHz). Frequencies below 20Hz In the meantime, humans have developed technologies Cool bean Max Maxfield (Hawaiian shirt, on the right) is emperor of all he that allow is to use ultrasonic surveys at CliveMaxfield.com – the go-to site for the latest and greatest sound for things like object in technological geekdom. detection and distance measureComments or questions? Email Max at: max<at>CliveMaxfield.com ment. For example, there’s the 46 Practical Electronics | January | 2024 Online resources For the purposes of this series, I’m going to assume that you are already familiar with fundamental concepts like voltage, current and resistance. If not, you might want to start by perusing and pondering a short series of articles I penned on these very topics – see: https://bit.ly/3EguiJh Similarly, I’ll assume you are no stranger to solderless breadboards. Having said this, even if you’ve used these little scamps before, there are some aspects to them that can trap the unwary, so may I suggest you feast your orbs on a column I wrote just for you – see: https://bit.ly/3NZ70uF Last, but not least, you will find a treasure trove of resources at the Arduino.cc website, including example programs and reference documentation. also display the result on… you guessed it… our 7-segment display. This will be the first step along our path to creating a suite of 1-digit, 2-digit, and 4-digit clocks. Until then, as always, I’m only an email away. NEW! 5-year collection 2017-2021 All 60 issues from Jan 2017 to Dec 2021 for just £44.95 PDF files ready for immediate download well-known HC-SR04 ultrasonic sensor (Fig.7). This little beauty is available from multiple suppliers, including Adafruit via Amazon: https://bit.ly/49AMBq4 Next time I can barely control my excitement, because we are going to do all sorts of cool things in our next column. We will commence by employing an HC-SR04 ultrasonic sensor to measure distances, present the results on our 7-segment display, and implement a soon-to-be fabled therabone, which will be our 21st Century answer to the 20th Century’s theremin: https://bit.ly/3ubLrBj Next, while the haunting sound of the therabone still echoes in our ears (and tears of joy still roll down our cheeks), we are going to introduce the concept of real-time clocks (RTCs). In addition to using an RTC to keep track of the time, we will See page 6 for further details and other great back-issue offers. Purchase and download at: www.electronpublishing.com Teach-In 8 CD-ROM Exploring the Arduino EE FR -ROM CD ELECTRONICS TEACH-IN 8 FREE CD-ROM SOFTWARE FOR THE TEACH-IN 8 SERIES FROM THE PUBLISHERS OF This CD-ROM version of the exciting and popular Teach-In 8 series has been designed for electronics enthusiasts who want to get to grips with the inexpensive, immensely popular Arduino microcontroller, as well as coding enthusiasts who want to explore hardware and interfacing. Teach-In 8 provides a one-stop source of ideas and practical information. The Arduino offers a remarkably effective platform for developing a huge variety of projects; from operating a set of Christmas tree lights to remotely controlling a robotic vehicle wirelessly or via the Internet. Teach-In 8 is based around a series of practical projects with plenty of information for customisation. The projects can be combined together in many different ways in order to build more complex systems that can be used to solve a wide variety of home automation and environmental monitoring problems. The series includes topics such as RF technology, wireless networking and remote web access. PLUS: PICs and the PICkit 3 – A beginners guide The CD-ROM also includes a bonus – an extra 12-part series based around the popular PIC microcontroller, explaining how to build PIC-based systems. £8.99 INTRODUCING THE ARDUINO • Hardware – learn about components and circuits • Programming – powerful integrated development system • Microcontrollers – understand control operations • Communications – connect to PCs and other Arduinos PLUS... PIC n’MIX PICs and the PICkit 3 - A beginners guide. The why and how to build PIC-based projects Teach In 8 Cover.indd 1 04/04/2017 12:24 PRICE £8.99 Includes P&P to UK if ordered direct from us SOFTWARE The CD-ROM contains the software for both the Teach-In 8 and PICkit 3 series. ORDER YOUR COPY TODAY! JUST CALL 01202 880299 OR VISIT www.epemag.com Practical Electronics | January | 2024 47 Circuit Surgery Regular clinic by Ian Bell Frequency Shifting and Superheterodyne Receivers – Part 2 𝑆𝑆! = 𝐴𝐴! cos(2𝜋𝜋𝑓𝑓! 𝑡𝑡) Frequency shifting and superheterodyne receivers – Part 2 L ast month, we started looking 𝑠𝑠"# = 𝐴𝐴$ (1 + 𝑘𝑘𝑆𝑆# ) a sinusoidal message of amplitude AM two input frequencies (two sinusoid at superheterodyne radio receivinputs) multipliers output just the sum the modulation depth is: ers, mainly concentrating on the and difference frequencies, whereas with 𝑘𝑘𝐴𝐴# principles of heterodyning (frequency other nonlinear circuits there may also be 𝑚𝑚 = × 100% 𝐴𝐴! shifting) and the mixers that provide many other output frequencies. We often this function. This month, we will only want one of the sum or difference look at the structure and operation of frequencies, so we have to filter the The maximum modulation depth superheterodyne radio receivers in mixer output to remove the unwanted without causing distortion is 100%, 𝑆𝑆# = 𝐴𝐴#that cos(2𝜋𝜋𝑓𝑓 more detail. signals. Multiplier circuits require a beyond we have overmodulation. # 𝑡𝑡) Frequency Shifting and Superheterodyne Receivers – Part 2 Radio transmission systems are relatively large number of transistors Real AM voice/music radio systems Frequency Shifting and Superheterodyne Receivers – Part Frequency Shifting and Superheterodyne Receivers – Part 2 2 fundamentally based on heterodyning. to implement so are more commonly have modulation depths well below this, Superheterodyne Receivers – Part The signal to be transmitted, referred found on Frequency integratedShifting circuitand receivers. maybe to 60% in2sinewave terms, 𝑆𝑆! = 𝐴𝐴30% ! cos(2𝜋𝜋𝑓𝑓! 𝑡𝑡) to as the message signal, (for example, The nonlinearity of a single transistor because real signals do 𝑠𝑠"# = 𝐴𝐴$ (1but + 𝑘𝑘𝐴𝐴 cos(2𝜋𝜋𝜋𝜋 𝑡𝑡)) cos(2𝜋𝜋𝜋𝜋 % $ 𝑡𝑡)not have 𝐴𝐴! cos(2𝜋𝜋𝑓𝑓 𝑆𝑆! =𝑆𝑆% 𝐴𝐴 ! !=cos(2𝜋𝜋𝑓𝑓 ! 𝑡𝑡) ! 𝑡𝑡) speech) is upshifted from its original or diode (or tube/valve in the old days) constant amplitude their modulation cos(2𝜋𝜋𝑓𝑓 frequency range (called the baseband) can be used for mixing in circuits with 𝑆𝑆depth expressed in rms (root mean ! = 𝐴𝐴! is ! 𝑡𝑡) to the much higher frequencies a relatively low component count. square) terms, where the typical values 𝑠𝑠"# = 𝐴𝐴$ (1 + 𝑘𝑘𝑆𝑆# ) (radio frequencies – RF) required may the 20% to 40% 𝑠𝑠"# = 𝐴𝐴! cos(2𝜋𝜋𝑓𝑓 + in 𝑘𝑘𝐴𝐴𝑠𝑠% cos(2𝜋𝜋𝜋𝜋 𝑡𝑡) ! 𝑡𝑡)be $𝐴𝐴 # 𝑡𝑡) rms (1 𝑠𝑠range (1 𝐴𝐴 = +$ cos(2𝜋𝜋𝑓𝑓 𝑘𝑘𝑆𝑆+ "# "# = # )𝑘𝑘𝑆𝑆# ) for practical wireless transmission (for example, see$ the International Amplitude modulation = 𝐴𝐴$ (1 + 𝑘𝑘𝑆𝑆# ) of electromagnetic signals. This is Telecommunications Union report Superheterodyne receivers can be used 𝑠𝑠"# achieved by varying (modulating) one or ITU-R BS.2433-0 (10/2018)). with a variety of modulation schemes, 𝑘𝑘𝐴𝐴# more properties of an RF carrier signal but we will just refer to amplitude 𝑚𝑚 = × 100% 𝑘𝑘𝐴𝐴# 𝑘𝑘𝐴𝐴# 𝐴𝐴! × 100% in sympathy with the message signal. modulation (AM) in this article to keep AM signals 𝑚𝑚 =𝑚𝑚 = × 100% 𝐴𝐴message ! 𝐴𝐴! A radio receiver must then downshift things simple. Before discussing the For a𝑘𝑘𝐴𝐴sinusoidal at frequency # 𝑚𝑚 = × 100% the signal from the RF carrier frequency receiver, it is worth looking at AM fM and 𝐴𝐴!amplitude AM, that is given by: to the original baseband to recover signals, so we know what the receiver 𝑆𝑆# = 𝐴𝐴# cos(2𝜋𝜋𝑓𝑓# 𝑡𝑡) the message, which is referred to as is dealing with. As the name suggests 𝐴𝐴# cos(2𝜋𝜋𝑓𝑓 𝑆𝑆# =𝑆𝑆# 𝐴𝐴#=cos(2𝜋𝜋𝑓𝑓 # 𝑡𝑡) # 𝑡𝑡) demodulation or detection. amplitude modulation involves changing the amplitude of a fixed 𝑆𝑆#The modulated signal, using = 𝐴𝐴resulting # cos(2𝜋𝜋𝑓𝑓# 𝑡𝑡) frequency carrier wave in proportion the equation above, is: Mixer recap 𝑠𝑠"# = 𝐴𝐴$ (1 + 𝑘𝑘𝐴𝐴% cos(2𝜋𝜋𝜋𝜋% 𝑡𝑡)) cos(2𝜋𝜋𝜋𝜋$ 𝑡𝑡) to the message signal. The carrier signal The principle of the superheterodyne 𝑠𝑠"# 𝑡𝑡)) cos(2𝜋𝜋𝜋𝜋 (1𝐴𝐴+$ (1 𝑠𝑠"# = 𝐴𝐴$= 𝑘𝑘𝐴𝐴+%𝑘𝑘𝐴𝐴 cos(2𝜋𝜋𝜋𝜋 cos(2𝜋𝜋𝜋𝜋 % cos(2𝜋𝜋𝜋𝜋 % 𝑡𝑡))% $ 𝑡𝑡) $ 𝑡𝑡) (SC) is a high-frequency receiver is downconversion a fixed Frequency Shiftingtoand Superheterodyne Receivers – Part 2(RF) sinusoid intermediate frequency (IF) before at frequency fC and amplitude A𝑠𝑠C, which "# = 𝐴𝐴$ (1 + 𝑘𝑘𝐴𝐴% cos(2𝜋𝜋𝜋𝜋% 𝑡𝑡)) cos(2𝜋𝜋𝜋𝜋$ 𝑡𝑡) further downcoversion to the baseband. we can write as: Multiplying out: 𝑠𝑠"# = 𝐴𝐴! cos(2𝜋𝜋𝑓𝑓! 𝑡𝑡) + 𝑘𝑘𝐴𝐴% cos(2𝜋𝜋𝜋𝜋$ 𝑡𝑡) cos(2𝜋𝜋𝑓𝑓# 𝑡𝑡) The intermediate frequency used in 𝑆𝑆! = 𝐴𝐴! cos(2𝜋𝜋𝑓𝑓! 𝑡𝑡) 𝑠𝑠"# 𝐴𝐴! cos(2𝜋𝜋𝑓𝑓 𝑠𝑠"# = 𝐴𝐴!=cos(2𝜋𝜋𝑓𝑓 𝑘𝑘𝐴𝐴+%𝑘𝑘𝐴𝐴 cos(2𝜋𝜋𝜋𝜋 ! 𝑡𝑡) % cos(2𝜋𝜋𝜋𝜋 $ 𝑡𝑡) cos(2𝜋𝜋𝑓𝑓 ! 𝑡𝑡) + $ 𝑡𝑡) cos(2𝜋𝜋𝑓𝑓 # 𝑡𝑡) # 𝑡𝑡) superheterodyne receivers is at a much higher frequency than audio (hence Note that the 2π factor converts 𝑠𝑠"# = 𝐴𝐴! the cos(2𝜋𝜋𝑓𝑓! 𝑡𝑡) + 𝑘𝑘𝐴𝐴% cos(2𝜋𝜋𝜋𝜋$ 𝑡𝑡) cos(2𝜋𝜋𝑓𝑓# 𝑡𝑡) the ‘super’ part of the name). The fact ordinary frequency of the signal (fC) in Frequency Shifting and Superheterodyne Receivers – Part 2 that the IF is a fixed frequency makes hertz angular frequency (w) in The signal is equivalent to the carrier plus 𝑠𝑠"# =to𝐴𝐴an $ (1 + 𝑘𝑘𝑆𝑆# ) the design of a receiver with good radians. The message signal (SM) is at the carrier multiplied by the message. performance much easier than if most Based on this and using a similar approach a lower frequency (for example, audio) 𝑆𝑆! = 𝐴𝐴! cos(2𝜋𝜋𝑓𝑓! 𝑡𝑡) of the circuitry has to cope with (be and varies the instantaneous amplitude tuneable to) the full range of carrier of the 𝑘𝑘𝐴𝐴 carrier to give the modulated # 𝑚𝑚 = (SAM× frequencies which need to be received. signal ): 100% 𝐴𝐴! Heterodyning is achieved using 𝑠𝑠"# = 𝐴𝐴$ (1 + 𝑘𝑘𝑆𝑆# ) Introduction to LTspice mixers. These are nonlinear circuits that combine signals to produce new Want to learn the basics of LTspice? frequencies (heterodynes) not present In this expression, k is the modulating Ian Bell wrote an excellent series of 𝑆𝑆# = 𝐴𝐴which # cos(2𝜋𝜋𝑓𝑓 Circuit Surgery articles to get you up in the input. We discussed mixers in factor, is #a𝑡𝑡)value greater than 𝑘𝑘𝐴𝐴# and running, see PE October 2018 detail last month. To recap briefly, an zero. of k, together with the 𝑚𝑚 =The value × 100% to January 2019, and July/August ideal mixer multiplies two signals, relative𝐴𝐴!amplitudes of carrier and 2020. All issues are available in but if signals are combined (added) message determine the modulation print and PDF from the PE website: 𝑠𝑠"# = 𝐴𝐴$ (1 + 𝑘𝑘𝐴𝐴(m), % cos(2𝜋𝜋𝜋𝜋 $ 𝑡𝑡) and applied to any nonlinear circuit depth that % is𝑡𝑡)) thecos(2𝜋𝜋𝜋𝜋 amplitude of the https://bit.ly/pe-backissues then heterodyning will occur. With modulation relative to the carrier. For 𝑆𝑆# = 𝐴𝐴# cos(2𝜋𝜋𝑓𝑓# 𝑡𝑡) 48 Practical Electronics | January | 2024 𝑠𝑠"# = 𝐴𝐴! cos(2𝜋𝜋𝑓𝑓! 𝑡𝑡) + 𝑘𝑘𝐴𝐴% cos(2𝜋𝜋𝜋𝜋$ 𝑡𝑡) cos(2𝜋𝜋𝑓𝑓# 𝑡𝑡) Fig.1. LTspice schematic for behavioural simulation of amplitude modulation. Fig.4. LTspice modulator special function component. is the same as in Fig.3. If there is no DC offset on the AM input the modulator component (configured for AM) will act as a multiplying mixer. Sidebands Fig.2. Waveform results from the circuit in Fig.1 with k = 0.3 (30%). to that used for mixers last month, we can create an LTspice behavioural simulation of amplitude modulation (see Fig.1). Like last month, to make it easier to see both the carrier and message waveforms, we are not using typical radio frequencies for the carrier. In the example the value of the modulation factor (k) is set up as a parameter. Fig.2 shows the results from the simulation in Fig.1 for k = 0.3 (30%). Fig.3 shows the modulated waveform for k = 0.6 (60%). As mentioned last month, when considering the operation of radio systems, we are often more interested in the signal spectra rather than the waveforms in the time domain. Therefore, the simulation is again configured to facilitate viewing of the spectrum with LTspice’s FFT function. In the circuit in Fig.1, we used a behavioural source to implement an AM modulator. An alternative approach is to use the ideal modulator component that is available in LTspice. This can be found in the ‘Special Functions’ folder of the component selector. It provides both amplitude and frequency modulation (AM and FM) functionality. It has two parameters – mark and space – which set the upper and lower FM frequencies. These should be the set to the same value, equal to the carrier frequency, for AM. An example circuit with the modulator component configured for AM is shown in Fig.4. The example uses a 0.6V-amplitude sinewave message signal on a 1.0V DC offset, with a 20kHz carrier signal. This produces AM with 60% modulation depth, so the output Fig.3. Waveform results from the circuit in Fig.1 with k = 0.6 (60%). Practical Electronics | January | 2024 From the discussion on mixers last month, we know that the multiply term in the equation for AM with sinusoids given above will produce an output with two signals at the sum and difference frequencies (f C – f M ) and (f C + f M), the carrier term in the equation means that this frequency (f C ) will also be present in the AM modulator output. This is shown in Fig.5, which is the spectrum (LTspice FFT) for the modulation waveform from the circuit in Fig.1, where the sum (20 + 2 = 22kHz) and difference (20 – 2 = 18kHz) and carrier (20kHz) peaks can be seen. In the context of modulation, sum and difference frequencies are referred to as the upper and lower sidebands respectively. They are single frequencies in this LTspice example, but in general they comprise the full message bandwidth upshifted to ranges above and below the carrier frequency. This is illustrated in Fig.6. The spectrum on the left of Fig.6 is the baseband and comprises a range of relatively low frequencies (from fm,min to fm,max); for example, audio from a few tens of hertz to several kilohertz. Like Fig.4, the frequency axis is linear and includes zero frequency (DC) unlike the logarithmic scales commonly used for plots such as amplifier frequency responses. The right of Fig.6 shows the spectrum of the AM signal produced by using the baseband signal on the left to modulate a carrier of frequency fC. The baseband is upshifted to the sum and difference frequencies and so appears both above and below the carrier frequency as the upper and lower sidebands. Note the ‘reversal’ of the lower sideband – the highest baseband frequency is shifted to the lowest frequency in the lower sideband. The gap between the carrier and sidebands on both sides is equal to the lowest baseband frequency. The plots in Fig.5 are not to scale – the 49 Fig.5. Spectrum of the modulated waveform of the circuit in Fig.1 with k = 0.6 (60%). break in the AM plot axis indicates that a typical carrier frequency is much further along the axis (relative to the size of the sidebands) than where it is located in the drawing. The full AM signal takes more bandwidth and power to transmit than is strictly necessary. For normal AM the sidebands are symmetric (see Fig.6), so only one needs to be transmitted, halving the bandwidth – this is called Single Sideband (SSB). The carrier contains no message information, so can be reduced in amplitude or removed (referred to as suppressed carrier), which can be applied to both single and double sidebands (SSB-SC and DSBSC). Not transmitting a sideband and/or the carrier reduces power requirements or increases coverage with the same power. Receiving SSB and suppressed carrier signals is more complex and requires higher receiver performance Intermediate frequency As previously explained, a key feature of the superheterodyne receiver is the downshifting of the received signal to a fixed intermediate frequency. The idea of what is required is illustrated in Fig.7. There is a range of possible received signals, that is different carrier signals and their associated sidebands from the various stations or channels that can be received. One of these is selected (by tuning to that station or selecting that channel) and it is downshifted to the fixed IF. The downshifting does not change the shape of the spectrum of the AM signal – it just shifts it to a new centre frequency (fIF instead of fC). The AM signal Magnitude Magnitude Message (baseband) than full AM, so is generally avoided for commercial AM stations, but is used in other contexts. For simplicity, we will assume full AM signals when discussing receivers here. Carrier Lower sideband fm,min Message bandwidth f fm,max fm,min fc – fm,max Upper sideband fc f AM bandwidth fc + fm,max Fig.6. Signal spectra for AM. Magnitude Wide range of possible received AM signals Magnitude 0 0 fc,min f Selected AM signal shifted to fixed IF fIF Fig.7. Shifting a received AM signal to IF. 50 fc,max IF AM signal can then be demodulated to recover the message signal. As we know from the detailed discussion of mixing last month, shifting to IF can be achieved by mixing (ideally multiplying) the received signal by a sinusoidal signal at an appropriate frequency. In a receiver, this signal is generated by a local oscillator (LO). The mixer produces sum and difference frequencies, which means that either the sum or difference frequency of the received carrier with respect to the LO frequency must match the required intermediate frequency. Using a local oscillator frequency below the carrier frequency is called ‘low-side injection’; if the local oscillator frequency is above the carrier frequency it is ‘high-side injection’. Both can be used, but for basic AM high-side injection is more common. The multiple frequencies produced by nonlinear mixers are more likely to produce disruptive signals in the received signal range if low-side injection is used. Mixing the received carrier at fC with a high-side local oscillator at fLO produces signals at (fLO – fC) and (fLO + fC), with their sidebands. Assuming we want an IF which is lower than the carrier frequency (it does not have to be) we need fIF = fLO – fC. This means we need to tune the local oscillator to fLO = fC + fIF. We need the local oscillator to be able to tune to fC + fIF throughout the range of frequencies we want to receive. In addition to the required IF signal at f LO – f C the mixer will also produces a higher frequency signal at fLO + f C. This needs to be removed by filtering. As a round-number example, for a carrier range of 1.0MHz to 1.5MHz and an IF of 400kHz (0.4MHz) the local oscillator needs to tune from 1.4MHz (1.0 + 0.4 = 1.4) to 1.9MHz (1.5 + 0.4 = 1.9). The mixer will also produce signals in the range 2.4MHz (1.0 + 1.4 = 2.4) to 3.4MHz (1.5 + 1.9 = 3.4), which need to be filtered out. This example is similar to traditional broadcast AM receivers where an IF of 455kHz was commonly used (from the early days of widespread superhet use). An advantage of high-side injection is that a smaller LO tuning range (ratio of highest to lowest LO frequency) is required than for low-side injection, which makes things easier if the tuning is implemented with a variable capacitor. IF mixer simulation fc f We can simulate the IF mixing in LTspice by adding a LO signal and behavioural multiplying mixer to the circuit in Fig.1. This is shown in Fig.8 – the carrier (from source V1) is at a higher frequency (80kHz) than in the circuit Practical Electronics | January | 2024 Fig.8. LTspice schematic for behavioural simulation of shifting an AM signal to an intermediate frequency (IF). in Fig.1, but the modulated signal generation is essentially the same. The modulated signal (signal modulated from source B 1 ) is multiplied by a 110kHz sinewave from the local oscillator (LO signal from source V3) using behavioural source B 2 . This produces the intermediate frequency Fig.9. Waveform results from the circuit in Fig.8. output (signal IF) at 30kHz (fIF = fLO – fC = 110kHz – 80kHz = 30kHz). The schematic includes a filter which we will discuss later. The results of simulating the circuit in Fig.8 up to the IF mixer output are shown in Fig.9. The top three traces (carrier (80kHz), message (2kHz) and AM modulated signal) are similar to Fig.2, but the carrier frequency is higher, and the waveforms are zoomed in more. The fourth trace is the local oscillator (LO) at 110kHz. The bottom trace is the IF signal from the mixer. This has a complex-looking waveform, which is difficult to interpret from its shape. It is more useful to look at the spectra. Fig.10 shows the spectra of the modulated and IF waveforms from Fig.8. It can be seen that the AM waveform comprises the carrier (80kHz) and the two sidebands (at 78kHz and 82kHz), corresponding with Fig.5 and Fig.6, as discussed earlier. The IF spectrum shows the presence of two ‘AM’ signals of equal amplitudes, one centred on 30kHz and the other on 190kHz. This is the required IF signal centred on 30kHz and the additional signal from the mixer centred on fLO + fC = 110kHz + 80kHz = 190kHz. Unlike the waveform, the spectrum clearly shows that the IF signal is behaving as expected from mixing (ideal multiplying) the local oscillator and AM signal. Looking at the lower trace in Fig.10 we see that to obtain the desired signal, that is the AM signal centred at the IF frequency of 30kHz on its own, we need to filter the IF mixer output to remove the component of the waveform centred at 190kHz. In this simplified example there are no other signals present in the spectrum, but in general the IF mixer output spectrum will contain many other significant peaks. These will include the result of mixing signals from adjacent radio stations/channels with the local oscillator, and additional spectral components resulting from non-ideal mixer behaviour (see last month’s discussion). Thus, a bandpass filter is required to remove all the unwanted parts of the IF spectrum before the IF signal can be demodulated to recover the message. Tuning Fig.10. Spectra of ‘received’ AM and IF waveforms from Fig.9. Practical Electronics | January | 2024 It is not the whole story, as we will see shortly, but the tuning of a superheterodyne receiver to the desired station/channel is fundamentally achieved by a combination of the local oscillator frequency, which selects which received frequency is shifted to the IF, and the bandpass filter after the IF mixer which removes everything apart from the wanted signal. This 51 requires a filter with a sharp cutoff outside the bandwidth of the received signal; however, because the IF is at fixed frequency a fixed filter can be used, which is relatively easy to achieve. The IF filter was implemented using LC circuits in the earliest superheterodyne radios, but later replaced by ceramic filter components which provide better accuracy at low cost. As mentioned above, 455kHz is the traditional IF frequency for broadcast AM receivers and many ceramic filters for this (and other related) IF frequencies were manufactured. However, some of these specific components may be harder to source now as technology has moved on. (eBay may be your best bet, as is scavenging old radio equipment.) These days, filtering (and other processing) of IF signals can often be achieved using DSP (digital signal processing). A bandpass filter is implemented in the circuit in Fig.8 using two LTspice second-order behavioural bandpass filters (U1 and U2). These are configured as a fourth-order bandpass filter, centred on the IF frequency of 30kHz, with a bandwidth which means that message signal (sidebands) will not be significantly attenuated. This filter is for illustration using these example waveforms and chosen for convenience of quick set-up in LTspice. It is not necessarily similar to the requirements for real radio signals because the IF, LO and carrier frequencies in the example are very low for purposes of displaying the waveforms, and there are no unwanted signals very close to the IF frequency in the example. The waveform of the filtered IF mixer output (signal filtered) for the circuit in Fig.8 is shown in Fig.11 with the original message signal for comparison. We can see that it looks like an AM signal modulated with the 2kHz sinewave message. The spectrum of the filtered IF mixer output is shown in Fig.12 and the frequency response of the filter is shown in Fig.13 over the same range as the spectrum. The frequency response was obtained using the circuit in Fig.14. Comparison of the filtered mixer output spectrum with the unfiltered spectrum in Fig.10 shows that the signal centred at 190kHz has been significantly attenuated. Fig.11. Waveform of filtered IF mixer output from the circuit in Fig.9. Fig.12. Spectra of filtered IF waveform from the circuit in Fig.9. Fig.13. Frequency response of the filter (U1 and U2) in Fig.9. Fig.14. LTspice circuit to obtain the frequency response in Fig.13. Mixer Image filter RF amp IF filter IF amp Simulation files Fig.15. Superheterodyne receiver structure. Most, but not every month, LTSpice is used to support descriptions and analysis in Circuit Surgery. The examples and files are available for download from the PE website: https://bit.ly/pe-downloads 52 Practical Electronics | January | 2024 Tuning Local oscillator Image frequency Previously, we discussed using a local oscillator at frequency fLO = fC + fIF to tune to our required carrier frequency (fC) and shift the signal to the IF (fIF = fLO – fC). However, the mixer, with the local oscillator at fLO as one of its inputs, will also shift a different frequency to f IF , specifically fIF = fIm – fLO, where fIm is known as the image frequency. We have fIm = fC + fLO. For example, using the same round numbers as above, for fC = 1.0MHz and an IF of 400kHz (0.4MHz) the local oscillator needs to be at 1.4MHz and therefore the image frequency is at 1.8MHz (1.4 + 0.4 = 1.8MHz). In this example, if the receiver picks up a signal at 1.8MHz it will be shifted to the IF along with the wanted signal. Because it is then at the same frequency, the image cannot be separated from the wanted signal by filtering after the mixer. In general, we have to assume that received signals will be present at the image frequency, so they must be removed before the mixer. This requires a filter before the mixer, called the image filter or preselection filter, which may be tuneable to track with the local oscillator. However, the requirements for this filter are a lot less severe than if we tried to filter the required station/channel directly from the RF signal received from the antenna. In a superhet the more demanding filtering is done by the fixed frequency IF filter, as described earlier. The preceding discussion leads to the structure of a superheterodyne receiver as shown in Fig.15. There are of course variations on this theme – for example, there may be another filter before the image filter to remove all signals outside the band the receiver is designed to work with. The next stage after the IF amplifier is detection or demodulation of the IF signal, which we will look at next month. ESR Electronic Components Ltd All of our stock is RoHS compliant and CE approved. Visit our well stocked shop for all of your requirements or order on-line. We can help and advise with your enquiry, from design to construction. 3D Printing • Cable • CCTV • Connectors • Components • Enclosures • Fans • Fuses • Hardware • Lamps • LED’s • Leads • Loudspeakers • Panel Meters • PCB Production • Power Supplies • Relays • Resistors • Semiconductors • Soldering Irons • Switches • Test Equipment • Transformers and so much more… Monday to Friday 08:30 - 17.00, Saturday 08:30 - 15:30 Station Road Cullercoats North Shields Tyne & Wear NE30 4PQ Tel: 0191 2514363 sales<at>esr.co.uk www.esr.co.uk STEWART OF READING 17A King Street, Mortimer, near Reading, RG7 3RS Telephone: 0118 933 1111 Fax: 0118 933 2375 USED ELECTRONIC TEST EQUIPMENT Check website www.stewart-of-reading.co.uk Fluke/Philips PM3092 Oscilloscope 2+2 Channel 200MHz Delay TB, Autoset etc – £250 LAMBDA GENESYS LAMBDA GENESYS IFR 2025 IFR 2948B IFR 6843 R&S APN62 Agilent 8712ET HP8903A/B HP8757D HP3325A HP3561A HP6032A HP6622A HP6624A HP6632B HP6644A HP6654A HP8341A HP83630A HP83624A HP8484A HP8560E HP8563A HP8566B HP8662A Marconi 2022E Marconi 2024 Marconi 2030 Marconi 2023A PSU GEN100-15 100V 15A Boxed As New £400 PSU GEN50-30 50V 30A £400 Signal Generator 9kHz – 2.51GHz Opt 04/11 £900 Communication Service Monitor Opts 03/25 Avionics POA Microwave Systems Analyser 10MHz – 20GHz POA Syn Function Generator 1Hz – 260kHz £295 RF Network Analyser 300kHz – 1300MHz POA Audio Analyser £750 – £950 Scaler Network Analyser POA Synthesised Function Generator £195 Dynamic Signal Analyser £650 PSU 0-60V 0-50A 1000W £750 PSU 0-20V 4A Twice or 0-50V 2A Twice £350 PSU 4 Outputs £400 PSU 0-20V 0-5A £195 PSU 0-60V 3.5A £400 PSU 0-60V 0-9A £500 Synthesised Sweep Generator 10MHz – 20GHz £2,000 Synthesised Sweeper 10MHz – 26.5 GHz POA Synthesised Sweeper 2 – 20GHz POA Power Sensor 0.01-18GHz 3nW-10µW £75 Spectrum Analyser Synthesised 30Hz – 2.9GHz £1,750 Spectrum Analyser Synthesised 9kHz – 22GHz £2,250 Spectrum Analsyer 100Hz – 22GHz £1,200 RF Generator 10kHz – 1280MHz £750 Synthesised AM/FM Signal Generator 10kHz – 1.01GHz £325 Synthesised Signal Generator 9kHz – 2.4GHz £800 Synthesised Signal Generator 10kHz – 1.35GHz £750 Signal Generator 9kHz – 1.2GHz £700 HP/Agilent HP 34401A Digital Multimeter 6½ Digit £325 – £375 HP 54600B Oscilloscope Analogue/Digital Dual Trace 100MHz Only £75, with accessories £125 (ALL PRICES PLUS CARRIAGE & VAT) Please check availability before ordering or calling in HP33120A HP53131A HP53131A Audio Precision Datron 4708 Druck DPI 515 Datron 1081 ENI 325LA Keithley 228 Time 9818 Practical Electronics | January | 2024 Marconi 2305 Marconi 2440 Marconi 2945/A/B Marconi 2955 Marconi 2955A Marconi 2955B Marconi 6200 Marconi 6200A Marconi 6200B Marconi 6960B Tektronix TDS3052B Tektronix TDS3032 Tektronix TDS3012 Tektronix 2430A Tektronix 2465B Farnell AP60/50 Farnell XA35/2T Farnell AP100-90 Farnell LF1 Racal 1991 Racal 2101 Racal 9300 Racal 9300B Solartron 7150/PLUS Solatron 1253 Solartron SI 1255 Tasakago TM035-2 Thurlby PL320QMD Thurlby TG210 Modulation Meter £250 Counter 20GHz £295 Communications Test Set Various Options POA Radio Communications Test Set £595 Radio Communications Test Set £725 Radio Communications Test Set £800 Microwave Test Set £1,500 Microwave Test Set 10MHz – 20GHz £1,950 Microwave Test Set £2,300 Power Meter with 6910 sensor £295 Oscilloscope 500MHz 2.5GS/s £1,250 Oscilloscope 300MHz 2.5GS/s £995 Oscilloscope 2 Channel 100MHz 1.25GS/s £450 Oscilloscope Dual Trace 150MHz 100MS/s £350 Oscilloscope 4 Channel 400MHz £600 PSU 0-60V 0-50A 1kW Switch Mode £300 PSU 0-35V 0-2A Twice Digital £75 Power Supply 100V 90A £900 Sine/Sq Oscillator 10Hz – 1MHz £45 Counter/Timer 160MHz 9 Digit £150 Counter 20GHz LED £295 True RMS Millivoltmeter 5Hz – 20MHz etc £45 As 9300 £75 6½ Digit DMM True RMS IEEE £65/£75 Gain Phase Analyser 1mHz – 20kHz £600 HF Frequency Response Analyser POA PSU 0-35V 0-2A 2 Meters £30 PSU 0-30V 0-2A Twice £160 – £200 Function Generator 0.002-2MHz TTL etc Kenwood Badged £65 Function Generator 100 microHz – 15MHz Universal Counter 3GHz Boxed unused Universal Counter 225MHz SYS2712 Audio Analyser – in original box Autocal Multifunction Standard Pressure Calibrator/Controller Autocal Standards Multimeter RF Power Amplifier 250kHz – 150MHz 25W 50dB Voltage/Current Source DC Current & Voltage Calibrator £350 £600 £350 POA POA £400 POA POA POA POA Marconi 2955B Radio Communications Test Set – £800 53 MITCHELECTRONICS Learn the basics of electronics with Robin Mitchell The 555 Timer IC – Part 2: Enter Logic MitchElectronics is a series of projects by Robin Mitchell that introduces beginners to useful, simple, easy-to-understand circuit designs. Each month, he will introduce fundamental components, theory and ideas used in electronics. The series will cover both analogue and digital electronics. I n last month’s article – The 555 Timer IC Part 1 – we looked at how the iconic 555 timer IC can be used as an astable and monostable, as well as learning about a number of fundamental circuit components, including resistors, capacitors and LEDs. This month, we will learn how to use the astable and monostable circuits in practical applications, including the MitchElectronics 4017 Light Chaser, Traffic Light and Electronic Dice kits. Plus we will introduce a number of new circuit concepts, including a start on how logic chips work. Fundamentals Before we can jump into the practical applications of the 555 astable and monostable circuits, we first need to discuss several new fundamental components and circuit ideas: diodes, potential dividers, a deeper dive into the 555 IC, logic, and an introduction to the cheap and easy-to-use CMOS 4000 series of logic ICs. What are diodes? Diodes are one of the most fundamental and important components (next to resistors and capacitors) and are used to control the flow of current. Like capacitors and resistors, diodes are passive components meaning that they are unable to control a current flow (whereas devices like transistors, op amps and logic chips are active components). Diodes are made of two layers of subtly different kinds of semiconductors, and just like the LEDs (light-emitting diodes) we met last month, diodes only conduct current in one direction. You can think of them as the electronic equivalent of a one-way valve in plumbing. Diodes have two pins: the ‘anode’ which must be positive compared to the other, called the ‘cathode’ if current is to flow – see Fig.1. This is a vital point for diodes, current can only flow through 54 I (milliamps) Anode (+) Cathode (–) V (volts) Fig. 1. Diode schematic symbol and 1N5817 diode. a diode from the anode to the cathode. This makes diodes extremely useful for ‘rectification’, where alternating current (AC) is converted into a direct current (DC), as well as for circuit protection and preventing reversed power supplies from damaging circuits (such as inserting batteries in the wrong direction). Diodes are cheap, widely used and have many uses. You will encounter them in all shapes and sizes as you build and study electronic circuits. Diodes can be made from various semiconductors, but the most common material for diodes is silicon. (Older devices were often germanium.) To make a diode, two differently doped pieces of semiconductor, called ‘n-type’, and ‘p-type’ are fused together – see Fig.2. n-type semiconductors are doped with materials such as phosphorus, arsenic or antimony, which give a semiconductor material an excess number of electrons (hence, N-type for negatively doped). p-type semiconductors are doped with materials such as boron or gallium, which give a semiconductor material a deficit of electrons resulting in net positive doping (hence, p-type). Let’s look at the electrical characteristics of diodes – how its current flow for a given applied voltage varies. Anode (+) p-type silicon Cathode (–) n-type silicon Fig. 2. Diode semiconductor structure. I-V curve of an ideal diode I (milliamps) 200 V (volts) –10 0.5 1.0 I-V curve of an real diode (eg, 1N914) Fig. 3. Voltage -current characteristics of an ideal diode vs real diode. An ideal or ‘perfect’ diode conducts current in one direction only, with no voltage drop across it; zero resistance when conducting, and infinite resistance when not conducting. In reality, diodes are far from perfect, and have a few important characteristics, including a forward voltage drop, and a non-linear current behavior. Looking at the graph shown in Fig.3, barely any current flows through a diode until the voltage across the diode goes beyond its ‘forward voltage’, often abbreviated to Vf. This can be thought of as the voltage needed to turn on the diode and make it function. When a diode has sufficient voltage across it to make it conduct, it is said to be forward biased. For silicon diodes, this forward voltage is typically around 0.7V, but it can be as low as 0.5V and as high as 1V (and remember it is typically 1-2V for LEDs). One neat feature of the forward voltages is that because the voltage across a diode cannot exceed the forward voltage of the diode (when used within the diode’s safe operating parameters), diodes can be used to clamp voltages. If the input voltage shown in Fig.4 exceeds the forward Practical Electronics | January | 2024 𝐼𝐼 = 𝐼𝐼 = 𝑉𝑉 = 𝐼𝐼𝐼𝐼 = 𝑉𝑉 = 𝐼𝐼𝐼𝐼 𝑉𝑉 𝑅𝑅 𝑉𝑉 𝑉𝑉!" = 𝑅𝑅 𝑅𝑅# + 𝑅𝑅$ 𝑉𝑉!" × 𝑅𝑅$ = 𝑉𝑉%&' 𝑅𝑅# + 𝑅𝑅$ Fig. 4. Diode-resistor circuit comparing the voltage across the diode and resistor in series. 𝑉𝑉 = 𝐼𝐼𝐼𝐼 voltage, then the remaining voltage is At this stage there 𝑉𝑉 𝑅𝑅$ are three things to notice: 𝑉𝑉 = 𝐼𝐼𝐼𝐼 𝐼𝐼 = 𝑉𝑉 = 𝐼𝐼𝐼𝐼 n  ‘dumped’ across the series resistor. This R is much smaller than R1, which agrees 𝑉𝑉 = 𝑉𝑉 × %&'2 !" 𝑅𝑅 𝑅𝑅# + 𝑅𝑅$ 𝑉𝑉 = 𝐼𝐼𝐼𝐼 can be handy for protecting circuits with our explanation that the bigger or 𝑉𝑉 and devices that may be damaged by smaller R2 is compared to R1 the bigger Since the 𝐼𝐼 =resistors are in series we know 𝑅𝑅 excessively large input voltages, such the total resistance seen by Vin is just R1 or smaller will be its proportion of the 𝑉𝑉 𝑉𝑉 𝑉𝑉R , and 𝑉𝑉𝐼𝐼!"thus 𝐼𝐼 = as most integrated circuits. voltage + the current though R and = 2 1 𝑅𝑅$ drop. 1 𝑉𝑉!" 𝐼𝐼 = = 𝑅𝑅 𝑉𝑉%&' = 𝑉𝑉!" ×he equation = 𝑉𝑉!" × the = ratio of resistor n The two diodes that MitchElectronics R𝑅𝑅2 is:𝑅𝑅# + 𝑅𝑅$𝑅𝑅 𝐼𝐼 = 𝑉𝑉 T gives 𝑅𝑅 + 𝑅𝑅 2 2 $ $ 𝑅𝑅 kits use are the 1N4148 signal diode and values, not the actual values. You could 𝑉𝑉 𝑉𝑉!" the 1N5817 Schottky diode. These are use 1kΩ and 7kΩ, or 100kΩ and 700kΩ 𝐼𝐼 = = 𝑉𝑉 = 𝐼𝐼𝐼𝐼 𝑅𝑅 𝑅𝑅# + 𝑅𝑅$ very common in electronic circuits, with and the result would be the same. This 𝑉𝑉 𝑉𝑉!" 𝑉𝑉!" 𝑉𝑉 𝑉𝑉𝐼𝐼!"= 𝐼𝐼 = = =to calculate the voltage the 1N4148 being great for low-voltage, flexibility can be useful. we need 𝑅𝑅 4700 𝑅𝑅 𝑅𝑅 + 𝑅𝑅 𝑉𝑉 = 𝐼𝐼𝐼𝐼 = Now × 𝑅𝑅 = 𝑉𝑉 $ 𝑉𝑉 𝑉𝑉 𝑅𝑅# + %&' 𝑅𝑅 $ #$ $ !" 𝑉𝑉%&'we = 𝑉𝑉use = 5.1 ×we wanted a voltage = 4.2𝑉𝑉drop to 𝑅𝑅# + 𝑅𝑅𝑉𝑉$𝑅𝑅 !" × 𝐼𝐼which = =is n  low-current signals, while the 1N5817 is across R=2,𝐼𝐼𝐼𝐼 V ; again, A lthough out 𝑅𝑅 + 𝑅𝑅 1000 + 4700 𝑅𝑅 𝑅𝑅# + 𝑅𝑅$ # $ great for rectifying power, thanks to its Ohm’s 𝑉𝑉 law: 1/8 of V 𝑉𝑉 , the resistor ratio is 1/7 – this in !" 𝐼𝐼 = 𝑉𝑉 = 𝐼𝐼𝐼𝐼 = × 𝑅𝑅$ = 𝑉𝑉%&' maximum forward current of 1A. is because the resistor calculation uses 𝑅𝑅 𝑅𝑅# + 𝑅𝑅$ 𝑉𝑉!" 𝑉𝑉𝑅𝑅 R /(R +R ), and not R /R – you always !" 2 1 2 1 2 𝑉𝑉𝑉𝑉== = 𝑉𝑉%&' $ 𝑉𝑉 ==𝐼𝐼𝐼𝐼 × 𝑅𝑅$ ×=𝑅𝑅𝑉𝑉$%&' =×𝐼𝐼𝐼𝐼 𝐼𝐼𝐼𝐼=𝑉𝑉𝑅𝑅 𝐼𝐼𝑅𝑅 need𝑅𝑅$to do 1the actual calculation to What are potential dividers? 𝑉𝑉%&' 𝑉𝑉!"𝑉𝑉 𝑉𝑉!" == +𝑅𝑅 𝑅𝑅𝑅𝑅 #$+ 𝑅𝑅 $ # 𝐼𝐼𝐼𝐼 = 𝑅𝑅 + 𝑉𝑉 = 𝐼𝐼𝐼𝐼 = × 𝑅𝑅 # $ $ = 𝑉𝑉%&' 𝑉𝑉 = 𝐼𝐼𝐼𝐼 find the A potential divider is a special resistor 𝑅𝑅# + 𝑅𝑅$correct 8 values and don’t just 𝑅𝑅# + 𝑅𝑅$ 𝑉𝑉 𝑉𝑉 !" assume it’s ‘obvious’. Rearranging a 𝑅𝑅 little, we finally get: combination that, as the name suggests, $𝐼𝐼 = = 𝑉𝑉%&' = 𝑉𝑉!" × n can be used to divide a potential, ie, a Resistors come in ‘funny’ values and 𝑅𝑅# + 𝑅𝑅$ 𝑅𝑅 𝑅𝑅# + 𝑅𝑅$ 𝑉𝑉 𝑅𝑅$ 𝑉𝑉𝑅𝑅$ 𝐼𝐼 𝑉𝑉 =𝑉𝑉 𝑉𝑉 =𝑉𝑉!" voltage. (Remember, ‘potential’ is just not always the most convenient steps 𝑅𝑅 1 𝑉𝑉 × $ 𝐼𝐼= = %&' 𝑅𝑅 𝑉𝑉𝑅𝑅!"𝑉𝑉 ××!" =𝑅𝑅 !" %&' = + 𝑅𝑅 𝑅𝑅# + 𝑅𝑅$ while there is a 1kΩ or 𝑉𝑉%&' = 𝑉𝑉!" × 𝐼𝐼𝑉𝑉= = 𝑅𝑅 𝑅𝑅 + 𝑅𝑅 # $ $ = a slightly archaic term for ‘voltage’.) –8𝑅𝑅 for example, !" $ #2$ # +=𝑅𝑅 𝑅𝑅$ + 𝐼𝐼𝑅𝑅 𝑅𝑅= 𝑉𝑉𝑅𝑅%&' 𝑉𝑉!" ×$2 $ 𝑅𝑅 Whenever you hear the term ‘potential 100kΩ value, there is no such thing as 𝑅𝑅# + 𝑅𝑅$ 𝑉𝑉!"𝑉𝑉 divider’ it simply means to divide/reduce a 7kΩ or 700kΩ resistor. Often you have Notice 𝑅𝑅that R1 ==R12 then $ 𝑉𝑉 if !" the equation = 𝑉𝑉%&' = 𝑉𝑉!" × = 𝐼𝐼𝐼𝐼 𝑉𝑉!" × 𝑅𝑅#=+ 𝑅𝑅$ × 𝑅𝑅$ = 𝑉𝑉%&' 𝑉𝑉 𝑅𝑅$ +𝑉𝑉𝑅𝑅 a voltage by a controlled amount. to play around with available values becomes: 2 2 !"$ 𝐼𝐼 = 𝑉𝑉 = 𝑉𝑉!"𝑅𝑅$𝑉𝑉!"𝑅𝑅$ 𝑅𝑅# the = 7𝑅𝑅 1 𝑉𝑉1!" 𝑉𝑉!" $ So how does it work? When two (or to get ratio you want. For the above 𝑅𝑅 4700 𝐼𝐼 = = =×𝑉𝑉𝑅𝑅 =×𝑉𝑉!" = × = 𝑅𝑅 +𝑉𝑉!"𝑅𝑅×$ 𝑅𝑅 $ 𝑉𝑉 %&' !"# × 𝑉𝑉𝑉𝑉%&'= = 𝑉𝑉= =$𝑅𝑅𝑉𝑉= 𝐼𝐼𝐼𝐼 = !"𝑉𝑉 !" 𝑉𝑉 %&' 𝑅𝑅 𝑅𝑅 + 𝑅𝑅 𝑅𝑅 + 2 2 𝑉𝑉 = 𝑉𝑉 × 5.1 × = 4.2𝑉𝑉 1 𝑉𝑉 # $ 𝑅𝑅 + 𝑅𝑅 2 2 $ $ 𝐼𝐼 = = %&'in series !" $ !" 𝑅𝑅 + 𝑅𝑅 $ $ more) resistors are placed (in example, a good choice would be 1.3kΩ # $ 𝑅𝑅# + 𝑅𝑅$ 𝑉𝑉%&' = 𝑅𝑅 =𝑅𝑅𝑉𝑉#1000 !"+×𝑅𝑅$+ 4700= 𝑉𝑉!" × 𝑅𝑅$ + 𝑅𝑅$ 2 2 line, as opposed to in parallel), the voltage and 9.1kΩ, since: 𝑅𝑅$ 𝑅𝑅$ 4700 across each resistor will be proportional 1300 1 𝑉𝑉%&' = 𝑉𝑉!" × = 5.1 × 𝑉𝑉%&' = 𝑉𝑉!" × = 4.2𝑉𝑉 𝑅𝑅 + 𝑅𝑅$ # +other 𝑅𝑅𝑉𝑉!" words,1000 + 4700 = to its resistance, such that the larger a 𝑅𝑅#In input voltage is halved, 𝑅𝑅$ × 𝑅𝑅$ 𝑅𝑅=the 4700 𝑉𝑉 = 𝐼𝐼𝐼𝐼 = 𝑅𝑅$$ 𝑉𝑉!" 𝑉𝑉 1300 + 9100 8 4700 %&' 15.1 𝑉𝑉𝑉𝑉 ==× 𝐼𝐼𝐼𝐼 = ×=𝑅𝑅 𝑉𝑉𝑉𝑉!" ×𝑉𝑉%&'would = = 4.2𝑉𝑉 𝑅𝑅𝑅𝑅× +𝑉𝑉!" 𝑅𝑅is resistor is, the larger the proportion of!" which what you intuitively $$= 𝑉𝑉%&' 𝑉𝑉 =%&' = ×5.1 4.2𝑉𝑉 #$ $ = 𝑉𝑉 × 𝑅𝑅 + 𝑅𝑅 %&' !" 𝑅𝑅 + 𝑅𝑅 1000 + 4700 = 𝑅𝑅 4700 #𝑅𝑅#$ $ $$𝑅𝑅𝑅𝑅$+= 1000 + 4700 𝑉𝑉 = 𝐼𝐼𝐼𝐼𝑅𝑅𝑅𝑅expect = +𝑅𝑅 𝑉𝑉 #two $ %&' the input voltage across it. resistors are identical. 8× 𝑉𝑉%&' =##𝑉𝑉+ =𝑅𝑅5.1 × = 4.2𝑉𝑉 It’s worth noting that one or both of the 𝑅𝑅 + 𝑅𝑅$the $ if !"# × 1000 + 4700 # + 𝑅𝑅particular $ The most basic and most common If we𝑅𝑅have values of V1in, R𝑉𝑉 𝑅𝑅 1 !" elements in a potential divider can be a $ 𝑅𝑅𝑉𝑉$%&' = 𝑉𝑉1!" × = 𝑉𝑉 × = !" potential divider consists of just two and R2 and want to calculate the resulting = + 𝑅𝑅$ 2 2 potentiometer – a variable resistor, which 𝑅𝑅# +voltage 𝑅𝑅$𝑅𝑅$𝑅𝑅8 (V 𝑅𝑅)$ then resistors, as shown in Fig.5: R1, R2, an𝑉𝑉 output means you can vary the output. Also, you we just plug 𝑅𝑅 1 ×$𝑅𝑅$ $$ 1 out %&' = 𝑉𝑉!" 𝑅𝑅 𝑉𝑉!" 𝑉𝑉 = =1use 𝑅𝑅𝑅𝑅 𝑅𝑅 = 𝑅𝑅𝑉𝑉#!"values. +× 𝑅𝑅+ = #𝑅𝑅 $!" $× $+ can have as many resistors and outputs input voltage and an output voltage. in the Let’s V = 5.1V, R = $ 𝑉𝑉%&' =𝑉𝑉8𝑅𝑅 𝑉𝑉%&' = 𝑉𝑉 × = in 1 𝑅𝑅 !" 𝑅𝑅𝑅𝑅## + 𝑅𝑅8$$ 28 12 𝑅𝑅+ = 𝑉𝑉$!" 𝑅𝑅R #×+ = as you want, although the analysis can The voltage across R1 and R2 is the input %&'1kΩ𝑅𝑅and 𝑅𝑅$2# $=+4.7kΩ: 𝑅𝑅$ 𝑅𝑅# + 𝑅𝑅$ 8 𝑅𝑅$ 4700 get a bit longwinded. Finally, and this voltage, referred to as Vin, and the voltage 8𝑅𝑅= 𝑉𝑉%&' 𝑉𝑉!"𝑅𝑅#×+ 𝑅𝑅$ = 5.1 × = 4.2𝑉𝑉 $ = is beyond the scope of this article, you across R2 is the output voltage, Vout. 𝑅𝑅 + 𝑅𝑅 1000 + 4700 # 1 $ 𝑉𝑉 𝑅𝑅 𝑅𝑅 =$𝑅𝑅7𝑅𝑅$ !" 1 𝑉𝑉 can use other types of components in a So how do we calculate Vout? First $ = !" 8𝑅𝑅 = 𝑅𝑅 + 𝑅𝑅 𝑉𝑉%&' let’s = 𝑉𝑉!" ×𝑅𝑅$# 8𝑅𝑅 = 𝑉𝑉 × = $ # $ !" 𝑅𝑅 + 𝑅𝑅 4700 $ #𝑉𝑉 × $ 𝑉𝑉%&' = 𝑅𝑅$ +𝑅𝑅=𝑅𝑅 !" 21 =2𝑉𝑉!" = 4.2𝑉𝑉 $ $5.1 𝑉𝑉%&'through = 𝑉𝑉!"== ×𝑉𝑉𝑉𝑉!"×× ×8𝑅𝑅 potential divider, for example a capacitor, calculate the current running 𝑅𝑅 + 𝑅𝑅 2 2 $ $ 𝑉𝑉%&' = 𝑉𝑉 × = = 𝑅𝑅 + 𝑅𝑅 𝑅𝑅!"# + 𝑅𝑅 𝑅𝑅$ + 𝑅𝑅 1000 !"$ 2+# 4700 2$ which would let you produce a simple both resistors using Ohm’s law: $ 𝑅𝑅 = $ 7𝑅𝑅 # $ 𝑅𝑅$a bigger1 resistance filter. All in all, the potential divider is a Notice that since R has 2 1300 1 = 𝑉𝑉 = 𝐼𝐼𝐼𝐼 𝑅𝑅7𝑅𝑅 = 7𝑅𝑅across = 𝑅𝑅 + 𝑅𝑅 8 very powerful and useful circuit element than R the voltage it (V ) is larger. # $ 𝑅𝑅 # $ # $ 1 out 𝑅𝑅$ + 9100 8 4700 1300 𝑅𝑅$ Finally, 4700 = get: 𝑉𝑉!" × = 5.1 × how = 4.2𝑉𝑉a potential that is well worth mastering. do you create Or dividing both sides by𝑉𝑉R %&'we 𝑅𝑅 = 7𝑅𝑅 𝑅𝑅 1 # $ $ 𝑉𝑉%&' = 𝑉𝑉!" × = 5.1 × = 4.2𝑉𝑉 𝑅𝑅# +𝑅𝑅𝑅𝑅 1000 + 4700 4700 $ $𝑅𝑅 = 𝑅𝑅 + 1000 + 4700 1300 1 If you want to save a little time, you divider with a particular output for a given # $ 𝑉𝑉%&' = 𝑉𝑉!" × =# 5.1 𝑅𝑅 + 𝑅𝑅× 8= + 4700 = 4.2𝑉𝑉 $ 1000 𝑅𝑅# + input? 𝑅𝑅1300 $ can access the online MitchElectronics Let’s say you + 9100 8 want a divider that 𝑉𝑉 1300 8𝑅𝑅 1300 1 $ of =1𝑅𝑅# +input 𝑅𝑅$ (×1/8, 𝐼𝐼 = I potential divider calculator – see: gives you one eighth = the = 𝑅𝑅 R1 1300 + 9100 8 1300 1 1300 + 9100 8 https://bit.ly/pe-jan24-pdcalc – but in the or ×0.125). What this means is that: Battery 𝑅𝑅$ 1 + 𝑅𝑅$ = 1300 1 + 9100 = 8 long term you really need to be able to do 8𝑅𝑅 = 𝑅𝑅 + 𝑅𝑅 Vin = 𝑅𝑅# +𝑅𝑅$𝑅𝑅 $ $𝑅𝑅 #818 $ – 𝑅𝑅# + $= this calculation yourself! R2 Vout 𝑅𝑅# + 𝑅𝑅$ 8 𝑅𝑅# = 7𝑅𝑅$ 𝑉𝑉 𝑉𝑉!" A great use for potential dividers is 𝐼𝐼 = = 𝑅𝑅 𝑅𝑅# + 𝑅𝑅$ in sensor circuits, where one of the If we cross multiply each side we get: Vin resistors is replaced with a resistive # =+7𝑅𝑅 8𝑅𝑅$ =𝑅𝑅𝑅𝑅 𝑅𝑅 $ I= R1 + R2 8𝑅𝑅$ =#𝑅𝑅# +$𝑅𝑅$ sensor element. For example, if R 2 is 1300 1 8𝑅𝑅$ = 𝑅𝑅# + 𝑅𝑅$ Vin × R2 = Vout = I × R2 = Leading to: replaced with a PTC (positive temperature R1 + R2 1300 + 9100 8 𝑉𝑉!" coefficient) thermistor whose resistance 𝑉𝑉 = 𝐼𝐼𝐼𝐼 = × 𝑅𝑅$ = 𝑉𝑉%&' 1 𝑅𝑅# +5.𝑅𝑅Potential 𝑅𝑅# 1300 = 7𝑅𝑅$ $ goes up with an increase in temperature, Fig. divider circuit. 𝑅𝑅# + =9100 7𝑅𝑅$ = 8 1300 𝑅𝑅# = 7𝑅𝑅$ Practical Electronics | January | 2024 55 𝑉𝑉%&' = 𝑉𝑉!" × 𝑅𝑅$ 1300 1300 = 1 1 Vcc Control pin 8 pin 5 Reset pin 4 Flip-flop R R1 Threshold pin 6 R Output pin 3 S R Comparator 1 Trigger pin 2 Comparator 2 Fig. 6. Schematic of a 555 IC, its RC voltage and output (see last month for more 555 operation details). R having a value of 5kΩ. These three resistors form the potential divider shown in Fig.7, and as we just learned about potentiometers, the voltage drop across each one is proportional to the input voltage. As each resistor is identical, each has a voltage drop across it of 1/3 of the voltage supply. But, as the sum of these voltages must be equal to the supply voltage (this is a very important rule in electronics), this also means that the voltage at the first resistor is the voltage supply itself, the voltage at the second resistor is 2/3 of the voltage supply, and the last is 1/3 of the voltage supply. Returning to the 555 internal schematic, the 1/3 and 2/3 voltages are connected to the comparators, this means that our trigger and threshold voltages are 1/3 and 2/3 of the voltage supply. These are the values that the capacitor charges and discharges to. (We haven’t met comparators yet, but in essence these are circuit elements that ‘compare’ two voltages and their output goes high or low depending on which of their two inputs is bigger.) Discharge pin 7 Gnd pin 1 then the voltage across the thermistor will increase as its temperature increases. The same could also be done with a light-dependent resistor (LDR), whose resistance decreases as the intensity of light falling on it increases. In this case, the voltage across the LDR decreases as the light intensity increases. Note that most LDRs on the market are based on cadmium, which is a toxic (carcinogenic) material. We recommend avoiding LDRs for light sensors, and instead use a phototransistor and/or photodiode. All MitchElectronics kits that use light sensors use photodiodes, which are safe to use and RoHS compliant. 555 in more detail Last month we looked at how the 555 IC works, with the capacitor charging and discharging to control the state of the 555. It’s important to understand that the the voltage across the capacitor (Fig.6, right), doesn’t go right to the power supply and back down to ground, but instead, rises and falls between two trigger points (otherwise known as the trigger and threshold voltages). But how exactly are these voltages defined? If we look at the inside of the 555 IC (Fig.6, left), you will notice that there are three resistors in series, each Vin + – R1 1V 3 in R2 1V 3 in R3 Vin 2V 3 in 1V 3 in Fig. 7. Voltages across the three internal 5kΩ resistors of a 555 IC. 56 Introduction to logic you can see it only take two values and is hence binary in nature. In our 555 astable and monostable circuits, the voltage across the timing capacitor varies throughout time, and it is this continuous range of possible values that makes this capacitor voltage analogue. However, the output of the 555 IC is either high (VCC) or low (0V), and hence, we call the output digital. Because the 555 timer IC has both analogue and digital components, it is referred to as being a ‘mixed-signal’ IC. What are CMOS ICs and the 4000 Series? So far, we have only looked at one IC, the 555 timer, a mixed-signal device dealing with both analogue and digital voltages. However, many ICs only deal with digital signals. These range from very simple devices up to the most sophisticated microprocessors. At the ‘simple’ end we have logic devices that process digital signals with simple functions, often called ‘gates’, or sub-systems built up from gates, such as counters. Arguably, the two most famous families of logic devices are the 7400 and 4000 series. The older of the two, the 7400, was initially brought out in 1966 by Texas Instruments to help engineers reduce the So far, we have looked at circuits Magnitude whose voltages and currents have (volts) been continuous, meaning that over 20 a range, they could be any value: 1V, 0 5V, 2.384V, or for current 1A, 0.659A… and so on. In the field of electronics, –20 such continuous values are thought of as ‘analogue’, which is how analogue electronics gets its name. Fig.8 shows Fig. 8. Example of an analogue signal. a continuous, analogue signal. However, in digital electronics, Magnitude voltages only have one of two discrete (volts) states – high or low – also called on/off, 5 1/0 or true/false respectively. As these values can only be one of two different 0 states, they are said to be ‘binary’, and this is why binary numbers (base 2) and binary arithmetic are so easily used in electronics. Fig.9 shows a digital signal; Fig. 9. Example of a digital signal. Time (secs) Time (secs) Practical Electronics | January | 2024 +5V Pin 14 Pin 8 Pin 1 Pin 7 7400 TTL quad NAND gate 0V Fig. 10. Example of a 7400N and its internal gates. Fig. 11. Most computing systems from the 1980s used ICs from the 7400 and 4000 series of logic devices. This photo shows the motherboard of a Sinclair ZX Spectrum. number of components on circuit boards by integrating logic circuits into silicon chips. The popularity of these chips was so massive that the 7400 quickly accounted for over 50% of the logic market shortly after being released to the public. Fig,10 shows a typical 14-pin DIL 7400-series IC; in this case a quad NAND gate chip. The 7400 series used energy-hungry design techniques (called TTL), which where fast but consumed a large amount of current. Recognising this problem, RCA developed the 4000 series of logic chips which used the much more energyefficient CMOS technology. While the first CMOS devices were much slower compared to their TTL counterparts, the fact that they consumed far less power made them ideal for lowpower environments – for example, battery-powered applications. Eventually, as CMOS technologies improved, not only did CMOS logic devices come to match the speed of TTL, but rapidly surpassed it and became the dominant logic technology that is now used throughout electronics. In fact, CMOS technology was so beneficial to engineers that many 7400 series devices now have CMOS variants. Despite the intense battle between the 7400 series and the 4000 series, both have proven to be extremely capable, and can even be mixed and used in the same circuit. While some chips in both families have been discontinued, the most important ones are still in active production. The 4000 series of logic chips consist of a large range of ICs that cover the most essential logic devices, including logic gates, counters, shift registers, and multiplexers. These components can be combined to build more complex circuits, with early computers being made almost out entirely of 4000 series devices. Even as late as the 1980s it was common to see plenty of these handy ICs supporting microprocessor-based PCs. However, considering that most electronic designs have now moved towards complex microcontrollers and microprocessors, nowadays it is rare to see circuits using more than one or two 4000 series devices. What makes the 4000 series especially handy to makers is that they are all 16 14 13 15 VDD CLK Q0 CKEN Q1 Q2 Q3 Reset Q4 4017 Q5 Q6 Q7 Q8 Q9 VSS Cout 3 2 4 7 10 1 5 6 9 11 12 8 Fig. 12. 4017 counter and its schematic circuit symbol. Practical Electronics | January | 2024 Fig. 13. 4017 output count graph. 57 SW1 +VIN R1 1kΩ 7 RV1 10kΩ 8 Vcc 16 Output Discharge IC1 NE555 6 2 Fig. 14. 4017 Light Chaser kit schematic. 4 Reset 14 3 13 15 Threshold VDD CLK Q0 CKEN Q1 Q2 Q3 Reset Q4 Trigger Ground Control 1 5 Q5 4017 Q6 Q7 C1 100µF + Q8 C2 100nF Q9 VSS Cout 3 D1-D10 D1 2 4 7 10 C3 100nF 1 5 C4 100nF 6 9 11 12 8 D10 R2 1kΩ 0V piece of pipe on a radiator, or better still, investing in an inexpensive grounded antistatic work mat and wristband. What is the 4017 IC? Fig. 15. Assembled 4017 Light Chaser kit. available in through-hole DIP packages, which can be used with breadboards, stripboards and simple PCBs. Thus, not only can they be used in prototyping, but also they can be reused in future circuits/projects. Special note on using 4000 series devices – it is important to keep in mind that the 4000 series is based on CMOS technology, which is extremely sensitive to static electricity. Therefore, it is vital when using these chips that static electricity is removed from your body, your project and workstation. This can be done by touching a grounded The first 4000 series IC that we will be introduced to is the 4017 10-stage Johnson counter. It’s schematic representation is shown in Fig.12. This IC is used to create all kinds of lighting effects – for example a light chaser, where an illuminated LED appears to move across a series of LEDs. The 4017 10-stage Johnson counter is a counter with ten stages, a clock input pin, a clock disable pin, and a reset pin. It is built with a 5-stage binary counter connected to an output decoder to produce the 10-stage output. The 4017 can also be described as a ‘decade’ counter, which means it counts to ten using the numbers 0 to 9. The counter increases with one for every rising clock pulse. After the counter has reached 9, it starts again from 0 with the next clock pulse. Fig.13 shows how each rising (low-tohigh) edge of the clock input (where the signal goes from low to high), results in the counter incrementing by one, and the next output stage turning on. Once the counter has reached its maximum count of 9, a final clock signal will reset the counter to 0. The reset pin to the 4017 IC is used to reset the current state of the counter to 0 if the reset pin is set to a high state. The 4017’s disable pin set to a high state prevents the clock from incrementing the counter. Logic ICs need a power supply, usually referred to as VDD and VSS, where VDD is connected to a positive supply (such as 9V for CMOS), and VSS is connected to the negative supply, typically 0V. The 4017 Light Chaser The 4017 Light Chaser kit from MitchElectronics is our most basic 4017 circuit, and not only demonstrates how the 4017 IC works, but also how to use the 555 astable as a clock source. Its schematic is show in Fig.14 and a completed kit in Fig.15. The speed of oscillation of the 555 astable is Fig. 16. 4017 Light Chaser simulation. 58 Practical Electronics | January | 2024 R1 10kΩ 7 + B1 9V R2 22kΩ 8 Vcc 16 Output Discharge IC1 NE555 6 2 C1 100nF 4 Reset 14 3 13 15 Threshold VDD CLK Q0 CKEN Q1 Q2 Q4 Trigger Ground Control – Q3 Reset 1 5 4017 Q5 Q6 Q7 C2 100µF + Q8 C3 100nF Q9 VSS Cout 3 D1 2 D2 4 7 To amber LED To green LED D4 To 0V D5 1 5 D6 6 D7 11 To red LED D3 10 9 J1 Lights D8 D9 12 8 Fig. 17. (Above) Traffic Light schematic and (below) completed project kit. counter, resulting in the next LED in the chain to shine. After ten clock pulses, the 4017 IC resets its count, shining the first LED in the chain, and repeating the cycle forever. For those who want to see a working simulation of this kit (as shown in Fig.16) head over to the 4017 Light Chaser Instruction page and use the in-browser Falstad Circuit Simulation, which allows you to adjust the 4017 Light Chaser frequency in real-time: https://mitchelectronics.co.uk/resources/ simulator/ SMD version determined by the timing capacitor C1, the resistor R1 and the potentiometer RV1. If the value of RV1 is low, then the 555 astable will oscillate quickly, and if the value of RV1 is high, then the 555 astable will oscillate more slowly. The output of the 555 astable is connected to the clock input of the 4017 IC, and both the clock disable and reset pin are connected to 0V, meaning that they are not used / never operating in this circuit. Each output of the 4017 is connected to its own LED, and each LED shares a single resistor, R2. Only one output from the 4017 will ever be high/on, so only one LED will ever be illuminated, thus each LED takes turn in using resistor R2. Each clock pulse from the 555 astable makes the 4017 IC increments its internal Fig. 18. LED sequence of the Traffic Light kit. Practical Electronics | January | 2024 The 4017 Light Chaser uses through-hole components, which are easy to solder for beginners, but for those who want to practise their skills at soldering, then the 4017 Light Chaser SMD Trainer kit offers the same 4017 Light Chaser circuit but using only SMD parts. The kit uses 0805-sized resistors and capacitors, a small potentiometer, and a 555 and 4017 in SOIC SMD packages. Traffic Light The Traffic Light kit is very similar to the 4017 Light Chaser in that it uses a 555 astable connected to a 4017 IC. However, there are a few differences that make it behave differently: specifically, the astable itself and the output stage of the 4017. Unlike the 4017 Light Chaser, the Traffic Light doesn’t have a potentiometer to change the speed of the astable, and the use of larger timing resistors (R1 and R2) results in a rather slow frequency (less than 0.5Hz). On the output side of the 4017 IC, outputs 0, 1 and 2 are connected to the red LED of the traffic light, output 3 is connected to both the red and amber LED, outputs 4, 5 and 6 are connected to the green LED, and output 7 is connected to the amber LED. Finally, output 8 is connected to the reset pin, so that when the counter reaches the ninth count, it automatically resets back to output 0. Now, you may have noticed from the schematic in Fig.17 that each output of the 4017 IC is connected to a diode, and there is a very important reason for this. CMOS logic devices have outputs that are either connected to the positive power supply or the negative supply. If a CMOS output is connected directly to one of the power rails, then it becomes possible for a large current to flow either in or out of the CMOS output, which will damage or destroy the device. The purpose of the diodes is to allow multiple outputs to be connected without risking current flowing back into the 4017. For example, in the case of the first state (where output 0 is high), the diode D1 becomes forward biased, and therefore can conduct electricity. However, because outputs 1 and 2 are low, their associated diodes D2 and D3 are not forward biased, and therefore do not conduct electricity. This prevents electricity from output 0 traveling back into outputs 1 and 2, which would damage the 4017 IC. Simply put, current can flow out of the outputs and into the LEDs, but current cannot flow back into the 4017 IC. The resulting pattern that the Traffic Light exhibits is the standard UK traffic light sequence, with red being followed by red plus amber, then green, then amber alone, and finally back to red – see Fig.18. 59 R1 SW1 10kΩ R2 10kΩ + 7 B1 9V R3 1kΩ 4 8 Reset Vcc Output Discharge IC1 NE555 – 6 2 R9 10kΩ 6 Threshold 2 Trigger 1 Q2 2N3904 8 Vcc 16 Output Discharge R4 680kΩ Ground Control R10 10kΩ Q1 2N3904 7 3 4 Reset IC2 NE555 14 3 13 15 Threshold VDD CLK Q0 CKEN Q1 Q2 Q4 Ground Control 5 Q3 Reset Trigger 1 IC3 4017 5 Q5 Q6 Q7 Q8 + C1 100µF C2 100nF C3 100µF Q9 C4 100nF VSS Cout 3 2 4 7 10 1 5 6 9 D1 Fig. 19. Electronic Dice schematic and kit. Electronic Dice The Electronic Dice kit combines one 555 astable, one 555 monostable and a 4017 IC to create an electronic dice that simulates a dice roll – see schematic in Fig.19. (Revisit Part 1 last month for a refresher on how the 555 astable and monostable operate.) Upon pushing the roll button, the dice begins a rolling animation, and after a predetermined length of time, will stop on a value between 1 and 6, with the LED pattern showing the dice face. In order for this kit to work, the first stage in the circuit is a 555 monostable, 1 2 3 4 5 6 Fig. 20. Image sequence of the Electronic Dice: 1 to 6 (top left to bottom right) 60 D4 D3 D5 D6 11 12 8 which is triggered upon pressing the roll button. The high time of this monostable is determined by resistor R2 and capacitor C1, and as there are no potentiometers, this time length is fixed. However, a transistor Q2 is also connected to the roll button, which, when pushed, keeps the capacitor C1 discharged. This is useful for allowing the user to maintain the roll action for as long as is needed by holding onto the button (similar to keeping the dice rolling in one’s palm).(We haven’t discussed transistors in any detail in this series yet, but for now you can think of the transistor here as simply an electronically controlled switch that applies a short-circuit across the capacitor.) The second stage of the Electronic Dice is a 555 astable, whose reset input is connected to the output of the 555 monostable. Before the roll button is pushed, the output of the 555 monostable is low, meaning that the 555 astable is D2 R5 R6 470Ω 330Ω R7 330Ω R8 330Ω D8 TR D9 R D10 TL D11 BL D12 L D13 BR D7 A kept in reset, and thus, doesn’t oscillate. When the roll button is pushed, the output of the 555 monostable goes high, and this reslults in the 555 astable starting to oscillae. The output of the 555 astable is connected to the 4017 IC clock input, so the 4017 begins to count while the output of the 555 monostable remains high. The output of the 4017 IC is connected to a complex arrangement of diodes and resistors that generate the six different faces of a dice (Fig.20). Determining the logic pattern of each dice face is beyond the scope of this article but may be revisited in future articles when we cover logic and truth tables. Eventually, the 555 monostable’s output goes low, and this not only stops the 555 astable oscillator, but also prevents further counting of the 4017 IC. Thus, the dice face is fixed, and this indicates the face the electronic dice shows. Build advice For a full explanation and example of building a MitchElectronics kit, see the December 2023 issue of Practical Electronics, where we cover the challenges involved with soldering and what order parts need to be soldered in. A quick build and assembly recap is demonstrated in Fig.21: it is always good to solder small parts first, with the most bulky and awkward components being soldered in last. It is essential that the polarisation/orientation of parts is checked, including ICs, electrolytic capacitors and diodes. In MitchElectronics kits, the anode of a diode is indicated by the circular pad, while for electrolytic capacitors, it is a square pad – see Fig.22. For a full guide on how to solder both through-hole and SMD parts, you can check out the MitchElectronics soldering guide, which can be found at: https://mitchelectronics.co.uk/resources Practical Electronics | January | 2024 a) b) Fig. 23. Oscilloscope showing voltage across the capacitor (top) in an astable circuit (bottom) While these kits can in theory operate down to 3V, the 555 can be somewhat temperamental at this voltage, so it is recommended that the minimum power supply voltage applied is 4.5V. Furthermore, it should also be noted that the maximum voltage is around 16V; going beyond this value could easily damage capacitors and the 555. c) d) Testing the projects e) Fig. 21. Construct your 4017 Light Chaser kit using stages a) to e). Another handy feature of these kits is that they do not require any specialist equipment to test – good old eyeballs can easily see if LEDs are flashing or not. Most of the kits operate at frequencies low enough that a multimeter can be used to check voltage levels, but in the case of the Electronic Dice, an oscilloscope can Powering The Projects One of the great advantages of the kits presented in this article is that they all use PP3 battery connectors, making them easy to power. However, that doesn’t mean that they have to be powered by a PP3 battery – they can just as easily be powered using smaller batteries, dedicated PSUs, or even a solar panel. Part Lists for the kits Fig. 22. Check the polarity of the LEDs and capacitors to make sure they are correct. 4017 Light Chaser Kit 1 x 16 DIP socket 1 x 8 DIP socket 1 x 4017 IC 1 x 555 IC 2 x 1kΩ resistors 3 x 100nF capacitors 1 x 100uF capacitor 1 x 10K potentiometer 1 x small slide switch 10 x red LEDs 1 x PP3 connector 1 x PCB 1 x 4017 IC 2 x 555 ICs 2 x 2N3904 NPN trans 3 x 330Ω resistors 1 x 470Ω resistor 1 x 1kΩ resistor 4 x 10kΩ resistor 1 x 680kΩ resistor 6 x 100nF capacitors 1 x 100uF capacitor 1 x tactile switch 7 x red LEDs 6 x 1N4148 diodes 1 x PP3 connector 1 x Dice PCB Electronic Dice Kit 1 x 16 DIP socket 2 x 8 DIP socket Traffic Light Kit 1 x 16 DIP socket 1 x 8 DIP socket Practical Electronics | January | 2024 1 x 4017 IC 1 x 555 IC 1 x 10kΩ resistor 1 x 22kΩ resistor 2 x 100nF capacitors 1 x 100uF capacitor 9 x 1N4148 diodes 1 x 4-way pin header 1 x PP3 connector 1 x Controller PCB 3 x 680Ω resistors 1 x red LED 1 x yellow LED 1 x green LED 1 x 4-way pin header 1 x Light PCB Scan these QR codes to see additional kit instructions. 61 damaged, or the roll button needs to be held for longer. Taking Projects Further Fig. 23. The completed projects – all three can form the basis of more advanced projects. be handy in checking the 555 capacitor voltages as well as the output of the 555 timer ICs, as shown in Fig.23. However, if you are nervous about damaging your kit and have access to a PSU, then you can use the current limiter to prevent the kit from damaging itself. Start by setting the current limiter to its lowest setting, connect the kit, and slowly increase the current level. If the PSU shows current consumption beyond 20mA, then it is possible that something may be wrong (MitchElectronics kits rarely consume more than 50mA). Troubleshooting These kits are deliberately simple, so there isn’t a lot that can go wrong with them. However, it is more than possible for something to break, whether it is due to incorrectly inserted parts, components being soldered for too long and being damaged by heat, or through static shock that can fry the sensitive electronics inside ICs. If the kits don’t show blinking LEDs when powered, then the first step to do is to check that the LEDs are inserted in the correct orientation, and that they are not damaged. Using the continuity setting on a multimeter, it is possible to probe an LED and power it up slightly to confirm that it is working. If the LEDs are correctly inserted and working, then it is likely that the ICs are damaged and/or not inserted correctly. Thus, the first step here is to check that the ICs are inserted correctly, taking extra care to see where pin 1 of the IC is (top left pin with the notch facing upwards). If the ICs are inserted correctly, then check the temperature of the IC when it’s in operation – an IC that feels very warm or even hot is likely damaged. Replacing the ICs in this case will resolve 99% of the problems, as the remainder of the components in these kits are passive (except for the transistors in the Electronic Dice kit). In the Traffic Light kit, the orientation of the external traffic light also matters, so make sure they are have been soldered with the correct orientation. If the Electronic Dice repeatedly falls on the same number, then either the 555 monostable is Besides the obvious uses for the kits mentioned in this article, there are a number of potential project ideas that you can do using them. The 4017 Light Chaser which could be integrated into a ‘wearable’ project – perhaps a Light Chaser tie, badge or broach. For those who are familiar with Kraftwerk, such a tie was featured in their music video The Robots, and this tie was so brilliant that, when it was introduced in the music video, the cameraman zoomed in on it! See: https:// youtu.be/D_8Pma1vHmw The Traffic Light is a great kit for those involved with model railways and dioramas, especially for those who reside in the UK. While not quite the correct scale for all models, it can easily be modified to work with pre-existing traffic light designs if the separate traffic light PCB is removed and wires connected to existing LEDs. Finally, the Electronic Dice is a good option for those who want to replace the mechanical dice found in popular board games. It is possible for two to be mounted in an enclosure with the first dice connected to the second via some extra wires so that the second dice continues to roll until the first one has finished (we won’t tell you how this could be done, that’s a challenge for you to figure out). Our dice only has six faces so it’s not ideal for games such as Dungeons and Dragons, which use a 20-sided dice. Remember, if you want to help support our work at MitchElectronics in designing kits for makers and engineers along with educational articles, blogs, and video content, then head over to the MitchElectronics store where you can get all kinds of kits, components, and resources that can help you with your next wonderful project. In the next article, we will look at a collection of related circuits that measure physical parameters, such as light, sound and temperature. Plus, we will introduce you to the most important class of analogue ICs – the operational amplifier, or ‘op amp’ for short. Partnership with PE MitchElectronics Ltd is an independent UK company. These articles are not ‘advertorials’, PE does not pay for the articles and MitchElectronics does not pay for their publication. Fig. 24. This month’s collection of kits available from: https://mitchelectronics.co.uk All the kits/parts described in the series are available from: https://mitchelectronics.co.uk 62 Practical Electronics | January | 2024 AOShop Small-signal PNP transistors NKT214F, OC57, OC59, 2N1377, 2N525 £1.00 5534H metal-cased op amp LM384, TDA2030A, TDA2050V TAA435 (Mullard power amp driver) Low-noise PNP transistors GET106 £2.50 Synthesiser ICs Ge semiconductors The home for specialist audio, analogue and historic components – provided by Jake Rothman, PE’s Audio Out columnist. The AOShop is your best bet for classic analogue ‘NOS’ (new old stock) components, including all parts for Audio Out projects and designs. £3.00 £1.50 £1.20 Small power NPN transistors AC176, AC176K, AC187K, AC141K £2.00 That/dbx 2180 VCA/VCF £6.00 CA3080 VCA/VCF (vocoder) £2.80 CA3280 VCA/VCF £4.00 LM13600/ LM13700 VCA/VCF £2.00 CA3086 transistor array £1.00 PT2399 echo/delay £1.50 High-voltage PNP transistors OC77, CV7001 £1.50 Dual transistors Small power PNP transistors AC153, AC153K, AC188, AC188K £1.50 TO3 PNP power transistors OC22, CV7054 (OC23), OC25, OC35, OC36, AD143, AD149, AD161, AD162 £2.00 AD140 £3.50 AD149, AD161/2 matched pair £5.00 RF PNP transistors OC41, OC42, 2SA12, 2SA53,AF124, AF178, GET872A £1.50 NPN transistors OC139, OC140, ASY73 £2.00 Diodes CV7049 (OA10), CG92 (OA91) £0.50 Si semiconductors Diodes ZC5800 RF Schottky £0.20 Low-noise silicon transistors BFW16A, 2SC3071, 2SC3068, 2SA1016K, 2SC2362K, 2SA970BL £1.50 2SC2204, 2SD655, BC550C £0.50 ZTX651 £0.30 ZTX751 £0.50 RF transistors (suitable for Theremin) BF199 £0.50 Audio power MOSFETs Exicon 10N20, 10P20 Hitachi 2SJ99, 2SK343 Hitachi 2SJ56, 2SK176 £6.50 £3.50 £8.50 JFETs BFW11, BFW10, TIS73L, J177, J113, U1994, U1898, 2SJ176, J201 £1.00 J175, J176, J112, J111, 2N3820, 2N5467, BF244, 2N5460, J230 £0.60 Small power output/driver transistors 2SB649A, D669A, 2SA1208, 2SC2910, MJE253G, MJE243G, 2SA1725, 2SC4511 £1.20 BD139,BD140, BD135, BD156, BD435, BD436, MPSA63, BCV46 £0.50 MOSFETs ZVP2106A Dual-gate 3SK45, BFS28 £0.30 £1.50 Metal-cased transistors BC143 2N1711 BCY71 BC109C £0.35 £0.50 £0.30 £0.60 Amplifiers LM318 high-speed op amp µA709 metal-cased op amp £0.35 £2.00 2N2639, 2N2223, 2N2910 (NPN) £4.00 E401 (JFET Moog) £4.00 2SK2145-Y dual JFET £0.80 2N5564 JFET £8.00 HN3C51F, HN3A51F £1.00 DMMT3904/6, HN1A01F, HN1C01F £0.50 Loudspeakers PE Mini-Monitor Volt PE165 6.5-inch woofer (each) £85 Morel MDT29 tweeter (each) £25 Kit pair of PE165/MDT29 plus Volt crossover parts and PCBs £299 Monacor DT-28N tweeter (each) £35 Vifa 19mm BC20SC15-04 tweeter (each) £15 Volt crossover inductors 1.2mH, 1.5mH, 2mH, 2.7mH, 0.5mH (tapped at 0.3mH) (each) £5.85 Fully assembled and tested high-quality speaker prototypes – ask for details LS3/5As and other similar speaker systems (pair) £200-£350 Fully tested reclaimed speakers Vifa BC14 5-inch woofer (each) £10 Vifa TC26 1-inch tweeter (each) £10 Low-price speakers Philips 4-inch 4070 £2.00 EMI 10x6-inch, 30Ω Alnico £7 64mm 64Ω neodymium £1.20 5x3-inch elliptical 50Ω or 80Ω Alnico £3.50 1.65x2.75-inch 8Ω £1.50 Capacitors Note ‘10/63’ denotes ‘10µF 63V’. Polyester 3.3/100, 4.7/250, 4.7/63 £1.00 5.6/63, 8.2/63, 10/63 £2.00 Mullard ‘Mustard’ C296 0.22/400 £2.00 Polycarbonate Axial 2.2/63 1%, 4.7/160, 6.8/63 £1.00 Radial 6.8/160V, 10/63 Reclaimed 22/63 £2.00 £2.00 Polystyrene Philips 1% 4.7nF/160, 6.2nF/500, 12nF/63, 22nF/63, 110nF/63, 24nF, 2nF £1.00 RIFA 1% 100nF/100, Suflex 90.9nF 0.5% £2.00 Suflex 2.5% 10nF/63 (rad. or ax.) £0.50 Practical Electronics | January | 2024 Radiation resistant Siemens cellulose acetate MKL 2.2/25 £0.80 Electrolytic – Mullard blue 017 series 10/25, 22/25, 100/10 £0.50 150/40, 470/40, 1000/40 £1.00 Tantalum – axial metal cased 22/50, 47/35, 68/25, 100/20, 120/10, 150/16, 220/10, 330/6 £2.00 22/35, 33/35, 47/20, 68/15, 100/10, 150/6 £1.25 4.7/50, 6.8/35, 10/25, 10/35, 22/15 £1.00 Axial moulded-case tantalum Kemet axial 6.8/10 £0.30 Kemet radial 33/10 £0.40 STC radial 100/20 £1.50 Tantalum bead 22/50 470/3 680/6.3 £1.00 £2.00 £3.00 Wet tantalum 220/25 axial £3.20 Castanet button 140/30, 470/3 £3.20 Hughes 540/10 £3.20 Bipolar Hermetic bipolar tantalum 16/35 £3.20 Elcap axial 10/50 £0.50 Generic radial 100/16, 470/35, 100/ 63, 22/35, 4.7/35, 220/16 £0.50 Philips solid-aluminium (axial) 121/123 47/16 £1.00 330/6.3 £2.00 100/35 £4.00 Philips Pearl 122 series (radial) 10/16 £0.30 Silvered mica (radial) 1nF/500 1% £1.00 Trimmer capacitors Vishay plastic-film 4-40pF Vishay plastic-film 5.5-45pF Vishay plastic-film 5-80pF Vishay plastic-film 10-250pF Mica 1-12pF, 2-40pF £0.80 £1.00 £1.20 £2.00 £1.00 Audio transformers and inductors Eagle transformers LT44, LT722 driver, LT700, LT723 500Ω output £2.50 LT30 500mW output £3.50 5:1 interstage £1.50 Repanco T/T3 splitter transformer CH2 5mH RFC £4.00 £2.00 Balanced output transformer Vigortronix 600Ω VTX-101-007 £10 Vigortronix 600Ω VTX-101-3001 £10 Vigortronix 600Ω VTX-101-3002 £15 Gardners 150Ω £10 Reclaimed BBC LL74/MPC nickel core 600Ω £12 Reclaimed mic input transformer £15 Inductors 82µH, 4.7mH, 100µH, 270µH, 10µH, 14µH (low Z) 7-inch ferrite rod with MW and LW windings £0.50 £3.00 Special resistors Bourns wire-wound trimmer 5kΩ 3059 JM panel-mount £2.00 Thermistor RA53, R13 £4.00 A13 £2.00 Thermistor CZ1, CZ6 £1.50 Holco H2 2.2MΩ 1W, 1% £1.00 Welwyn 1GΩ 2W £1.00 5k Bourns 3321H cermet trimmer £0.50 Potentiometers Bourns 81 25kΩ lin cermet £2.00 25kΩ lin, 5kΩ lin conductive plastic £3.00 Bourns 91 10k dual-gang lin or log £10.00 Plessey moulded-track 5kΩ log with switch 50kΩ A/log Mil 250kΩ lin dual £3.00 £3.00 £5.00 Alpha 16mm 4.7kΩ A/log £0.80 220kΩ A/log £0.80 10kΩ lin centre-detent dual-gang £1.50 Allen Bradley J series/Honeywell 10kΩ lin 1 million cycles £5.00 Blore Edwards AB 45 dual 5kΩ A/log with switch £3.50 Alps RK9 dual-gang 5kΩ RD law £4.00 Alps 50k log tapped motorised stereo £5.00 BI P260 500kΩ log conductive plastic 1 million cycles £2.00 Colvern wire-wound 100kΩ or 50kΩ dual-gang 3W £5.00 Mil Spec hermetic 10Ω £8.00 Miscellaneous Theremin Clearance Sale! Elysian Theremin MIDI box £300 PCBs Pocket Theremin (EPE, 1996) £2.00 Elysian Theremin (EPE, 1996) £6 Synth VCF, VCO (EPE, 2017) £3.00 48V PSU (EPE, 2019) £3.00 SMT dual transistor adapter £0.40 Contact Jake Rothman The Old Rectory, Arlais Road, Llandrindod Wells, Powys LD1 5HE (visit by appointment) +44 (0)1597 829102 jrothman1962<at>gmail.com Minimum order £5.00 inc post Quantity discounts negotiable Payment PayPal, cards (via phone), bank transfer, cheques (payable to ‘J Rothman’, UK pounds only) No VAT payable Postage Small Jiffy bag £2.99 Small package £4.99 Big boxes and overseas at cost – ask for a quote 63 AUDIO OUT AUDIO OUT L R By Jake Rothman Discrete audio op amp – Part 4 for my signal generator. This was needed for testing the high-voltage buffer amps that we will start describing next month. Next, I need to make some little additions to the component list in last month’s Part 3. For the high-power version, R10 is 5.6kΩ to make the Iq preset more likely to be in the middle of its rotation. R27 is 75Ω and C14 is 100µF, 35V to provide higher headroom. This was the biggest capacitor I could find to fit on the PCB and I used a Panasonic ECA1VAM101X (Farnell 876-7254, costs a very reasonable 15p). Note the voltages across the 2.2Ω resistors R11 and R12 are 70mV for optimum Iq of 32mA, the same voltage as the low-power version. For the low-impedance version, R10 is 6.2kΩ. Also, PE reader Les Wolstenholme noticed on the Fig.42 circuit diagram that TR10 should be labelled BC327, not BC337. Mullard muddle Fig.57. The new Discrete Op Amp PCB as supplied by the PE PCB Service. It has a new orange colour with some minor modifications. Note the fully insulated ST BD139/40 output devices must have their writing facing outwards from the board. N o circuit design is ever finished – there’s always something to change, add or improve – and with that in mind I have a few updates for the Discrete Audio Op Amp. First, there is an updated batch of PCBs, which are a new orange colour with locations for the extra R27 resistor, C15 capacitor and input earth pin shown in Fig.35 (Part 3). It’s pictured in all its glory in Fig.57. After building 20 boards, it became apparent that some 2SB649AL (TR13, PNP) and 2SD669AL (TR14, NPN) transistors did need C15 for stability, so I recommend always including C15. The high-power version using the BD139/40 NPN/PNP pair and the above transistors will go up to a frequency limit of 130kHz without problems. I made myself one as a booster amplifier 64 I wrongly castigated the BD139/40 transistors for having higher distortion than other pairs. When I Fig.58. Distortion curve for high-power non-inverting discrete op amp shown in Fig.57 using new ST BD139/40 output transistors and with standard BC546B/556B small-signal devices. For this version, the output is 6Vpk-pk, gain of 6, driving 180Ω load and supply of ±25V. Practical Electronics | January | 2024 Table 4. Toshiba dual transistor options Device HN4C06J-BL HN4A06J HN4A51J HN4C51J Type NPN PNP PNP NPN Wiring pattern Commoned emitter Commoned emitter Commoned base Commoned base Optimum source Z 700Ω 0.4mA 700Ω 0.4mA 700Ω 0.4mA 2kΩ 0.2mA Hfe BL 350-700 200-700 200-700 200-700 Pack code DL 53 34 33 used new BD139/40 output transistors made by ST and supplied by Rapid, rather than the old Mullard 1985 ones I used originally, the distortion was as good as the more expensive Japanese transistors: 0.0013%, as shown in Fig.58. I’ve come across this anomaly a few times before. Semiconductor processing was just not as good 30 years ago as it is now. Balanced input Normal differential op amp circuits are rather noisy due to Johnson (resistor) noise. The way round this is to use low-value input resistors, for example, 620Ω. On the down side, this presents a rather low input resistance. A pair of buffers on the non-inverting and inverting inputs can greatly increase this to reduce the loading and hence distortion of the source. (This is an excellent application for the buffers which will be presented next month.) The distortion of the balanced version was significantly lower than the single-ended design, as shown in Fig.59. This effect happens with most op amps since the common-mode signal (the same voltage excursion across the non-inverting and inverting input terminals) is lower. A photo of the balanced op amp PCB is shown in Fig.60. Fig.59. Distortion curve of balanced input discrete op amp using new BD139/40 output transistors. The rise in distortion at low frequencies in this curve (and Fig.58) is caused by the output electrolytic capacitor feeding a low impedance of 180Ω with no polarising voltage. This can be avoided by using a bi-polar type for C10. They have the same SOT-26 five-pin pack used by the Toshiba dual-JFET 2SK2145, so they can use the same adaptor board. One version has the emitters joined together for high-gain, long-tailed pairs (where no emitter resistors are used, such as in moving magnet RIAA pre-amps), and the other has the bases joined for current mirrors. They are available in both PNP and NPN varieties. When I measured them, the typical Hfe was 500 and the Toshiba temptations I noticed Mouser has some interesting audio dual-transistors manufactured by Toshiba. They can replace the obsolete HN3 types shown in Table 2 (Part 3). They have 1dB noise factor curves in their specification, which is an indication of a genuine audio device. However, there’s no maximum figure, only ‘typical 1dB’, which implies there is no individual device testing for noise level. This means the odd unit may be noisy. The maximum ratings are 120V, 100mA, unity gain at 100MHz, 200mW per device, but 300mW pack total. These are ideal for discrete op amps and the inputs for big power amps. Fig.60. Balanced input version of discrete op amp PCB. This will help in conjunction with the diagram (Fig.37) in Part 3. Using 620Ω input resistors (R19 and 20) and 2kΩ for R21 and Rgnd (in C8 position) in the diagram in Fig.37 (Part 3) allows a useful balanced amplifier with a gain of 4x to be built. The input XLR connector wiring is: red for the non-inverting input, yellow for inverting input and black for 0V. Note: C7 is linked and C8 has a 2kΩ resistor vertically mounted (above pins for red/black wires lower left) Practical Electronics | January | 2024 65 Top view of adaptor boards for Toshiba HN4 dual transistors Commoned emitter B C TR2 Vbe was 0.74V with excellent matching. I’ve not yet tested them for noise. I did crack one open and was surprised to see it consisted of two separate dies. I suspect they were adjacent dies on the same silicon wafer, given the excellent matching. The pin-out details are shown in Fig.61 and summarised in Table 4. TR1 53 E Q1 HN4A06J PNP TR1 E TR1 Discrete op amp kit DL TR2 Q1 E C HN4C06J-BL NPN B E TR2 Commoned base E C TR1 34 B Q1 TR1 HN4A51 PNP A kit of parts is available from the PE PCB Service. This comprises the main PCB, the SMT J-FET adaptor board, all capacitors, a 2SK2145 SMT J-FET, two Toshiba SMT dual transistors, two miniature 5kΩ presets, the inductor and heatsinks. That – for now – concludes the Discrete Audio Op Amp design. Next month, I will follow up with a new series on a related circuit for an Audio Buffer – discrete, of course! B TR2 TR1 33 TR2 B C Q1 E HN4C51 NPN B Fig.61. Pack outlines for commonedconnection Toshiba dual-transistors. Note that the collectors are the middle pins (C) on the adaptor boards, so a pair of crossed wires will be needed to mount them on the discrete op amp PCB. BACK ISSUES Practical Electronics Your best bet since Chock-a-Block with Stock The UK’s premier electronics and computing maker magazine Circuit Surgery Timing and metastability in synchronous circuits Build an RGB display project using a Micromite Plus The UK’s premier electronics and computing maker magazine Circuit Surgery Audio Out Make it with Micromite Timing and metastability in synchronous circuits Construct a transistor radio Frequency Reference Mastering Signal Distributor RFID tags for your projects WIN! Microchip Curiosity HPC Development Board Make it with Micromite Fun display project using a Micromite Plus Nutube Guitar Overdrive and Distortion Pedal WIN! Programmable Thermal Regulator <at>practicalelec Circuit Surgery Transformers and LTspice Audio Out Make it with Micromite Accessing Internet data with your MKC Superb microphone preamplifier Touchscreen Wide-range RCL Box Programmable Thermal Regulator WIN! Microchip MCP19114 Flyback Standalone Evaluation Board Apr 2021 £4.99 04 9 772632 573016 practicalelectronics PLUS! Techno Talk – No blame, no shame? Cool Beans – Round-up of NeoPixel effects Net Work – Videoconference cameras www.electronpublishing.com <at>practicalelec Mar 2021 £4.99 03 9 772632 573016 practicalelectronics PLUS! The UK’s premier electronics and computing maker magazine Flowerpot speakers! A low-cost route to high-quality Hi-Fi PIC n’ Mix Software tools for the PIC18F Ultrabrite LED bike light WIN! Microchip Explorer 16/32 Development Kit WIN! Fabulous low-cost Concrete speakers! <at>practicalelec Jun 2021 £4.99 06 9 772632 573016 practicalelectronics Random Number Generator Audio Out Constructing the PE Theremin amplifier Circuit Surgery Micro-Cap 12 simulator review WIN! Microchip MPLAB Starter Kit for Serial Memory Products WIN! Clever Controller for dumb chargers Hi-Fi amp on the cheap! Cool Beans – Even cooler ping-pong ball lights! Net Work – IP security cameras Techno Talk – The perils of an enquiring mind... <at>practicalelec Sep 2020 £4.99 09 9 772632 573016 practicalelectronics Making a splash with NeoPixels! Components • Audio • Video • Connectors • Cables Arduino • Test Equipment etc, etc Fun LED Christmas Tree offer! PLUS! Techno Talk – Triumph or travesty? Cool Beans – Mastering NeoPixel programming Net Work – The (electric) car’s the star! www.electronpublishing.com <at>practicalelec Dec 2020 £4.99 12 9 772632 573016 practicalelectronics We can supply back issues of PE/EPE by post. We stock magazines back to 2006, except for the following: 2006 Jan, Feb, Mar, Apr, May, Jul 2007 Jun, Jul, Aug 2008 Aug, Nov, Dec 2009 Jan, Mar, Apr 2010 May, Jun, Jul, Aug, Oct, Nov 2011 Jan 2014 Jan 2018 Jan, Nov, Dec 2019 Jan, Feb, Apr, May, Jun Issues from Jan 1999 are available on CD-ROM / DVD-ROM If we do not have a a paper version of a particular issue, then a PDF can be supplied – your email address must be included on your order. Please make sure all components are still available before commencing any project from a back-dated issue. 66 Or phone our friendly knowledgeable staff on 020 8452 0161 Completing the High-power 45V/8A Variable Linear Supply Building the Low-noise theremin PSU PLUS! www.electronpublishing.com The UK’s premier electronics and computing maker magazine Analogue inputs and using servomotors Meet the Micromite Explore-28 Visit: www.cricklewoodelectronics.com Practical Electronics Make it with Micromite Circuit Surgery Understanding Differential amplifiers Don’t miss our Super Summer Sale! Robot Buggy Ultrasound sensing! Techno Talk – Bad science and good Cool Beans – Smoothing LED colour transitions Net Work – Lockdown technology and how we now work www.electronpublishing.com Practical Electronics Mastering stepper motor drivers Roadies’ Test Signal Generator Tunable HF Preamplifier Techno Talk – Tin whiskers scourge Cool Beans – Bouncing around the Maxiverse Net Work – Hydrogen: a viable alternative to batteries? www.electronpublishing.com The UK’s premier electronics and computing maker magazine WIN! Microchip PIC24F LCD and USB Curiosity Development Board Meet the Cricket: making IoT designs super easy! Make your own PCBs with our precision Solder Reflow Oven PLUS! Audio Out How to make a transistor radio Superb PE PIC Development Board Practical Electronics – N NEW E EW PE D NA – ES M IG E N ! Practical Electronics – N NEW E EW PE D NA – ES M IG E N ! BACK ISSUES – ONLY £5.95 Practical Electronics MAPLIN Visit our Shop, Call or Buy online at: www.cricklewoodelectronics.com 020 8452 0161 Visit our shop at: 40-42 Cricklewood Broadway London NW2 3ET Practical Electronics | January | 2024 DIRECT BOOK SERVICE Teach-In 2017 The books listed here have been selected by the Practical Electronics editorial staff as being of special interest to everyone involved in electronics and computing. They are supplied by mail order direct to your door. Introducing the BBC micro:bit FOR A FULL DESCRIPTION OF THESE BOOKS AND CD-ROMS SEE THE SHOP ON OUR WEBSITE PYTHON CODING ON THE BBC MICRO:BIT Jim Gatenby www.electronpublishing.com Python is the leading programming language, easy to learn and widely used by professional programmers. This book uses MicroPython, a version of Python adapted for the BBC Micro:bit. All prices include UK postage Among the many topics covered are: main features of the BBC micro:bit including a simulation in a web browser screen; various levels of programming languages; Mu Editor for writing, saving and retrieving programs, with sample programs and practice exercises; REPL, an interactive program for quickly testing lines of code; scrolling messages, creating and animating images on the micro:bit’s LEDs; playing and creating music, sounds and synthesized speech; using the on-board accelerometer to detect movement of the micro:bit on three axes; glossary of computing terms. This book is written using plain English, avoids technical jargon wherever possible and covers many of the coding instructions and methods which are common to most programming languages. It should be helpful to beginners of any age, whether planning a career in computing or writing code as an enjoyable hobby. 118 Pages Order code PYTH MBIT £7.99 Not just an educational resource for teaching youngsters coding, the BBC micro:bit is a tiny low cost, low-profile ARM-based single-board computer. The board measures 43mm × 52mm but despite its diminutive footprint it has all the features of a fully fledged microcontroller together with a simple LED matrix display, two buttons, an accelerometer and a magnetometer. Mike Tooley’s book will show you how the micro:bit can be used in a wide range of applications from simple domestic gadgets to more complex control systems such as those used for lighting, central heating and security applications. Using Microsoft Code Blocks, the book provides a progressive introduction to coding as well as interfacing with sensors and transducers. Each chapter concludes with a simple practical project that puts into practice what the reader has learned. The featured projects include an electronic direction finder, frost alarm, reaction tester, battery checker, thermostatic controller and a passive infrared (PIR) security alarm. No previous coding experience is assumed, making this book ideal for complete beginners as well as those with some previous knowledge. Self-test questions are provided at the end of each chapter, together with answers at the end of the book. So whatever your starting point, this book will take you further along the road to developing and coding your own real-world applications. 108 Pages PRACTICAL ELECTRONICS HANDBOOK – 6th Ed Ian Sinclair 440 pages Order code NE21 £33.99 STARTING ELECTRONICS – 4th Ed Keith Brindley 296 pages Order code ELSEV100 Order code TF43 Order code TF47 £32.99 £21.99 A BEGINNER’S GUIDE TO TTL DIGITAL ICs Robert Penfold 142 pages OUT OF PRINT BP332 £5.45 UNDERSTANDING ELECTRONIC CONTROL SYSTEMS Owen Bishop 228 pages Order code NE35 Order code NE48 £34.99 £7.99 496 pages + CD-ROM Order code NE45 £38.00 INTRODUCTION TO MICROPROCESSORS AND MICROCONTROLLERS – 2nd Ed John Crisp 222 pages Order code NE31 £29.99 THE PIC MICROCONTROLLER YOUR PERSONAL INTRODUCTORY COURSE – 3rd Ed John Morton 270 pages Order code NE36 £25.00 PIC IN PRACTICE – 2nd Ed David W. Smith 308 pages Order code NE39 £24.99 MICROCONTROLLER COOKBOOK Mike James 240 pages Order code NE26 £36.99 BOOK ORDERING DETAILS For postage, add £3 per book to Europe, £4 for rest of the world per book. CD-ROM prices include VAT and/or postage to anywhere in the world. FUNDAMENTAL ELECTRICAL AND ELECTRONIC PRINCIPLES – 3rd Ed C.R. Robertson 368 pages 298 pages All prices include UK postage. £18.99 ELECTRONIC CIRCUITS – FUNDAMENTALS & APPLICATIONS – Updated version Mike Tooley 400 pages Order code BBC MBIT INTERFACING PIC MICROCONTROLLERS – 2nd Ed Martin Bates PROGRAMMING 16-BIT PIC MICROCONTROLLERS IN C – LEARNING TO FLY THE PIC24 Lucio Di Jasio (Application Segments Manager, Microchip, USA) GETTING STARTED WITH THE BBC MICRO:BIT Mike Tooley THEORY AND REFERENCE MICROPROCESSORS Send a cheque, (£ sterling only) made payable to: Practical Electronics or credit card details (Visa or Mastercard) to: Electron Publishing Limited, 113 Lynwood Drive, Wimborne, Dorset BH21 1UU Books are normally sent within seven days of receipt of order. Please check price (see latest issue of Practical Electronics or website) before ordering from old lists. For a full description of these books please see the shop on our website. Tel: 01202 880299 – Email: shop<at>electronpublishing.com Order from our online shop at: www.electronpublishing.com £36.99 Practical Electronics | January | 2024 67 Practical Electronics PCB SERVICE PROJECT JANURY 2024 CODE Q Meter ....................................................................................CSE220701 Q Meter (black solder mask).....................................................CSE220704 Raspberry Pi Pico W BackPack................................................07101221 DECEMBER 2023 Digital Boost Regulator..............................................................24110224 Dual-Channel Power Supply for Breadboards.........................04112221 Display Adaptor for the Breadboard PSU.................................04112222 PRICE Tesla Coil driver board...............................................................26102221 Tesla Coil potentiometer board.................................................26102222 Cooling Fan Controller & Loudspeaker Protector....................01102221 Remote Gate Controller............................................................11009121 8.95 11.95 9.95 JANUARY 2023 LC Meter Mk3............................................................................CSE220503C 9.95 DC Supply Filter for vehicles.....................................................08108221 8.95 Discrete Audio Op Amp PCB....................................................AO1-JUL23 9.95 Discrete Audio Op Amp PCB + essential components............AO2-JUL23 17.95 Buck/Boost Charger Adaptor....................................................14108221 PIC Breakout Board for SOIC parts..........................................24110225 PIC Breakout Board for DIP parts.............................................24110222 AVR64DD32 Breakout board....................................................24110223 Automatic Train Controller.........................................................09109221 Chuff Sound module..................................................................09109222 SEPTEMBER 2023 Mini LED Driver..........................................................................16106221 New GPS-Synchronised Clock.................................................19109221 Wide-Range Ohmmeter............................................................04109221 AUGUST 2023 110dB RF Attenuator.................................................................CSE211003 Universal Battery Charge Controller (2023 update).................14107192 Wide-Range OhmMeter............................................................04109221 JULY 2023 Multimeter Checker/Calibrator..................................................04107221 MIDI Spectral Sound Synthesiser (full kit – see p.25)..............N/A JUNE 2023 Arduino Programmable Load....................................................04105221 Buck-Boost LED Driver.............................................................16103221 MAY 2023 Precision AM-FM DDS Signal Generator.................................CSE211002 Improved SMD Test Tweezers programmed PIC....................0410621PIC AO 2x-dual-to-quad through-hole (pack of five).......................AO1-MAY23 AO 2x-dual-to-quad SMD (pack of five)...................................AO2-MAY23 AO 2x-single-to-dual through-hole (pack of five)......................AO3-MAY23 AO 2x-single-to-dual SMD (pack of five)..................................AO4-MAY23 9.95 5.95 5.95 5.95 6.95 6.95 7.95 9.95 14.95 9.95 9.95 12.95 10.95 N/A 8.95 8.95 14.95 12.95 6.95 6.95 6.95 6.95 APRIL 2023 500W Amplifier Module.............................................................see p.22, April 2023 Clipping Indicator (per channel)................................................01112211 7.95 CD Welder Power Supply (one needed)..................................29103221 9.95 CD Welder Controller (one needed).........................................29103222 9.95 CD Welder Energy Storage module (several needed)............29103223 7.95 AO Universal Dual Op Amp Board........................................AO1-APR23 9.95 AO Stereo RIAA precision passives kit for dual op amp.......AO2-APR23 8.95 MARCH 2023 Pico BackPack...........................................................................07101221 Semaphore Signal (controller)..................................................09103221 Semaphore Signal (blade)........................................................09103222 CODE 8.95 7.95 8.95 NOVEMBER 2023 OCTOBER 2023 PROJECT FEBRUARY 2023 9.95 7.95 5.95 Classic LED Metronome – 8-LED.............................................23111211 Classic LED Metronome – 10-LED...........................................23111212 Multi-Channel Speaker Protector – 6 channel.........................01101221 Multi-Channel Speaker Protector – 4 channel.........................01101222 Remote Control Range Extender – IR-to-UHF........................15109212 Remote Control Range Extender – UHF-to-IR........................15109211 AO Universal Single Op Amp Board......................................AO1-JAN23 DECEMBER 2022 Hummingbird Amplifier..............................................................01111211 SMD Trainer PCB......................................................................29106211A SMD Trainer PCB + parts.........................................................29106211B PRICE 9.95 5.95 8.95 12.95 7.95 8.95 9.95 7.95 5.95 7.95 7.95 9.95 8.95 13.95 NOVEMBER 2022 USB Cable tester – main PCB..................................................04108211 12.95 USB Cable tester – front panel.................................................04108212 5.95 USB Cable tester – optional panel............................................SC5970 5.95 Model Railway Carriage Lights – PCB.....................................09109211 6.95 AO transfmr PCB – standard VTX-A range........................ VTX-101-007 6.95 AO transfmr PCB – dual-outline VTX102-3001/101-3002....VTX-Dual 6.95 OCTOBER 2022 SMD Test Tweezers – PCB and pair of tweezer arms.............04106211-2 SMD Test Tweezers – programmed PIC12F1572-I/SN...........0410621A Tele-com............................................................................. 12110211 SEPTEMBER 2022 Touchscreen Digital Preamp – main board........................ 01103191 Touchscreen Digital Preamp – adaptor board pair............. 01103192 20A DC Motor Speed Controller......................................... 11006211 AUGUST 2022 Multi-purpose Battery Manager – I/O Expander module.... 11104212 Multi-purpose Battery Manager – Switch Module............... 11104211 Simple MIDI Music Keyboard (for 8 switches).................... 23101213 Nano Pong......................................................................... 08105212 11.95 7.95 12.95 12.95 5.95 9.95 5.95 8.95 6.95 7.95 JULY 2022 Silicon Labs AM/FM/SW Radio.......................................... CSE210301C 10.95 Level Crossing Controller................................................... 09108211 6.95 JUNE 2022 Full-wave Motor Speed Controller...................................... 1010221 PIC Programming Helper for 8-pin PICs only..................... 24106211 PIC Programming Helper for 8, 14 or 20-pin PICs ............ 24106212 Advanced GPS Computer.................................................. 05102211 8.95 7.95 10.95 9.95 MAY 2022 Bus board PCB for Analogue Vocoder............................... AO1-MAY22 10.95 Complete set of 14 PCBs for Analogue Vocoder................ AO2-MAY22 97.95 Programmed EEPROM for Digital FX Unit......................... FX1-MAY22 10.95 Programmed PIC for Digital FX Unit using potentiometer.....FX2-MAY22 8.95 APRIL 2022 64-key MIDI Matrix shield................................................... 23101211 8.95 64-key MIDI Matrix switch board........................................ 23101212 11.95 High-current Battery Balancer ........................................... 14102211 10.95 Digital FX Unit – using potentiometer................................. 01102211 9.95 Digital FX Unit – using BCD switch.................................... 01102212 9.95 Universal Audio PSU.......................................................... AO1-APR22 11.95 PCBs for most recent PE/EPE constructional projects are available. From the July 2013 issue onwards, PCBs with eight-digit codes have silk screen overlays and, where applicable, are double-sided, have plated-through holes, and solder mask. They are similar to photos in the project articles. Earlier PCBs are likely to be more basic and may not include silk screen overlay, be single-sided, lack plated-through holes and solder mask. Always check price and availability in the latest issue or online. A large number of older boards are listed for ordering on our website. In most cases we do not supply kits or components for our projects. For older projects it is important to check the availability of all components before purchasing PCBs. Back issues of articles are available – see Back Issues page for details. 68 Practical Electronics | January | 2024 Double-sided | plated-through holes | solder mask PROJECT MARCH 2022 CODE PRICE Mini Isolated Serial Link..................................................... 24102211 £5.95 Busy Loo Indicator.............................................................. 16112201 £5.95 Analogue Vocoder – Band-pass filter board....................... AO1-MAR22 9.95 Analogue Vocoder – HP/LP filter board.............................. AO2-MAR22 9.95 FEBRUARY 2022 Arduino-based Power Supply............................................. 18106201 Battery Monitor Logger....................................................... 11106201 Electronic Wind Chimes..................................................... 23011201 Analogue Vocoder – Driver Amplifier.................................. AO-FEB22 JANUARY 2022 Vintage battery Radio Li-ion Power Supply........................ 11111201 MiniHeart: A Miniature Heartbeat Simulator....................... 01109201 9.95 10.95 10.95 8.95 9.95 8.95 DECEMBER 2021 AM/FM/SW Digital Receiver............................................... CSE200902A 13.95 Balanced Input and Attenuator for USB CODEC............... 01106202 11.95 NOVEMBER 2021 Dual Battery Lifesaver........................................................ 11111202 OCTOBER 2021 Mini Wi-Fi LCD BackPack.................................................. 24106201 £6.95 £8.95 SEPTEMBER 2021 USB SuperCodec PCB....................................................... 01106201 £14.95 Audio DDS Oscillator PCB................................................. 01110201 £5.95 Audio DDS Oscillator rotary encoder................................. 01110201-ENC 6.95 Programming Adaptor Board for Audio DDS Oscillator...... 01110202 £5.95 High-power Ultrasonic Cleaner main PCB......................... 04105201 £14.95 High-power Ultrasonic Cleaner front-panel PCB................ 04105202 Night Keeper Lighthouse PCB........................................... 08110201 £5.95 AUGUST 2021 Ol’ Timer PCB..................................................................... 19104201 £11.95 Ol’ Timer 8x8 RGB LED module using WS2812B.............. 19104201-88 £8.95 Ol’ Timer set of acrylic case pieces and spacer................. 19104201-ACR £8.75 Ol’ Timer DS3231 RTC IC wide SOIC-16.................................19104201-RTC £5.95 Wideband Digital RF Power Meter..................................... 04106201 £9.75 Switchmode 78xx regulators (PACK of 5!)........................ 18105201 £7.95 Cool Beans SMAD display................................................. CB-AUG21 £11.95 JULY 2021 ATtiny816 Breakout / Dev Board with Capacitive Touch.... 24110181 £9.75 IR Remote Control Assistant (Jaycar version).................... 15005201 £8.95 IR Remote Control Assistant (Altronics version)................ 15005202 £8.95 PIC18F Development Board.............................................. PNM-JUL21 £12.95 Microphone Preamplifier........................................................AO-JUL21 £11.95 JUNE 2021 Roadies’ Test Signal Generator (surface-mount version)... 01005201 Roadies’ Test Signal Generator (through-hole version)...... 01005202 Touchscreen Wide-range RCL Box (Resistor module)....... 04104201 Touchscreen Wide-range RCL Box (Ind/Cap module)....... 04104202 KickStart Part 3 – Gyrator-based Audio Filter.................... KS3-2021 MAY 2021 7-Band Equaliser (Mono)................................................... 01104201 7-Band Equaliser (Stereo).................................................. 01104202 Car Altimeter....................................................................... 05105201 £8.95 £9.95 £18.95 £7.95 £8.95 £10.95 £7.95 PROJECT APRIL 2021 CODE PRICE Reflow Oven – DSP Active Crossover (CPU)..................... 01106193 Reflow Oven – DSP Active Crossover (Front panel).......... 01106195 £19.95 Reflow Oven – DSP Active Crossover (LCD)..................... 01106196 Frequency Reference Signal Distributor.................................... CSE200103 £8.95 MARCH 2021 Nutube Guitar Effects Pedal............................................... 01102201 £12.95 Programmable Thermal Regulator (Peltier Interface)......... 21109181 £18.95 Programmable Thermal Regulator (Peltier Driver)............. 21109182 Tunable HF Preamp........................................................... CSE190502 £8.95 FEBRUARY 2021 4G Remote Monitoring....................................................... 27111191 JANUARY 2021 Nutube Valve Preamplifier.................................................. 01112191 Arduino DCC Controller...................................................... 09207181 £9.95 £12.95 £10.95 DECEMBER 2020 Pseudo-Random Sequence Generator.............................. 16106191 £7.95 Clever Charger................................................................... 14107191 £11.95 PE Theremin Amplifier........................................................ AO-1220-01 £8.95 For the many pre-2016 PCBs that we stock please see the PE website: www.electronpublishing.com PE/EPE PCB SERVICE Order Code Project Quantity Price ......................................................... ......................................................... ......................................................... ......................................................... ......................................................... Name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ......................................................... Tel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I enclose payment of £ . . . . . . . . . . . . . . (cheque/PO in £ sterling only) payable to: Practical Electronics Card No . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Valid From . . . . . . . . . . . . . . . . . Expiry Date . . . . . . . . . . . . . . . Card Security No . . . . . . . . . . You can also order PCBs by phone, email or via the shop on our website: www.electronpublishing.com No need to cut your issue – a copy of this form is just as good! All prices include VAT and UK p&p. Add £4 per project for post to Europe; £5 per project outside Europe. Orders and payment should be sent to: Practical Electronics, Electron Publishing Ltd 113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU Tel 01202 880299 Email: shop<at>electronpublishing.com On-line Shop: www.epemag.com Cheques should be made payable to ‘Practical Electronics’ (Payment in £ sterling only). NOTE: Most boards are in stock and sent within seven days of receipt of order, please allow up to 28 days delivery if we need to restock. Practical Electronics | January | 2024 69 Practical Electronics PCB SERVICE PROJECT NOVEMBER 2020 CODE PRICE LED Christmas Tree (1 off)................................................. 16107181-1 £6.95 LED Christmas Tree (4 off)................................................. 16107181-2 £14.95 LED Christmas Tree (12 off)............................................... 16107181-3 £24.95 LED Christmas Tree (20 off)............................................... 16107181-4 £34.95 USB/SPI Interface Board.................................................... 16107182 £5.95 45V/8A Power Supply PCB plus acrylic spacer.................. 18111181 £14.95 45V/8A Power Supply front panel five-way display bezel... 18111181-BZ £3.95 Five-way LCD Panel Meter/Display.................................... 18111182 £7.95 OCTOBER 2020 Digital Audio Millivoltmeter................................................. 04108191 Precision Signal Amplifier................................................... 04107191 SEPTEMBER 2020 PE Theremin PSU.............................................................. AO-0920-01 PE Theremin PSU transformer........................................... AO-0920-02 Micromite Explore-28......................................................... 07108191 Ultrabrite LED Driver.......................................................... 16109191 AUGUST 2020 Micromite LCD BackPack V3............................................. 07106191 Steering Wheel Audio Button to Infrared Adaptor............... 05105191 £9.95 £7.95 £5.95 £7.95 £6.95 £6.95 £9.95 £7.95 JULY 2020 AM/FM/CW Scanning HF/VHF RF Signal Generator......... 04106191 £13.95 Speech Synthesiser with the Raspberry Pi Zero................ 01106191 £5.95 PE Mini-organ PCB............................................................ AO-0720-01 £14.95 PE Mini-organ selected parts............................................. AO-0720-02 £8.95 High-current Solid-state 12V Battery Isolator – control...... 05106191 £6.95 High-current Solid-state 12V Battery Isolator FET (2oz).... 05106192 £9.95 JUNE 2020 Arduino breakout board – 3.5-inch LCD Display................ 24111181 Six-input Audio Selector main board.................................. 01110191 Six-input Audio Selector switch panel board...................... 01110192 £6.95 £10.95 MAY 2020 Ultra-low-distortion Preamplifier Input Selector.......................... 01111112 £11.25 Ultra-low-distortion Preamplifier pushbutton Input Selector...... 01111113 Universal Regulator..................................................................... 18103111 £7.95 433MHz Wireless Data Repeater............................................... 15004191 £8.50 Bridge-mode Adaptor for Amplifier.............................................. 01105191 £7.95 iCEstick VGA Terminal................................................................. 02103191 £5.95 Analogue noise with tilt control.................................................... AO-0520-01 £7.95 Audio Spectrum Analyser............................................................ PM-0520-01 £8.95 APRIL 2020 Flip-dot Display black coil board.................................................. 19111181 Flip-dot Display black pixels........................................................ 19111182 Flip-dot Display black frame........................................................ 19111183 Flip-dot Display green driver board............................................. 19111184 MARCH 2020 Diode Curve Plotter............................................................ 04112181 Steam Train Whistle / Diesel Horn Sound Generator................ 09106181 Universal Passive Crossover (one off)....................................... UPC0320 FEBRUARY 2020 Motion-Sensing 12V Power Switch.................................... 05102191 USB Keyboard / Mouse Adaptor........................................ 24311181 DSP Active Crossover (ADC)............................................. 01106191 DSP Active Crossover (DAC) ×2 ....................................... 01106192 DSP Active Crossover (CPU)............................................. 01106193 DSP Active Crossover (Power/routing)............................... 01106194 DSP Active Crossover (Front panel)................................... 01106195 DSP Active Crossover (LCD).............................................. 01106196 70 PROJECT JANUARY 2020 CODE Isolated Serial Link............................................................. 24107181 DECEMBER 2019 Extremely Sensitive Magnetometer.................................... 04101011 Four-channel High-current DC Fan and Pump Controller.... 05108181 Useless Box........................................................................ 08111181 NOVEMBER 2019 Tinnitus & Insomnia Killer (Jaycar case – see text)............ 01110181 Tinnitus & Insomnia Killer (Altronics case – see text)......... 01110182 OCTOBER 2019 Programmable GPS-synced Frequency Reference........... 04107181 Digital Command Control Programmer for Decoders......... 09107181 Opto-isolated Mains Relay (main board)............................ 10107181 Opto-isolated Mains Relay (2 × terminal extension board)....10107182 £5.95 £8.50 £29.95 £16.75 £8.75 £11.50 £9.95 £9.95 £11.50 £9.95 £11.50 Brainwave Monitor.............................................................. 25108181 £12.90 Super Digital Sound Effects Module................................... 01107181 £6.95 Watchdog Alarm................................................................. 03107181 £8.00 PE Theremin (three boards: pitch, volume, VCA).............. PETX0819 £19.50 PE Theremin component pack (see p.56, August 2019).... PETY0819 £15.00 JULY 2019 Full-wave 10A Universal Motor Speed Controller............... 10102181 Recurring Event Reminder................................................. 19107181 Temperature Switch Mk2.................................................... 05105181 JUNE 2019 Arduino-based LC Meter.................................................... 04106181 USB Flexitimer.................................................................... 19106181 MAY 2019 2× 12V Battery Balancer.................................................... 14106181 Deluxe Frequency Switch................................................... 05104181 USB Port Protector............................................................. 07105181 APRIL 2019 Heater Controller................................................................ 10104181 MARCH 2019 10-LED Bargraph Main Board............................................ 04101181 +Processing Board.............................................. 04101182 FEBRUARY 2019 NOVEMBER 2018 Super-7 AM Radio Receiver ............................................... 06111171 OCTOBER 2018 £10.95 £8.50 £12.50 £8.50 AUGUST 2019 1.5kW Induction Motor Speed Controller........................... 10105122 £14.95 PRICE 6GHz+ Touchscreen Frequency Counter........................... 04110171 Two 230VAC MainsTimers................................................. 10108161 10108162 SEPTEMBER 2018 3-Way Active Crossover..................................................... 01108171 Ultra-low-voltage Mini LED Flasher.................................... 16110161 AUGUST 2018 Universal Temperature Alarm............................................. 03105161 Power Supply For Battery-Operated Valve Radios............ 18108171 18108172 18108173 18108174 £12.90 £8.00 £10.45 £8.00 £10.45 £5.95 £10.45 £5.95 £14.00 £11.25 £8.60 £24.95 £15.95 £12.95 £11.95 £17.95 £5.95 £7.95 £24.95 Practical Electronics | January | 2024 CLASSIFIED ADVERTISING Practical Electronics If you want your advertisements to be seen by the largest readership at the most economical price then our classified page offers excellent value. The rate for semi-display space is £10 (+VAT) per centimetre high, with a minimum height of 2·5cm. All semi-display adverts have a width of 5.5cm. The prepaid rate for classified adverts is 40p (+VAT) per word (minimum 12 words). Cheques are made payable to ‘Practical Electronics’. VAT must be added. Advertisements with remittance should be sent to: Practical Electronics, 113 Lynwood Drive, Wimborne, Dorset, BH21 1UU. Tel 07973518682 Email: pe<at>electronpublishing.com BOWOOD ELECTRONICS LTD For ratesofand further information on display and classified advertising Suppliers Electronic Components please contact our Advertisement Manager, Matt Pulzer – see below. www.bowood-electronics.co.uk Unit 10, Boythorpe Business Park, Dock Walk, Chesterfield, Derbyshire S40 2QR. Sales: 01246 200 222 Practical Electronics reaches more UK readers than any other UK monthly hobby electronics magazine. Our sales figures prove it. We have been the leading monthly magazine in this market for the last twenty-seven years. Send large letter stamp for Catalogue BOWOOD ELECTRONICS LTD Suppliers of Electronic Components www.bowood-electronics.co.uk Unit 10, Boythorpe Business Park, Dock Walk, Chesterfield, Derbyshire S40 2QR. Sales: 01246 200 222 Send large letter stamp for Catalogue MISCELLANEOUS VALVES AND ALLIED COMPONENTS? For free stock list and/or advice, please contact me: geoffdavies337<at>gmail.com Telephone: 01788 574774 Electrical Industries Charity (EIC) We help people working in the electrical, electronics and energy community as well as their family members and retirees. We use workplace programmes that give the industry access to financial grants and a comprehensive range of free and confidential services. www.electricalcharity.org COAST ELECTRONICS BREAKOUTS-COMPONENTSCONTRACT DESIGN-3D PRINTER PARTSMUSICAL-MICROCONTROLLERS WWW.COASTELECTRONICS.CO.UK Andrew Kenny – Qualified Patent Agent EPO UKIPO USPTO Circuits Electric Machinery Mechatronics Web: www.akennypatentm.com Email: Enquiries<at>akennypatentm.com Tel: 0789 606 9725 PIC DEVELOPMENT KITS, DTMF kits and modules, CTCSS Encoder and Decoder/Display kits. Visit www.cstech.co.uk ADVERTISING INDEX CRICKLEWOOD ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . 66 ESR ELECTRONIC COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . 53 FLOWCODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 HAMMOND ELECTRONICS Ltd . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 JPG ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 MICROCHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cover (ii) PEAK ELECTRONIC DESIGN . . . . . . . . . . . . . . . . . . . . . . Cover (iv) POLABS D.O.O. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 QUASAR ELECTRONICS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 SILICON CHIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 STEWART OF READING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 TAG-CONNECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 TERRINGTON COMPONENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Practical Electronics | January | 2024 Advertisement offices Matt Pulzer Electron Publishing Ltd 1 Buckingham Road Brighton East Sussex BN1 3RA Tel 07973 518682 Email pe<at>electronpublishing.com Web www.electronpublishing.com For editorial contact details see page 7. 71 Next Month – in the February issue Advanced SMD Test Tweezers – Part 1 The SMD Test Tweezers and their successor, the Improved SMD Test Tweezers, are both simple but useful tools. We have developed an enhanced version with many more features and other improvements, such as a larger screen and an easier-to-use interface. Active Mains Soft Starter – Part 1 High startup current appliances can be dangerous, damage your work, cause brownouts or trip out the circuit breaker when power is first applied. This Soft Starter prevents the high surge current, replacing it with a slow current buildup and reducing the ‘kick’ you get from many tools. Active Subwoofer –Part 2 In this second and final article in the series, we’ll finish off the Active Subwoofer by building and installing its internal 180W amplifier, finishing the wiring, installing the driver and adding some feet. PLUS! All your favourite regular columns from Cool Beans and Circuit Surgery, to MitchElectronics, Techno Talk and Net Work. On sale 4 January 2024 Content may be subject to change Welcome to JPG Electronics Selling Electronics in Chesterfield for 29 Years Open Monday to Friday 9am to 5:30pm And Saturday 9:30am to 5pm • Aerials, Satellite Dishes & LCD Brackets • Audio Adaptors, Connectors & Leads • BT, Broadband, Network & USB Leads • Computer Memory, Hard Drives & Parts • DJ Equipment, Lighting & Supplies • Extensive Electronic Components - ICs, Project Boxes, Relays & Resistors • Raspberry Pi & Arduino Products • Replacement Laptop Power Supplies • Batteries, Fuses, Glue, Tools & Lots more... Shaw’s Row T: 01246 211 202 E: sales<at>jpgelectronics.com JPG Electronics, Shaw’s Row, Old Road, Chesterfield, S40 2RB W: www.jpgelectronics.com Britannia Inn JPG Electronics Maison Mes Amis Old H all Ro ad Old Road Rose & Crown orth tsw Cha Johnsons d Roa Morrisons Sparks Retail & Trade Welcome • Free Parking • Google St View Tour: S40 2RB NEW subscriptions hotline! Practical Electronics We have changed the way we sell and renew subscriptions. We now use ‘Select Publisher Services’ for all print subscriptions – to start a new subscription or renew an existing one you have three choices: 1. Call our NEW print subscription hotline: 01202 087631, or email: pesubs<at>selectps.com 2. Visit our shop at: www.electronpublishing.com 3. Send a cheque (payable to: ‘Practical Electronics’) with your details to: Practical Electronics Subscriptions, PO Box 6337, Bournemouth BH1 9EH, United Kingdom Remember, we print the date of the last issue of your current subscription in a box on the address sheet that comes with your copy. Digital subscribers, please call 01202 880299 or visit: www.electronpublishing.com Published on approximately the first Thursday of each month by Electron Publishing Limited, 1 Buckingham Road, Brighton, East Sussex BN1 3RA. Printed in England by Acorn Web Offset Ltd., Normanton WF6 1TW. Distributed by Seymour, 86 Newman St., London W1T 3EX. Subscriptions UK: £33.99 (6 months); £59.99 (12 months); £114.99 (2 years). EUROPE: airmail service, £38.99 (6 months); £69.99 (12 months); £129.99 (2 years). REST OF THE WORLD: airmail service, £46.99 (6 months); £84.99 (12 months); £164.99 (2 years). Payments payable to ‘Practical Electronics’, Practical Electronics Subscriptions, PO Box 6337, Bournemouth BH1 9EH, United Kingdom. Email: pesubs<at>selectps.com. PRACTICAL ELECTRONICS is sold subject to the following conditions, namely that it shall not, without the written consent of the Publishers first having been given, be lent, resold, hired out or otherwise disposed of by way of Trade at more than the recommended selling price shown on the cover, and that it shall not be lent, resold, hired out or otherwise disposed of in a mutilated condition or in any unauthorised cover by way of Trade or affixed to or as part of any publication or advertising, literary or pictorial matter whatsoever. 72 Practical Electronics | January | 2024 Did you know our online shop now sells the current issue of PE for £5.99 inc. p&p? Practical Electronics Prac Electro tical nics The UK’s premier electronics and computing maker magazine The UK ’s pre Circuit Surgery MitchElectronics Audio mierOut eleamp Mixing and tuning in the Our new series on electronics Discrete op ctronic Circuit s and urgeryupdate superheterodyne receiver basics for beginners: Fusing theS555 reque compu ncy sh ting ma superh ifting a MitchE eterod nd ker ma yne re Raspberry Pi Pico A bran lectronics gazine ceivers d new serie bas W BackPack DualC for Bre hannel PSU adboa rds ics for beginn s on electron ers ics Digita Regulal Boost tor WIN! Check quality factor with our Q Meter PLUS! Microchip PIC-IoT WA Development Board WIN! Superb Active Subwoofer WIN! Mic MitchE PIC24F rochip LC U l e S B C D and ctronic MitchElectronics New Develouriosity s p lealearning rni series! Boardment DiscNew over A ng series! circuits Mon555/4017 ostabl stable and e circu its D Janis 2024 S! pla£5.99 Techno Talk – Oscillating onions,LU Batman!? Techn for Bre y 01Adaptor otransistors Cool Beans – Arduino: switching with Talk – a Good Cool B 9 772632 573030 dboa grief! Is ea UK mains Net Work – Celebrating the magnifi cent plug! rds that th Net W ns – Arduino ork – L e time uzzers ? ow-po b , ‘m www.electronpublishing.com <at>practicalelec practicalelectronics usical’ wer UP www.e notes S syste lectro and ms for npubli electro LDRs shing .com nics P KickSta Legac rt y revisite logic d <at>prac ticale lec practi Dec 2 023 £5.99 12 9 772 632 5 73030 calele ctronic s You read that right! We now sell the current issue of your favourite electronics magazine for exactly the same price as in the High Street, but we deliver it straight to your door – and for UK addresses we pay the postage. No need to journey into town to queue outside the newsagent. Just go to our website, set up an account in 30 seconds, order your magazine and we’ll do the rest. www.electronpublishing.com