DIY SamplePad Controller

A unit to allow sample audio files be triggered and played by Roland drum pads

Public Chat
Similar projects worth following
While working on my MIDI Drum Module project I was asked to explore making a smaller standalone module to allow the use of a small number of pads to augment an acoustic drum kit.

The drummer in question currently uses an Alesis Samplepad alongside his kit; it offers 4 pads, and an SD Card slot to load sounds onto the device. It has a small screen for displaying sample information, and a few buttons/knobs for sample adjustment.

What I propose to assemble will allow for 3xdouble trigger pads to be used to trigger onboard samples, much in the same way as the Alesis device.

The requirements I need to meet are as follows:

  • The controller must support a minimum of two Roland pads
  • The controller must be able to replicate the soundset of the Alesis Samplepad it will be replacing
  • It must be easy to add new sounds
  • It must be simple to use
  • It must be robust


I have researched a few options in order to help establish the best way to achieve the requirements.

My initial instinct was to build a Pi-based solution and use an analog Zero pHat I have to attach the pad inputs, using python to read the pads and play audio files, however I feel that the need to safely shut it down wouldn't meet the simplicity or robust requirements in my eyes.

After some further searching for a Microcontroller-based answer to the problem I stumbled across the DFRduino M0 board by DFRobot. The board looks perfect; An ARM Cortex M0 board, complete with an IIS chip onboard for handling audio processing. The board is less than $10 too!

After looking further into this board I found the perfect companion shield for the board: Audio Shield For DFRduino M0. Complete with Micro SD card slot, line out and recording features and a small onboard amp, this board will give me the functionality I need to achieve all of the above targets and give plenty of features for future development.

In addition to this shield I will also include an i2c 16x2 LCD screen and a rotary encoder for menu and navigation control. Add in a handful of 1/4" jack sockets and an enclosure and this should give us a complete unit.


I have a rough idea on how I am going to tackle the code of this project:

Sample sounds will be uploaded to the MicroSD Card, and follow a naming convention of group number followed by the intended pad to trigger it. For example, 1_1m.wav will be the sound for pad 1 main in group 1, and 3_3r.wav would be the sound for pad 3 rim in group 3.

The rotary encoder and lcd will allow the setting of the volume of the output and also the number of the group of sounds to be triggered - switching between the two will be done by pressing the encoder button.

The main loop of the code will check the pad pins (A0-A5) and check for a reading; if > 0 then a hit has been registered. The play command will send the name of the pad, the currently selected group number and the reading of the analog pin.

The Reading will be mapped against 100 and used to dictate the percentage of the main volume that the sound should be played, allowing velocity of the hit to be reflected in playback. The group number  and pad name will be combined to give the name of the file that should be triggered from the SD card.

  • 1 × Enclosure - TBC Big enough to hold your boards and allow for drilling of holes for jacks, screen, encoder and power
  • 1 × DFRduino M0 Mainboard (Arduino Compatible)
  • 1 × Audio Shield For DFRduino M0
  • 6 × TRS Jack sockets for connecting the pads (main, rim and ground connections)
  • 1 × Panelmount DC barrel socket to pass power to the M0

View all 9 components

  • Better boards for the task?

    Craig Hissett06/26/2019 at 23:56 0 comments

    So far the project is 2/3 worked out; my menu and GUI is all working, I know how to read my pads via analog pins, but in Just need to get playback working well with the M0 board.

    Tonight I have been trying to make progress on playback, using a serial input to trigger wav files to be played from the SD card, but at the minute it plays garbled sounds. I'm hoping to track down where I've gone wrong sooner rather than later, as I'd like to get this working for our drummer soon.

    I've started to have a few doubts as to whether I am going to be able to achieve the level of performance I would like to get from this board, and have wondered if i could achieve better results with a different board?

    My options:

    Pi - easy shout, this one. Wav player could be written in Pygame, can use the encoder and LCD display as planned. I'd need to pair it with a microcontroller to accommodate it's lack of Analog pins.

    PCDuino - I have an old v1 in a drawer which could work. Should be able to handle Python and Pygame plan no problem, plus has Arduino compatible pins for piezo reading.

    Intel Edison/Galileo - I have these boards gathering dust somewhere, just screaming out to be used in a project.

    I've never used them before so set up may be tricky, but their arduino compatible pins and their running of Yocto Linux could be of advantage.

    I'm open to thoughts - post a comment and let me know your views!

  • Menu Test complete

    Craig Hissett06/06/2019 at 23:49 1 comment

    Apologies for the slow updates everyone, I've been having a bit of a difficult time getting stick into projects at the moment.

    Today I have tested the setup for menu, using a Wemos Mega + WIFI board, i2c LCD, some push buttons and the dfrobot mp3player unit.

    The menu is simple, butndoes all itllnever need to do. Clicking the rotary encoder button selects either Bank or Volume on the menu  and rotating it will adjust the relevant variable.

    Next I'd like to solder up a small board with the jack sockets in it, alongside the screen and encoder. This'll keep the in case set up nice and neat.

  • Prototyping

    Craig Hissett05/16/2019 at 15:56 0 comments

    While I wait for my DFRobot boards to arrive from China I'm going to work on the menu first.

    I have a few Arduino Nano boards kicking around; it's breadboard-friendly pin layout is perfect for prototyping. I also have an lcd display and a rotary encoder already, so I can attach those to the breadboard with some male-female jumper cables.

    This little setup will enable me to work on the menu and selecting/setting the parameters, and also committing the parameters to EEPROM so they can be loaded on startup.

    I have also ordered a little DFRobot mp3 module for this setup, which, when it arrives, will allow me to test reading data and playing sound from it's onboard Micro SD Card slot.

    Good times!

View all 3 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

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