Robotic Music Player and Sequencer With LittleBits AKA Fruityloops IRL




Introduction: Robotic Music Player and Sequencer With LittleBits AKA Fruityloops IRL

About: Bilal Ghalib is interested in doing things that surprise him and inspire others. Let's create a future we want to live in together.

So I, along with many other mammals, love to make music! I make goofy sounds, fun raps, but often I find myself playing music by myself and I wish I had a robot friend that can lay down some wicked beats. That's why I made a drum and tone sequencer with the littleBits synth kit platform.

Similar to a player piano I created a device that connects my iPad, littleBits, and a printed excel sheet to make a motorized robot that would physically hit the drums on my iPad's screen while sequencing 3 different oscillators all to the same variable beat. This makes it a really flexible platform for sequencing a variety of other instruments.

This project was intended to show people the modularity of littleBits, as well as to rethink modularity across mediums. How can we connect my iPad drums to my littleBits synth, to the physical world, to... anything! Hopping between the physical world and the digital world is fun and all it takes is a bit of creativity rethinking the interfaces each medium has. littleBits makes it easy to plug and play modules and create quick sketches in circuits, but also can easily get hooked out into the real world. Here's a video describing the whole project:

Now where do we begin.... [start dream sequence]

Step 1: Create the Interface to the IPad

The first approach I took was to imitate the way that I interact with the iPad which is using it's touch interface. littleBits has a servo bit that would be perfect to replace the functionality of my finger and with added regularity too! The idea is that by covering the end of the servo bit with conductive foam/fabric and connecting the fabric to my body or a bit of metal with a large enough capacitance we can "play" any spot on the iPad's screen by swinging down the servo's tip electronically.

For this you will need:

  • Hot glue
  • Chipboard
  • Paper
  • iPad
  • Pencil
  • Wire spool
  • Conductive foam from chip packaging or conductive fabric
  • Solder
  • Chunk of metal. Big fork, metal pipe, pan, etc :D

Here's how you make the "iPad shield"

  1. Chose your instrument. I chose Alchemy to play my drum beat but you can chose any iPad application that makes a sound you like.
  2. Trace the outline of the touch spaces you want to actuate.
  3. Trace the location of the motor making sure there is enough room for the motor to sit between them.
  4. Place the paper on top of a bit of chipboard and tape it in place.
  5. Cut wide rectangular slits big enough for the servo's arm.
  6. Hot glue the motors down to the chipboard on top of where you drew the outlines of the motors
  7. Hot glue a pad of foam to the bottom side of the servo, making sure theres about 90 degrees range of motion in that direction
  8. Strip about 8 inches of wire and insert it into the foam and also glue it into place. Strip and solder together the back end of all the wires you attached to the servo and attach them all to one long wire.
  9. Connect that wire to a heavy piece of metal, or hold on to it

Step 2: Create a Drum Sequencer Using Logic Bits

Western drums are often very rhythmic and drummers are often known as machines for keeping really great time. The crazy thing is that littleBits are even better at keeping time! The new logic bits allow us to take a pulse train coming from the pulse bit or another digital output and segment it into various offsets for the different parts of a drum beat using a digital latch.

The digital latch is like a pushbutton that latches into place. So once you hit it the button is enabled and stays enabled till you hit it again. Putting one in line with a pulse will cause the output to turn on every other time the pulse is turned on. Putting two in a row causes it to pulse every 4 and so on.

Place the shield you created in the last step on top of your iPad and fix it into place with some tape. Before creating the logic drum machine you will need to tune the servo arms so that it swings and touches the screen but doesn't push too hard. To do this connect the power bit to the pulse bit followed by a potentiometer bit. Then sequentially connect each servo motor to this while adjusting the potentiometer. This will allow you to tune the arm so that it doesn't swing too far but still hits the pad making a good connection.

Now it's time to create the logic based drum machine. The paper diagram above describes the flow of the bits. Here's how to arrange them:

  1. Power. All circuits start with POWA
  2. Pulse. This will give us our clock for this demonstration of a logic based drum machine.
  3. LED. This will help us debug and gives a visualization of what's happening
  4. Branch. This neat logic bit let's us fork the path of our circuit into doing multiple things at the same time
    1. Branch 1
      1. Latch delay the pulse
      2. LED
      3. Potentiometer

      4. Servo Motor. Connect to the sound you want to play every other beat

    2. Branch 2
      1. Latch
      2. Latch
      3. LED
      4. Potentiometer
      5. Servo motor. Connect to the sound you want to play every 4th beat. I chose the bass.
    3. Branch 3
      1. LED
      2. Potentiometer
      3. Servo motor. Connect to something that happens every beat. So for me I liked it on the high hat.

