Silicon ChipAUDIO OUT - June 2020 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Subscriptions: PicoLog Cloud
  5. Publisher's Letter: Publisher's Statement
  6. Publisher's Letter
  7. Feature: Techno Talk by Mark Nelson
  8. Feature: Net Work by Alan Winstanley
  9. Back Issues: Net Work by Alan Winstanley
  10. Project: AM/FM/CW Scanning HF/VHF RF Signal Generator by Andrew Woodfield
  11. Project: A low-cost 3.5-inch touchscreen for the Arduino or Micromite by Tim Blythman
  12. Project: Ultra-low-distortion Preamplifier with Tone Controls Part 3 by John Clarke
  13. Feature: Circuit Surgery by Ian Bell
  14. Feature: Practically Speaking by Mike Hibbett
  15. Feature: Make it with Micromite by Phil Boyce
  16. Feature: AUDIO OUT by Jake Rothman
  17. Feature: Max’s Cool Beans by Max the Magnificent
  18. PCB Order Form
  19. Advertising Index

This is only a preview of the June 2020 issue of Practical Electronics.

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

Articles in this series:
  • 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)
AUDIO OUT AUDIO OUT L R By Jake Rothman PE Mini-organ – Part 1 Student projects All educational establishments are closed now, so I thought I would get a nice pile of student projects finished for when everything restarts. An eternal favourite is the Stylophone, but all previous designs have had problems. My version presented here has a big Mike-Grindle-designed wide-spaced through-hole PCB. There are only two (optional) surface-mount components: a mini-USB (everybody needs to learn how to solder these since they regularly break) and an output transistor option. There are three traditional analogue stages and a 4×AA battery-pack, which lasts for days. The keyboard resistor-chain is a nice challenge for those learning the resistor colour code. (Top tip, do check every resistor with a good DMM – if you get just one resistor wrong then it will upset every note.) Basic design The PE Mini-organ I ’m writing this during the All that really works is FM radio. This has brought home the fragility of our interconnected global society and dependence on tenuous component supply chains. Even my solar panels are useless because they need power from T une the grid to run the Output inverter. What a mess, stage but at least there’s still S peaker Cadbury’s Chocolate 7 5 5 5 L ow- freq uency S q uare- wave and AA cells. osci llator osci llator Looking on the bright side, I don’t feel guilty for being a hoarder any V ibrato V ibrato V olum e more. Glancing smugfreq uency depth ly at my vast piles of K eyboard stylus dust-covered components and bur nt d a t a - s h e e t s , i t ’s a great time to do some Fig.1. The basic system consists of a CMOS 7555 square-wave low-power analogue circuit design. oscillator, a vibrato oscillator and a unique output stage. pandemic but also still suffering from February’s storm damage, which means no Internet, TV or landline – the mobile works in just one room, badly. 54 This PE Mini-organ is based on a provisional design I did for Audio Out (EPE, August 2018 Fig.11). This was later refined to produce a design for Dubreq, which became their new Analogue Stylophone, an ultra low-cost surface-mount design. (This will of course be cheaper to buy than building the instrument described here when it becomes available. However, that’s not the point, building your own is always so much more than just the final result). The analogue version is cheaper to make and uses around a fifth of the power of the Stylophone S1 digital design. It also sounds nicer, having no aliasing and other high frequency whistles. Incidentally, this ‘analogue renaissance’ in electronic music is now an established marketing angle to boosts sales. Of course, the main disadvantage with analogue is tuning accuracy. There is always more drift with a capacitor as the heart of a timing element compared to a numerical divided-down quartz or ceramic resonator. There’s no need to worry too much about this for a ‘toy’ instrument. I don’t think a Stylophone has ever been used in an orchestra; it’s pinnacle was probably David Bowie’s Space Oddity. (https://youtu.be/iYYRH4apXDo). Practical Electronics | June | 2020 4 R 2 /3 × V C C 5 T uning/ vi brato co ntrol vo ltage – 6 M aster reset R eset + T hreshold tim ing ca p R 3 Output Q C om parators C 2 – T rigger F req uency set resistor ( keyboard resistor ch ain) G round S et + Q 7 D isch arge ( not used) 1 /3 × V C C R 5kΩ 1 C harge/ disch arge cu rrent Fig.2. Internal circuit of a CMOS 7555. Is it analogue or digital? I would say both. Block diagram oscillator to provide vibrato. The output wave is fed into a MOSFET speaker driver. That’s a 20p chip with two 5p transistors, about right for a student project – see Fig.1. The basic system is a 555 square-wave oscillator controlled by the keyboard. This is modulated by a phase-shift low-frequency + n 8 I make no apologies for using the good old 555-timer chip for the oscillator. It was used in the original Stylophone designs from the late 1970s. Internally, the chip uses a chain of three resistors to define the top and bottom comparator-switching thresholds (see Fig.2). Since these thresholds are ratio-based, the output frequency does not vary much with supply voltage or temperature. It is stable enough for a Mini-organ run off batteries with no voltage regulator. In its CMOS version (called the 7555), as used here, the power consumption is less than 0.2mA. This chip could be considered an analogue/digital hybrid. Are comparators analogue or digital? Here, it is used in an analogue way with a capacitor that charges up. The circuit diagram is shown in Fig.3. It looks challenging for a beginner, but it’s not when broken down into its functional blocks. The internal operation of the 555 has been well covered before. Pin 5 allows a degree of voltage control of the frequency. The output of the tuning control (VR1) and the vibrato oscillator are summed here. + V C C – B attery P ower D 1 S B 4 0 2 . 1 m m power socke t with battery bypass R 7 470kΩ S 1 D 2 S B 4 0 C entre pin V B U S D – U S B -A D + G N D N C C 1 1 5 0 nF N C C 2 1 5 0 nF C 9 4 7 0 µ F 1 6 V + V R 1 0kΩ R 4 30kΩ C 3 1 5 0 nF U S B -B M ini D + G N D D 3 1 N 4 1 4 8 8 5 D epth 6 V R 2 220kΩ 2 C 1 2 1 nF C 1 0 1 0 nF C 8 1 0 nF C 5 1 0 nF C 6 1 0 nF C 1 3 4 7 0 pF C ON R E S T H R E D IS T R IG OU T S peed S 3 b N C N C N C S 3 a N C * T R 2 ca n also be an S M D : F D C 6 3 4 P 6 .3 m m output j ack socke t 4 7 N C T R 2 * Z V P 2 1 0 6 A 3 R 1 1 47kΩ C 7 4 7 0 nF G N D 1 S 3 c IC 1 7 5 5 5 + V C C V R 3 00kΩ T R 1 B C 5 4 9 C R 2 22kΩ + – C W N C C W R 9 330kΩ C 4 4 7 0 nF R 3 4.7MΩ N C R 1 8kΩ C 1 1 4 7 0 nF R 5 2kΩ R 6 00kΩ V B U S D – P itch C W L S 1 35 80Ω (4 .5 -9 V ) R 8 2.2kΩ C W R 1 0 2.2MΩ d V R 4 4.7kΩ A - log S 3 d N C s g V olum e R 1 2 2.2kΩ K eyboard stylus N C R 3 8 5kΩ R 3 7 3kΩ R 3 6 3kΩ R 3 5 2kΩ R 3 4 2kΩ R 3 3 kΩ R 3 2 0kΩ R 3 1 0kΩ R 3 0 . kΩ R 2 9 R 2 8 R 2 7 R 2 6 . kΩ 8.2kΩ 7.5kΩ 7.5kΩ R 2 5 .8kΩ R 2 4 .2kΩ R 2 3 .2kΩ R 2 2 R 2 1 R 2 0 R 1 9 R 1 8 R 1 7 R 1 6 R 1 5 .2kΩ 5. kΩ 5. kΩ 5. kΩ 4.3kΩ 4.3kΩ 3. kΩ 3. kΩ R 1 4 2kΩ R 6 3 * R 6 2 * R 6 1 * R 6 0 * R 5 9 * R 5 8 * R 5 7 * R 5 6 * R 5 5 * R 5 4 * R 5 0 * R 4 9 * R 4 8 * R 4 7 * R 7 0 .0MΩ R 5 3 * R 5 2 * R 5 1 * R 4 6 * R 4 5 * R 4 4 * R 4 3 * R 4 2 * R 4 1 * R 4 0 * T op C highest note Fig.3. Full circuit of the PE Mini-organ. Practical Electronics | June | 2020 55 Fig.4. PE Mini-organ output waveform viewed across the speaker. The ringing is the resonant back electromotive force voltage (EMF) from the speaker. Power supply The PE Mini-organ operates from 3.5 to 12V. Current consumption is 0.2mA with no note playing. Average current when played is 12mA, and a continuous note at full volume draws 40mA. The current consumption is minimised by having an uneven mark-to-space ratio on the output waveform – off more than it is on. The waveform is shown in Fig.4. Power supply connections options are provided via a 2.1mm DC connector, a standard USB socket and a mini-USB version. Schottky diodes D1 and D2 block back current passing from the battery. (I don’t know what happens if you put 9V into a USB socket on a laptop and I don’t want to test it). The 7555 goes up in smoke if the power is connected the wrong way and these diodes also provide reverse-polarity protection. The current from standard batteries is limited which avoids most damage, but power supplies will generally supply enough current to start a fire. Note that the 2.1mm connector follows the ‘guitar-pedal standard’, which is centre-pin negative. Watch out for this when using ‘off-the-internet’ ‘wall-warts’ that are generally the other way round. Octave switching An octave interval is simply a doubling or halving of frequency. In a digital system, to go down an octave, a divide-by-two stage (eg, a flip-flop) would be used. Since the PE Mini-organ is an all-analogue design, we are just going to double or halve the value of the timing capacitor. Three octave ranges are available and the total capacitance for each range is 10nF, 20nF and 40nF respectively, selected by a rotary switch. Although very simple in principle, there are problems with this approach because capacitors have wide tolerances, causing the octaves to not be exact. ±5% is the best specification for cheap capacitors, such as ceramic NP0 types. We could use 1% polystyrene or silvered-mica versions but they are scarce and pricey. However, it 56 is the ratios between the capacitors that matter, rather than the absolute value. I’ve have found 5% capacitors taken from adjacent positions of the same reel are accurate enough because there is generally little variation between each one in the same production batch. One batch I had were all around 9.6nF with a maximum of 9.65 and a minimum of 9.42nF. So what I have done here is use parallel capacitors from the same batch to create accurate doubling of capacitor values. C6 provides the first (top) octave. For the second octave, C5 is switched in parallel. For the final (lowest) octave, C10 and C8 are added in parallel. The rotary switch specified can be a pain to wire up, but it’s nice and easy when soldered directly to a PCB where all the ‘wiring’ is done for you. Mike Grindle even paralleled-up the unused sections, a standard technique which improves reliability. You’ve already paid for those contacts, so why not use them? All oscillators have a tendency to go a bit flat as they go higher in frequency due to their finite switching time. To compensate for this, the upper octave capacitor (C6) has to be a bit smaller than the lower ones (C5, C8/C10). If you have access to a capacitance meter and you find you have a variation between them, the lowest value should be used for C6 and the highest for C10. (Optional) padder capacitors C12 and C13 are provided to deal with this. Keyboard The big problem in musical electronics is that most oscillators are linear and musical scales are exponential. This is because human senses are logarithmic; it’s the way biological organisms handle the huge range of intensity of the various stimuli encountered in nature. The way round this is to make the keypard resistor value increments non-linear, so that the notes increase in the correct musical steps (the twelfth root of two if you need to know). The editor and I nearly had breakdowns typing the calculations and ratios for the keyboard resistors last time (in Audio Out, EPE, August 2018 p.56) so we’re not going to go through it again! The problem here is to get the right value resistors in the right holes. For those who are obsessed with getting the ratio exactly right (1.0595) there are spare positions for parallel resistors and or presets. Most people are happy with the standard 1% E24 series resistors. Resistor R14 is critical to the scale of the whole keyboard from the top octave to the bottom. If you find the top ‘C’ is flat compared to the bottom ‘C’ it will be necessary to tweak it a bit. I had to add a 1MΩ resistor (R70) in parallel with R14 to bring it into line. Modulation oscillator This is a standard phase-shift sinewave oscillator consisting of three capacitors (C1 to C3) and two resistors. This network is placed in a negative feedback loop around a standard common-emitter stage. At the frequency where the network phase lag hits 180°, the feedback becomes positive, and oscillation commences. On the original design the vibrato modulation level and frequency were fixed. Since we are less limited by size and cost in home construction, pots are provided for level/depth (VR3) and frequency (VR2). Note that as usual in audio RC oscillators, the frequency potentiometer must be anti-logarithmic to give a smooth adjustment range. Output stage Since the waveform is basically a square wave (see Fig.4) a linear audio amplifier, such as an LM386, is not required. A simple ‘switch’ will do. A bipolar common-emitter stage could be used, but the CMOS 7555’s output drive current capability is too low, so a MOSFET with its high input impedance has been used. This stage is wired ‘upside down’ so the speaker goes to the ground rail using a P-channel device rather than the more common N-channel with the speaker going to the power rail. This approach is needed so that the output is ground referenced, allowing external amplifiers to be connected via a jack socket. The volume control is a bit unusual in that it is simply a variable resistor I nput I nput – + + – R ear vi ew of switch Out- ofphase I n- phase – + Output T oggle next to output is in- phase + – Output Fig.5. Try flipping the phase on the speaker with this specially wired DPDT toggle switch. Sometimes it sounds better in one position. Practical Electronics | June | 2020 resistor to prevent oscillation. R10 and R9 form the biasing network for the FET to make sure it is normally biased off. These resistors may have to be adjusted if different devices are used. D3 is a clamping diode that prevents the waveform developing an additional DC voltage across the coupling capacitor as the notes are pulsed on and off. If the diode is omitted, an interesting pulse-width modulation effect occurs as the bias changes. The diode D3 and coupling capacitor C7 could be avoided by DC coupling the output device, but then it would be difficult to bias correctly and there is always the possibility of it latching-up hard on. The speaker output is muted when a jack is inserted into the socket. A DC load on the TR2 is maintained by R12. Fig.6. A suitable high-impedance speaker for the PE Mini-organ – note its position on the bench edge to give a baffle effect. placed in series with the speaker to limit the current. It is placed at the output rather than the more normal input position, so that the MOSFET is always fully driven. I was surprised such a primitive arrangement worked so well. Since the resistance of the pot has to decrease as it is rotated clockwise, it has to be anti-logarithmic. Normally, a logarithmic type is used in potential divider mode where the volume increases as the resistance gets bigger going clockwise. However, here the resistance needs to decrease because the potentiometer is used a variable resistor. The best output device to use if you want to run the instrument on low-voltage power sources, such as USB, is the Fairchild FDC634P. Unfortunately this is only available in surface-mount, but there is provision on the board for both a through-hole and SMD MOSFET. A similar MOSFET is available in a TO92 or Zetex E-line package, the ZVP2106A. This costs a bit more and has a higher turn-on voltage. It is best suited for 6-9V operation, but it will work with the USB supply, although it will give slightly reduced output. R11 is a gate-stopper Loudspeaker For musical instruments, never use Mylar cone speaker. They’re designed for alarms and have poor tone quality. Instead, use a large lightweight-paper-coned speaker, but not an 8Ω one because peak currents could reach 1.1A – not good for small batteries! High impedance speakers can be hard to obtain, so I have made provision for a supply of new old stock (NOS) 5 × 3-inch paper speakers originally made for old tube style TVs and then left in a warehouse for 20 years. For low voltages (4V to 6V) use a 50Ω speaker. For 9V, use 80Ω. One strange observation I have made is that speakers fed with asymmetrical waveforms often sound better connected one way compared to the other. So it’s worth quickly flipping the plus and minus terminals on the speaker just to check. I suspect this is because the cone motion of the speaker is also asymmetrical. A quick phase-flip switch, shown in Fig.5, is an essential bit + 5 V (+ 9 V ) R 9 330kΩ C 7 4 7 0 nF R 1 1 47kΩ If you want to use a standard 8Ω or 4Ω speakers, then an output transformer can be used to match the impedance. Even these components are now difficult to get. Luckily, Mouser offer several types from Xicon, also J Birkett’s, a small electronics shop sell Eagle brand transformers (write to: J. Birkett, 25 The Strait, Lincoln LN2 1JF). There is a degree of leakage inductance with transformers, so it is possible to use this to resonate with a capacitor (C14), producing a peaking low-pass filter, which gives a ‘warm’ tone. This trick was often used in low-power valve amplifiers. Since transformers are still used extensively in expensive ‘Neve’ style audio processors, this is a low-cost way of introducing their principles to audio engineering students. Fig.7 shows the transformer circuit and Fig.8 shows a photo of the transformer. One of the interesting points of inductive/transformer loading is that very little of the power-rail voltage is lost, unlike the high impedance speaker. This means the transformer should present a load of at least 200Ω (for 5V) and 500Ω for 9V to give the same power consumption and power output as a high-impedance loudspeaker. Next month In Part 2 next month we will discuss compnents, including sourcing them, and how to assemble the project. T R 2 s Z V P 2 1 0 6 A g d V R 4 4.7kΩ A - log C W V olum e * T 1 has 500Ω primary T 1 * im pedance S tart L T 7 2 6 ‘ T one’ ca p C T C 1 4 * 3 3 0 nF 0 V Transformer output D 3 1 N 4 1 4 8 I nput R 1 0 2.2MΩ of gear in every audio designer’s tool kit. The 50Ω ITT speaker specified sounded best in phase, with the ‘+’ on the speaker going to the ‘+’ on the board. A loudspeaker is an air pump and it needs a baffle or box to give good bass response. For testing, placing the speaker halfway face-down across the bench (see Fig.6), which provides an adequate degree of baffling for testing purposes. * W ired acr oss transform er F inish 8Ω L S 1 8Ω 4Ω C onnect 0 V to ‘ finish’ for 9 V operation 0 V Fig.7. Adding a transformer to the PE Mini-organ output stage enables a standard low-impedance speaker to be used. Tuning it with a capacitor can improve the tone over direct drive. Practical Electronics | June | 2020 Fig.8. Output transformer for impedance matching. It’s too big to mount on the board, so should be mounted in a secure way. 57