After a few months away from electronics, I dusted off the littleBits Arduino project that I completed way back in September. Just as I completed the project, we took a short vacation trip — just enough time away to break the creative flow and to procrastinate about a write-up.
The old-new project uses the Arduino SPI digital-to-analog converter which I sketched out in two earlier posts: How to add SPI to a littleBits Arduino and the Arduino SPI DAC design. The SPI DAC greatly improves audio quality over the el-cheapo PWM+filter approach. It adds a little extra hardware, but it’s worth it.
The SPI DAC project adds a 12-bit digital-to-analog converter (DAC) to the littleBits Arduino. The DAC is a Microchips Technology MCP4921. The design is fairly simple and could be whipped together by a novice. I built the circuit on a solderless breadboard in order to avoid soldering. You still need to solder a 2×3 header to the littleBits Arduino. Can’t avoid it unless littleBits decides to sell Arduino modules with pre-installed headers.
I wanted to make the project “kid friendly.” So, rather than geeking out with MIDI, synthesis, etc., the sketch sings a song in Solege (i.e., “Do, re, mi). The Arduino’s program memory (PROGMEM) holds the waveforms (samples) for the eight syllables of the C major scale. The song is represented in an array where each row of the array contains the pitch and duration of a note. The sketch steps through the song array and sings each note (a Solfege syllable). Check out the MP3 demo.
As you might guess, it took a fair bit of effort to fit the waveforms into 28K bytes of PROGMEM! For more information, read about the waveform development process.
I posted the full design and code on the littleBits web site. I want to move ahead to new projects and frontiers and I won’t be posting the detailed design here. I do want to use the SPI DAC in future projects.
While you’re at the littleBits site, please check out the Mini Pops Drumcomputer. This is a very nice update on the Lo-fi Beat Box project. The developer, f.j2, fabricated the low pass filter as a littleBits module using the littleBits Hardware Development Kit (HDK). He also added new waveforms. Great job!