Silicon ChipBusy Loo Indicator - January 2021 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: More articles than space - a good problem to have!
  4. Feature: Automotive Electronics, Part 2 by Dr David Maddison
  5. Project: AM/FM/SW Single-Chip Digital Radio by Charles Kosina
  6. Review: Altium 365 and Altium Designer 21 by Tim Blythman
  7. Project: MiniHeart: A Miniature Heartbeat Simulator by John Clarke
  8. Feature: How to use the MPLAB X Development Environment by Tim Blythman
  9. Serviceman's Log: One good turn deserves another by Dave Thompson
  10. Project: The Bass Block Subwoofer by Nicholas Dunand
  11. Project: Busy Loo Indicator by John Chappell
  12. Feature: AVR128DA48 and Curiosity Nano Evaluation Board by Tim Blythman
  13. Product Showcase
  14. Vintage Radio: 1963 Philips Musicmaker MM1 mantel radio by Associate Professor Graham Parslow
  15. PartShop
  16. Feature: El Cheapo Modules: Mini Digital AC Panel Meters by Jim Rowe
  17. Market Centre
  18. Advertising Index
  19. Notes & Errata: Balanced Input Attenuator for the USB SuperCodec, November-December 2020; Two LED Christmas Stars, November 2020; D1 Mini LCD BackPack, October 2020
  20. Outer Back Cover

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

You can view 42 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • Automotive Electronics, Part 1 (December 2020)
  • Automotive Electronics, Part 1 (December 2020)
  • Automotive Electronics, Part 2 (January 2021)
  • Automotive Electronics, Part 2 (January 2021)
Items relevant to "AM/FM/SW Single-Chip Digital Radio":
  • AM/FM/SW Single-Chip Digital Radio PCB [CSE200902A] (AUD $10.00)
  • Pulse-type rotary encoder with pushbutton and 18t spline shaft (Component, AUD $3.00)
  • PCB-mount right-angle SMA socket (Component, AUD $3.00)
  • 16x2 Alphanumeric serial (I²C) LCD module with blue backlight (Component, AUD $12.50)
  • Firmware for the AM/FM/SW Single-Chip Digital Radio (Software, Free)
  • AM/FM/SW Single-Chip Digital Radio PCB pattern (PDF download) [CSE200902A] (Free)
  • Cutting diagrams and front panel artwork for the AM/FM/SW Single-Chip Digital Radio (PDF download) (Free)
Items relevant to "MiniHeart: A Miniature Heartbeat Simulator":
  • MiniHeart PCB [01109201] (AUD $5.00)
  • PIC12F617-I/P programmed for the MiniHeart [0110920A.HEX] (Programmed Microcontroller, AUD $10.00)
  • MiniHeart SMD parts (Component, AUD $7.50)
  • Firmware for the MiniHeart [01109201A.hex] (Software, Free)
  • MiniHeart PCB pattern (PDF download) [01109201] (Free)
  • Cutting diagrams and front panel artwork for the MiniHeart (PDF download) (Free)
Items relevant to "The Bass Block Subwoofer":
  • Cutting diagrams for the Bass Block (PDF download) (Panel Artwork, Free)
Items relevant to "Busy Loo Indicator":
  • Busy Loo Indicator PCB [16112201] (AUD $2.50)
  • Busy Loo Indicator PCB pattern (PDF download) [16112201] (Free)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)

Purchase a printed copy of this issue for $10.00.

