A doorbell project for Arduino Uno with ATMEGA328P device. The EEPROM 24C512 is 512Kbits and it can store up to 3 seconds wave file of 22.050KHz, 8 bits, mono.
The Arduino reads the ROM bytes in a sequential read mode and stream each byte to the PWM generator at a rate of about 22 KHz. The I2C bus works at 200 KHz for the purpose of managing to process 22 Kbits per second. Changing the bus frequency changes the speed of the sound.
The transistors are a push-pull buffer for driving the speaker, any replacement can be used.
The I2C lib doesn't have a function for sequential read, so I added a routine.
To load sound file to the eeprom do this:
- Convert sound file to .wav PCM 22.050KHz, 8 bits, mono
- Change the file name extension from wav to bin.
- Load the bin file to the EEPROM Programmer.
Comments
Please log in or sign up to comment.