Once you have your circuit in place and you've attached the servo motor bits on the shield to the slide potentiometers on the logic circuit we just designed. Bring a few friends and then turn it on.

Here's a video describing this process and showing you the beat it creates:

I look so happy don't I?


Step 3: Make the Roller Setup for the Drum and Music Sequencer

So we now have two parts.

  1. An interface to your iPad
  2. A logic circuit that creates a drum beat from a pulse train.

What we are missing is the tone generating circuits, and the physical sequencer which will coordinate the action.

The basic premise is that we will create a roller device that will draw a dark spot over a light sensor bit to trigger both the logic drum machine and the tones. Taking inspiration from roller mechanism inside the Great Uncle Edward project seen at littleBits. After a quick period of sketching out ideas I started. Here's what you'll need:

  1. 2 Wooden dowels
  2. 4 Thin nails
  3. Wood blocks about 6" tall or laser cut replacement holders
  4. Chipboard / acrylic
  5. DC Motor bit
  6. Cardboard base


  1. Find the center of the dowels and mark it with a sharpie
  2. Hammer a thin nail halfway into one dowel
  3. Hammer two thin nails halfway into the other dowel
  4. Cut a circle of thick chipboard so that it fits on the end of the dowel
  5. Cut a small T into the chipboard and push one end of the DC motor bit through, glue it in place
  6. Arrange the wooden blocks as a stand for the dowels and fix them to the cardboard they're sitting on
  7. Place the dowels into grooves cut into the wood so that they are all the same height and spin freely.

As an alternative arrangement you can use a picture frame similar to the Great Uncle Edward project to hold two rollers in place. However you do this step the important part is that the rollers stay a fixed distance from each other and that they remain parallel.

Step 4: Make Narrow Field of View Light Trigger Sensor

Now we must create the light sensors that look up at the paper roll that gets periodically blocked by a passing dark patch printed on the paper. To do this we must take a light trigger bit and tune it appropriately. We also must create a channel so that the light sensor doesn't get much ambient light except from directly above it.

Here's what you'll need:

  1. Clay
  2. Paper
  3. AA Battery
  4. Electrical Tape
  5. Light Trigger bit
  6. Scissors
  7. {ALT} - bubble tea straw (one of the fatties)
  1. Roll a tube of paper around a AA battery and proceed to tape it heavily with electrical tape so there's a nice thick tube.
  2. Push the battery out carefully using a pencil
  3. Cut the tape and paper tube till it's 1" tall
  4. Roll a tiny bit of clay and make a circle out of it. Place that circle around the light sensor on the light trigger bit.

Do this for each trigger you want. So for this project I needed 3 triggers for oscilloscopes and 1 for the pulse train to the logic drum machine. I made 5 of these in case I wanted to add another feature.

After making the narrow field of view light triggers you need to tune the system. Cut a thin strip of paper and scribble some squares on it with sharpie, this will represent a note or trigger. Now make 2 simple circuits (or use a branch, I made two circuits in the photo) like this:

Power => Light Trigger with hat => Long LED

Power => Long LED

Point the Long LED down into the barrel of the tube you made and notice if the light turns on or off. If nothing changes use the screw driver to change the sensitivity adjustment screw on the Light Trigger bit. Once you notice a change from on to off or off to on when you shine the light on top bring the paper between the long LED and the barrel and drag it across so the squares pass over casting shadows into the tube. Continue to tune the sensitivity screw until the output changes depending on whether or not there is a dark square on top of the tube.


Step 5: Create the Paper Music Scroll

We have most of the electronics and mechanics done. Now we must create the music carrying medium! This is where you open excel for something non-work related. Crazy right?!

The structure of this sheet is as follows you have rows that define instruments and column width that define length of note and notes per roll. The far right of the paper has a black bar every other row. This is the clock that will go to the logic drum machine and operate it instead of a pulse bit. The blocks in the middle represent various notes that will be connected through the light trigger to different oscillators.

