Noe’s Juke Box | Main components and schematics

Main parts

Juke Box showed here is based on the following main components :

components photo

  • an Arduino Mega (here a clone from DF Robot) as the “brain”
  • an Adafruit Music Maker for music & midi player
  • a Sparkfun’s button par and associated PCB (need to get leds separately)
  • some simple illuminated push buttons from found at Adafruit
  • a rotary encoder. Strangely enough, the RGB one I found at Sparkfun is the only which has a threaded shaft with a bolt and then can be mounted on a chassis
  • and last but not least an accellerometer breakout board just for fun also from Sparkfun

Connecting the button pad

Connecting the Arduino to the button pad is not complex but there are quite a bit of wires between them… I already went through this here. But I changed the pins I used in the first place. Just that I thought it would simplify soldering later on by keeping related pins together as much as possible. Not sure it did simplify though…

final button pad connection

And PWM pins have been chosen precisely because you don’t want to use pins 4 and 13… More on this here.

And last, resistors for the leds are 150Ω, 100Ω and 100Ω for red, green and blue pins.

 Now, the Music Maker

The Adafruit’s Music Maker is based on the VS1053 chip which has 2 main functions : MP3/WAV/OGG… player and MIDI synth. It comes with a handy SD card connector from which it can read files to play. It comes in several flavors :

I chose the latter for two reasons : I liked the idea of having an onboard amp so it would simplifiy cabling and I thought I could stack it onto the Mega. But… as it is using by default PWM pins I desperately need for controlling the leds, I had to re-cable everything to new pins. In addition, I could not stack it anyway because I needed all the space on the Mega proto shield as you’ll see later on.

So, in the end, if I had to do it again, I would probably get the breakout board (smaller, much smaller) and the 3W amp separately.

Here are the connections

music maker connection

Schematic based on Adafruit’s Music Maker catalog product photo

Note the little voltage divider to feed GPIO 1 on the VS1052 : the VS is a 3.3V device so feeding directly with Arduino’s 5V may (will) damage it.

 Then the accellerometer

I choose a cheap 3-axis, I2C capable accellerometer breakout : the Sparkfun’s MMA8452 breakout board.

It has some nice features and can make use of 2 interrupts… but I only have one available… So the other one won’t be connected for now. My first version of arduino code won’t make use of any of it for now. So it does not matter. I did connect one… just in case I have an idea on how I could use it !


Schematic based on Sparkfun’s catalog product photo

Let’s continue with the encoder

The Sparkfun’s encoder is a bit tricky because documentation is not quite clear but in the end… it works !

encoder connection

Note that it is a common anode RGB led. Setting pins D12, D13 or D14 to 0 means ON and 255 means OFF !

And last, resistors for the leds are 150Ω, 100Ω and 100Ω for red, green and blue pins. Also, pull-down resistor for the switch is 10kΩ

Let’s finish with the buttons

And now the very last thing : the illuminated buttons.

button rear connection

Schematic based on Adafruit’s catalog product photo


Have 3 of them. Quite straight forward… just don’t forget 150Ω led resistors.

Wrap up

Ok… all parts have been connected one by one, here is the full picture !

schematic 1500

 And what about Arduino code

All is here on GitHub :

What’s next

In next posts, I will sho how I did assemble all that stuff and build a nice enclosure for it.

Noe’s Juke Box | Introduction

Time has gone by since my first post about the sound box… I already wrote a couple of articles about the button pad here, here and here. I finaly came up with something. I did build an autonomous sound box which can act as a piano or act like an MP3 player.

It is based on an Arduino Mega, a Sparkfun’s 4×4 button pad and its associated PCB, anamplified Adafruit’s Music Maker, and a Sparkfun’s MMA8452 triple axis accelerometer breakout board.

There are 3 modes which are demonstrated in the following videos

Player mode

In this mode, you first select a “bank” and then a file to play. Sound / music files are stored and the SD card inserted in the Adafruit’s Music Maker. File is read from the SD and played by the VS1053.

[youtube width=”640″ height=”360″][/youtube]


Piano Mode

Here, I use the MIDI mode of the VS1053. You first select a “bank”. Each bank has a specific set of sounds mapped to pad buttons.

[youtube width=”640″ height=”360″][/youtube]


Tilt Mode

This mode is quite simple for now : the light is moving using Sparkfun’s MMA8452 triple axis accelerometer data.

[youtube width=”640″ height=”360″][/youtube]


What’s next

In following posts, I will go into details of the Sound Box, hardware and software, how to assemble everything…

There is plenty of stuff that could be done : voice or music recorder using microphone input on the music maker, piano record mode, more advanced tilt game, “simon says” game…