Shop OBEX P1 Docs P2 Docs Learn Events
Musical Stepper Motor — Parallax Forums

Musical Stepper Motor

RaymanRayman Posts: 14,848
edited 2009-08-22 01:38 in Propeller 1
I'm playing around with driving a Stepper motor directly from the Prop (with just a ULN2803 buffer in between)...

Anyway, did full-step, then half-step and it got smoother.

Then, went to quarter-step (where I cycle between half-steps for the extra steps) and I swear the motor is making musical notes!· It sounds like cheesy special effects for Star Trek or something...

Anybody noticed this with stepper motors?· Or, maybe I'm doing something very wrong...

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-25 18:21
    You'll get a tone as the step speed (full / half / quarter)·gets into the audio range.· After all, you've got pulsatile movement at an audio rate, not an efficient way to produce sound waves, but it works.
  • Ken PetersonKen Peterson Posts: 806
    edited 2008-06-25 18:39
    @Rayman: When doing quarter-step, does the motor run even smoother, or just get louder? What frequency do you use to cycle between steps? Does it depend on overall stepping speed?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Jim FouchJim Fouch Posts: 395
    edited 2008-06-25 18:42
    Some of the old dot matrix printers used to drive the steppers at higher rates to make sound. It would not actually move the stepper, but create a tone to indicate an error.

    On my CNC router, the controller (at·idle/rest)·pulses the steppers at such a rate that they sound like hissing air.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jim Fouch

    FOUCH SOFTWARE
  • RaymanRayman Posts: 14,848
    edited 2008-06-25 19:10
    It's very smooth...
    I just found that the frequency depends on the rate at which I cycle between half-steps to make a quarter step...

    Here's a video:
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-06-25 19:11
    I've found the same thing. Try increasing/decreasing the frequency on the fly and make an entire song out of it! I did half of Mary had a Little Lamb [noparse]:)[/noparse]
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-25 19:13
    One person's pen plotter or printer or CNC table is another person's musical instrument.
  • jazzedjazzed Posts: 11,803
    edited 2008-06-25 19:23
    ROFLMAO [noparse]:)[/noparse] Sounds better than R2D2. Was kind of hoping to hear the "door shwish" sound though since you mentioned Star Trek.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2008-06-25 21:31
    I think I hear "Paul is dead" backwards.
  • HarleyHarley Posts: 997
    edited 2008-06-25 22:42
    May be off-subject, but.....

    A company I worked for in the early '80s had 'open-house' periodically. The Test Equipment department had what I thought was a really neat 'display'. They had a large shake table; about 3-4 feet across, if memory serves mounted on a concrete slab. Basically like a huge speaker coil with a mechanical 'mounting table' about a foot across for whatever unit-under-test.

    Well, the day was slow, and I got permission to stand on it while it was playing Star-Wars it seems. Man, did that 'massage' tool sound good and feel good. Hated to get off. And hoped it wouldn't turn my shoes and feet to Jello. Tingled for many minutes. Don't know what power it took to drive the shake table, but I'd guess many Watts.
    Sensory rather than visual demonstration. yeah.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-06-25 22:59
    I don’t know how many forum members remember the C=64 but there were programs you could get which would play songs through the 1541 Disk Drive (which was Stepper Driven). This is the same effect. I have seen hacks for printers as well.

    http://everything2.com/e2node/Commodore%25201541

    This one is live video of it...

    http://www.youtube.com/watch?v=5gnMgmlKi_o

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • hinvhinv Posts: 1,255
    edited 2008-06-26 13:38
    Yeah,

    I remember doing that on the 1541 when I was a kid. I was quite amazed. We only ran it once because we didn't want to damage it driving it. Back then, those cost big money to us.

    I sure wish that guy with the c64 emulator on prop would come back and share his stuff.

    Thanks,
    Doug
  • LeonLeon Posts: 7,620
    edited 2008-06-26 13:54
    Like most of those early computers, the C64 has been emulated on an FPGA. I could run it on my Xilinx Spartan 3 board.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • Ken PetersonKen Peterson Posts: 806
    edited 2008-06-26 14:35
    @Rayman: When I heard your video I laughed out loud. It's like that squeaky wheel sound effect you hear in all the cartoons.

    @Harley: We use vibration tables for durability testing of our product (rear view mirrors) in the building I work in. They do use a lot of power! The drivers for ours run from 480V 3-phase power. We have one test with a random waveform that will shake an assembly to bits.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Eric REric R Posts: 225
    edited 2008-06-27 03:11
    I saw this on a scanner once.

    http://www.youtube.com/watch?v=s1tatiU2ha0

    Pretty neat!
  • simonlsimonl Posts: 866
    edited 2008-06-27 13:34
    Hehe! Reminds me of the Top Gear programme when Richard Hammond tried to drive a Renault Formula One car - at the end the engineers ran the engine so that it played the national anthem! (Would that be the most expensive musical instrument?)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2008-06-27 13:42
    Quite similar:

    Some radiohead:

    www.vimeo.com/1109226?pg=embed

    p.s. you have to wait for it to load

    Post Edited (Graham Stabler) : 6/27/2008 2:03:46 PM GMT
  • simonlsimonl Posts: 866
    edited 2008-06-27 14:15
    I love YouTube - here's the musical Renault F1: www.youtube.com/watch?v=uT4dpGRpDeY

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2009-08-22 01:38
    Leon said...
    Like most of those early computers, the C64 has been emulated on an FPGA. I could run it on my Xilinx Spartan 3 board.
    But will it sing, Leon? tongue.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sign In or Register to comment.