“Arduino Powered” CD Changing Robot

UPDATE!

Check out my new(er) cd robot project here. I grabbed an old scsi changer machine from ebay and have been working on adding serial connectivity to it. If it works, it will be a much simpler route!

One of my “always in my head” projects is a CD changing machine. I have seen the myriad of other projects out there, and this always captivates me, in that it is just out of reach, but it seems to be a fairly simple concept. I have been thinking and sketching on this one for SUCH a long time that I have decided to post it before it is fully polished up.


arduino powered cd robot - left side


The basic premise is I have an arm that swings up and down mounted on a platform that rotates 180 degrees. Both of those are positioned by hobby servos. On the tip of the arm there is two vacuum aided suction cups and some hdpe tubing.


arduino powered cd robot - front view facing right



An arduino calls the shots, telling which servo to go to where, as well as controlling the vacuum pump and the cd tray. I have it connected to ladyada’s motor shield. I believe I have 5v going into the “motor input” part of the shield. This exits the shield and goes to a 6v relay that actually powers the vacuum motor(with 12 volts). The other relay is actuated by a different motor shield port and opens a relay that is hard-wired to the cd tray close button on the cd drive.


arduino powered cd robot - circuitry

The Vacuum Pump is a 12v automotive tire inflator like this one
. I bought it and jb-welded a nylon tube nozzle onto the air intake port. This serves as a poor man’s vacuum pump.


arduino powered cd robot - PC power supply and Vacuum Pump


The power supply is one from a tower pc. There are plenty of instructables and blogs about how to make one of these. I didn’t have a resistor big enough around, so I used a car brake lightbulb. It provides a myriad of different voltages and much more amps than the standard wall wart.


arduino powered cd robot - front view facing left

SOFTWARE – So the basic theory is that the arduino sends the arm around to the different stations, lowering it, powering up the pump, raising it, and then rotating it over to the next station. The 3 ‘stations’ are a cd input tray, a cd drive, and a cd output tray. When the arm drops it onto the cd tray, the arduino puts high a motor control pin on the motor shield, which activates a relay to ‘push’ the cd close button. From there I have itunes set up to auto-import and eject the disc. There is a switch that closes when the cd tray hits it, telling the arduino to pick up the disc and move on.


PROBLEMS – The motor shield situation is not what it was designed for, and is probably not the best way of going about this. I am using it because I can’t run 12v through my arduino.


I also initally wanted to use tinker.it’s serial->applescript software, but I have found it to be very buggy (sadly)

The servos move very jerkily and quickly. That means that some times the arm will flex one way or the other, and the movements are not very reliable. I am currently trying to write a way for the servos to wind up and wind down slowly and hopefully end up with a more polished result.

The vacuum tubing is pretty stiff and I can’t find a way that it doesn’t interfere with either the rotation or the up/down movement of the arm.

The vacuum pump is pretty loud, but I will deal with making an enclosure when the rest of it is all running nicely.


STILL TO DO
I need to build a platform for the cd tray and the arm to mount to, create some sort of stacking corral for the input and output, and just test it more.
I would also LOVE to find a way to detect the cd open state without a switch (ie via the computer) and get tinker.it’s solution working for closing the tray. Thusfar the software will work, but not reliably. I’m not sure, but it might be somehow conflicting with the arduino program’s serial monitor.

as always, suggestions are welcome! And video to follow!

