(Nipper photo by Bevery & Pack - Creative Commons Share Alike)

Recording with the VS1053

The record_ogg example sketch turns your VS1053 breakout into a recording device that generates OGG encoded files on the SD card in real-time.


Wiring for the record_ogg sketch is as follows:

Power and Ground:
  • VCC -> 5v
  • GND -> GND

Basic SPI connections:

  • SCLK -> Arduino #13
  • MOSI -> Arduino #11
  • MISO -> Arduino #12
  • CS -> Arduino #10

Additional Control Signals:

  • SDCS -> Arduino A0
  • XDCS -> Arduino #8
  • RST -> Arduino #9
  • DREQ -> Arduino A1

Start/Stop Button (Momentary):

  • from Arduino #7 to GND

Electret Microphone Circuit:

The Microphone circuit is derived from the reference design shown in Figure 3 on Page 13 of the VS1053B Datasheet. Note that the ground connections shown are to analog ground (AGND).

A note about microphone circuits:

Microphones, by their nature, are very sensitive devices. They are prone to picking up all sorts of noises (both electrical and acoustic) in addition to what you are trying to record. A microphone circuit built on a breadboard is not likely to sound good at all. For good sound, you will want to review the spec sheet recommendations and build this on a good quality circuit board.

Recording Sketch:

Connect the Arduino to your computer with a USB cable and plug your headphones into the headphone jack. Select File->Examples->Adafruit_VS1053_Codec->record_ogg to load the example code.


The record_ogg example sketch demonstrates a powerful feature of the VS1053 breakout: Plug-ins. OGG recording capability is not supported natively in the chip itself, but through a plug-in code module. A binary file containing the code image of the plug-in is loaded from the SD card at startup. Once loaded, the VS1053 becomes an OGG recording device.

To Record:

Press the start/stop button to start the recording. Press once again to stop. Each recording will be stored in a separate .OGG file on the SD card.

To Playback:

Use any OGG capable audio player on your computer - or playback through the VS1053 using the Simple Audio Player configuration (see link at left).

This guide was first published on Jul 30, 2013. It was last updated on Mar 08, 2024.

This page (Ogg Recorder) was last updated on Jul 21, 2013.

Text editor powered by tinymce.