Silicon ChipSilicon Chirp - the pet cricket - April 2024 SILICON CHIP
  1. Contents: FLOWCODE
  2. Subscriptions
  3. Back Issues
  4. Publisher's Letter: Welcome to the future
  5. Feature: Techno Talk - Wait! What? Really? by Max the Magnificent
  6. Feature: Net Work by Alan Winstanley
  7. Project: Basic RF Signal Generator by Charles Kosina
  8. Project: Swiss Army Knife by Richard Palmer
  9. Project: Silicon Chirp - the pet cricket by John Clarke
  10. Project: Teach-In 2024 by Mike Tooley
  11. Feature: Circuit Surgery by Ian Bell
  12. Feature: Max’s Cool Beans by Max the Magnificent
  13. Project: AUDIO OUT by Jake Rothman
  14. PartShop
  15. Advertising Index: Peak Test Instruments
  16. Back Issues

This is only a preview of the April 2024 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)
Articles in this series:
  • Win a Microchip Explorer 8 Development Kit (April 2024)
  • Net Work (May 2024)
  • Net Work (June 2024)
  • Net Work (July 2024)
  • Net Work (August 2024)
  • Net Work (September 2024)
  • Net Work (October 2024)
  • Net Work (November 2024)
  • Net Work (December 2024)
  • Net Work (January 2025)
  • Net Work (February 2025)
  • Net Work (March 2025)
  • Net Work (April 2025)
Articles in this series:
  • Teach-In 2024 (April 2024)
  • Teach-In 2024 (May 2024)
  • Teach-In 2024 – Learn electronics with the ESP32 (June 2024)
  • Teach-In 2024 – Learn electronics with the ESP32 (July 2024)
  • Teach-In 2024 – Learn electronics with the ESP32 (August 2024)
  • Teach-In 2024 – Learn electronics with the ESP32 (September 2024)
  • Teach-In 2024 – Learn electronics with the ESP32 (October 2024)
  • Teach-In 2024 – Learn electronics with the ESP32 (November 2024)
Articles in this series:
  • Circuit Surgery (April 2024)
  • STEWART OF READING (April 2024)
  • Circuit Surgery (May 2024)
  • Circuit Surgery (June 2024)
  • Circuit Surgery (July 2024)
  • Circuit Surgery (August 2024)
  • Circuit Surgery (September 2024)
  • Circuit Surgery (October 2024)
  • Circuit Surgery (November 2024)
  • Circuit Surgery (December 2024)
  • Circuit Surgery (January 2025)
  • Circuit Surgery (February 2025)
  • Circuit Surgery (March 2025)
  • Circuit Surgery (April 2025)
  • Circuit Surgery (May 2025)
  • Circuit Surgery (June 2025)
Articles in this series:
  • Max’s Cool Beans (April 2024)
  • Max’s Cool Beans (May 2024)
  • Max’s Cool Beans (June 2024)
  • Max’s Cool Beans (July 2024)
  • Max’s Cool Beans (August 2024)
  • Max’s Cool Beans (September 2024)
  • Max’s Cool Beans (October 2024)
  • Max’s Cool Beans (November 2024)
  • Max’s Cool Beans (December 2024)
Articles in this series:
  • Audio Out (January 2024)
  • Audio Out (February 2024)
  • AUDIO OUT (April 2024)
  • Audio Out (May 2024)
  • Audio Out (June 2024)
  • Audio Out (July 2024)
  • Audio Out (August 2024)
  • Audio Out (September 2024)
  • Audio Out (October 2024)
  • Audio Out (March 2025)
  • Audio Out (April 2025)
  • Audio Out (May 2025)
  • Audio Out (June 2025)
Articles in this series:
  • Circuit Surgery (April 2024)
  • STEWART OF READING (April 2024)
  • Circuit Surgery (May 2024)
  • Circuit Surgery (June 2024)
  • Circuit Surgery (July 2024)
  • Circuit Surgery (August 2024)
  • Circuit Surgery (September 2024)
  • Circuit Surgery (October 2024)
  • Circuit Surgery (November 2024)
  • Circuit Surgery (December 2024)
  • Circuit Surgery (January 2025)
  • Circuit Surgery (February 2025)
  • Circuit Surgery (March 2025)
  • Circuit Surgery (April 2025)
  • Circuit Surgery (May 2025)
  • Circuit Surgery (June 2025)