For those times when you DON’T want to be interrupted . . . I’m busy. Go away! OK, it’s a bit tongue-in-cheek . . . but it could have other, more serious, uses. The Busy Dunny Door Warning flashes a bright LED light on the door when you, ahem, don’t want someone barging in. When you leave and open the door the light goes out! It’s a simple idea with a real simple circuit – but it makes a superb beginner’s project . . . T he idea for this little project came about when avid SILICON CHIP reader John Chappell was sitting, reading his latest copy . . . and the dunny door burst open, with obvious embarrasement all around. So maybe he had taken a bit longer than normal; maybe he was so engrossed in the magazine that he didn’t hear anyone yelling out . . . but it started him thinking how to avoid the delicate situation in the future. One problem was that the door lock, umm, didn’t. So without replacing the lock, how 78 Silicon Chip to let others know that the best seat in the house was, umm, occupied – without the embarrasement! Light bulb LED moment Of course, that was the answer: a bright, flashing LED that would let others know not to barge in. If it was made somewhat automatic – ie, it turned off when the outhouse door opened to let him out, so much the better. And this really simple circuit is the outcome. Original by John Chappell Australia’s electronics magazine When the pushbutton (S1) is pressed, both the LED mounted on the door and the internal LED start flashing. Why two LEDs? One is the ultrabright warning LED mounted on (or through) the dunny door to warn others that it is occupied. The second (internal) LED merely confirms that the circuit is operating. Overkill? Perhaps - but at the cost of a 10c LED and a 5c resistor, it doesn’t add much cost to the project. When the dunny door is opened, a magnetic reed switch resets the cirsiliconchip.com.au You’re looking at the entire project! On the left is a reed switch and magnet which turn the LED off when the door is opened. At right is the door-mounted ultrabright LED, while the internal LED in this case is integrated with the pushbutton “start” switch cuit and the LEDs turn off. It really is that simple! As we said earlier, it makes a great beginner’s project. Parts are as cheap as chips; it’s battery operated (and the battery will last for yonks) and it doesn’t use any of those pesky surfacemount devices that beginners have so much difficulty soldering. Total assembly time shouldn’t be much more than an hour. The circuit It’s shown in Fig.1 – and as you can see, there’s not much to it! It’s based on a 4093B CMOS quad 2-input Schmitt trigger NAND gate chip (IC1). Now if all those words scare you, don’t worry: see the panel “What is a NAND gate?” and all will be revealed. The four NAND gates are configured in different ways. IC1a is an inverter: when its inputs are low, the output is high (and vice versa). With the door closed, the magnet pulls the “normally open” reed switch closed, which in turn means IC1a’s inputs are both low – so the output is high. IC1b and IC1d form a latch with the inputs to IC1d normally high. Think of a latch just like a door latch: it’s normally at rest but needs someone to actuate it. In this case, when the push button siliconchip.com.au (“Start”) switch is pressed, the latch is reset by forcing pin 12 of IC1d low which forces the output, pin 11, high. This also enables IC1c, with its 47kΩ resistor and 10µF capacitor, to start oscillating, with its output going high and low at a rate set set by the time it takes the tantalum capacitor to charge and discharge – in this case the rate is about one second. As it goes low, the two LEDs connected in series between its pin 10 output and +9V become forward biased and therefore light up. Incidentally, you can change the flash rate by changing the resistor and/ or capacitor. Increasing either (or both) will slow the rate down and, as you would expect, decreasing will speed the rate up. When the door is opened, the reed switch opens (when the magnet moves away), IC1a inputs go positive because of the 100k resistor connected to 9V and the circuit reverts to its dormant state. Power The circuit is powered by a single 9V battery which, due to the intermittent drain, should last for almost as long as its shelf life. For the same reason, no on/off switch is provided or needed. (Of course, if you decide to read War and Peace during your “visits” you might not get quite that life). l l Fig.1: the circuit consists of one quad Schmitt NAND gate, designed to flash an ultrabright LED mounted on the door. It is actuated by S1, the “Start” switch and automatically turned off when the door is opened. Australia’s electronics magazine January 2021  79 Fig.2: the PCB component overlay will help you place the components in the right positions. Watch the polarity of IC1, the diode and LED and both of the capacitors. This PCB is different from the photo at right in that it has “extensions” on it to allow it to snap into place in the Jiffy box. These can be cut off if not needed. The battery snap leads can connect to a header set, or feed under the board and up through the hole at bottom left before soldering to their respective pads from the board top. This gives some strain relief to prevent the rather thin leads breaking off. A 1N4004 silicon diode is included in series with the battery to prevent damage if you try to connect the battery back-to-front (surprisingly easy to do!) A single 10µF capacitor bypasses (or filters) the 9V supply. While a tantalum capacitor is specified in the parts list, you will probably note from the photos that a standard 10µF 16V electrolytic was used. Either is fine – but the other 10µF capacitor (on pin8 of IC1c) should be a tantalum. Construction There are only ten components to solder to the PCB and only five of these are polarised: the 4093B IC, of course, the on-board LED, the 1N4004 diode and the two capacitors. Fit the resistors first – as well as reading the colour codes in the parts list, use your multimeter to confirm their value. In the case of the tantalum capaci- The PCB photo is reproduced larger than life size. It is of an early prototype and there are some differences between the overlay and this board – for example, S1 and LED1 are both housed in the same bezel (you can use this type or a separate LED and switch). Also in this case, the battery connector is “hard wired” to pads on the board and using the hole at lower left for strain relief. tors, the + marked on their body goes to the + mark on the PCB. (“Ordinary” electros have the – leg marked; this of course goes to the – mark on the PCB). Similarly, make sure the stripe on the diode aligns with the stripe on the PCB. Finally, note the notch on the end of the quad gate IC: it goes closest to the right edge of the board. The anode of the internal LED is the longer of the two leads – again, it goes to the “A” marked on the PCB. S1, the “start” switch, should be soldered direct to the PCB. The reed switch and external LED both connect via thin insulated wires to their respective screw terminals on the PCB (reed switch to CON1; LED to CON2). Watch the LED polarity – make sure the anode connects to the A marking on CON2. Before drilling the case and mounting the completed PCB, connect the 9V battery and check operation. Hold the door magnet close to the reed switch, then press S1. Both LEDs should start flashing; move the magnet away from the reed switch and they should stop flashing. If none of this happens, check your The battery snap wires are quite thin, so they go through a strain-relief hole in the PCB before soldering to their respective pads. As mentioned in the text, the capacitor at lower right is specified in the parts list as tantalum but here, a standard electro is adequate. The other capacitor (the yellow component) should be tantalum due to their lower leakage. 80 Silicon Chip Australia’s electronics magazine component placement, orientation and soldering. With so few components, there is very little else that could go wrong. If all else fails, measure the battery voltage when the circuit should be on. It should be at or very close to 9V. Mounting the PCB The board sits upside-down in the Parts List – Dunny Busy Warning 1 PCB, 38.5 x 49mm; code 16112201 1 UB5 Jiffy case, 83 x 54 x 31mm [eg, Jaycar HB6025] 1 reed switch set (reed switch & magnet - often sold for alarm systems – eg, Jaycar LA5027) 1 small momentary contact pushbutton switch (S1) # 2 mini PCB mount connectors 1 4093 quad Schmitt NAND gate (IC1) 1 1N4004 diode (D1) 1 ultrabright red LED [eg, Jaycar ZD0102] 1 standard red LED # Suitable mounting for internal and external LED 1 9V battery snap 1 9V battery Capacitors 2 10µF 16V tantalum Resistors (0.25W, 1%) 2 100kW (brown black yellow brown) 1 47kW (orange violet orange brown) 1 1kW (brown black red brown) # we used a pushbutton switch with an integrated LED; provision is made on the PCB for this or for separate switch and LED. siliconchip.com.au Fig.2: the PCB mounts upside-down in the case, held in place by the notches in the case edge. The component at left (on the red/black wires) is the ultrabright LED which mounts on the door. jiffy box – the board is designed to snap into the captive guides on the box sides. You’ll need to drill holes in the bottom of the case (which becomes the top!) for “start” switch (and internal LED). If the start switch is soldered directly to the PCB, you need to be quite accurate with the hole placement. Another hole is needed in the top of the case (which becomes the bottom!) for the wires to go off to the reed switch and to the door LED. Mounting the door hardware The exact location of the warning LED is entirely up to you – whatever gives the best visibility. That might be actually through the door . . . or it could be on the door jamb. A wide variety of LED bezels is available, some of which are designed to work through a door or jamb. Or you might simply glue the flat base of an ultrabright LED to the outside of the door, with a couple of fine holes for its leads/wires. The reed switch and its magnet need to be placed so that when the door is closed, the magnet comes very close to the reed switch (without hitting it!). It’s probably best to have the reed switch on the door jamb and the magnet on the door. What is a NAND gate? There are handy reed switch sets which come in plastic holders with screw holes, intended for alarm systems (eg, Jaycar LA5027). There are others which are intended for completely concealed mounting – the reed is recessed into the jamb and the magnet mounts inside the door. (eg Jaycar LA5075). Using it That is simplicity itself! When you go into the dunny, you press the momentary action (ie, normally open) “Start” switch (S1). This starts both LEDs flashing (the internal LED to assure you that you don’t have a flat battery). It stays that way until you open the door to leave. As the magnet moves away from the reed switch (S2) it opens, turning off the circuit, ready for the next occupant. The “automatic” reed switch turnoff is included because of the high likelihood that someone will forget to manually turn it off, resulting in a queue at the door of an unoccupied dunny! We could have made it fully automatic (ie, LEDs start flashing as soon as you entered) but deemed the extra complication not worthwhile. But for experimenters, it wouldn’t be hard SC to do. Two types of reed switch, both suitable for this application. The type at left (Jaycar LA5072) is designed for surface mounting (hence the mounting holes) while the type above (Jaycar LA5075) is fully concealed, mounting in holes drilled in a wooden door (or window) frame. There are two halves – the reed switch itself (on the right in both cases) and the actuating magnet. The switch is normally open, closing when the magnet is brought into close proximity. siliconchip.com.au Inside the 4093B chip there are four identical gates, each one operating completely independently of the others (but with a single power supply). That’s why it’s called a “quad”. First, we’ll look at an AND gate. Think of a gate as you would a gate in a fence. It can be either open or closed. With two gates, BOTH have to be in the same state, open or closed, to have any effect. With an AND gate, if both inputs are high, the output will be high. If either is low, the output will be low. That’s why it’s called an AND gate. But the 4093 has extra circuitry in each gate which “inverts” the output. So instead of both inputs going “high” resulting in a “high” at the output, both inputs going high result in a “low” at the output (and vice versa). This makes it a NAND gate, an abbreviation for NOT AND. The little circle at the gate output tells you that it is a NAND gate (an AND gate won’t have the circle). Australia’s electronics magazine Before we leave the AND/NAND gate, you’ll often see another type of simple gate, the OR/NOR. With this gate, as its name implies, either input – one OR the other – can be high to bring the output high. But if it’s a NOR gate, as distinct from an OR gate, the output will be inverted (just like the difference between NAND and AND gates). Finally, where does the “Schmitt Trigger” part come from? In most gates, the transition between the high and low states is fairly wide – it needs to be below a certain voltage to be low (close to 0V) and above a certain voltage to be high (much closer to the supply voltage). Voltages between the low and high states are not defined. However, this is often undesirable, so circuitry is included inside the gate which makes the transition from low to high or high to low much more defined due to hysteresis. This is called a Schmitt Trigger. January 2021  81