Thursday, November 16, 2017

Bare Conductive Arduino MP3 Player

I found the Bare Conductive Touch Board Starter Kit while searching for activities to do with my almost nine year old son over the school holidays. It contains a custom Arduino board with a built in microSD card reader and audio output along with twelve electrode that can be used for touch or proximity sensor input. There is also a jar and tube of black conductive paint, a brush for painting them on alligator clip wires and adhesives, stencils and cardboard cutouts for designing the sensors. A 128 MB microSD card, USB card reader and portable speaker round out the collection.

The idea is that you either paint on the sensors or clip the wires to metallic objects so that when touched it triggers the playing an MP3 track.

It turned out to be a bit too complicated for a 9 year old, but my son likes to fall asleep and wake up to music and I had the idea that I would use the kit to make an interesting MP3 player on Alex's bedhead.

The first thing was to program the Arduino board, something I was now familiar with after the ticket gate project. The code examples provided were only for the triggering of single tracks, whereas I wanted proper player navigation. This included the ability to:

  • Stop, play, pause and skip tracks
  • Shuffle tracks
  • Change the volume
  • Play collections
By default the library used by the code only plays files named in the format TRACKxxx.mp3, where each x is a number 0 to 9. I did see some code for alternative names, but couldn't get it to work so I stuck with that format.

When the shuffle mode is selected random tracks are picked. Each played track is added to a list which is scanned to ensure that it is not repeated. Skipping a track forwards or backwards only moves to the next number and doesn't use random selection.

For playing collections I made a subdirectory, in my case called sleep and placed the relevant tracks in there. I also swapped the 128 MB microSD card for an 2 GB card I'd got with an old phone. This is the largest size supported by the FAT16 library. 

The code, listed at the bottom of the post, is memory intensive and occasionally locks, but it mostly seems to work.


The need to manually copy and rename tracks made the player impractical for use by my son, who also likes current pop. Instead a I got him a portable bluetooth speaker and an old mobile phone with Google Play Music installed.

Still, after all that effort I decided to get my player working anyway and painted up a pre-primed MDF board with the stencil, affixing the Arduino board and speaker at the bottom. Each silhouette corresponds to a control. It's not intuitive, but it is artistic and I might add to the design later. I like the look of the bare white, gold and black Arduino as well, a nice reminder of what is usually hidden inside the designs.


No comments:

Popular Posts