Sunday 12 February 2017

Attiny85 SD Player - Redo of Chan 2009 SD Wav Player in Arduino IDE

Chan 2009 player has C and assembly code. I try to redo so that only I need only the Arduino IDE and Attiny85 with arduino or a USB tiny programmer. You need only to upload an .ino file to Attiny85 for it to play music from a SD card.

Credit for internet knowledge that lead to my work:
1. for a link to the wrapper.
2. for spi pin connection
3. for the sd code
4. for the double buffering code

Hardware required:
1. Attiny85
2. SD card adapter

1. 200 uF capacitor to remove noise
2. a npn transistor to amplify the sound
3. a 100 ohm resistor
4. a push button

The above components are optional. You can leave them out in the circuit diagram below. It will still work.

Difficulties that I encounter:
1. There is no sound. I was struck at this problem for a day. And I found it is because of a short circuit in DI and CS port of the SD adapter. I remove the bad solder and there is sound.
2. Wrong connection from SD to Attiny85. SD DO pin (second pin from the left) should go to Attiny DI pin (PB0). SD DI pin (third pin from the right) should go to Attiny DO pin (PB1).

Here is the circuit diagram:

Some photos:

Here is the software .ino Please note the wav file is name love.wav in the source. Please get your own wav file by using iTune etc to produce a 8 bit 8000 hz wave file.


  1. hola. great shot , do you have a better schematic ?

  2. Hi unfortunately the link to the INO file does not work anymore, any chance you could update? Thanks

  3. Yes, could you please relink your .ino for this project? Thanks!