Building a Simple Audio Player with an ATtiny85
The Four Sample Player outputs over 8 minutes of audio using an external memory module.
While the diminutive ATtiny85 chip is, of course, capable of playing bloops and bleeps, for more refined audio — e.g. voices and other recorded sounds — you might assume that you’d need something a bit more powerful. This Technoblogy post by David Johnson-Davies, however, shows that this is indeed possible, with the caveat that you’ll need to add an external memory module.
Johnson-Davies' "Four Sample Player" consists of an ATtiny85, a 4Mbyte DataFlash board, and four buttons that act as a user interface. This allows it to play a total sample length of 8 minutes, 44 seconds, divided up between the four output options. Each button starts one sample, with three of them wired to input pins and the fourth wired to a reset. As any of the four buttons wakes the chip from sleep mode, the reset input is cleverly used to start one of the samples via a logical “else” — since no actual input button was used.
Audio files are first set to 8 kHz, 8-bit mono and loaded onto an SD card. This is then hooked up to an Arduino Uno to transfer files to the DataFlash board. Audio is played with the help of a special ATtiny85 64MHz clock option, which is utilized to produce fast digital-to-analog conversion. As typical with other Technoblogy projects, the task could perhaps be accomplished easily with more powerful hardware, but it’s very instructive to see the tricks needed to pull of this type of build with purposely limited hardware.