Silicon ChipMax’s Cool Beans - June 2023 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Subscriptions
  5. Back Issues: Hare & Forbes Machineryhouse
  6. Publisher's Letter: Powerful projects
  7. Feature: Technology comes in different shapes and sizes by Max the Magnificent
  8. Feature: Net Work by Alan Winstanley
  9. Project: Arduino Programmable Load by Tim Blythman
  10. Project: 500 WATTS POWER AMPLIFIER by JOHN CLARKE
  11. Project: High-Power Buck-Boost LED Driver by Tim Blythmhman
  12. Feature: CJMCU-7620 Gesture Recognition Module by Jim Rowe
  13. Feature: Max’s Cool Beans by Max the Magnificent
  14. Feature: Circuit Surgery by Ian Bell
  15. Feature: Make it with Micromite by Phil Boyce
  16. Feature: AUDIO OUT by Jake Rothman
  17. Feature: PE hands-on product review by Julian Edgar
  18. PCB Order Form
  19. Advertising Index

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

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

Articles in this series:
  • (November 2020)
  • Techno Talk (December 2020)
  • Techno Talk (January 2021)
  • Techno Talk (February 2021)
  • Techno Talk (March 2021)
  • Techno Talk (April 2021)
  • Techno Talk (May 2021)
  • Techno Talk (June 2021)
  • Techno Talk (July 2021)
  • Techno Talk (August 2021)
  • Techno Talk (September 2021)
  • Techno Talk (October 2021)
  • Techno Talk (November 2021)
  • Techno Talk (December 2021)
  • Communing with nature (January 2022)
  • Should we be worried? (February 2022)
  • How resilient is your lifeline? (March 2022)
  • Go eco, get ethical! (April 2022)
  • From nano to bio (May 2022)
  • Positivity follows the gloom (June 2022)
  • Mixed menu (July 2022)
  • Time for a total rethink? (August 2022)
  • What’s in a name? (September 2022)
  • Forget leaves on the line! (October 2022)
  • Giant Boost for Batteries (December 2022)
  • Raudive Voices Revisited (January 2023)
  • A thousand words (February 2023)
  • It’s handover time (March 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • Prophecy can be perplexing (May 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • How long until we’re all out of work? (August 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • Holy Spheres, Batman! (October 2023)
  • Where’s my pneumatic car? (November 2023)
  • Good grief! (December 2023)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (February 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk (July 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk (November 2024)
  • Techno Talk (December 2024)
  • Techno Talk (January 2025)
  • Techno Talk (February 2025)
  • Techno Talk (March 2025)
  • Techno Talk (April 2025)
  • Techno Talk (May 2025)
  • Techno Talk (June 2025)
Max’s Cool Beans By Max the Magnificent Arduino Bootcamp – Part 6 I n this month’s column we are going to be leaping from topic to topic with the agility of young mountain goats, so readers are encouraged to dress appropriately and responsibly. As one example, we are going to use a passive piezoelectric buzzer to super-size the ‘click’ sounds that occur when we press our momentary pushbutton switches, but first… Mum knows best! When I was 16, my mother told me it would be a really good idea for me to learn to type. She also suggested I learn Pitman shorthand. This was after she’d finished touring the world as the personal assistant to a captain of British industry. As a follow-up act, she became a principal lecturer at college teaching shorthand, typing, and business studies in English, French, and German (she never liked to restrict herself unduly). Unfortunately, this was 1973, when the widespread proliferation of computers at home and in the office was still naught but a pipedream. At that time, I was debating whether to apply to art college or embark on a career in engineering. I never envisioned I would end up as an engineer who spends his days interviewing industry luminaries (wishing I knew shorthand) and writing books, technical articles and whitepapers (wishing I could type). To this day, I remain a two-fingered hunt-and-peck typist. Occasionally, I see someone who can really type at speed using all ten fingers (including thumbs) to full advantage, and I think, ‘I wish I’d listened to my mum.’ Invariably, my mind will then meander onto other topics, such as wondering if we could Fig.1. Acanthostega had eight fingers on each hand. Practical Electronics | June | 2023 type faster were we to have six, seven or even eight fingers on each hand. You may be raising a quizzical eyebrow at this point in the proceedings, but this isn’t as far-fetched as it may seem. As I wrote in my book Bebop Bytes Back (yet Listing 1. Why once and why repeatedly? while the loop() function will run over another 850+ page tome typed with two and over again, but that he doesn’t unfingers), the term ‘tetrapod’ refers to an derstand what makes things work this animal that has four limbs, along with way and could I possibly explain. hips and shoulders and fingers and toes. When we look at these functions, there’s In the mid-1980s, paleontologists discovnothing to distinguish them except their ered Acanthostega who, at approximately names, so why do they work different365-million-years old, is the most primily? Have you ever wondered about this tive tetrapod known. yourself? If so, why didn’t you email Ultimately, we (and all the other verme rather than leaving everything up tebrates) are descended from Acanthoto poor old Andrew? I am, of course, stega or one of her cousins. The point is, more than happy to elucidate, explicate, this little beauty had eight fully evolved and expound on this topic (as I’ve said fingers on each hand (Fig.1). So, if evomany times before, much like my dear lution hadn’t taken a slight detour, we old mother, the real trick is to get us to could have been wizards at typing while stop waffling). also ending up using a hexadecimal (baseHere’s the deal. In the real world, every 16) numbering system. As we discovered C/C++ program commences with a main() in my previous column (PE, May 2023), function. If we were to explicitly show having sixteen fingers and being familiar this function in our Arduino sketches, it with hexadecimal would have been jolly would look something like Listing 2 (the handy (no pun intended) when we finalreal-world Arduino incarnation is a tad ly got around to inventing computers. more involved, but that’s nothing we need concern ourselves with here). Why once? Why repeatedly? As we see, the first statement in our A reader we will call Andrew (because hypothetical main() function calls our that’s his name) emailed me to say he had a question pertaining to the setup() and loop() functions we use when creating Arduino sketches (programs). These functions are automatically instantiated for us when we use the Arduino’s integrated development environment (IDE) to create a new sketch (Listing 1). Andrew said that he fully accepts that the setup() function will run only one time Listing 2. Ah! That explains it! 45 5V 10kΩ 10kΩ A0 A1 S W0 S W1 G ND T o the Arduino’s A 0 analog pin T o the Arduino’s A 1 analog pin Fig.2. Adding a second pushbutton switch. setup() function a single time. With respect to the second statement, remember that the Arduino sees 1, HIGH, and true as being the same thing; hence, while(1) is the same as saying while(true). Since this condition, by definition, always returns true, the while(1) statement will repeatedly call our loop() function. The creators of the Arduino wanted to keep things as simple as possible to get users up and running as quickly as possible. Based on this philosophy, they decided to hide a lot of nitty-gritty details ‘under the hood,’ as it were. One of these details was the main() function, which is automatically slipped in by the Arduino’s IDE while you aren’t looking whenever you compile your programs. The loneliest number I’ve said before and I will doubtless say it many times again – if there is one song that sets my teeth on edge, that song is One (popularly known as One is the Loneliest Number), which was written by Harry Nilsson and made famous by the American rock band Three Dog Night in 1968. Listing 3. First switch test program. 46 Having said this, it must be admitted that the solitary pushbutton switch we used in our previous experiments did look a little lonely. This is why, toward the end of my previous column, I asked you to add a second switch (with associated pull-up resistor) to your breadboard to keep the first switch company. I also asked you to connect the output from this switch to pin A1 on your Arduino. The result should look something like Fig.2. To ensure we are all marching in lockstep, you can download a copy of our current breadboard layout showing both switches, our 7-segment display, and the connections to our Arduino Uno (file CBJun23-01.pdf). As usual, all the files mentioned in this column are available from the June 2023 page of the PE website at: https://bit.ly/pe-downloads We will be using both these switches shortly, but first we have a little catching up to do. Mission impossible I used to enjoy watching the television series Mission Impossible in the late1980s (I only recently discovered that this was a continuation of an earlier series from the mid-1960s). Each episode started with the team leader receiving a tape describing the mission du jour, and each tape commenced with the iconic phrase, ‘Your mission, should you choose to accept it…’ As you may recall, the last experiment we performed in the previous column was to create a test program that looped around reading from our first pushbutton switch and writing its current 0 or 1 value to the Arduino’s Serial Monitor on our computer screen (Listing 3, file CB-Jun23-02.txt). I then said something along the lines of, ‘Your mission, should you choose to accept it, is to use the minimum number of modifications necessary to tweak our existing decimal count program so that, after bidding us ‘HELLO,’ it loops around reading the state of the switch and displaying corresponding 0 and 1 values on the 7-segment display.’ How well did you do? I bet you were magnificent! How about if I show you how I did it and you can compare your solution to mine? I started by using the Arduino IDE to open our Auto_Dec_Count_Up program (you can find a copy in file CB-Jun23-03.txt) and saving it as a new program called Switch_Test_02. In the definitions at the top of our new test program I added Line 1 from Listing 3: #define SAMPLE_PERIOD 100 I augmented the existing pin definitions in our new test program by adding Line 3 from Listing 3: int PinSwitch = A0; In the setup() function in our new test program, I specified that our new pin was to be treated as an input by adding Line 9 from Listing 3: pinMode(PinSwitch, INPUT); The last statement in our loop() function is a call to the built-in delay() function. In the original counting program, we used our ON_TIME constant (1000 milliseconds or 1 second) as the argument to this function. I replaced this with our new SAMPLE_PERIOD constant (100 milliseconds or 1/10th of a second). All that remained was to modify the GetNewDigit() function. As you will recall, at the heart of the existing function we use the following statement to implement our decimal count. tmpDigit = (DigitToDisplay + 1) % NUM_DIGITS; All I had to do was replace this statement with a modified version of Line 16 from Listing 3 as follows: tmpDigit = digitalRead(PinSwitch); And that’s all there is to it. This really isn’t bad when you come to think about it. All we had to do was add three new statements and tweak two of our existing statements, and ‘Bob’s your uncle’ (or aunt, depending on your family dynamic). You can access a copy of this modified program in file CB-Jun23-04.txt When we run this new version of our program, after displaying the ‘HELLO’ message, it will start to present 1 on the 7-segment display. When we press and hold the momentary pushbutton, the program will present 0 on the display. Try pressing and releasing the pushbutton a few times. I don’t know about you, and I don’t know why this should be, but I find that watching the display change when I press the pushbutton gives me a certain sense of satisfaction. Ready, steady, press! The second task I asked you to perform at the end of the previous column was Practical Electronics | June | 2023 to return to our Auto_Dec_Count_Up program and save this as Switch_Dec_ Count_Up. In this case, following the ‘HELLO’ message, we want to commence by presenting a 0 on the display. Next, we want the program to loop around checking the state of our pushbutton switch. Whenever the switch is pressed, we want to increment (add 1 to) the value on the display. As usual, when we reach 9, pressing the switch one more time will cause the display to wrap around back to 0. Let’s do this together. To keep our code concise, we will use ‘SW’ (or ‘sw’ or ‘Sw’ depending on the circumstance) as abbreviations for ‘switch.’ Remember, when our switch isn’t being pressed, the wire connected to the Arduino will be pulled up to 5V by the pull-up-resistor, so the value seen by the Arduino will be 5V (1 or HIGH). By comparison, when the switch is pressed, the value seen by the Arduino will be 0V (0 or LOW). Based on this, we’re going to add the following lines to the definitions at the top of our program. #define SW_PRESSED LOW #define SW_RELEASED HIGH As before, we will augment the existing pin definitions in our new count program by adding a modified version of Line 3 from Listing 3: int PinSw = A0; In our original auto-count program, we declared a global integer called DigitToDisplay to which we assigned a value of –1. Since we now wish to start off by displaying 0, and based on other modifications we’re going to make, we are going to change this assignment to 0, as follows: int DigitToDisplay = 0; There are two changes we need to make to the setup() function in our new count program. As before, we will specify that our new pin is to be treated as an input by adding a modified version of Line 9 from Listing 3: pinMode(PinSw, INPUT); We also need to add a new statement right at the end (just before the ‘}‘ curly bracket) as follows: DisplaySegs(DigitSegs[0]); Actually, in the real program (file CB-Jun23-05.txt), instead of 0 we use our DigitToDisplay variable to which we just assigned 0 (I used 0 here to ensure I didn’t run out of space). The last statement in our current loop() function is a call to the built-in delay() function. We did this to pause after displaying the new auto-count digit, but we no longer need this delay because we are going to control the count with our pushbutton switch, so we can delete this statement from our program. All we need to do now is modify our GetNewDigit() function such that, instead of auto-counting, it only increments our current value to be displayed when we press our switch. If you are a newbie to all this, your knee-jerk solution might be to modify our code to look something like Listing 4. At a first glance, this certainly seems simple enough. We start on Line 88 by declaring a local variable (ie, a variable whose scope is limited to this function) called tmpDigit (‘temporary digit’) to which we assign the value stored in the global variable DigitToDisplay (ie, the current value of the number we wish to display). Next, on Line 89, we declare a local variable called swVal (‘switch value’) to which we assign the value returned when we use the built-in digitalRead() function to access the value on the pin connected to our switch. On Line 91 we use an if() control statement to make a decision based on the value we just read from our switch (we introduced the if()in PE, April 2023). If the switch is pressed, we increment the value in tmpDigit using the statement on Line 93. As we discussed in an earlier column (PE, April 2023), our use of the % modulo operator means that our count will proceed from 0 to 9 and then back to 0 again. Finally, we return the value in tmpDigit. Due to the somewhat clunky way in which we’ve created our program, this will end up being copied back into DigitToDisplay (we had good reasons for employing this technique when we were learning how to do things, and we may as well stick with what we’ve got for now). Does this all look good to you? If so, upload this new version of our program into your Arduino. Wait for it to display ‘HELLO’, pause for a second, and start displaying 0. Are you ready? Are you steady? If so, press and release your pushbutton switch a few times and see what happens. What’s going wrong? As you know, what we want is for the value on the display to increment every time we press our pushbutton switch. As you will have discovered, however, this isn’t what’s happening. Whenever we press the switch, the display shows a value of 8. Whenever we release the switch, the display presents what appears to be a random value between 0 and 9. So, what’s going wrong? Well, the problem is that we’re being silly billies. As is often the case, the best way to visualise what’s going on is by means of a diagram (Fig.3a). The ‘Test Times’ in this illustration reflect every time we execute our loop() function, call our GetNewDigit() function, and read and test the state of our switch. Since the Arduino Uno’s clock is running at 16MHz (16 million times a second), this means we are racing around checking the state of the switch hundreds of thousands of times each second (in turn, this means there would be many more ‘Test Times’ than are shown in this simple diagram). The way our current program is set up, every time we read our switch and determine that it’s in its pressed state, we increment and display our count value. Thus, the reason we see the number 8 whenever we press and hold our switch is that the Arduino is repeatedly displaying 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. It’s doing this so fast that everything is a blur, and it appears to our eyes that all the segments are illuminated all the time. Similarly, when we release the switch, the reason we see what appears Switch Released Switch Pressed Test Times (a) Pressed ? No Yes No Yes No (b) Changed ? No No No No No Y es (Pressed) Y es (Released) Fig.3. You turn me on. Practical Electronics | June | 2023 Y es (Pressed) Y es (Released) Listing 4. First pass at using the switch to control the count. 47 to be a random value between 0 and 9 is that this reflects whatever is the current count value when we release the switch. Just for giggles and grins, add a delay(50); statement at the end of the loop() function and upload this new version to your Arduino. This will enable you to see the individual values racing by while you are pressing the switch. Experiment with different delay values like 20 and 200, and then remove this statement before proceeding to our next experiment. All change! What we need to do is to modify our code to detect when the state of the switch changes from being released to being pressed, and vice versa (Fig.3b). If you root around various Arduino forums, you will discover that there are myriad ways we can do this. As usual, however, I’m just going to make things up as I go along. The first thing we’re going to require is a global variable to keep track of what we are currently looking for. Let’s use an integer called LookFor (I’m good with names). Just to keep things simple, let’s also assume that, when we first run our program, the switch will be in its released (un-pressed) state. This means we will start off looking for it to be pressed, so we can assign this as part of the declaration as follows: int LookFor = SW_PRESSED; To be honest, this is a bit naughty of us. We should always be careful when making assumptions as to how a user is going to work with a system. In our case, it’s not beyond the bounds of possibility that a user would press and hold the switch before powering-up the Arduino. Thus, if we were creating code for use in some mission-critical or safety-critical application, we would read the power-up state of the switch as part of our setup() function and assign a value to LookFor accordingly. Fig.4. Switches bounce – that’s what they do! The next step is to modify our GetNewDigit() function, as shown in Listing 5. First, we check to see if the switch’s current value AND the value we are looking for are both equal to SW_PRESSED. When we first run the program, this test will fail because the switch is in its SW_RELEASED state. When we ‘fall through’ to the else if() portion of the test, we check to see if the switch’s current value AND the value we are looking for are both equal to SW_RELEASED. In this case, when we first run the program, this test will fail because we are looking for the switch to be in its SW_PRESSED state. We will cycle round and round with nothing changing until the switch is pressed. At that time, the first if() test will pass, resulting in our incrementing the value to be displayed and updating the value assigned to LookFor to be SW_RELEASED. The next time round the loop, the if() test will fail because we are now looking for the switch to be released, and the else if() test will fail because the switch is in its pressed state. It’s only when the switch is eventually released Listing 5. Second pass at using the switch to control the count. 48 that the else if() test will pass, at which time we will return the value assigned to LookFor to be SW_PRESSED. (All this is a lot easier to understand than it is to explain.) OK, let’s run our latest version of the program (file CB-Jun23-06.txt) and see what happens. What? More problems? What happens now largely depends on the switch you are using. It may be that your setup works just the way you expect. That is, when you press the switch, the display value increments, and when you release the switch, things stay ‘as-is.’ If so, congratulations, you were lucky. The thing is, switch and relay contacts are usually made of springy metals. When these contacts strike together, their momentum and elasticity cause them to bounce apart one or more times before making steady contact. This affects all sorts of switches, including toggle switches, pushbutton switches, limit switches, reed switches, and so forth. It’s possible to see as many as 100+ bounces spanning a duration as great as ~6 milliseconds (ms). Feel free to peruse and ponder my Ultimate Guide to Switch Bounce for more details (https://bit.ly/41e3p14). As fate would have it, the first switches I used for this experiment didn’t bounce at all, causing me to exclaim ‘Oh Dear!’ (or words to that effect). Happily, after rooting around in my treasure chest of bits and pieces, I located some switches that bounced like Olympic champions (Fig.4). In this case, the horizontal scale on my scope is set to 50 microseconds (µS) per division, which means this particular bouncing sequence persists for around 0.3ms. As a result, when I press my switch, the value on my display increases by some random amount depending on the number of bounces. Practical Electronics | June | 2023 Listing 6. Third pass at using the switch to control the count. What we need to do is debounce the signal we are receiving from the switch. Purely in the spirit of proof of concept (POC), what we are going to do is assume that any switch bounce will have terminated by 8ms after the switch has been activated (pressed) or de-activated (released). We will add a new definition to our program. #define DEBOUNCE_TIME 8 Also, we will modify our GetNewDigit() function, as shown in Listing 6. As we see, whenever we detect that the switch has been pressed, we pause for the debounce time before returning control to the main program, and similarly when the switch is released. Since this delay is only eight thousandths of a second, it’s imperceptible to our human senses, but it’s more than sufficient for our purposes. When we now run the latest and greatest version of our program (file CB-Jun23-07.txt), everything finally works as we wish. Naughty, naughty! I should point out that, although it serves our purpose here, the debouncing scheme we just introduced is flaky and shaky, and that’s if we’re being generous. I would be obliged to chastise myself soundly and hang my head in shame if anyone were to see this in a realworld program. We will ponder the potential problems with our current debounce solution and consider various improvements in our next column, but first… Well, buzz me! Listing 7. Piezo buzzer click test program. Practical Electronics | June | 2023 As I promised at the beginning of this column, we’re going to use a passive piezoelectric buzzer to super-size the ‘click’ sounds that occur when we press our momentary pushbutton switches. Piezoelectricity is the electric charge that accumulates in certain solid materials like crystals and some ceramics in response to applied mechanical stress. One aspect of this is that these materials can be used to form a variety of sensors, including microphones. Conversely, those same materials will deform (change their static dimension) when an external electric field is applied. This inverse piezoelectric effect can be used Fig.5. Passive piezoelectric buzzer. to create actuators, such as buzzers, that produce sound and ultrasound. There are two types of piezoelectric buzzers that are commonly used in electronic projects. These are classed as active and passive. In addition to its piezo element, an active piezo buzzer has a few extra components. All this 2-pin device requires is a DC voltage to produce sound but (at least as far as we’re concerned here) it can generate only a single frequency. By comparison, a passive piezo buzzer boasts a troika of pins: power (we will be using 5V), ground (0V), and an input signal. Finagling the input makes our lives a little more complicated, but we can control the little rascal to generate a wide range of frequencies and sounds, including musical notes. For the purposes of our experiments, I purchased a simple passive piezoelectric buzzer for $6.59 here in the US (https://amzn.to/3nTZ0Ce). The closest equivalent I could find in the UK costs £12.89 (https://amzn.to/3KmxjcX). The great thing about this little scamp is that it is presented on a small breakout board (BOB) with three pins that allow it to be plugged directly into our breadboard (Fig.5). Speaking of breadboards, let’s plug this buzzer into ours and connect its signal pin (shown as ‘IO’ in Fig.5) to our Piezo buzzer shown as being transparent so we can see the pins and wiring T o the Arduino’s digital pin 10 Fig.6. Piezoelectric buzzer on breadboard. 49 Arduino’s digital pin 10, as illustrated in Fig.6). For your delectation and delight, you can download a copy of our latest and greatest breadboard layout showing both switches, our 7-segment display, our piezo buzzer, and all the connections to our Arduino Uno (file CB-Jun23-08.pdf). Step by step If I’ve taught you anything, I hope it includes taking things step-by-step and performing some simple software tests to ensure any new hardware works before we start bolting it into a larger, more complex program. For example, may I make so bold as to suggest you create a program similar to the one shown in Listing 7 (file CB-Jun23-09.txt)? On Line 1 we declare an integer called PinBz and assign it a value of 10. This is the pin we’re going to use to control our piezoelectric buzzer. Our setup() function contains only two lines. First, we set the pin connected to our buzzer to be of type OUTPUT, after which we drive it LOW. Similarly, our loop() function contains only two lines. First, we call a function we’re calling Click(), and then we wait for a second before doing it all again. The Click() function is just a little something I threw together. All we do is loop around some All that remains is to take the call to the Click() function (Line 14 from Listing 7) and add it into the main program (between Lines 96 and 97 in Listing 6). The result is a program that increments the display when we press our switch, with each press being accompanied by an extremely satisfying click. I don’t know about you, but I certainly feel a little ‘Tra-la’ is in order. Clickety Click! Now, I want you to be brave because I’m going to leave you in charge. Your first mission is to modify our latest and greatest switch-controlled ‘count with click’ program so that it reacts to both of our pushbutton switches. Our original switch will continue to increment the count, while the second switch will decrement the count. Once you have this working, your next task is to ‘tweak’ things so that each switch has its own unique click sound. I have every faith that you can do this. Make me proud. This is where we bring everything together. What we are going to do is to take most of the contents of our click test program and add them to our current switch-controlled count program. Specifically, we are going to copy Line 1 from Listing 7 over ‘as-is.’ We are going to add Lines 6 and 7 from Listing 7 into our count program’s setup() function. Also, we are going to copy the entire Click() function from Listing 7 (Lines 18 through 27) and paste it into our count program. Over to you Cool bean Max Maxfield (Hawaiian shirt, on the right) is emperor of all he surveys at CliveMaxfield.com – the go-to site for the latest and greatest in technological geekdom. Comments or questions? Email Max at: max<at>CliveMaxfield.com BACK ISSUES Practical Electronics Practical Electronics number of times (5 in this example) driving our buzzer pin HIGH and LOW with 1ms delays between transitions. Running this first-pass program results in a click sound, albeit one that’s a tad tinny. Once we’ve performed our final experiment for this column, I’m going to experiment with different values for the number of cycles and the delays to see what happens, and I think it would be a good idea for you to do the same. Practical Electronics Practical Electronics Practical Electronics Practical Electronics Practical Electronics Practical Electronics The UK’s premier electronics and computing maker magazine The UK’s premier electronics and computing maker magazine The UK’s premier electronics and computing maker magazine The UK’s premier electronics and computing maker magazine The UK’s premier electronics and computing maker magazine The UK’s premier electronics and computing maker magazine The UK’s premier electronics and computing maker magazine Circuit Surgery Exploring op amp exponential amplifiers Make it with Micromite Circuit Surgery Audio Out PE Analogue Vocoder: Driver Amplifier design Using and interfacing the Exploring op amp versatile iButton input offsets Audio Out Vocoder: Driver Amplifier build KickStart Using the I2C bus Make it with Micromite Circuit Surgery Using and interfacing Exploring the the versatile iButton LM35 temp sensor Audio Out C movlw D′7 D′7′ bsf STATUS, RP0 bcf STATUS, RP1 movwf _adcon1 movlw D′192′ movwf _option_reg Hex :040000008A01122837 :08000800F000F00S030 EF10000 :10001000040EF2000A0 EF300BA110A122928352 86C :2000200D928FE28073 Flowcode Audio Out Vocoder final assembly Wind turbine Small-scale garden set-up Electronic Building Blocks Circuit Surgery Building a budget Distortion and electronic stethoscope distortion circuits Audio Out Designing a practical de-thump circuit Make it with Micromite Circuit Surgery Code for an iButton-based Simulating distortion Electronic Door Lockand distortion circuits Audio Out Using transformers in audio electronics Make it with Micromite Circuit Surgery Installing MMBASIC on Using a distortion and Raspberry Pi Pico distortion circuits <at>practicalelec WIN!High-current Microchip WLR089 Xplained Pro Evaluation Kit Battery Balancer Microchip MPLAB ICD 4 In-Circuit Debugger WIN! void interrupt(void) { if (intcon & 4) { clear_bit(intcon, 2); FCM_INTERRUPT_TMR o(); Assembly movlw D′7′ bsf STATUS, RP0 bcf STATUS, RP1 movwf _adcon1 movlw D′192′ movwf _option_reg Flowcode Programming Hex :040000008A01122837 :08000800F000F00S030 EF10000 :10001000040EF2000A0 EF300BA110A122928352 86C :2000200D928FE28073 movlw D′7′ bsf STATUS, RP0 bcf STATUS, RP1 movwf _adcon1 movlw D′192′ movwf _option_reg Hex Full-wave Universal Motor Speed Controller PLUS! Feb 2022 £5.49 Techno Talk – Go eco, get ethical! PLUS! 01 Techno Talk – Should we be worried? Net Work – Electricity generation and streaming radio <at>practicalelec WIN! Microchip SAM E54 Curiosity Ultra Development Board High-current Battery Balancer :040000008A01122837 :08000800F000F00S030 EF10000 :10001000040EF2000A0 EF300BA110A122928352 86C :2000200D928FE28073 PLUS! Jan 2022 £5.49 WIN! Explorer 8 Development Kit from Microchip Assembly Learn Flowcode Programming: PIC, Arduino and 16x2 LCD Battery Monitor Logger 9 772632 573023 practicalelectronics www.electronpublishing.com Digital FX Unit 8/14/20-pin PIC Introducing the Programming Helper Raspberry Pi Pico WIN! WIN C void interrupt(void) { if (intcon & 4) { clear_bit(intcon, 2); FCM_INTERRUPT_TMR o(); Digital FX Unit WIN! 02 Apr 2022 £5.49 Fox Report – Another fine mess: moving to Windows 11 Net Work – Scanners, eVTOLs and the latest from space 9 772632 573023 practicalelectronics www.electronpublishing.com <at>practicalelec BACK ISSUES – ONLY £5.95 £5.95 per issue for UK incl p&p n £8.95 Europe Air Mail n £9.95 ROW Air Mail 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 for the same price. Your email address must be included on your order. Please make sure all components are still available before commencing 50 any project from a back-dated issue. KickStart Techno Talk – From nano to bio 04 Cool Beans – Simple filtering with software Net Work – UK gigafactories, Rolls-Royce electric planes 9 772632 573023 practicalelectronics www.electronpublishing.com <at>practicalelec PLUS! Introduction to linear actuators Single-Chip Silicon Labs FM/AM/SW Digital Radio Receiver May 2022 £5.49 Techno Talk – Positivity follows gloom 05 Cool Beans – Amazing Analogue AI and a handy PSU Net Work – Google Lens plus energy and space news <at>practicalelec PLUS! Jun 2022 £5.49 <at>practicalelec Microchip SAM V71 Xplained Ultra Evaluation Kit Multi-purpose Battery Manager Controlling a linear actuator Techno Talk – Mixed Menu 06 Cool Beans – Choosing servos and a little competition Net Work – NFC and the rise of mobile payments 9 772632 573023 practicalelectronics www.electronpublishing.com MMBASIC + RPi Pico + display = PicoMite Backpack! WIN! Simple MIDI Toot toot! Music Model Railway Level Keyboard Crossing with moving barriers, flashing Advanced GPS Computer: lights and bell! Advanced GPS Computer construction and use 9 772632 573023 practicalelectronics www.electronpublishing.com Make it with Micromite Exploring DACs and microcontrollers WIN! Microchip SAM C21 Xplained Pro Evaluation Kit Completing our impressive Analogue Vocoder Flowcode C 192kHz, 24-bit Learn SuperCodec: Balanced Input and Attenuator Techno Talk – Communing with nature Fox Report – Power as free as the wind Net Work –EVs, upgrading to Windows 11 and space tech Soothing Electronic Wind Chimes Assembly Learn Flowcode Programming www.electronpublishing.com Build an iButton-based Exploring the Electronic Door Lock Royer oscillator Mastering AC meters MiniHeart Heartbeat SimulatorBuild this handy Arduino-based power supply void interrupt(void) { if (intcon & 4) { clear_bit(intcon, 2); FCM_INTERRUPT_TMR o(); PLUS! Make it with Micromite Circuit Surgery WIN! WIN Flowcode Vintage Battery Radio Li-ion Power Supply Mastering switch debounce 64-key MIDI Matrix Microchip MPLAB Starter Kit for Digital Power PIC18F Development Board: using displays Cool Beans Vocoder: Audio PSU WIN! WIN! Retro gaming with Nano Pong! Flowcode Digital Clock Design Flowcode C void interrupt(void) { if (intcon & 4) { clear_bit(intcon, 2); FCM_INTERRUPT_TMR o(); Assembly movlw D′7′ bsf STATUS, RP0 bcf STATUS, RP1 movwf _adcon1 movlw D′192′ movwf _option_reg PLUS! Jul 2022 £5.49 Hex :040000008A01122837 :08000800F000F00S030 EF10000 :10001000040EF2000A0 EF300BA110A122928352 86C :2000200D928FE28073 Techno Talk – Time for a total rethink? 07 Cool Beans – Touch-sensitive robots and using servos Net Work – The irresistible rise of automotive electronics 9 772632 573023 practicalelectronics www.electronpublishing.com <at>practicalelec Aug 2022 £5.49 08 9 772632 573023 practicalelectronics ORDER FORM – BACK ISSUES  Back issues required (month / year) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tel: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  I enclose cheque/PO to the value of £ . . . . . . . . . . . .  Please charge my Visa/Mastercard £ . . . . . . . . . . . . . . . Card No . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Valid From . . . . . . . . . . . . . Card Expiry Date . . . . . . . . . . . . . Card Security Code . . . . . . . . . . (Last three digits on or under the signature strip) SEND TO: Practical Electronics, Electron Publishing Limited 113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU Tel: 01202 880299 Email: stewart.kearn<at>wimborne.co.uk On-line Shop: www.electronpublishing.com Payments must be in £ sterling – cheque must be drawn on a UK bank and made payable to ‘Practical Electronics’. Practical | toJune | issue. 2023 All items normally posted within seven days of receipt of order. Copy this formElectronics if you do not wish cut your