Electronic cricket

Summary of Electronic cricket


This article describes an electronic cricket project using an ATtiny2313 microcontroller to mimic real cricket chirps. The device generates a sequence of three 5kHz square waves, repeated with specific time intervals to simulate natural sounds influenced by temperature. The circuit connects an 8-ohm speaker to the microcontroller's Port B.1, and the software allows tuning of delays and repetition rates for realism.

Parts used in the Electronic Cricket:

  • ATtiny2313 microcontroller
  • 8 ohm/0.5W loudspeaker
  • Breadboard or ATTiny2313 board

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.
Electroni

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.
Digital Clock using Seven Segment Display and ATMega16

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

Quick Solutions to Questions related to Electronic Cricket:

  • What frequency do the sinus waves in a real cricket chirp have?
    A real cricket chirp is composed of sinus waves of a single frequency of about 5kHz.
  • How does the rate of a cricket chirp depend on environmental factors?
    The rate of the chirp depends on the temperature, with crickets chirping faster in warmer temperatures.
  • Which microcontroller is used for this project?
    The ATtiny2313 microcontroller is used to produce the required square waves.
  • Can the ATtiny2313 produce realistic cricket sounds?
    Yes, it can produce square waves that almost sound like the sinus waves a real cricket makes.
  • How should the speaker be connected in the circuit?
    An 8 ohm/0.5W loudspeaker is connected to portb.1 and ground of the Attiny2313.
  • What is the duration of a single square wave group in the program?
    The routine produces a square wave of 5kHz for about 0.6 seconds.
  • How many times is the wave group repeated before the longer delay?
    The wave group is repeated 3 times after each other with an interval of 0.4 seconds.
  • What happens after the initial three repetitions?
    The three waves are repeated again with a delay of 1 second.
  • How can users adjust the sound of the electronic cricket?
    You can tweak the sound by adjusting the delays and the repeats in the for loops.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top