The door bell seems like a simple project but it's not! There is one major difficulty it's to generate a sine wave via Pulse Width Modulation.
The output of OC1A from ATMega8 oscillates at 32 kHz and the pulse width determined value from a sine look up table. A low pass filter of 1.8 kHz removes the 32 kHz. The resulting output is a pure sine wave. To archive a better sound I used two sine waves at the same note but at a different octave. You can listen this song here. The decay of each note is done via another PWM which control the gain of the output amplifier.
- Many different songs can be done
- Nice sound
20 Comments to “Door Bell”
All my source codes were taken from my personal projects.
Everything is for your information only. The C/C++ codes have been written
with ICCAVR. You can find the header and source CRT files by downloading their compiler.
All is for your information and everything is AS IS without any warranty of any kind. No other files are available and I don't make any modification for any body.
- All projects
- Electric Train
- General Posting
- Lastes News
- Work Bench Tools