Servo Movement via Music Input

uliuli Posts: 6
edited 2004-12-04 - 03:15:34 in Robotics
Hi all,

has anyone ever tried to move a servo by music (line level)? I found a way with help of the group to do it with stamp but I figure there must be some easier, more direct way. The task is: how to convert Voltage (about 1V) into a shift of the high-time and low-time of a fixed Frequence (to control servo)? Must be some kind of A/D converter influencing the pulswidth.. Any ideas?

Thanx a lot in advance!

Uli

Post Edited By Moderator (Jon Williams) : 12/3/2004 4:15:17 PM GMT

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2004-12-02 - 20:00:46
    No, there is no direct mapping between Music frequencies and the input a Servo requires. A Servo wants a normally low signal, with a high pulse of from 1 mSec to 2 mSec, repeated every 20 mSec. This does not match the relatively chaotic mix of frequencies output in Music.

    What this means is there needs to be some 'driving' device generating the Servo signal. So, the question then becomes what kind of input signal, and input processing, should be done to the music (Fourier Transform? Volume? ) so the 'driving' device drives the Servo in a 'meaningful' way.

    You can't 'wish' or 'magic' this level of processing away. By the way, finding frequencies from a set of digital readings of analog voltage IS what the Fourier Tranform does. This tends to be processor intensive.
  • uliuli Posts: 6
    edited 2004-12-02 - 20:37:31
    No, it doesn't have to be that complicated, I just want the servo to move according to the VOLUME, so all I need is some kind of amp to increase the line signal and then something that transforms the Voltage into the pulswidth...
  • allanlane5allanlane5 Posts: 3,815
    edited 2004-12-02 - 23:03:40
    Again, there does not exist any 'simple' solution which will turn a 'volume' signal (0 to 5 volts) into a pulse-width pulse for a Servo. The BS2 is about as 'simple' as that gets. This is at most a 20 line program for the BS2.

    That 'all I need is... something that tranforms the Voltage into the pulsewidth' statment is the problem. The BS2 is a good solution. Transforming a Voltage into a 1 to 2 mSec pulse-width repeated every 20 mSec is right up the BS2 alley.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-12-04 - 03:15:34
    Uli,

    ·· I saw your earlier thread on this, and it occurs to me...If you're line-level signal will be average music, then the servo will never be able to track the volume changes with any speed anyway.· Picture a rock song playing, and everytime there is a bass beat, the volume is peaked out at 1V, and in between, silence.· The servo will never be able to move fast enough to respond to changes in volume like that.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
Sign In or Register to comment.