Silicon ChipSkill Tester 9000, Pt1 - April 2024 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Asking questions
  4. Feature: Becoming a Radio Amateur by Dr David Maddison, VK3DSM
  5. Project: Pico Gamer by Geoff Graham
  6. Project: Pico Digital Video Terminal, Pt2 by Tim Blythman
  7. Review: ROCK Model 4C+ SBC review by Tim Blythman
  8. Project: Skill Tester 9000, Pt1 by Phil Prosser
  9. Project: ESP32-CAM BackPack by Tim Blythman
  10. Product Showcase
  11. Project: Reference MEMS Microphones by Phil Prosser
  12. Serviceman's Log: Power tool batteries, part two: electric boogaloo by Dave Thompson
  13. Vintage Radio: Fender Bassman Guitar Amp by Brandon Speedie
  14. PartShop
  15. Subscriptions
  16. Market Centre
  17. Advertising Index
  18. Notes & Errata: Microphone Preamplifier, February 2024; Arduino DCC Controller, January 2020
  19. Outer Back Cover

This is only a preview of the April 2024 issue of Silicon Chip.

You can view 39 of the 104 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.

Items relevant to "Becoming a Radio Amateur":
  • Ham radio links (Software, Free)
Items relevant to "Pico Gamer":
  • Pico Gamer PCB [08104241] (AUD $10.00)
  • 3.2-inch TFT Touchscreen LCD module with SD card socket (Component, AUD $30.00)
  • Pico Gamer kit without case or battery (Component, AUD $85.00)
  • Pico Gamer kit with white case, no battery (Component, AUD $125.00)
  • Firmware for the Pico Gamer (Software, Free)
  • Pico Gamer PCB pattern (PDF download) [08104241] (Free)
Articles in this series:
  • Pico Digital Video Terminal (March 2024)
  • ETI BUNDLE (March 2024)
  • Pico Digital Video Terminal (March 2024)
  • ETI BUNDLE (March 2024)
  • Pico Digital Video Terminal, Pt2 (April 2024)
  • Pico Digital Video Terminal, Pt2 (April 2024)
Items relevant to "Skill Tester 9000, Pt1":
  • Skill Tester 9000 PCB [08101241] (AUD $15.00)
  • Skill Tester 9000 PCB pattern (PDF download) [08101241] (Free)
Articles in this series:
  • Skill Tester 9000, Pt1 (April 2024)
  • Skill Tester 9000, Pt1 (April 2024)
  • Skill Tester 9000, Part 2 (May 2024)
  • Skill Tester 9000, Part 2 (May 2024)
  • The Skill Tester 9000, part one (May 2025)
  • The Skill Tester 9000, part one (May 2025)
  • Skill Tester 9000, Part 2 (June 2025)
  • Skill Tester 9000, Part 2 (June 2025)
Items relevant to "ESP32-CAM BackPack":
  • ESP32-CAM BackPack PCB [07102241] (AUD $5.00)
  • 3.5-inch TFT Touchscreen LCD module with SD card socket (Component, AUD $35.00)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (Component, AUD $5.00)
  • ESP32-CAM LCD BackPack short-form kit (Component, AUD $42.50)
  • Firmware for the ESP32-CAM BackPack (Software, Free)
  • ESP32-CAM BackPack PCB pattern (PDF download) [07102241] (Free)
Items relevant to "Reference MEMS Microphones":
  • Calibrated Measurement Microphone PCB (SMD version) [01108231] (AUD $2.50)
  • Calibrated Measurement Microphone PCB (TH version) [01108232] (AUD $2.50)
  • Short-form kit for the Calibrated Microphone (SMD version) (Component, AUD $22.50)
  • Short-form kit for the Calibrated Microphone (TH version) (Component, AUD $25.00)
  • Simulation and calculation files for the Calibrated Measurement Microphone (Software, Free)
  • Calibrated Measurement Microphone PCB patterns (PDF download) [01108231/2] (Free)
