Home‎ > ‎

Jukebox

Read on, or go straight to the Youtube playlist

Introduction

I started this project “a while ago”, when MP3 players weren't so common. The idea was to stack a load of CDs/DVDs/BluRays on top of my PC tower and pick and place them into the PC disc drive so they could be played on the PC. Ultimately I'd integrate this "jukebox" into a music-playing application on the PC like Amarok but I never got around to this. Instead I wrote a GUI to manually control the Jukebox and knocked together a Bash script to play back a CD requested by the user.

Implementation

I should start by saying that my aim was to build it almost entirely out of Lego Technic Mindstorms with the brains being a pair of RCXs in communication with the host PC using IR. There are two parts to the jukebox; the mobile part and the static bit.

The mobile part was basically a train with a lifting device that would travel along the line of stacked discs and pick one up then transport it to the end disc slot which would be in the vicinity of the PC's disc drive. I originally designed this with the RCX directly controlling a Lego train motor however this proved too inaccurate. Instead I used a rack and pinion method that stretched along the length of the rack of discs. The location of the “train” is calculated by a downward-facing optical sensor which looks onto a zebra crossing pattern. The angle of the lifting device on the train uses a rotation sensor to determine placement. The jaw that actually grips the disc on the train just uses a touch sensor to know how hard it should grip on a disc and how to release a disc.

The static part of the system would take the disc from the end slot (where it was placed by the mobile part) and put the disc into the PC drive and retrieve it when required. This uses touch sensors and rotation sensors for positioning. I also used an optical sensor to determine if a disc had been correctly placed in the end slot or not.

Software

There are separate RCXs for mobile and static parts of the system. The PC side of things runs LNPD with a Qt application for the GUI. As I mentioned, ultimately I would integrate the system with a music player on the PC but I grew unmotivated before reaching this stage!

Here's a screenshot of the manual control software:


The embedded software for the RCXs was written in C using multiple threads in the mobile part to control motor power (important when overcoming obstructions like tangled wires) and measure position along the rack of discs. Here is a photo of the actual RCXs and their IR transceiver that was attached to my PC:


A Note on Non-Lego Parts

There were some places that I had no choice but to use non-Lego parts. This is sacrilege but I couldn't have got it going without going insane otherwise.

The non-Lego parts are:

  • Tissue paper used to raise the height of the rack slightly to allow the train's drive cog to engage with the teeth reliably.

  • Black and white striped paper to allow the train to align correctly to pick up discs from the rack. I found black Lego to be too reflective and using black and white Lego tiles wouldn't have allowed me to accurately position the train in conjunction with the optical sensor.

  • Plastic tabs+blu tac+araldite – this was used on the train jaws to allow the train not to be perfectly lined up with the discs, and indeed to allow some leeway in the way the discs were placed in the rack by the train.

  • Bicycle puncture repair rubber strips - used to give the jaws on the mobile part of the jukebox more grip for lifting discs.

Result

I was pleased with the outcome though it took a large amount of fine tuning to get the system working to my satisfaction. Even then, it isn't particularly reliable due to the Lego creaking itself apart during operation and me not using enough rotation/touch sensors. I think you can solve most robotics problems with enough sensors!

If you want to see exactly how it works, I recommend downloading the LDRAW files from the downloads section below and opening up "jukebox.ldr" in MLCAD.

Specifications

  • 2 x Lego Mindstorms RCXs powered from the mains, each running BrickOS 0.9.0
  • Static part: 2 micro motors, 1 normal Technic motor, 2 touch sensors, 1 rotation sensor and 1 light sensor
  • Mobile part: 1 normal Technic motor, 1 mini Technic motor, 1 micro motor, 1 light sensor, 2 touch sensors, 1 rotation sensor

Photos

Here's a photo of the entire setup:


The long white strip on the zebra crossing pattern is to allow the mobile part to work out where slot 0 is when it's initialising. You can also see the gray train track that the mobile part drives up and down in order to select CDs.

Here is a closeup of the static part (the white and yellow sticks are pushed into the disc's hole and then they expand outwards in order to grip the disc):


Close up of the gripping sticks (the translucent rubber piping also helps to grip the disc by stopping the disc sliding down the sticks when a disc is held upside down):


And here is the mobile part:


And a close up of the gripping jaws of the mobile part:


Videos

Check out the Youtube playlist. This does the best job of explaining how it works.

Downloads

You can download the binaries that run on the RCXs for the static and mobile parts.

BrickOS binary that runs on each RCX here. Source code for BrickOS project is here.

The PC application for controlling the Jukebox is here. You'll also need the LNPD daemon running on your PC before you start the app.

You can download the LDRAW drawing instructions here. You'll need MLCAD to view the design and the best way of getting this is by downloading the LDRAW automated installer from here.


Email me: ralph_lego@<domain is oohaY backwards>.com

For Sale

The whole thing is for sale. I'm based in London, UK and open to offers, otherwise it'll end up in pieces on ebay.

Č
ċ
brickOS.srec
(31k)
nash12er .,
28 Apr 2013 13:15
ċ
jukebox
(53k)
nash12er .,
28 Apr 2013 13:18
ċ
mlcad.zip
(61k)
nash12er .,
28 Apr 2013 13:23
ċ
mobile.lx
(3k)
nash12er .,
28 Apr 2013 13:18
ċ
static.lx
(2k)
nash12er .,
28 Apr 2013 13:18
Comments