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):
Read on, or go straight to the Youtube playlist
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.
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
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.
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:
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:
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.
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.
Youtube playlist. This does the best job of explaining how it works.
Email me: ralph_lego@<domain is oohaY backwards>.com
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.