Noise Nugget

Square Inch music widget

Similar projects worth following
Noise Nugget is a compact digital synthesizer based on an 180MHz Cortex-M4 and quality audio DAC with headphone amplifier.

My goal with this project is to create a little "Swiss Army knife" of audio synthesis. Packing the maximum features on the smallest and cheapest board.

With all its connectivity (USB, 2 x audio out, 1 x audio in, I2C, UART, GPIOs) it can be used for many different tasks:
- Digital synthesizer, with a MIDI interface or some other means of control
- Audio effects, for a guitar pedal or synthesizer (delay, reverb, distortion)
- Audio FX trigger board, playing pre-recorded sounds
- Audio playback, recording sounds from the input and then playing it back at the push of a button
- USB sound interface

So far I implemented one audio effect, a MIDI over USB synth and sampler.
  • 1 × STM32F446RET6 ARM Cortex-M4F 180MHz
  • 1 × SGTL5000 Audio ICs / Audio CODECs
  • 2 × B3U-1000P Switches and Relays / Switches
  • 1 × USB Micro-B Connector
  • 1 × SJ-3523-SMT Connectors and Accessories / Audio and Video Connectors

View all 8 components

  • ​ The future of Noise Nugget

    Fabien-Chouteau10/21/2018 at 18:27 0 comments

    So the Noise Nugget is in final of the 2018 Hackaday Prize! That is amazing and I am very honored that my project was chosen.

    I have a few ideas for the future of Noise Nugget. One of them is having a GUI that let the users to build their sounds with basic modules such as oscillators, filters, effects, etc. Similar to the teensy audio tools but in real-time, without any code involved for the users. This could make an interesting and versatile tiny synthesizer.

    Noise Nugget is also a way for me to try some hardware design for another project: Wee Noise Maker. Because Noise Nugget is smaller, it cost less to have it manufactured so this allowed me to try different things before using them on a bigger project. For instance, this is my first 4 layers PCB. So I will probably use some of the prize reward to do a new iteration on the Wee Noise Maker project.

  • Software design

    Fabien-Chouteau10/18/2018 at 11:37 1 comment

    The software of the Noise Nugget is written in Ada. The Ada programming language is all about functional safety, that is, detect when the software is not doing what is supposed to do (bugs!). With Ada you know quickly and exactly what is going wrong instead of scratching you head for hours on a buffer overflow or uninitialized driver. This means less time spent debugging. And since I don't necessary have a lot time available to develop this software, every minutes counts.

    The most important aspect of the software is to generate audio samples and send them to the DAC.

    A sample is a 16bit signed integer that indicates the value of the audio signal at a given point in time.

    The DAC is configured at 44_100 samples per seconds (CD quality). If the software fails to deliver the samples at the appropriate speed, the audio will glitch (loud pops and clicks). So this is a true real-time requirement of the system.

    The samples are not sent one by one but in buffers of 512 samples * 2 bytes per samples * 2 channels (stereo), so 2048 bytes. Buffer B is filled while buffer A is transmitted, and vise versa (flip flop buffers). Samples coming from the audio input are received in a similar way. The transfer of the buffers is done via DMA so the CPU is not used during that operation, which means more time to generate the samples.

    To ensure the real-time requirement, I use the Ada Ravenscar run-time. You can see it as a Real-Time Operating System (RTOS) integrated in the Ada programming language. I wrote a blog post about it if you want to see what it looks like:

    There are two tasks in the system:

    • The audio task, it has the highest priority because it is responsible for filling the audio buffers. This means that this task will be executed whenever there are audio buffers to fill.
    • The other task is handling USB request in a polling loop. In the future this could be moved to and interrupt handler.

    In terms of dependency, the drivers come from the Ada_Drivers_Library, a project I stared a couple years ago to encourage the use of Ada on micro-controllers. The audio synth is based on ada-synth-lib by Raphael Amiard.

  • Hardware design

    Fabien-Chouteau10/17/2018 at 08:44 1 comment

    The main goals of the hardware design are simplicity and small footprint.

    The heart of the system is obviously the STM32F446 micro-controller. It is based on an ARM Cortex-M4 core with floating point unit running at 180MHz, and a ton of peripherals.

    Around the STM32F4 we have:

    •  A USB micro-B connector
    • A power regulator to provide 3.3V from the 5V of the USB connector
    • Crystal oscillator for the STM32F4 clock
    • One user button and one button to enter Device-Firmware-Update (DFU) mode
    • Flash memory to store sample data
    • A row of header for custom IOs
    • A debug header (which is badly wired in rev-B...)
    • One headphone jack
    • The audio Digital to Analog Converter (DAC)

    I could have used the DACs of the STM32F4, but on one hand they are only 12bits vs 16bits for a proper audio DAC, and on the other hand it would have required extra circuitry to drive headphone. So using the SGTL5000 provides higher sound quality and simplicity. The SGTL5000 also have a lot of options for IOs:

    • Headphone output
    • Line output
    • Line input
    • Microphone input

    This means a lot of options for different applications.

    On the rev-B of Noise Nugget I didn't use the microphone input. I think this is a mistake because there is some room on the board for a MEMS mic, and that would open even more possibilities. For instance real-time voice effects or sample recording.

    The design of the DFU button is inspired by the Numworks open calculator. If the button is pressed when you plug the USB cable, the STM32F4 automatically enters DFU mode. It is then very easy to install a different firmware without using any debug probe. With WebUSB, it is even possible to install from a

    My TODO list for the next revision is:

    • Fix the debug connector
    • Try to add another jack for line input
    • Add a MEMS microphone


  • Sampler on the Noise Nugget

    Fabien-Chouteau10/07/2018 at 17:56 0 comments

    I implemented a sampler mode for the Noise Nugget. It plays a single audio clip at different speeds to give the illusion of different notes.

    For the moment the audio clip is stored in the main flash memory, with the code. There's not a lot of space available so I am limited to one sample of a couple hundreds kilobytes. In the future I will implement the drivers for the external flash chip that has 8MBytes of memory, that is 1 minute 30 seconds of audio. It might seem small, but samples are only a couple seconds long at most , so 1m30s is plenty.

  • USB synthesizer on the Noise Nugget

    Fabien-Chouteau09/29/2018 at 20:02 0 comments

    I finally managed to make the Noise Nugget play notes from MIDI commands over USB!

    I took me some time because there was no USB support in the driver library I'm using, so I had to write a USB stack from scratch :)

    The synth code is based on ada-synth-lib from my friend Raphael. I used it to make a simple pulse wave sound with ADSR envelope.

  • Flanging effect with the Noise Nugget

    Fabien-Chouteau09/09/2018 at 20:28 0 comments

    One of the example projects that I wanted to do with the Noise Nugget was to use it as an audio effect.

    This is what I demonstrate in this video:

    The music in produced by the PO-20 (left), then goes through  the Noise Nugget (center) and finally comes out of the small speaker (right). The flanging effect is enabled and disabled by pressing on the button of the Noise Nugget. The LED is lit when the effect is enabled.

    Flanger/Flanging is a simple effect achieved by mixing a incoming signal with its echo, and slowly changing the period of the echo.

  • First sounds

    Fabien-Chouteau09/03/2018 at 22:01 0 comments

    I did a first test on the board using the software of another project and it does work :)

    Very short demo here:

    Now, what's next with this little thing? There are multiple directions possible:

    • Digital synthesizer, with a MIDI interface or some other means of control
    • Audio effects, for a guitar pedal or synthesizer (delay, reverb, distortion)
    • Audio FX trigger board, playing pre-recorded sounds 
    • Audio playback, recording sounds from the input and then playing it back at the push of a button
    • USB sound interface

    I think I will pick one or two ideas an implement them before the end of the month.

  • Got the board from MacroFab

    Fabien-Chouteau09/01/2018 at 21:50 0 comments

    I received my assembled 1 square inch board from MacroFab yesterday:

    It is the second time I use this service and I'm happy once again. It is quite expensive, but when you take into account the shipping for low quantity of parts (20 euros for Mouser), the cost of the 4 layers PCB and the difficulty of soldering a QFN20 part, I think it is worth the price.

  • Beginning of the project

    Fabien-Chouteau08/13/2018 at 21:58 0 comments

    This project started from the failure of the last iteration of my Wee Noise Maker board. Since the Wee Noise Maker board is relatively big an complicated, I decided to pack the main components in a simpler design to speed up the prototyping time and lower the cost. Turns out that this smaller board is quite interesting in itself.

    The first iteration of Noise Nugget was designed around a 2xAAA battery holder :

    When I saw the announcement of The Return of the Square Inch Project competition I decided to make a new version that would fit the requirements (1x1 inch board).

