Electronic cricket

his electronic cricket is a fun project. A real crickets chirp at night and faster in warmer temperatures. A cricket chirp is composed of a group of three sinus waves of a single frequence of about 5kHz. occurring in rapid succession.

Introduction

This electronic cricket is a fun project. A real crickets chirp at night and faster in warmer temperatures. A cricket chirp is composed of a group of three sinus waves of a single frequence of about 5kHz. occurring in rapid succession. Each group of three is one chirp. The rate of the chirp depends on the temperature. For this project the attiny2313 is used. It can produce square waves that almost sound as the sinus waves a real cricket make.

Circuit

The circuit itself is very simple, a small loudspeaker of 8ohm/0,5W is connected to portb.1 and ground of the Attiny2313 microcontroller.You can build the circuit on a breadboard or use the ATTiny2313 board. You can buy the ATTiny2313 board at www.bizztronix.eu.

Software

The major difficulty is to program the microcontroller to produce a cricket sound realistic enough. The core of the program is routine that produces a square wave of 5kHz of about 0,6 seconds. This is then repeated 3 times after each other with an interval of 0,4 seconds, and then the three waves are repeated again with an delay of 1 second. You can tweak the sound by adjusting the delays and the repeats in the for loops.
For more detail: Electronic cricket