Turn an Arduino Uno into a digital audio recorder

dar2One of the great things about Atmel’s ATMEGA328P microcontroller that powers the Arduino Uno boards is the sheer versatility of the chip. It might only clock in at 16MHz and process data in 8-bit chunks, but it has so many practical real-world interface options that helps it punch well above its weight.

My favourite part of the chip is the ADC or ‘analog to digital converter’. By rights, it’s only a 10-bit ADC and only has a rated sample rate of around 9.6kHz, but with a little ‘code karate’, you can push that sample rate beyond 70kHz and still maintain 8-bit accuracy.

Perform a few other tricks and you can lock that sample rate to pretty darn close to 44.1kHz. Add in some extra coding to create a WAV file header and the Arduino Uno all of a sudden becomes a more-than-passable digital audio recorder.

Earlier this year, I wrote a two-part feature on how to do just that, including all the how-to stuff – circuit diagram, parts and the software or ‘sketch’ that makes it work.

Read both parts of the feature on the APC Magazine website – part 1 and now part 2.

I don’t expect it will worry the likes of Marantz or Tascam, but if you want to learn how digital audio recording works by actually building your own, this would be a great place to start. Enjoy.

6 comments for “Turn an Arduino Uno into a digital audio recorder

  1. Leroy Young
    October 17, 2014 at 1:39 am

    Hi Darren: Your articles on Arduino ADCs are excellent! Thank you for sharing such detailed information.

    I’m working on a project that requires multiple A/D inputs (6 to be specific) with each requiring sample rates of less than 70 kHz/6. But I’m having trouble finding appropriate ways to multiplex inputs ‘onto’ a single internal ADC. Any thoughts or directions for more info on this ‘next step’?

    Thanks again!
    Best regards, Leroy Young
    Nashville TN USA

    • Darren Yates
      November 5, 2014 at 11:29 am

      The Arduino Uno (and other boards using the ATMEGA series of MCUs) pretty much does that already – the Uno has six analog inputs (A0 to A5) that are multiplexed onto the one 10-bit ADC. Of course, I don’t know the exact sample rate or bit depth you need, but the Uno could make a very good place to start. If you only need around 13kHz or so, you should be able to go very close to 10-bit precision on that ADC (precision drops the faster you crank the ADC clock rate).

  2. Max
    December 11, 2014 at 9:14 am

    Hi Darren, sorce code for part 2 is missing. Link points to attacknid. Would you please provide it..?

    • Darren Yates
      December 12, 2014 at 8:23 am


  3. Patrick
    November 10, 2015 at 7:31 pm

    Hello Darren,

    I came across your brillant article on APC. Thank you very much for sharing, this is exactly what I needed for my project ! It is a miracle a chip so “slow” could do so much.
    Who needs an audio shield now ? ;)

    • Darren Yates
      November 10, 2015 at 7:41 pm

      No worries, Patrick. Glad you enjoyed it.
      Yes, I’m pushing the ATMEGA328 about as hard as it’ll go!

Leave a Reply

Your email address will not be published. Required fields are marked *

Current day month ye@r *