Silicon Chirp the pet cricket By John Clarke This pet cricket will keep you company; it only needs to be fed occasionally and won’t run away. Keep it for yourself or play a prank on a family member or friend by hiding it in their room. When they switch the lights off, they will get a bit of a surprise! C rickets, frogs and canaries tend to be organic, made from tried-and-tested construction materials such as DNA and proteins. Until now, that is. Silicon Chirp, the electronic cricket, sounds like a real cricket. Not only is this project fun, it totally (and unexpectedly for a cricket) mimics frog and canary sounds. With very few parts, it is easy and fun to build. Silicon Chirp loves to sing in the dark and happily chirps away, much to the annoyance of others. When disturbed by light, (s)he ceases, thus hiding its whereabouts until darkness falls again. But (s)he does not immediately begin to chirp again when darkness falls. That could take up to 40 seconds. And as you enjoy the peace and when all thoughts of an annoying cricket drift away...chirping starts. And so begins the hunt for that pesky critter. Catching its glinting eyes in the dark, you are faced with a predicament: remain petrified and unable to move, or face that terrifying sight! When the novelty of cricket sounds wears off, it can be changed to a frog, croaking in the dark. Or, for something completely different, change the sound to a singing canary to brighten your day. Why call this critter Silicon Chirp? The name comes from the fact that the workings to produce the cricket sound are based upon silicon DNA. Also, it produces a chirping sound. Hence the name: Silicon Chirp. As mentioned, Silicon Chirp can produce the sound of a frog or canaries and, of course, a cricket shape is inappropriate when making these alternative sounds. We considered having three separate PCBs with different shapes, but swapping parts from one board to the other seemed like overkill. Then again, the Bower Bird still looks like a bird, even when making sounds like a chainsaw or a car alarm. So, this cricket is a keen ventriloquist, mimicking the sounds of other animals while remaining in the cricket shape. It’s so talented that Features and Specifications ] Looks and sounds like a cricket ] Also has the option to produce frog or canary sounds ] Flashing red eyes ] Can be set to only operate in the dark (or light, in canary mode) ] Low current draw from 3V lithium coin cell ] Current draw: 0.4μA while dormant, 0.48-1.7mA during chirps 34 its legs and mouth don’t even move while making those sounds! You could place a frog or bird toy near Silicon Chirp to make the ventriloquism seem all the more real. For the cricket, most components are mounted on Silicon Chirp’s back, with its eyes being 3mm red LEDs. The piezo transducer that produces the sounds is slung under the PCB abdomen. Six legs are fashioned from thick 1.25mm copper wire, while the two antennae and ovipositor (tail) are made from a thinner gauge wire. Cricket sounds Crickets produce their iconic chirping sounds by rubbing a coarse section of one wing against a scraper on the other. This process is called ‘stridulation’; it’s a bit like running a stick along a picket fence or old-fashioned washboard. Typically, the sound a cricket produces comprises three closely spaced chirps, followed by a longer gap, then another three and so on (ie, they have a particular pattern or cadence). A typical cricket chirp comprises four bursts of a 4kHz tone, each lasting for around 50ms. The spacing between each chirp is also about 50ms, while the separation between each triplet is around 250ms. These periods are not precise and do vary a little. However, the tone of the chirp does not appear to vary by any noticeable degree. Practical Electronics | April | 2024 Scope 1: cricket-like chirping is simulated by driving the piezo with groups of three signal bursts spaced apart by around 20ms. These groups have much longer silent periods in between them. Silicon Chirp follows the same pattern, with triplets of 4kHz bursts, each separated by a longer gap. However, we found that driving a piezo transducer with three 20ms bursts at 4kHz and with 20ms gaps between them produced the most authentic cricket sound, even though the 20ms periods are different from that of an actual cricket. The screen grab in Scope 1 shows the Silicon Chirp’s cadence as measured by an oscilloscope. To act like a real cricket, the chirp rate must vary slightly rather than being at precise intervals. So Silicon Chirp’s chirping periods vary randomly over a limited range. In other words, they aren’t always exactly 20ms long or spaced apart by precisely 20ms. The variations in the periods provide a more natural cadence and help prevent the simulated cricket chirp from sounding fake or artificial. Frog sounds are produced similarly but with a different cadence to the cricket. For Silicon Chirp, frog sounds comprise a set of 10 chirps, 10ms long with 2ms gaps. This is followed by a 30ms gap and then another set of three chirps. The ten and three groups are separated by a delay of 200-1200ms that varies irregularly. The frequency of the chirps is set at around 2kHz. The canary sounds have been divided into three types, designated A, B and C. Song A sounds like a typical canary, while Song B simulates a Fife canary. Song C is a selection that comprises various single phrases produced by these birds. The canary sings at random. Each song is repeated between two and 27 times with a 2.4 to 17-second gap Practical Electronics | April | 2024 Scope 2: a close-up of the drive to the piezo, showing how the 3V peak-to-peak square wave signals from the RA0 and RA1 outputs (yellow and cyan traces) combine to produce a 6V peak-to-peak square wave across the transducer (red trace). between them. There is an extended gap between each series of repeated songs, between 80 seconds and nine minutes. Like the cricket and frog, the bird songs are produced by varying the frequency, volume and length of bursts of pulse trains applied to the piezo. The sound volume is varied by changing the pulse width of the signals applied to the piezo transducers. Narrow pulses generate a lower volume, while the wider pulses make more sound. The maximum (loudest) pulse width equates to a duty cycle of 50%. Each chirp starts at the minimum pulse width, increasing to the required volume level over time. Similarly, the pulse width is reduced to zero over a short interval when a chirp or tweet is about to end. This avoids clicks from the piezo transducers, which would otherwise spoil the effect. Unlike crickets and frogs, which tend to make noise when it’s dark, bird sounds occur mainly when it is light. So the light/dark detection is inverted for the canary. Circuit description The complete Silicon Chirp circuit is shown in Fig.1. It’s based around microcontroller IC1, a PIC16F15214-I/SN, powered by a 3V lithium cell, switched via slide switch S1. IC1 does not draw much current, typically only about 400nA while it is dormant. This rises to between around 480μA to 1.7mA while making a noise. Diode D1 is included as a safety measure to prevent damage to IC1 should the cell be inserted incorrectly. The correct polarity is with the positive side up, but the cell The underside of Silicon Chirp, showing the large piezo transducer. Feel free to customise the board to suit your taste. Note the on/off slide switch near the ‘tail’. 35 holder will accept the cell in either possible orientation. With the positive side down, the cell will be shorted out by contact with the sides and top spring contacts. However, during insertion, there could be a brief period when there is no contact with the cell holder sides, so the circuit could be supplied with a reversed voltage polarity that could damage IC1. Diode D1 clamps any reverse voltage to a low level. The cell will lose some capacity if left connected in reverse for more than a few seconds, but that’s better than damaging the IC. IC1’s power supply is bypassed with a 100nF capacitor and runs using its internal 4MHz oscillator. When dormant, this oscillator is shut down (ie, in ‘sleep mode’) to save power. A ‘watchdog’ timer starts running to wake IC1 periodically (at approximately four-second intervals). During this period, the current consumption is typically less than 1µA. During the waking period, IC1 checks the ambient light level on the light-dependent resistor, LDR1. Most of the time, the RA5 output (pin 2) of IC1 is set high (3V), so there is no current flow through the 470kW resistor and the LDR to minimise the current drain. When IC1 is awake, it sets the RA5 output low (0V) and the LDR forms a voltage divider with the 470kW resistor across the 3V supply. The RA4 digital input (pin 3) monitors the voltage across LDR1. In darkness, the LDR resistance is high (above 5MW), so the voltage at the RA4 input is more than 2.7V due to the voltage divider action of the LDR and the 470kW resistor. This voltage is detected as a high level by IC1. With sufficient light, the LDR resistance drops below 10kW, so the voltage divider produces a low level of 63mV or less at the RA4 input. The thresholds for the RA4 input are 20% of the supply voltage for low and 80% of the supply for high. It is a Schmitt-trigger input, so once it exceeds the high threshold, the voltage must drop below 20% of the supply to switch to low. Similarly, once detecting a low, the voltage must go above 80% of the supply before a high level is indicated. That ensures there is no rapid switching between high/low state detection when the voltage is between these thresholds. Driving the piezo transducer IC1’s RA0 and RA1 digital output pins (pins 7 and 6) drive the piezo transducer that produces the chirps. The piezo is driven in bridge mode, connected across these two outputs, which increases the AC voltage to produce a louder sound. When RA0 is driven high, the RA1 output is taken low; when the RA0 output is low, RA1 is high. In one condition, there is +3V across the piezo transducer and in the other, -3V, producing a 6V peak-to-peak square wave. This is shown in the Scope 2 screen grab. Scope 2 is a close-up of the 4kHz drive waveform fed to the piezo sounder. Channels 1 and 2 (yellow and cyan traces) are the signals applied at either end of the piezo transducer, while the red trace shows the total. So, while each end of the piezo is driven by a 3.28V peak-topeak waveform, there is double that voltage produced across the piezo. A 100W resistor limits the peak current into the transducer’s capacitive load immediately after the outputs switch. LED1 and LED2 are driven via the RA2 (pin 5) and RA5 digital outputs with 330W current-limiting resistors. These LEDs are driven alternately on and off while the piezo transducer is driven. When RA5 is low and RA2 high, LED1 is lit, while when RA5 is high and RA2 is low, LED2 lights. Note that RA5 is also used to drive the LDR (LDR1) to monitor the ambient light level. When driving RA5 low for light measurement, RA2 is also set low, so the LEDs are off. Similarly, when the LDR is off (RA5 high), RA2 is also brought high to keep the LEDs off. Pushbutton switch S2 changes the sound produced from cricket to frog or canary. IC1 detects when S2 is closed by monitoring digital input RA3 (pin 4). When S2 is pressed, the voltage at that pin goes to 0V. When the switch is open, the internal pull-up at RA3 keeps that input level high. The S2 switch closure is only checked during power-up; changing the sound can only be done then. ‘Silicon Chirp’ Cricket Fig.1: Silicon Chirp is controlled by 8-bit PIC16 microcontroller IC1. Slide switch S1 applies power from the coin cell. It then uses LDR1 to sense the light level and, depending on what it finds, produces sounds by driving the piezo transducer from its pin 6 and 7 digital outputs while flashing the eye LEDs via the pin 2 and pin 5 digital outputs. 36 Practical Electronics | April | 2024 Practical Electronics | April | 2024 The 100nF capacitor is fitted next, and since it is an unpolarised part it can be positioned either way round. We installed slide power switch S1 on the PCB’s underside. You could place this on top if you prefer. The on position for the switch is when the slider is toward the front of the cricket. You can also mount pushbutton switch S2 now by soldering its four pins. Parts List – Silicon Chirp Cricket 1 double-sided, plated-through PCB coded 08101231, 94 × 30.5mm available fro the PE PCB Service 1 CR2032 surface-mounting coin cell holder (CELL1) [BAT-HLD-001] 1 CR2032 3V lithium cell 1 SPDT micro slide switch (S1) [Jaycar SS0834] 1 SPST surface-mounting tactile pushbutton switch (S2) [Altronics S1112A, Jaycar SP0610] 1 30mm diameter 4kHz wired piezo transducer (PIEZO1) [Altronics S6140, Jaycar AB3442] 1 45k-140kW light dependent resistor (LDR1) [Altronics Z1619, Jaycar RD3480] 3 M3 × 10mm panhead machine screws (metal or plastic) 1 M3 × 6.3mm tapped Nylon spacer (or two M3 hex nuts) 2 Nylon or polycarbonate M3 hex nuts 2 TO-220 insulating bushes (eg, from TO-220 insulating kits) [Altronics H7110, Jaycar HP1142] 1 6-way header with 2.54mm pitch (CON1; optional, for programming IC1) 1 200mm length of 1.25mm diameter enamelled copper wire (for legs) 1 100mm length of 1mm diameter enamelled copper wire (for antennae and ovipositor) Semiconductors 1 PIC16F15214-I/SN 8-bit microcontroller programmed with 01810123A.hex, SOIC-8 (IC1) 2 3mm red LEDs (LED1, LED2) 1 LL4148, MM4148 or 1N4148WS (or 1N4148; see text) SMD diode, Mini-MELF (SOD-80) or SOD-323 [Altronics Y0161/Y0164A] Capacitors 1 100nF 50V X7R SMD M3216/1206 size Resistors (all M3216/1206 size 1%) 1 470kW 1 330W 1 100W TOP VIEW WITH LEGS, TAIL AND ANTENNAE SCREW & STANDOFF S2 LED1 K LDR1 + PIC16F15214 CELL1 100W CON1 CELL CAPTURE CR–3032 IC1 LED2 A 100nF BOTTOM VIEW (JUST THE PCB) PIEZO1 470kW S1 D1 PIEZO1 Construction Silicon Chirp is built on a double-­ sided, plated-through PCB coded 08101231 that measures 94 × 30.5mm available form the PE PCB Service. Wire legs are soldered to this PCB so it ‘stands up’ like a real cricket. These wires and the other parts are shown in Fig.2 and Fig.3. CON1 is the in-circuit serial programming (ICSP) header, which is needed to program a blank micro. Screen printing for this is on the underside of the board (for aesthetic reasons); however, it needs to be installed from the top since only the underside of the PCB has exposed pads for soldering. The top layer pads are masked, also for aesthetic reasons. Ideally, you should remove the ICSP connector after programming, as real crickets do not tend to have a programming connector. Begin by installing the surface-­ mounting microcontroller, IC1. You will need a soldering iron with a fine tip, a magnifier and good lighting. The use of flux paste during soldering is advised, in which case you don’t necessarily need a very fine soldering iron tip. Solder IC1 to its PCB pads by first placing it with the pin 1 locating dot to the top left, positioning the IC leads over their corresponding PCB pads. Then tack-solder a corner pin and check that the IC is still aligned correctly. If you find that it needs to be realigned, remelt the soldered connection and gently nudge the IC into correct alignment. Once alignment is correct, solder all the IC pins and refresh that initial joint. Any solder that runs between the IC pins can be removed with solder paste and the application of solder-wicking braid. Continue construction by installing the resistors. They are printed with a code indicating their values, which is likely to be ‘1000’ or ‘101’ for 100W, ‘3300’ or ‘331’ for 330W and ‘4703’ or ‘474’ for 470kW. These are in ‘scientific notation’ where the last digit indicates the number of zeros to add to the first few digits to give a value in ohms. Diode D1 can be installed next. Remember that it is polarised, so take care to orient it correctly, with the cathode stripe facing away from the centre of the PCB. There is sufficient pad area to allow Mini-MELF (SOD-80) or SOD-323 package diodes to be soldered in. Alternatively, an axial-­leaded 1N4148 could be used with the leads at each end bent back by 180° to allow soldering to the PCB pads. 330W Fig.2 and Fig.3: Silicon Chirp is pretty easy to build. Simply place the components as shown here but note that the piezo transducer is wired and mounted over reverse polarity protection diode D1. That diode, IC1 and the LEDs are polarised and must be soldered the right way around; the other components are not polarised. 37 Silicon Chirp should look similar to this when yours is finished, but feel free to customise it to suit your taste. Note that the CR2302 cell is secured using one screw as a preventative measure against tampering, so children can’t get a hold of the cell by itself. The cell holder (CELL1) is a halfshell type and its body makes contact with the positive side of the cell. A tinned copper area on the PCB completes the cell holder and provides for the negative connection to the cell. It must be fitted with the cell entry toward the rear of the cricket so that the cell capture screw prevents small children from removing it. This is to comply with my local safety standards (Australian Standard AS/NZS ISO 8124.1:2002), where toys for children three years and younger must have any batteries (and/or cells) secured in a compartment by a screw. Alternatively, where there is no compartment screw used, there must be two simultaneous independent movements to open the battery compartment. While Silicon Chirp is not really a project for small children, it could be used in a household with children who could potentially swallow button or coin cells, which poses a serious hazard (see the warning panel for details). For our project, cell removal is blocked by a 10mm M3 machine screw inserted from the PCB’s underside and secured on top with an M3-tapped Nylon spacer. When tightened, the spacer cannot be removed by hand and stops the cell from being removed. An alternative to the standoff is to use two M3 nuts, with the top one used as a lock nut, tightened against the other. Mount LED1 and LED2 so that the top of the dome of each LED is raised off the PCB by about 10mm. This provides enough lead length so they can be bent to about 30° above the PCB plane and outward about 10° from the centre line, as shown in Fig.2 and the photos. Make sure the longer lead of 38 each LED (the anode) is inserted in the ‘A’ position on the PCB. Mount the LDR about 5mm above the PCB surface, with its face sitting horizontally. This component is not polarised and can be installed either way around. The piezo transducer is mounted on the underside of the PCB, supported on TO-220 insulating bushes that are used as spacers to raise the transducer from the PCB. This leaves room for the cell capture screw and diode to fit between the PCB and piezo. The piezo transducer is secured with two 10mm M3 machine screws and two Nylon or polycarbonate nuts. You will need to drill out the mounting holes on the piezo unit to a 3mm diameter to suit the M3 screws. The nuts will not fit in the room provided on the piezo transducer mounting lugs, so the screws need to enter from the piezo transducer side. The insulating bushes can then be slipped onto the screw shafts, followed by the piezo transducer, then the Nylon or polycarbonate nuts. We use plastic nuts because a metal nut will short out the cell if used at the end of the cell nearest to IC1. That’s because the PCB hole and surrounding track are connected to ground, while the metal of the cell holder connects to the cell positive. To avoid any potential confusion and prevent the wrong type of nut from being placed at each point, we have specified both piezo-securing nuts as plastic. Note that to remove the cell capture screw when the cell needs to be replaced, one of these piezo mounting screws will need to be removed so that the piezo transducer can be swung out of the way. Solder the piezo wires to the underside of the PCB at the positions marked ‘PIEZO1’. You could instead bring them to the top of the PCB and solder them through the corresponding top holes, although that will look a bit messy. The wires will need to be shortened, but leave sufficient length for the piezo to swing out of the way to access the cell capture screw. The piezo transducer wires will probably be red and black, although the transducer is not a polarised component. It does not matter which colour wire goes to the two piezo PCB pads. Legs and antennae The legs can be fashioned from 1.25mm-diameter enamelled copper wire. Each front leg is 40mm long, while the mid and rear legs are each 30mm. These can be as simple or as fancy as you like. The cricket shape printed at the rear of the PCB shows the general leg shape we used, as do Fig.2 and the photos. Bend the legs so that Silicon Chirp’s PCB is above the platform it sits on. Form the feet into small loops so that the sharp ends of the wires are not exposed. Where the legs are soldered to the PCB, you will need to scrape off the enamel insulation (eg, using a sharp hobby knife or fine sandpaper) before you can solder them. Make up the two antennae using 40mm lengths of 1mm-diameter enamelled copper wire and the ovipositor (tail) with a 20mm length of the same. Once in place, curl the two antenna wires into shape by running a thumbnail along the inside of the radius, with your index finger on the outside. Now install the CR2032 cell in its holder and switch on power with S1. If all is well, the LEDs will momentarily flash after about three seconds to acknowledge that power has been connected to the circuit. An acknowledgement by a brief flashing of the LEDs also occurs when a low light level is detected for the cricket and frog, or when a high light level is detected for the canary. Low light can be simulated by covering over the LDR, or a higher light level by shining light onto the LDR. Silicon Chirp will begin chirping after a delay of about 10 seconds, providing the low light level remains for the whole time. To program the PIC, you can download the firmware (01810123A.hex) from the April 2024 page of the PE Practical Electronics | April | 2024 website: https://bit.ly/pe-downloads Additionally, as mentioned previously, ICSP (in-circuit serial programming) header CON1 will need to be installed. One of the piezo transducer leads may need to be disconnected, or one end of the 100W resistor, to allow programming. Changing the sound Changing from cricket to frog to canary and back is performed by holding switch S2 while switching power on via S1. Continue to hold S2 until you see the eyes flashing. They will flash once for the cricket, twice for the frog and three times for the canary. To change to the next selection, continue holding S2 for two seconds until the eyes flash to show the next selection. When you see the selection you want, release S2. The selected sound is stored in flash memory, so that selection remains even if powered off and on again. It only changes when S2 is pressed during power-up. Note that the frog sounds are best expressed with the piezo transducer close to a flat surface to emphasise lower frequencies. The canary sounds run through a repertoire before switching off when darkness GET T LATES HE T COP Y OF TEACH OUR -IN SE RIES AVAILA BL NOW! E Warning: small cell This design uses a small lithium cell that can cause severe problems if swallowed, including burns and possible perforation of the oesophagus, stomach or intestines. Young children are most at risk. Read the information sheet at www.schn.health.nsw.gov.au/fact-sheets/buttonbatteries on the dangers of button cells. Ensure that the cell is kept secure using the cell capture screw and Nylon spacer as specified, tightened sufficiently so they cannot be undone by hand. Keep unused cells in a safe place away from children, such as a locked medicine cupboard. New cells should be kept within the original secure packaging until use. Unfortunately, some older button-cell-powered devices not intended for children under three provide easy access to the cells. Keep these away from children or devise a method to make cell access more difficult (eg, by gluing the compartment shut). is detected, so they won’t necessarily stop as soon as the light goes away. Modifications Silicon Chirp has a loud chirp, which can be pretty annoying! (But maybe you want that...) To reduce the volume, increase the value of the 100W resistor in series with the piezo transducer. Increasing it to, say, 10kW will reduce the apparent volume by about 50%. Higher values will provide an even lower volume, to the point where it won’t chirp at all. Order direct from Electron Publishing PRICE £8.99 (includes P&P to UK if ordered direct from us) The light sensitivity can also be altered by changing the 470kW resistor value between the positive supply and the PIC’s RA4 input. Increasing the resistance value (say to 1MW) will make the light threshold level darker. By contrast, reducing the resistance value will mean more light is required to detect daytime. Reproduced by arrangement with SILICON CHIP magazine 2024. www.siliconchip.com.au EE FR -ROM CD ELECTRONICS TEACH-IN 9 £8.99 FROM THE PUBLISHERS OF GET TESTING! Electronic test equipment and measuring techniques, plus eight projects to build FREE CD-ROM TWO TEACH -INs FOR THE PRICE OF ONE • Multimeters and a multimeter checker • Oscilloscopes plus a scope calibrator • AC Millivoltmeters with a range extender • Digital measurements plus a logic probe • Frequency measurements and a signal generator • Component measurements plus a semiconductor junction tester PIC n’ Mix Including Practical Digital Signal Processing PLUS... YOUR GUIDE TO THE BBC MICROBIT Teach-In 9 – Get Testing! Teach-In 9 A LOW-COST ARM-BASED SINGLE-BOARD COMPUTER Get Testing Three Microchip PICkit 4 Debugger Guides Files for: PIC n’ Mix PLUS Teach-In 2 -Using PIC Microcontrollers. In PDF format This series of articles provides a broad-based introduction to choosing and using a wide range of test gear, how to get the best out of each item and the pitfalls to avoid. It provides hints and tips on using, and – just as importantly – interpreting the results that you get. The series deals with familiar test gear as well as equipment designed for more specialised applications. The articles have been designed to have the broadest possible appeal and are applicable to all branches of electronics. The series crosses the boundaries of analogue and digital electronics with applications that span the full range of electronics – from a single-stage transistor amplifier to the most sophisticated microcontroller system. There really is something for everyone! Each part includes a simple but useful practical test gear project that will build into a handy gadget that will either extend the features, ranges and usability of an existing item of test equipment or that will serve as a stand-alone instrument. We’ve kept the cost of these projects as low as possible, and most of them can be built for less than £10 (including components, enclosure and circuit board). © 2018 Wimborne Publishing Ltd. www.epemag.com Teach In 9 Cover.indd 1 01/08/2018 19:56 PLUS! You will receive the software for the PIC n’ Mix series of articles and the full Teach-In 2 book – Using PIC Microcontrollers – A practical introduction – in PDF format. Also included are Microchip’s MPLAB ICD 4 In-Circuit Debugger User’s Guide; MPLAB PICkit 4 In-Circuit Debugger Quick Start Guide; and MPLAB PICkit4 Debugger User’s Guide. ORDER YOUR COPY TODAY: www.electronpublishing.com Practical Electronics | April | 2024 39