Articles in this series:
  • Calibrated Measurement Mic (August 2023)
  • Calibrated Measurement Mic (August 2023)
  • Reference MEMS Microphones (April 2024)
  • Reference MEMS Microphones (April 2024)

Purchase a printed copy of this issue for $12.50.

Skill Tester 9000 Part 1 – by Phil Prosser This old-school dexterity tester has added lights, timers, countdowns, sounds, noises and competition between players! Plus, it has plenty of construction fun, and you can modify it to your heart’s content. Background image: https://unsplash.com/photos/gaming-room-with-arcade-machines-m3hn2Kn5Bns T his project reinvents that simple and fun game of skill where you need to navigate a loop of wire along a convoluted path without sounding a buzzer. That old game had no clear ‘win or lose’ scenario, nor did it add competitive factors such as time limits or measuring your speed against your friends. The buzzer version is easy to design, but how about we add more sounds than just the buzzer, making it more exciting to play? Enter the Skill Tester 9000! This project is all about fun mixed with a bit of learning. Younger builders can just solder parts to the PCB to get a working game, while more mature constructors can look into how the logic works and change the sounds by varying resistor and capacitor values. When considering how to design this game, the obvious answer in 2024 is to grab a microcontroller and write everything in software, including the game logic and sounds. That would result in a board with just a handful of parts and a loudspeaker, which would be small and cheap. The problem is 62 Silicon Chip that it is not that much fun, and constructors cannot easily tweak any aspect of the project. There’s also relatively little to learn from such a design unless you’re willing to delve into the source code. Responding to feedback for ‘less micro stuck on a board’ projects and seeking to give builders a test bed on which they experiment with some old-fashioned discrete logic, we decided to stick to commonly available 4000-series logic chips and discrete through-hole components. While there are a lot of parts to solder, it is easy to build overall and delivers that therapy of soldering a bunch of parts to a board. We also think the result is pretty cool in an old-school way. Given this implementation, there is little in this project that you cannot tweak. Maybe it is just me, but I find that fun. As can be seen from the photos, the Skill Tester 9000 has a complicated wire ‘maze’ that you need to run a hoop along without touching. We have just added a bunch of technology to make it more fun and competitive. When Australia's electronics magazine building it, you need to decide how dastardly you make the wire maze, which affects the difficulty factor. It’s powered by a 9V battery that gives decent runtime and avoids the need for plugpacks and the like. It is, of course, possible to use a 9V DC mains supply, and all the parts on the board can operate over a wide voltage range, so there is no need for regulation if you take that route. Given that this project is entirely made from parts that have been available for around 50 years, the following question came to mind: why hasn’t it been done already? I think the answer lies in the cost of materials, especially the PCB. This project would be impractical without a double-sided PCB and moderately thin traces. As recently as 10 years ago, the PCB cost would have been prohibitive. Designing the game Watching youngsters play modern games, a few themes became apparent. • The games are competitive. • They often incorporate difficulty levels. siliconchip.com.au Fig.1: this simplified version of the game logic shows how it broadly works. The game starts after the circuit is reset and is won if the Win Pad is touched before either Lose condition is met (out of Time or out of Health from touching the wire). Sounds are produced for each time tick, if the wire is touched (and Health is lost), if the game is won and if the game is lost. • Characters ‘take hits’ and lose health; if this runs out, they lose. • The games have a sense of urgency, often in the form of time limits. • Sound plays a big role; we want to hear things like time passing, an alarm if the wire is touched, a distinctive tune for winning and a depressing tune for running out of time or losing all your health. We decided to use 4000-series CMOS logic to implement these functions, which is both cheap and widely available. We can do that as follows. Health is a commodity that starts full and is reduced each time the player touches the wire. A logic block must detect if the wire is being touched and determine the duration. We do this using a 4017 decade counter that we can ‘clock’ at a slow, medium or fast rate to implement three difficulty levels. That determines how long you can touch the wire before you run out of health and lose. To win, the player must navigate the course within a set Time. This is implemented in a logic block comprising a clock source, a 4026 digital counter and a 7-segment decoder. The clock speed for this counter can also be varied to determine how quickly you need to traverse the game to win. siliconchip.com.au Winning is pretty important. We have added a pad at the end of the course that the player must touch. This stops the timer and health counter, and if you have health and time left, it will play a victory song. The majority of the circuit components are to track health and time, determine the winning and losing conditions, and play the various sounds. Sounds are triggered if health is reduced as time passes and if the player wins or loses. While these parts all interact, they can be analysed as standalone blocks. Melodic sounds are better than a simple buzzer. We have taken a couple of approaches here, illustrating a few concepts we have seen over the years. The ‘touch’ sound uses a couple of logic-­based oscillators to make a twotone siren noise. This is implemented using Schmitt-trigger NAND gates and a few discrete parts. We have tweaked this to make it a nasty, alarming sound. The Tick sound for time passing is derived from the overall game timer and uses a similar siren circuit, but adds a very simple circuit to ‘shape’ the sound into a fast attack and slow decay. We have tweaked this to make the tick less of an alarm but still add urgency to the game. For the Win sound, we have used a Australia's electronics magazine circuit that allows us to play 10 notes, each at an independent frequency. This amounts to a clock circuit that defines each note length and a 4017 decade counter that changes the resistance in a 555 astable oscillator circuit. After each clock pulse, the resistor in series with the respective 4017 output sets the frequency of the 555, allowing us to program a 10-note tune by choosing those resistor values. The Lose tune is precisely the same circuit as Win, but we have set the resistors to make a sad tune rather than a happy one. Those of you with more musical sense than us may disagree with the tunes we have set – all you need to do to make your own is fiddle with these resistor values! Adding a diode would allow you to change the tune length if you want to; we will leave that to you. The resulting game logic is shown in the simplified block diagram, Fig.1. It performs the following tasks. • When the game is reset, the Time counter starts running, and the Health counter is reset to full. It is ready to play. • A ticking sound is made each time the Time counter is reduced. • During the game, touching the wire decreases your health and makes a noise. April 2024  63 Fig.2: this half of the circuit diagram includes all the game logic. Three identical debouncing sections are provided for each input (all at upper left), while the State Machine Registers section in the middle keeps track of the game state. The remaining sections implement the health counter, the time clock and some debugging LEDs. • If you reach the wire’s end and touch the Win pad before the time or health run out, the system goes into the Win state. It plays a happy song, and the Win LED latches on. • If the time or health hit zero before you touch the Win pad, the system 64 Silicon Chip goes into the Lose state. It plays a sad song, and the Lose LED latches on. The Win state can no longer be triggered until a new game is started. • In the Win or Lose state, the Time counter stops so you can see how fast you did it and the Health counter stops Australia's electronics magazine so you can see how much health you had left. • Pressing Reset starts another game. The Reset button is best as a pad at the start of the wire rather than a separate button. That way, you’re ready siliconchip.com.au can see each part of the circuit operate without the whole thing having to be complete and operational in one hit. That’s especially good for those with shorter attention spans. We have used a range of coloured LEDs on the health bar, starting with green and then going to yellow, orange and red as the Health bar runs down. After all, sound and colour communicate good and bad well, creating excitement, which matters in a game like this. Circuit details to go as soon as you start the game. Implementation This is intended to be a fun project that allows people to build and play with one another, show off some oldschool logic, and let people see how it works. Thus, the entire game is built on one PCB that houses the battery and speaker. It can be screwed to the board siliconchip.com.au that holds the Skill Tester 9000 wire. All solder pads have been made as large as practical and with good spacing so that younger people can build it successfully. There are quite a few bits, but you will note that, for example, all bar one of the diodes are the 1N4148 type that’s dead easy to solder. We have incorporated a lot of extra LEDs that show the system states so we Australia's electronics magazine The game is controlled by three key latches: Win, Time Lose and Health Lose. If implemented in software, it could be done as a classic state machine. The states have been simplified to a reset state and the three win/lose states to keep the parts count manageable. We use three D-type flip-flops to store the state of the game. After Reset has been asserted, the Win, Time Lose and Health Lose latches are all cleared to 0, and the game runs. The game continues until one of these latches is set; then, the game stops. While a flip-flop is technically not identical to a latch, they are similar, so we can consider them equivalent here. IC4a, IC4b and IC7a are the flipflops that store those states. These are 4013 D-Type flip-flops, part of the 4000 series of logic that came out in 1968, still widely available and used today. A flip-flop stores a single bit of data, where the Q and Q outputs represent the value stored. (Q is the inverse of Q; 1 instead of 0 or 0 instead of 1). The bar over the name means it is active low, or the inverse of the plain signal name. The device has data (D), set (S) and reset (R) inputs. The logic value present at the D input is stored in the flip-flop when the clock (CLK) signal transitions from low to high and then appears on the Q output. This only happens on the rising edge for most flip-flops, which is very important in digital design. The fact that data is only latched on the clock rising edge allows digital designers to work out all the delays in their system to ensure that the D input level is stable before the clock edge, or else things would go haywire. The set and reset pins on these ICs allow these latches to be set to one or cleared to zero asynchronously (ignoring the April 2024  65 clock input). That means these flipflops can also act like latches. Thankfully, our clock rates are 1-20Hz, about a billion times slower than your PC and a million times slower than the 4000 series logic can handle. However, the principle of latching and storing our few bits of data still applies. Our control logic is shown in the “state machine registers” section of the first part of the circuit diagram, Fig.2. Yes, this game is truly asynchronous! When the Reset line is high, all the latches are reset (the counters are also reset, but we’ll get to that later). When Reset goes low again, all three flip-flops have Q=0, and diodes D9, D7 and D12 ‘OR’ these signals together, producing a 0 on the Win Lose Latch line, starting the game. That line remains low until one of the flip-flop Q outputs goes high, at which point Win Lose Latch goes high. That means the game ends, and the counters stop, whether the player won or lost. The associated 4017 or 4026 counter IC will overflow if either time or health runs out. When this occurs, they have a carry-out (Co) pin that goes from low to high. That is connected to the clock input of our D-type flip-flop, which you will recall will clock the data on the D input to the Q output on the rising edge of the clock. So, if you run out of health or time, the Health Lose or Time Lose signal will go high. Our D-type flip-flops have a convenient Q inverted output, which is high when the game starts, and we can use AND gates to enable the Win input signal using IC5a and IC5b. When one of the Time Lose or Health Lose outputs goes high, the respective Q output goes low. That disables the input to the Win flip-flop, so you can no longer win the game until it is reset. If the player touches the Win pad at the end of the course, that generates a high Win signal that is ANDed with Time Lose and then Health Lose. The resulting signal drives the clock input of the Win flip-flop, causing its Q output (Win Latch) to go high. Once one of the latches is triggered, the only way for the system to become active again is for Reset to be touched, which resets the system to its initial state. Now that we know how the game control works, let’s look at how the timers and sound generation work. Each section is quite self-contained and generally is either triggered by a state or enabled by an event such as a clock tick. Sound generators The completed PCB of the Skill Tester 9000. We recommend you assemble the PCB in sections as shown on the silkscreen. The sound-generating part of the circuit is shown in Fig.3 (see overleaf). Together with Fig.2, these two diagrams show the complete circuit of the game. That’s except for the wand, wire, reset (start) and win pads, which connect to the terminals of CON2, CON3 & CON4; as shown in Fig.4. The touch sound generator is a classic CMOS logic sound circuit using two oscillators. The pin 1 input of NAND gate IC15a is tied to the positive rail (logic high), so the gate acts as an inverter, with pin 2 being the input (we could get the same effect by tying the two input pins together). The output goes back to the input through a resistor, and the input has a capacitor to ground, creating an RC (resistor/capacitor) oscillator. We use a NAND gate here because we have a Schmitt trigger input NAND gate IC, with positive-going and negative-­going input voltage thresholds about 1V apart. The voltage difference or ‘hysteresis’ is needed for it to oscillate when we apply feedback. To put it another way, let’s say the voltage at the input is increasing from 0V, and at 5V, the output switches low. The input voltage then starts to decrease, but it has to drop to 4V before the output will go high again. The resistor and capacitor values and hysteresis voltage combine to determine the oscillation frequency. So, with the 470kW resistor and 1μF capacitor, IC15a oscillates at about 1Hz. Its output produces a square wave that switches between 0V and Vdd (about 9V), which feeds pin 6 of IC15b. IC15b is also configured as an oscillator, and the time it takes to charge or discharge the 10nF capacitor to its threshold voltage depends on whether the output of IC15a is high or low. In this way, IC15a causes IC15b to oscillate at alternating frequencies (like a siren). The output of IC15b is gated by AND gate IC5d, controlled by the outputs of the three state latches and the touch Australia's electronics magazine siliconchip.com.au 66 Silicon Chip buffer. When the player touches the loop on the wire, the Touch line goes high, allowing the signal from oscillator IC15b to pass through to pin 11 of IC5d and the Touch Sound Out line. However, we only want touching the wire to produce a sound if the game has yet to be won or lost. Thus, if the game is in the Win state or one of the Lose states, the Touch line cannot pull pin 13 of IC5d high via the resistor because the Win or Lose latch is holding pin 13 of IC5d low via the associated diode. The resistor and diodes create a crude but effective four-input AND gate (Touch AND Win Latch AND Time Lose AND Health Lose). Parts List – Skill Tester 9000 How do we make a tune using 4000-series logic? Some may say that “tune” is generous. Others might think this is pretty cool. I find it amazing that parts like the 4000-series logic chips and 555 timers are half a century old and still in use. 1 double-sided PCB coded 08101241, 174 × 177mm 1 0.5in (12.7mm) common-cathode 7-segment LED display (DS1) [Altronics Z0190 (red) or Jaycar ZD1855 (red)] 1 PCB-mounting vertical SPDT regular (on-on) toggle switch (S1) [Altronics S1315] 2 PCB-mounting vertical SPDT centre-off (on-off-on) toggle switches (S2, S3) [Altronics S1332] 1 PCB-mounting 9V battery holder (CON1) [Altronics S5048, Jaycar PH9235] 1 9V battery (alkaline recommended) 1 57mm 8W loudspeaker [Altronics C0610, Jaycar AS3000] 3 2-way mini terminal blocks, 3.5mm pitch (CON2-CON4) [Altronics P2028] 1 2-way mini terminal block, 5/5.08mm pitch (CON6) 4 16-pin DIL IC sockets (optional) 6 14-pin DIL IC sockets (optional) 5 8-pin DIL IC sockets (optional) Hardware, wire etc 1 500 × 200mm × 12mm (approximately) timber baseplate 4 M3 × 16-25mm panhead machine screws (depending on baseplate thickness) 4 M3 × 6mm panhead machine screws 8 M3 shakeproof washers 8 M3 × 20mm tapped spacers 4 5mm or 3/16in × 30mm gutter bolts 8 5mm or 3/16in hex nuts 8 5mm or 3/16in flat washers 1 1m length of 2mm diameter steel wire (eg, from a coathanger) 4 1m lengths of heavy-duty hookup wire (eg, red, black, blue & yellow) 1 1m length of super-flexible silicone-insulated cable (for the wand) 1 1m length of 1mm diameter tinned copper wire 4 50mm lengths of 4mm diameter heatshrink tubing 4 ring or fork crimp lugs (to connect wires to the board) [Altronics H2051B, H2058B] 4 stick-on rubber feet [Altronics H0940] 1 small tube of superglue Semiconductors 1 4026B CMOS decade counter/divider, DIP-16 (IC1) 4 555 timers, DIP-8 (IC2, IC6, IC9, IC14) 3 4017B decade counter/divider, DIP-16 (IC3, IC8, IC13) 3 4013B dual D-type flip-flops, DIP-14 (IC4, IC7, IC12) 1 4081B quad 2-input AND gate, DIP-14 (IC5) 1 LM386N 1.25W mono audio power amplifier, DIP-8 (IC11) 2 4093B quad 2-input Schmitt-trigger NAND gates, DIP-14 (IC15, IC17) 4 green 5mm LEDs (LED1-LED4) 2 yellow 5mm LEDs (LED5, LED6) 2 amber/orange 5mm LEDs (LED7, LED8) 9 red 5mm LEDs (LED9-LED17) 55 1N4148 or 1N914 diodes (D1-D50, D52-D56) 1 1N5819 40V 1A schottky diode (D51) Capacitors 1 470μF 16V radial electrolytic 1 220μF 16V radial electrolytic 1 22μF 50V radial electrolytic 6 10μF 50V radial electrolytic 2 1μF 50V radial electrolytic 1 1μF 63V MKT 2 470nF 63V MKT 2 330nF 63V MKT 23 100nF 50V multi-layer ceramic 1 47nF 63V MKT 1 33nF 63V MKT 1 10nF 63V MKT 1 4.7nF 63V MKT Resistors (all 1/4W 1% unless noted) 2 680kW 5 220kW 6 56kW 1 22kW 30 1kW 2 470kW 3 120kW 2 27kW 3 18kW 1 10W 5 270kW 3 100kW 4 24kW 16 10kW siliconchip.com.au Australia's electronics magazine The ticking sound The Skill Tester 9000 makes a ticking noise every time the timer value decreases, from the initial value of zero until it reaches the terminal count of nine, and the game is lost. The circuit to generate the ticking noise is similar to that for Touch. While the Touch noise is supposed to be ‘angry’, we want the tick to create a sense of urgency and doom, but with just a little hope of finishing! The siren oscillator circuit, based around IC15c and IC15d, is the same but set for higher frequencies. We have added an amplitude modulator based on the components between output pin 10 of IC5c and the Tick Out line, which softens the sound somewhat. In a sense, this is a poor person’s voltage-controlled attenuator, so very much in the spirit of this project! It works as follows. Each time the Trigger line goes high, the two capacitors form a capacitive voltage divider, bringing the cathode of D47 to about half the supply rail voltage. This voltage decays as the capacitor discharges via the 10kW resistor to GND, or both 10kW resistors if pin 11 of IC15d is low. The result is a fast rise time with a slow, exponential falloff. In this way, the ‘tick’ pulses on the Time CLK line amplitude modulate the ~20Hz waveform from the IC15c/d oscillator. Winning and losing songs April 2024  67 68 Silicon Chip Australia's electronics magazine siliconchip.com.au Fig.3: the remainder of the circuit is dedicated to producing the various sounds. The Win song generator (top left) and Lose song generator (below) are similar but use different resistor values to produce different tunes. The touch siren and time tick sections are shown below those, and the output of the four sound generators are mixed using diodes, feeding power amplifier IC11 to drive the speaker. siliconchip.com.au Australia's electronics magazine April 2024  69 Fig.4: this diagram (reproduced from the article next month) shows how the Touch, Reset and Win terminals (CON2-CON4) connect to the wand, game wire and start and finish pads. Note that the ground wire going to the wand can connect to the lower screw of any of the three terminals. Fundamentally, the tunes are generated by a 555 timer set up in an astable oscillator configuration. That’s a fancy way of saying “free running”. The frequency of operation is defined as f = 1 ÷ (C × [Ra + 2 × Rb]). In our circuit, Ra = 1kW, C = 100nF and Rb is the resistance in series with the diodes from the 4017B (IC8 after winning or IC13 after losing). As the 4017B IC counts from 0 to 9, only one of its Q output pins is high at a time. The high output becomes the charging source for the 100nF capacitor in the 555 timer circuit, and the series diodes stop the other resistors from loading this down. This means we can set 10 different frequencies that the 555 oscillates at in sequence to make notes in our tune. The clocks for the 4017 that set the note pace/duration come from the sequence clock, another simple Schmitt-trigger oscillator based on IC17d. The 4017 ICs will count from 0 to 9 and then back to 0, repeating forever if we don’t stop them. To stop the tune after the 10th note, we use an extra flip-flop per 4017 IC, triggered by the 4017’s carry output. When triggered, the flip-flop latches the reset input of the 4017 and the RESET input of the corresponding 555 oscillator (they are different). After being reset, the Q output of the flip-flop (IC7b or IC12a) is high and the Q output is low. This holds both the 70 Silicon Chip 4017 and 555 in reset, so they are initialised but doing nothing. When the Win Latch or one of the Lose latches goes high, that clocks the WinSong or LoseSong flip-flop, taking the 4017 and 555 out of reset, and they start playing the 10 notes. The 4017’s carry output (CO) goes low after five notes and goes high again after 10. By combining these carry-out signals through two diodes, which are pulled high by 10kW resistors, we can use the carry-out lines from both 4017 counters to trigger End Of Tune as it is that final rising edge that the D-type flip-flop uses. This End Of Tune signal resets the WinSong and LoseSong flip-flops, putting both the 4017 and 555 ICs back into reset, thus stopping the tune. If you analyse the circuit, you will see two 10kW resistors that do nothing in regular operation, at the reset and RESET inputs of the 4017 and 555, respectively. We have included these so we can test the circuit before all parts have been mounted on the board; the final controller chips are added at the last stage. The timer To limit the game time, we are using a 4026 decade counter that can drive a 7-segment LED display. To minimise the parts count, we simply use unbuffered series resistors for the LEDs, which achieves good brightness but will cause reduced output Australia's electronics magazine voltage from the 4026 due to loading the CMOS outputs. The 4026 IC needs a clock, which we generate using a 555. This allows us to switch in different timing capacitors to make slow, medium and fast difficulty levels. The clock rate is about 1.5Hz on the quickest setting, giving a total of six seconds. On the slowest settings, each count is a little under 4 seconds, for a total of around 30 seconds. If you wish to change these speeds, you can change the values of the 10μF & 22μF capacitors. The Timer clock is cleared by the system reset line, ensuring that at the start of each game, the timer starts at 0. The Clock Enable input is driven by our combined Win Lose Latch signal that goes high if any of the Win, Time Lose or Health Lose latches goes high. This way, if the game ends for any reason, this timer stops. The only output from this circuit is the carry-out signal from the 4026, which in our circuit is labelled Out Of Time. This drives the clock input to the Time Lose latch; the rising edge of this ends the game. Health The ‘health’ status in games is usually a bargraph that goes from green to red. We use the now-familiar 4017 decade counter IC for this (IC3). In this case, we have connected LEDs to its output rather than clocking it to make a tune. That allows us to get creative with the LED colours. The 4017 is not intended to drive LEDs, but it does OK, provided you don’t want the 4017 outputs to drive other CMOS logic reliably, as the voltages will droop. The health counter is implemented like a hit counter. The longer you touch the wire, the more hits you take. We have implemented this by using the Touch input to enable a 555 timer. With that input low, the 555 (IC2) is in reset and produces no output pulses. While the Touch line is high, the 555 oscillator runs free. The output of the 555 drives the clock input to the 4017 counter. After either 10 touches or a time period long enough for 10 counts of the 555, the hit counter reaches zero health and Carry Out goes high. The remainder of the logic around this is identical to the Time counter. In this case, we have set the clock rate for the 555 to a much faster pace. siliconchip.com.au With the same 10kW and 100kW resistors for Rb and Ra, the slow count rate is set by a 1μF capacitor in parallel with a 33nF capacitor, resulting in 6.6Hz, allowing about 1.5 seconds of touch. The fast count runs at about 150Hz, so pretty much any touch ends the game. You can change these capacitor values. If you want to use electrolytics in these locations, you can; we have marked the “+” end of each on the silkscreen. The selection of LED colours warranted some discussion with my helper. The advice is that it definitely starts with green and ends with red. In between are as many colours as you can get a hold of. We have recommended using red, amber, yellow and green in the parts list. You can tweak the series resistor values if some are too bright or dim. Audio output The audio output section has a mixer/combiner implemented using more 1N4148 diodes. The output is pulled to ground with a 10kW resistor, then capacitively coupled to the LM386 amplifier. Its gain has been set to produce a generous sound level. Note that this diode mixer only works because we are combining digital signals. This circuit takes lo-fi to new levels! If you want to reduce the volume, we suggest adding a series resistor for the loudspeaker. 100W 1W would be a good place to start. To keep assembly simple, we have put a cutout on the PCB that will accept a 57mm speaker, which can be glued in place with super glue, Araldite or whatever comes to hand. Input debouncing Earlier on, we skipped over some of the details of how we detect touches on different parts of the wire in favour of explaining the game logic. The Win, Touch and Reset inputs have identical debounce circuits. When a switch closes, it is never perfect, and the connection ‘bounces’ for a few milliseconds. Many digital circuits are so fast that such bouncing can interfere with their operation. In each case, our input starts with a 1kW series resistor and normally reverse-biased diodes to ground and Vdd. This protects the circuit from static, which we expect will be present with enthusiastic hands and feet on the carpet. The inputs have a 56kW pull-up resistor and a 470nF capacitor to GND, which gives a time constant of 26ms. The arrangement of two 56kW resistors makes it roughly the same for rise and fall. This signal feeds a Schmitt-trigger input buffer, adding further immunity to bounce through its ~1V input hysteresis. The output of the Schmitt triggers goes to the game control logic and debugging LEDs, which let you see that these inputs are working. Next month Next month’s second and final article in this series will give all the construction details, including the PCB overlay diagram and how to make the wire and attach everything to the baseplate. Importantly, PCB construction is broken up into stages, and you can test new functions at the end of each stage. We’ll also have some hints on troubleshooting and how to play the game, SC including tournament rules. Silicon Chip as PDFs on USB ¯ A treasure trove of Silicon Chip magazines on a 32GB custom-made USB. ¯ Each USB is filled with a set of issues as PDFs – fully searchable and with a separate index – you just need a PDF viewer. ¯ 10% off your order (not including postage cost) if you are currently subscribed to the magazine. ¯ Receive an extra discount If you already own digital copies of the magazine (in the block you are ordering). The USB also comes with its own case EACH BLOCK OF ISSUES COSTS $100 OR PAY $500 FOR ALL SIX (+POSTAGE) NOVEMBER 1987 – DECEMBER 1994 JANUARY 1995 – DECEMBER 1999 JANUARY 2000 – DECEMBER 2004 JANUARY 2005 – DECEMBER 2009 JANUARY 2010 – DECEMBER 2014 JANUARY 2015 – DECEMBER 2019 WWW.SILICONCHIP.COM.AU/SHOP/DIGITAL_PDFS Ordering the USB also provides you with download access for the relevant PDFs, once your order has been processed siliconchip.com.au Australia's electronics magazine April 2024  71