Battery Backup for Audio Hacker Samples

When you record audio samples to the serial SRAM on the Audio Hacker, the data will be lost when power is disconnected. However, the Audio Hacker uses SRAM chips that allow a small voltage to maintain their contents. The Audio Hacker board has pads where you can connect a small battery.


A 3V coin cell battery (like a CR2032) is sufficient to maintain the contents of the memory:


Now you can disconnect power without losing your awesome samples. There is one problem though: your sampling program on the Arduino was probably keeping track of which memory address your sample began/ended at, so now your program has “forgotten” where the sample boundaries are. One way to fix that is to write your sample address information to a header in SRAM. Another easy approach is to store the address info in the Arduino’s EEPROM. There is code in the Four Sample 12-bit Sampler project, as well as the 3-Track Looper project. These sketches store each sample’s end address in EEPROM whenever a sample is recorded. At sketch startup, these addresses are read from EEPROM. The code is simple, so just look for lines that use the EEPROM library.

Published by Michael, on July 5th, 2013 at 6:09 am. Filed under: Audio. | No Comments |

Playing Audio Hacker Samples in Reverse

This simple example project is the same as the 12-bit Sampler, but the audio sample is played in reverse. In the Arduino menu, choose File->Examples->Audio Hacker->SamplerReverse. Record your audio sample with button S1 on the Audio Hacker (top button), and play it back in reverse using the S2 button. Just as with the 12-bit Sampler, you can connect a potentiometer to A0 to adjust the playback speed. If you are unsure how to wire the potentiometer, see analog input tutorial. To enable this feature, make a minor code change to set adjustablePlaybackSpeed = true;. Arduino will prompt you to save your changed sketch to another location.

Published by Michael, on July 5th, 2013 at 6:08 am. Filed under: Audio. | No Comments |

Connecting an Electret Microphone to the Audio Hacker

I like to use my computer’s microphone and audio output when I want to record my voice in the Audio Hacker, but you can also connect an electret microphone using a simple circuit. An electret microphone is handy for applications where you don’t want a computer. Electret microphones have polarity, so make sure you connect the positive/negative leads correctly in the circuit.


Since the output of the microphone is very weak, turn up the preamp gain on the Audio Hacker shield until you are happy with the level (probably all the way up!). The preamp provides up to 100X gain. Connect the microphone’s positive lead to one of the input pads. It doesn’t matter if you pick ‘L’ or ‘R’, or connect the microphone to both.


Another approach is to use this handy microphone breakout board from Sparkfun. It includes a 100X amp so you don’t need to amplify its signal with the Audio Hacker preamp.

Published by Michael, on July 5th, 2013 at 6:07 am. Filed under: Audio. | No Comments |

Audio Hacker Echo Effect

This project allows you to use the Audio Hacker shield to manipulate an audio signal in realtime by adding an echo effect. This is achieved by constantly recording the incoming signal to memory. When reproducing the incoming audio on the output, we also mix in previously recorded signal from “the past”. By adjusting a potentiometer connected to A0, you can adjust the amount of delay that the echo has. The longer the delay, the further back into memory the program reads to get the echo signal. The echo is attenuated so that it is quieter than the signal being played through from the input. Attenuating the signal is achieved by simply dividing the value by 2, therefore reducing its volume by 6dB.

Load the Arduino sketch File->Examples->Audio Hacker->EchoEffect. Connect a potentiometer to A0. If you are unsure how to wire the potentiometer, see analog input tutorial. Set the pot to its lowest level. Connect an input source so we can create an echo effect of the input. Spoken word is much better for hearing an echo than music, so try using a talk radio station or a podcast. Now increase the potentiometer to increase the amount of echo.

If you want to know how long the echo is, uncomment the line #define DEBUG and open the Arduino serial monitor with speed 115200.

Here is what the echo effect sounds like. While recording this, I changed the echo delay by using a potentiometer so you could hear the difference between short delays and long delays.

To send my voice into the Audio Hacker, I run Audacity on my computer and enable the monitoring feature for the microphone.

This sends anything picked up by the computer’s microphone to the computer’s audio output, which is connected to the Audio Hacker input. I highly recommend Audacity which is free!

Published by Michael, on July 5th, 2013 at 6:06 am. Filed under: Audio. | 1 Comment |