To make the right blocks for your excel sheet and to start drawing music you'll need to size the rows and columns appropriately.

What you'll need:

  1. Computer with excel or Google Docs
  2. Printer and paper

Your loop length will depend on your cell height. So first you need to figure out how long of a roll length you have. Take a few sheets of paper and tape them together. Pull them across the roller mechanism you created and mark the intersection point where the front of the sheet wraps all the way around and touches the other side. Measure that length and divide it by the number of beats you want. For instance if you wanted 1 beat per loop you would take the loop length and dive it by two and make that the cell height in excel. This will give you one block of black and one block of white on the edge. If you wanted 200 beats per loop you will take your length measurement in inches and dive it by 400.

For the width of the columns you should measure the distance from center to center the narrow field of view light trigger's tubes.

Now go crazy in the excel document. Maybe you have an idea for a 3 note song that would be awesome. Or maybe have a great bass riff. Fill in the excel blocks with black whenever you want that note to be operational. Once you draw your music, print it out, cut it up. tape it together and install it onto your rollers :)

Turn the motor on, you should see the paper rolling by. If you do, onward!

Step 6: ​Make the Light Bar

The light bar is simply a row of LED bits that sit directly on top of the Light Trigger bits and shine down on them. We attached the light bar to a strip of foam board and used a rubber band to fix them in place.
Place the row of light bar inside the device. It should be in the the middle of the paper pointing downwards facing the light triggers. Arrange the light triggers so that the middle of the excel column crosses the middle of the trigger. This will be much easier if you arrange the trigger on a mounting board.

Step 7: Optically Isolate the Motors From the Rest of the Circuit.

We're so close to finishing! If you attempt to run the clock train directly into the motors be warned, they suck a lot of juice, have potential backward flowing electromagnetic fields coming from turning the motors on and off and can create problems for the rest of the circuit. So to prevent that unpredictability we optically isolate the motor circuit from the trigger and synth circuits. To do this take the output from the clock pulse light trigger and connect it to a wire and a long LED bit.

That long LED is placed on top of another light trigger that replaces the pulse bit in the first version of the logic powered drum machine and is fixed in place and isolated from other light with a big blob of clay. Test the sensitivity by putting a pulse on one end and seeing if it's being picked up by the trigger.

Here's are two circuits

Power => Light Trigger => Wire => Long LED {sitting on top of other trigger with blob of clay}

Power => Light Trigger {with Long LED and clay on top} => LED => Branch =>rest of logic drum machine

Previously the logic drum machine set up looked like:

Power => Pulse bit => Branch => rest of logic drum machine

Step 8: Assembly and Setup for the Synthesizers

So here is the architecture of our project so far:

  • Logic drum machine connected to an iPad
  • Roller system with a printed set of music and clock
  • Trigger system set up with outputs
  • One output optically isolated and connected to the logic drum machine

What we need to do now is connect the other 3 outputs to an oscillator and make some NOISE!!! The simplest synth setup is:

Power => Oscillator bit => Speaker

The photograph above is a more complex sounding keyboard triggered synth project I was working on. For this project I kept it simple and had three different oscillators set at 3 different frequencies. Once you set up your three synth devices it's time to connect the final pieces together.
Wire bits help a lot here, plug the output from the three note triggers into the three synth setups you just made and plug in all the batteries. Using mounting boards is very helpful to keep things from moving.

Ok, so this is it. The time has come to flip the switch and turn it all on :)!

Step 9: Find Critics and Rock Out!

Gather your friends (critics) and turn the device on. If absolutely nothing happens ignore the scoffing and check the circuit diagram above and make sure you have all the connections properly connected. Adding LED's to explore where there are potential faults helps. But if it works, CONGRATULATIONS! Now you have a platform where you can print out new songs, make more complex synth instruments, play alongside with another device, modify the logic on the drum machine and more! I'm curious to see how you take this project and remix it and make it your own.

Record your jams and share it with me! :)

Here's a short overview of the setup and how it works:

Stay wonderful and let me know if you have any questions on how to put something like this together. Your version will necessarily look a lot different than mine!

Be the First to Share


    • Puzzles Speed Challenge

      Puzzles Speed Challenge
    • "Can't Touch This" Family Contest

      "Can't Touch This" Family Contest
    • CNC Contest 2020

      CNC Contest 2020