11 Responses to “Arduino Powered” CD Changing Robot

  1. Pingback: Arduino powered CD changing robot - Hack a Day

  2. Pingback: Arduino powered CD changing robot @ NerdNewz.Net

  3. ok so after a quick review of http://arduino.cc/en/Reference/Servo I have some sudo function code for you. assuming you handle pin attachments elsewhere;

    MoveServo1(int X, int Y)
    {
    //I
    doWhile((X != servo1.read()) && (servo1.attached()==1) )
    {
    if(X > servo1.read ())
    {servo1.write(servo1.read ()+1)}
    else {servo1.write(servo1.read ()-1)}
    wait(Y);
    }
    if(servo1.attached() ==1) return(1);
    else return(0);
    }

    rotation, fixed/continues
    X=position/speed
    Y=speed/acceleration
    //I
    int I = servo1.read (); may be placed on this line and all other instances of servo1.read () should then be replaced with I. You could dig around in servo.h to find out what the best option is, I don’t know if servo1.read has any benefit over indexing internally besides letting you know that servo.h’s output index is really where the function thinks it is in terms of output to the servo, but this should never happen even with internal indexing unless something goes terribly wrong. Sure servo.read makes the function take longer to run but that’s just adjusting the Y baseline, and if you want to go fast when your not holding a CD just use servo.write not the MoveServo1 function.

    If you want speed/acceleration control on both servos you could add another argument to specify which one, (int y, bol ServoNum) then replace servo.write with Z = and add [if( ServoNum == 1) servo1.write(Z);
    else servo2.write(Z);]
    between the else and wait lines.

    As far as the stiff vacuum tubing getting in the way have you thought of mounting the pump on the rotating base plate? Then you only have to flex the tubing on one axis, the added mass might also smooth the motion out a bit if its balanced to counter the arm like on a back hoe, and we both know if you ditch the plastic casing the pump will take up 1/3 the space it currently does if your running out of room on your baseplate. There are also some more flexible verities of tubing that will hold up under the vacuum that pump can pull, I forget the proper name but home depot sells it, its slightly squishy, non-transparent, and usually has a gloss finish. Its commonly used as pneumatic air line in the industrial manufacturing world to power pneumatic cylinders on assembly lines, usually used with plastic quick disconnects instead of hose barbs or compression fittings.

    You could mount two pikes of lamp rod (threaded rod with a hole through the center) to a base plate, and then mount an IR LEDs at the top ends of the lamp rod and space the length of the rod so that you can place a translucent CD spindle over them, then re build the manipulator, use 3 equity spaced suction cups mounted to a CD and a IR sensor above the center whole in the CD, then all you have to do is center on the IR led and lower the CD griper, the spindle will align the griper with the cd perfectly every time, similarly you can place an IR led under the open tray and center on that to get more reliable positioning results. You can easily swap out spindles if you ever wand to burn your newly ripped mp3 collection to DVD back up for of site storage ;).

    wow that was a rant, I’m an electromechanical engineering student that’s been stuck working of liberal arts requirements for the last semester, man I wish I had time to be working on my project, I got an old scsi CD juct box with a proprietary serial interface to play with and upgrade to a USB DVD burner, but before it showed up at the flemarket I had been planing on building my own, I wish I had thought of using suction cups, the griping mechanism was the part that kept me from getting started. I will warn you to make sure you have some sort of filter on you vacuum line, I used the same trick a while back and you need to make sure nothing gets in to the compressor that shouldn’t or your off to harbor freight to buy a new one.

  4. CD/DVD drives usually have a microswitch inside that tells the internal controller if the tray is open or closed. You can interface this switch to one input of the arduino

  5. Wow Matt!

    Thanks for all of the info! I will definitely have to try to integrate some of that into version 2.0. I hadn’t thought about putting it all on the rotating platform, but I could see that working.
    Good luck with your scsi box. I picked up a big old scsi cd-r tower a while back and had big plans for it.

  6. Hi Francesco!
    I actually do have the microswitch interfaced. It is the second relay on that relay board. It is still buggy though. I am really interested in getting that part done in software, but I haven’t had much luck thusfar.

  7. Python and the pyserial interface is a wonderful way to write your own connections to your arduino. I actually didn’t know the arduino software had a serial monitor until yesterday! I wrote a simple motor controller that allowed you to specify the direction and duration of the motor spin. It was incredibly simple and worked wonderfully.

    If you can write programs for your Arduino you can definitely write programs in python. HTH!

  8. I have been working on a CD loader for quite some time, kudo’s for posting what you have. I am particularly impressed you chose to use vacuum and pick and place suction cups. I am perfecting my vacuum pickup, and I haven’t seen anyone else go this route. You might like my design for the pump, it is quieter. I haven’t published it yet, so if you want to collaborate on the project let me know.

  9. @Joseph Le Brech – yes I could use an optical sensor, but I don’t see much advantage to the mechanical switch I am currently using. Also, the mechanical switch is one of the only things that hasn’t worked erratically! If it ain’t broke…

    @Srilyk – definitely! did you check out my serial lcd projects? Here’s a python script that checks facebook status updates and prints it out to an arduino connected LCD. I definitely want to learn more python.
    http://blog.tinyenormous.com/2008/12/02/arduino-based-rss-reader-with-lcd/

    @brian aday – I’d love to see your pump ideas! I don’t know if you saw it, but I’ve been working on a cnc router as well AND I’ve got a bunch of photography posts too. I think we’re geeks-of-a-feather!

Leave a Reply

Your email address will not be published. Required fields are marked *


eight + = 15

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>