View all 9 project logs

  • 1
    Hardware build

    There's no real build instruction for Noise Nugget hardware because it only consist of a small electronic circuit.

    You can assemble it by soldering each components according to the board design available in the repository.

    However, some of the components are very small and difficult to solder by hand. So I recommend using PCB assembly services such as MarcroFab.

  • 2
    Software: Getting the toolchain

    The Noise nugget software is developed in Ada, so you will need an the arm-elf GNAT Ada compiler. You can get and install the community edition from here:

  • 3
    Software: Getting the sources

    The sources are hosted on GitHub so you can get them with the git tool:

    $ git clone

    Go into the directory:

    $ cd noise-nugget

     Get the dependencies with the git submodule command:

    $ git submodule update --init --recursive  

View all 5 instructions

Enjoy this project?



ucasano wrote 11/06/2018 at 09:24 point

Hi, I did try  "git submodule update --init --recursive" and I got:

Submodule 'software/Ada_Drivers_Library' ( registered for path 'software/Ada_Drivers_Library'
Cloning into '/home/xxxxxxx/prog/noise-nugget/software/Ada_Drivers_Library'...
error: Server does not allow request for unadvertised object 5cdae5191fd0041cb0dceab34a3454dbc1854ec6
Fetched in submodule path 'software/Ada_Drivers_Library', but it did not contain 5cdae5191fd0041cb0dceab34a3454dbc1854ec6. Direct fetching of that commit failed.

Did I miss something?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates