Sound Card Driven Servo Motor

[youtube=http://www.youtube.com/watch?v=1LG2Ecsk13Q]

[Darrell] is using a sound card to drive this servo motor. The motor draws power from a cellphone battery with the control signal coming from one of the audio channels. It’s not too surprising that this works since the motor just needs a PWM signal to operate and that’s what is used to create the different frequencies of sound on electronic speakers. We’re not sure what [Darrell’s] got planned for this system but he mentions that two servos can be used, one on each audio channel. If you’re not using your sound card this would be a way to stop using the Arduino for that mail checker and just use a little flag attached to a servo. When mail comes in the appropriately engineered sound raises the flag.

14 thoughts on “Sound Card Driven Servo Motor

  1. […] and that’s what is used to create the different frequencies of sound on electronic speakers.
    no. thats wrong. he is playing a special soundwave: “[…] play a special tone that is low for between 1-2ms and high for the rest of the time at 48hz!” as written in the description of the video.

    I think this works because the servo has internal clamping diodes on the input terminal which add a dc-component to the soundcard signal.

  2. I was pondering this idea a year ago thinking about cheap ways to drive an X-Y plotter. this is awesome!

    now if you can get some software to convert XYZ coords into 3 ch pwm audio, you’d have a really cheap driver for a CNC with hobby servos.

  3. To clarify, when I say “low” I mean logic low, not music low. The pulse is high to low for Hitec and Futuba servos, but I think it is inverted for Airtronix and JR, so you may have to experiment.

    Theoretically it should be at 50hz because servos are supposed to get a pulse every 20ms but I found that a slightly lower freq eliminates jitter. Also never pulse a servo at more then 50hz or you may damage the motor driver circuit.

  4. Neat idea.

    And I am reminded that my C64 D2TV has three audio channels that can be brought out individually, as well as a PWM waveform. Hmm…

    Oh, and then there’s that app note from Maxim about using an audio amplifier IC as a stepper motor driver (google it). Misuse of technology can be fun!

  5. Seems like a great hack for simple motion control on halloween props. Just use a voice recorder chip or mp3 player and put it on a loop. Of course I would probably use a cheap microcontroller but if you don’t want to program it would be an easy alternative. Outstanding hack.

  6. @Brian Aday

    I didn’t even think about an MP3 player, that might work depending on how good the player handles those frequencies. If you want to just move a servo, a cheap $10 MP3 player can be reused.

  7. I often use my line-input as an ADC for when I need to measure something.

    Recently, I’ve measured the speed of my hometrainer by connecting the flywheel sensor directly to my line-input. By measuring the time between each pulse, I could calculate my current cycling speed. You can read about it on my blog.

  8. I did nearly the same thing last year, needed to hook up a stepper motor to a new laptop without the traditional parallel port, didnt want to use a micro for usb (or the controller) so I used the sound output, my controller was set up for 2 inputs one to step left, the other channel to step right.

    The whole project was to move a camera for a time lapse panorama.

  9. also another mod is to use a high pass filter and transistor switch. this way the pc can generate >15 kHz outputs (sound cards often work up to 22) and the servo will react to it as if it were a lower frequency.

    total parts count is under 10 for two channels.

Leave a Reply to loansCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.