Solar-Powered Cricket

The pleasant sound of crickets chirping is part of the charm of summer evenings. And if there are no crickets, the engineer makes one… I found this circuit in an old electronics magazine; originally, it was powered by a 9 V battery. I thought I’d try it in a solar-powered version.

This simple circuit is a great project for those just learning electronics, as it helps them understand the operation of two CMOS ICs. The waveform required to produce a sound reminiscent of cricket chirping is generated by IC1, a CD4060 14-stage binary counter.

Circuit diagram of the cricket device
Pinout of the CD4060 IC
Pin NamePin NumberTypeDescription
VDD16PowerSupply voltage (+3 – +15 V)
GND8PowerGround (0 V)
Q3–Q91–7OutputCounter outputs
Q11–Q1313–15OutputCounter outputs
C EXT9InputConnection for external capacitor
R EXT10InputConnection for external resistor
CLK11InputClock input / oscillator
RST12InputResets the counter

The binary counter consists of a series of D flip-flops connected in sequence, each input (CK) linked to the inverted output (Q̅) of the previous stage. When a CK signal is applied, the value at the D input is stored. If the D input is at a logic high (1), the output becomes 1; if it’s low (0), the output becomes 0 at the next clock pulse. The Q output of the flip-flops is not used (it’s not shown in the diagram); instead, the inverted Q̅ output is fed back to the D input. Since Q̅ is always the opposite of Q (if Q = 0, then Q̅ = 1), the stored value toggles with each clock pulse, effectively dividing the input frequency by 2. As each stage divides by 2 and they are cascaded, the outputs count in binary, stepping through values from 0 to 2¹⁴–1 = 16,383 (because there are 14 stages). On the 16,384th step, the output resets to 00000000000000, and the process repeats.

An interesting detail of this IC is that Q̅1, Q̅2, Q̅3, and Q̅11 are not brought out to pins (there was no room for them on the 16-pin DIP package). The RST (or CLEAR) input is used to reset the counter to its initial state (00000000000000), and the clock is fed into the CLK input. Unlike other similar counters (such as CD4040 or CD4024), this IC also has two special pins, 9 and 10. By connecting two resistors and a capacitor to these pins, together with the internal circuitry, the IC forms an oscillator. With this oscillator, the IC can generate its own clock signal. The frequency of this clock can be calculated with the formula:
F (Hz) = 1 / (2.3 × Cₜ × Rₜ).

The RC oscillator of the CD4060 IC

For example, if we set the clock to 1 Hz, the counter advances once per second. This way, the Q3 output can be used for an 8-second timing interval, and Q13 for 2 hours and 16 minutes (8192 seconds). The diagram below shows a simple timer circuit that can switch a lamp on and off:

A simple timer circuit

Of course, an oscillator made from resistors and a capacitor is not very precise; its frequency is unstable and changes with temperature. However, the CD4060 can also be driven by a crystal oscillator, which greatly improves accuracy. In our case, though, this is not necessary. A 33 kΩ resistor and a 3.3 nF capacitor produce a clock frequency of about 4 kHz. This appears on the Q5 output divided by 2⁵ = 32, giving about 125 Hz, and on Q8 divided by 2⁸ = 256, giving about 16 Hz. These signals are mixed using diodes D1 and D2, and we also add a little of the original clock signal. This creates the basic “cricket tone.”

To turn this into chirping, the sound is modulated by two square waves of different, longer periods, generated by oscillators built from IC2’s CD4093 gates. (The diagram shows CD4011 because that’s what was available in the Fritzing parts library, but in reality, we use CD4093.) Both ICs contain four NAND gates with the same pinout, but the CD4093 has Schmitt-trigger inputs, which make building oscillators easier. These two oscillators produce long-period square waves, thanks to the 47 μF capacitors and 220 kΩ and 680 kΩ resistors. The signals on IC pins 3 and 4 are combined, then used to trigger a monostable multivibrator built from the remaining gate in IC2. The resulting signal goes through diode D3 to the CD4060’s RST input, stopping the counter. Each time a positive edge appears on the combined output of the two oscillators (IC2 pin 11), the monoflop starts, and the voltage on IC2 pin 10 briefly drops. During this time, diode D3 blocks, allowing C2 to charge through resistor R7. For this short period, the CD4060 resumes running, producing the chirping sound.

Pinout and truth table of the CD4093 IC

The R6 photoresistor is optional and does not need to be installed. If the circuit runs on a battery (not solar power), the photoresistor ensures that the CD4060 is completely stopped in daylight so the “cricket” won’t chirp during the day.

Both ICs—like most CMOS ICs—can operate from a supply voltage between 3 and 15 V, which means the circuit can be powered by three AA batteries, a 9 V battery, or even a car battery. For this project, I opted for a solar-powered solution using the YX8018 IC commonly found in garden solar lights. These ground-stake lights can be purchased at DIY stores for just a few hundred forints.

The rechargeable battery inside these lights usually fails within a year or two, and although some allow battery replacement, buying a new light is often cheaper than replacing the battery. The internal electronics vary depending on the light: sometimes the IC is a bare die under a blob of epoxy directly on the PCB, while other times it’s housed in a small four-pin package. The former is unusable, but the latter can be desoldered and reused.

It’s well worth salvaging the solar panels and such ICs from dead garden lights because they are extremely versatile. One way to reuse them is to build a solar power supply for low-power gadgets. This IC is an NMOS step-up converter that, depending on the value of the connected inductor (33–560 μH), can provide 3–30 mA of current and up to about 6.5 V output voltage. For those interested in more details, further documentation can be found here.

Solar lamp PCB with YX8018 IC


The YX8018 is perfectly suitable for powering our “cricket” circuit using a 27 μH inductor. To do this, you need to connect a 1.2 V NiMH AA cell and a 2 V solar panel—practically, the same components salvaged from the garden light. The output voltage will be around 6 V. The photoresistor is unnecessary because the YX8018 automatically supplies power in the dark and charges the battery in sunlight.

The circuit on a breadboard

I didn’t make a PCB for this gadget—there’s really no need—but the attached Fritzing file includes a basic PCB layout for anyone who wants to make one: 202106cricket-chirping-generator.fzz

Here you can listen to the sound of the cricket:

1 thought on “Solar-Powered Cricket”

Leave a comment