Silicon ChipMax’s Cool Beans - December 2022 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Subscriptions
  5. Back Issues: Hare & Forbes Machineryhouse
  6. Publisher's Letter: Soldering surface-mount devices
  7. Feature: Giant Boost for Batteries by Mark Nelson
  8. Feature: From virtual reality to virtue signalling by Barry Fox
  9. Feature: Net Work by Alan Winstanley
  10. Project: The Hummingbird Audio Amplifier by Phil Prosser
  11. Project: USB CABLE TESTER by Tim Blythman
  12. Project: SMD Trainer Board by Tim Blythman
  13. Project: SMD Soldering Tips & Tricks by Tim Blythman
  14. Feature: AUDIO OUT by Jake Rothman
  15. Feature: Circuit Surgery by Ian Bell
  16. Feature: Make it with Micromite by Phil Boyce
  17. Feature: Max’s Cool Beans by Max the Magnificent
  18. PCB Order Form
  19. Advertising Index

This is only a preview of the December 2022 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 Flashing LEDs and other engineering temptations – Part 34 I n my previous column (PE, Rotate that! signal. In fact, if you don’t need to read the encoder at full resolution you can make things even simpler. I suspect this is why some of the encoders you looked at give two or four transitions per click. If you only need quarter resolution for example, you can just look for Low->High transitions of signal A and use signal B to tell you the rotation direction. This type of approach is simple to implement and doesn’t need any information about the previous state of the encoder or where the ‘click’ points are. I use this approach in Cyclepong.’ Unfortunately, as I pen these words, everything feels a little ‘fluffy around the edges’ on the cognitive processing front. I just got back from a visit to my One such example is Cyclepong (do see this: https://bit.ly/3RYRQG8), which is an update of the classic arcade game Pong (https://en.wikipedia.org/wiki/Pong) using bikes as the controllers. Billed as ‘Bringing two of humanities greatest inventions together,’ Cyclepong (Fig.1) also promises to ‘Build thighs of steel (weather permitting).’ At the time of this writing, Cyclepong is on show at Novelty Automation in London (https://bit. ly/3Vo8Vfw). Iain’s current project is an electromechanical version of the classic Lunar Lander computer game (https://bit. ly/3ESSnX4), but we digress... In his email, Iain spake as follows: ‘Hi Max, Re your piece in PE Nov 22 on the work you and Joe Farr are doing with quadrature encoders. There is a ‘trick’ to decoding them that used to be well known but seems to have been largely forgotten more recently. Instead of tracking the state of the encoder and determining which signal is ‘leading’ to work out the direction of rotation, you can find the direction from the signal state when a signal transition takes place. For example, looking at Fig.4 in your piece. If A goes from Low->High when B is low then this is always a CW step. If A goes from Low->High when B is high this is always an ACW step. You can build a truth table for all the possible combinations (as you would expect it’s very symmetrical) and immediately know the direction of rotation from the direction of the transition and the state of the other Fig.1. Cyclepong: experience man and machine in perfect harmony. November 2022), I waxed eloquently on the topic of rotary encoders. Following this, I received an email from PE community member Iain Sharp who hails from Nottingham, which is where my dad was raised. Iain tells me that his day-job involves supporting the development of some very cutting-edge technology, but that his role these days is mostly focused on project management and budget issues, so he spends his spare time doing interesting (and diverse) hands-on projects that remind him why he got into engineering in the first place. 62 doctor who tells me I tested positive for Covid. I can’t believe it, I had it only three months ago, I’m too young for all this excitement. They’ve put me on antivirals (Q: ‘Do you have the antivirals?’ A: ‘No, I always walk this way!’) so I hope to return to full cognitive capacity in a few days’ time, which is when I’ll peruse and ponder Iain’s proposal in more depth and give it the consideration it deserves. Having said this, my brain is still ticktocking away in the background (albeit skipping the occasional tick or tock), and it’s trying to decide if Iain’s simplified scheme works while still addressing the problem of noisy signals caused by switch bounce. Another issue Joe and I wish to address is preventing the system Practical Electronics | December | 2022 VDD Make 1 Break NO 0 NO 1 COM NC SPDT Switch Break Make NC 0 First 0 on NO Fig.2. Switch bounce on an SPDT switch. a) b) c) d) Practical Electronics | December | 2022 First 0 on NC from getting confused when you are rotating the knob quickly and you turn it halfway past the final ‘click’ and then return it to the final ‘click’ location. This will also require some pondering in the context of Iain’s suggestions. A tight squeeze Speaking of switch bounce... were you by any chance wondering how I spent last Saturday? You were! Well, this is your lucky day because I’m in the mood to share. In previous columns, we’ve talked about the problem with switch bounce for single-pole, single-throw (SPST) switches (PE, March 2022) and single-pole, doublethrow (SPDT) switches (PE, April 2022). It’s the bounce on the latter type which interests us here (Fig.2). Remember that NO stands for ‘normally open’ and NC stands for ‘normally closed.’ The last time we talked about this, we looked at how to remove this bounce using two back-to-back NAND gates. For the purpose of these discussions, we are focused on the small breakout board (BOB) that LogiSwitch uses to debounce SPDT microswitches and small pushbutton switches (Fig.3a). This board is 0.45-inch wide and 0.5-inch tall. On the top side, there’s a small LogiSwitch IC, a capacitor, and (in the lower middle of the board) a field-effect transistor (FET), which protects you if you apply the voltage the wrong way round. On the bottom of the board are three large pads. From top to bottom (in this image) they are GND, NO (fed from the switch’s normally open terminal), and NC (fed from the switch’s normally closed terminal). The five small pads on the edge of the BOB are V+, NH (normally high), NL/ HS (normally low with handshake), TG (toggle) and GND. When the switch is in its inactive state, the NH output from the BOB is high (logic 1). When the switch is activated (which we take to be the first 0 on NO), the NH signal goes low (logic 0). When the switch is deactivated (which we take to be the first 0 on NC), the NH signal returns to its high state. The NL/HS signal presents the opposite values to the NH signal with an added twist. When the switch is activated and Fig.3. Inserting a BOB into a very small space. Top to bottom: a) LogiSwitch breakout boards (BOBs) used to debounce SPDT microswitches and small pushbutton switches; b) 8108 lever-arm limit switch with adjustable roller – my target for the LogiSwitch BOB; c) There’s not a lot of spare space inside the limit switch. I had to file down some plastic to make everything fit (the surfaces marked red); and d) connecting it all up. 63 Next, I connected the NC and NO terminals on the far side of the switch together to give me a common (COM) signal and connected this to the GND pad on the BOB. I also connected the NC and NO terminals on the nearside of the switch to the corresponding pads on the BOB (Fig.3d). Finally, I ran a little program on an Arduino Uno to make sure everything worked as expected before sealing the switch up again (Fig.4). Oh, did I forget to mention that I then had to do all of this for another 14 switches (sob). Eek! Zeke! Fig.4 Checking the LogiSwitch BOB works in the limit switch. the NL/HS signal goes high, the program in the microcontroller that’s monitoring and using this signal can change its input to an output, pull the signal low for 5µs, and then return it to being an input again. The LogiSwitch IC will understand this to be an acknowledgement that the switch event has been seen and it will take over pulling this signal low. This saves you having to set a flag in your code to say when you are waiting for the switch to go inactive. Last, but not least, the TG signal starts off in a high state. Every time the switch is activated, the TG signal toggles to its opposite state. My mission was to insert this BOB into an 8108 lever-arm limit switch with adjustable roller (Fig.3b). These are wonderful devices, but it has to be acknowledged that there’s not a lot of spare space inside (Fig.3c). What is inside is four individual terminals. The two on the lefthand side of this image are marked ‘NO’, while the two on the right are marked ‘NC’. When the switch is in its deactivated state, a small bar connects the two NC terminals. When the switch is activated, this bar moves, disconnecting the two NC terminals and connecting the two NO terminals. Observe the clear plastic piece that holds everything in place. The blue outer shell sits on top of this without any gap whatsoever. I started by covering the internals with painter’s masking tape to stop dust getting anywhere it shouldn’t. I then used a small file to make a wire-sized groove between the two halves of the clear plastic (the red lines shown on the left). There are ‘steps’ in the clear plastic on the right (on the far side, middle, and nearside pieces sticking out). I also filed half of the middle step down further to make room for the FET on that side of the BOB (the red lines shown on the right). One of the things I’ve been meaning to talk to you about is an amazing 11-yearold kid called Zeke. I was first introduced to Zeke and his dad Eric a couple of months ago (Fig.5). In this image we see them holding a circuit board Zeke designed using AWR Microwave Office software from Cadence Design Systems (Zeke is the one on the left). There’s so much to tell here but (as always) so little time to tell it. In a crunchy nutshell, Zeke has been interested in science and technology since he was about one and a half years old when Eric took a piece of wood and attached a small incandescent light bulb, a battery holder, and a knife switch of the type favored by Igor and Frankenstein (‘It’s alive! It’s alive!’). Zeke carried that little creation around with him everywhere, turning it on and off and chanting ‘switch, battery, light bulb… switch, battery, light bulb…’ When he was eight, Zeke informed his parents that he wanted to communicate with the astronauts and cosmonauts on the international space station (ISS). If I’d said this to my dad, he would have patted me on the head and wished me Left-right: Fig.5. Budding electronic engineer Zeke, with his dad Eric, showing a PCB he designed; Fig.6. Zeke with his first ham radio; and Fig.7. Zeke working on his 10-foot helical antenna. 64 Practical Electronics | December | 2022 luck. By comparison, Eric told Zeke that in order to do this he would have to a) get his ham radio license and b) have a suitable radio system. Just to make sure we’re all tap-dancing to the same skirl of the bagpipes, the term ‘ham radio’ (a.k.a. amateur radio) refers to the use of the radio frequency spectrum for the purposes of non-commercial exchange of messages, wireless experimentation, self-training, private recreation, radio sport, contesting and emergency communications. Thus, a few weeks later, Zeke, Eric, and Zeke’s grandfather Mark attended a ham radio class together, following which they took their ham Technician exam. Eric and Mark passed first time, but Zeke failed. It took Zeke a couple of months studying and two more tries before he also got his Technician license (he now has his General license) and his own KJ7NLL call sign, at which point his grandmother, ‘Bobbi,’ presented him with his first ham radio (Fig.6). Eric told me that the very first time Zeke used his radio, someone immediately responded to his young voice saying, ‘Who is this and whose radio and call sign are you using?’ Eric says that Zeke firmly responded, ‘This is my radio and my call sign!’ The funny things is that when Zeke is talking to me, it’s obvious that he’s worried about leaving me behind, so every time he drops an engineering acronym like SSB into the conversation, he will pause and then say, ‘that stands for single-sideband’ (I feel so old). After looking into several different techniques (one of his back-burner projects is to create his own phased array antenna), Zeke opted to build a 10-foot-long helical antenna (Fig.7). Not shown here is the chicken wire reflector Zeke has attached to one end of the antenna. This results in the bulk of the radiation coming out of the other end, thereby significantly boosting the range of the antenna. Via the ham network, Zeke acquired two large rotors to control the azimuth and elevation of his antenna (azimuth defines the direction to face; elevation tells you how high up in the sky to look). Zeke is currently working with some software he picked up from someone on the internet. This software runs on his PC. You tell it what satellite (including the ISS) you want to track and if feeds you a constant stream of azimuth and elevation values. I will keep you updated as to Zeke’s progress in future columns. What’s it all about? I’m currently thinking about the 1966 British comedy-drama Alfie starring Michael Caine as handsome Cockney Alfred Elkins. The title song Alfie was sung over the film’s closing credits. I now Practical Electronics | December | 2022 have the first line of the lyrics ‘What’s it all about, Alfie?’ rattling around my poor old noggin. ‘Why is that?’ You ask. I shall elucidate and explicate (don’t worry, I’m a professional). I recently received a letter from a distraught mother saying that her 6-year-old son, Alfie, told her that he wanted a pack of nanobots for Christmas. After explaining what nanobots are, he told her that he could put them in a barrel, add some chemicals, stir things up, and then sit back and wait for them to build him a supercomputer. When his mom told Alfie that this was beyond the bounds of today’s technology, he pointed to the relevant portion of my book, Bebop to the Boolean Boogie: An unconventional Guide to Electronics (https://amzn.to/3s15Nc6), which she had bought for him a few weeks earlier. Unfortunately, young Alfie had missed the part where I said this type of technology was something we might expect to be talking about in the 2050 edition of the book. Alfie’s mom asked if I had any suggestions to keep his mind occupied. I suggested that he read The Chronicles of Narnia and the Magic Treehouse books, both of which I think are great for kids of all ages. She replied that Alfie’s 4-yearold brother Eddie loved reading those books, but that Alfie himself would rather be reading about things like logic gates, p-type and n-type silicon and field-effect transistors. She also said, ‘I told him once that most grownups prefer to read stories for fun, not textbooks, and he looked at me with incredible skepticism, bordering on full disbelief.’ Fortunately, I still had a couple of tricks up my sleeves. A couple of years ago, two former teachers, Paul and Alyssa Boswell, created an awesome marblepowered computer called the Turing Tumble (https://bit.ly/3TdIPKY). They launched it as a Kickstarter project, and it went gangbusters. This comes with lots of puzzles that I’m sure will keep Alfie busy (I have one here in my office and it certainly keeps me occupied). The second, even more awesome, thing is the latest and greatest offering from Paul and Alyssa – a mechanical implementation of electronic components and systems called Spintronics (https://bit.ly/3s0IoHW). The first production run is currently on the high seas heading our way (they discovered a problem with the mechanical resistors if they were transported via airplane (the lower atmospheric pressure caused the silicone gel to leak out). Suffice it to say that hearing about these two offerings made Alfie’s longsuffering mother very happy indeed. Open circuits I’m really bad when it comes to remembering names and faces. This problem is only exacerbated by the fact that I’ve spoken at so many conferences. You’d be amazed how many people email me to say something like, ‘I saw your presentation at the XYZ conference in the year of the fruit bat – I was the one who asked the question about reverberating foodle valves’ (or words to that effect), to which I usually reply, ‘That was you?’ The reason I mention this is that I just received an email from Philip Freidin, who hails from Silicon Valley and who started off by saying, ‘You probably don’t remember me, but we met a few years ago at an Embedded Systems Conference (ESC) – in 2015, I think – and chatted for about an hour. I showed you OSHChip, a 32-bit ARM CPU + Bluetooth radio packaged as a 16 pin DIP.’ The funny thing is that I do remember this meeting. Philip went on to say, ‘This email has nothing to do with any of that.’ (This brought a smile to my face because it’s the sort of thing I might say myself.) It turned out that the reason for Philip’s email was that two of his friends, Windell Oskay and Eric Schlaepfer, are poised to publish a book called Open Circuits (https://amzn.to/3CzWZ1P), which should hit the streets around the beginning of November 2022 (which is now as you read these words). This book does not require any indepth electronics knowledge and I think it will be of interest to both engineers and non-engineers alike. Basically, it contains a lot of gorgeous photographs showing the insides of electronic components. You can download a free PDF of Chapter 1: Passive Components from the publisher, No Starch Press (https:// bit.ly/3VyHS1i). I LOVE this book. My wife (Gina the Gorgeous) tells me that she never knows what to get me for Christmas. Well, safe to say that Open Circuits is now at the top of my wish list. I’m afraid that’s all we have time for in this column. As always, I look forward to receiving your captivating comments and insightful questions. Until next time, have a good one! 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 65