Motors as speakers?

Anyone who’s ever worked on VEX, or turned on a camera flash, has dealt with the microphony effect. This is when a high-frequency changing magnetic field is induced in a wire due to an electrical wave, and the field opposes itself, causing the whole coil to vibrate. It’s what makes that high-pitch whine when you turn a VEX motor on half-power, or charge a camera flash. So, knowing this effect exists, I was wondering if you could turn a motor into a speaker using PWM sound encoding.

The most common way of producing an analog signal on a microcontroller is using a PWM signal pulsed through a low-pass filter. Basically, an analog signal is represented by the duty-cycle of a high-frequency PWM wave (usually around 40 kHz), and the low-pass filter takes out the high-frequency, leaving a fairly good approximation of an analog voltage. Motors are inductive, and inductors were the first low-pass filters, and continue to be used for such purposes as RF chokes and some high-current audio equalizers. So what if you just used a motor as the low-pass filter, and encoded an audio signal into a PWM wave, say, through a motor controller. Would the motor make music, or would it be too high a load and cause too much interference?

Just food for thought. I don’t think this would be possible through a servo signal motor controller, the updates to servos (and VEX motors) only happen once every 20 ms or so, so I think this would have to be done with a hardwired motor on a CCP port on the VEX if that were the platform being used. Maybe I’ll try that if Santa brings an Arduino :rolleyes:

The lean-steered Segways do this. The startup whoooooop noise is emitted by the motors.

Some brushless DC motor speed controllers for model aircraft do this as well. For example, Schulze future-universal controllers cause the motor to chirp as a way of indicating the calibration status.

I think that’s using stepper motors, which is a slightly different angle than what I’m looking for. Making sound with steppers is more about turning on coils at crests and troughs, not producing multiple crests and troughs in the same coil in sequence.

Anybody know how fast the CAN’s on the Jaguars update? :smiley:

Not exactly, what you are hearing are two different things. The high frequency you hear in a flash charging is the actual oscillator used in the DC-DC converter. It changes frequency because the feedback that causes oscillation is dependent on load current. As the capacitor charges the load current becomes less so the frequency rises.
The Vex motor whine could be a variety of things but is most likely the windings in the motor moving or the laminations of the armature reacting to the PWM input. Manufacturers of small, cheap components rarely dip the coils to prevent individual wires from moving in the magnetic field. Moving laminations is something we all just learn to live with. There is greater acoustic output from a motor when using the IFI 844 Victors because the switching frequency (150Hz) is so low compared to Jaguars (15kHz). Old 883 Victors switched at about 2kHz and made some nice whine when used in the past.
Motors have been used to drive speaker cones directly. But since there is so much mass to move, they have been relegated to very low frequencies such as large sub-woofers.
As to microphony effect, I think what you may be referring to is “microphonics”. This is an effect wherein acoustic energy adds noise to a stable signal. Vacuum tubes were particularly sensitive to microphonic if tapped or if present in a large signal acoustic environment. Modulation of video was also a microphonic effect in cameras prior to the 1990’s when used on music shows with loud PA systems. CCD cameras have nothing to move in the pickup so they are not sensitive to microphonics.

Stick shake is made the same way as well.

-Tanner

As a cool side note:

Ceramic capacitors have a slight piezoelectric effect. They make very good (obnoxious) speakers in these sorts of circuits. They also make electrical noise when you tap on them.

Has anyone built a circuit designed solely to play tunes based on these effects?

Not exactly, what you are hearing are two different things. The high frequency you hear in a flash charging is the actual oscillator used in the DC-DC converter. It changes frequency because the feedback that causes oscillation is dependent on load current. As the capacitor charges the load current becomes less so the frequency rises.

I was under the impression that microphony referred to the effect you’re describing. I guess it’s sometimes called a “reverse microphonic” effect. But in any case, I know how the effect works, I just don’t know what it’s called. The two phenomena are essentially the same, there’s a high-frequency electrical oscillation in both cases which causes the physical coils to vibrate.

Aaron,
The terms “microphonic” or “microphony” imply that the device is receiving acoustic energy and converting it into a signal, or noise and distortion in an existing signal. In the cases I was describing, the components themselves are reacting with the surrounding air or vibrating parts within the component to produce sound. In the case of magnetic devices like transformers or motors, the changing fields in the audio spectrum can either move the parts of the device to produce sound or move the entire device to produce sound. It is not uncommon for a transformer winding to become loose on it’s core and vibrate at the frequency (or sub harmonic) of the signal that is passing through it. Capacitors have been known to also produce sound, particularly those that have aged and have microscopic spaces between the plates. As has been pointed out, ceramic capacitors have a slight piezoelectric effect and can physically distort with applied signal.
High quality audio transformers take care of many of the problems related with transformers by dipping the cores in a some adhesive (usually a high temperature varnish), using specific winding techniques for the wires and then securing all components of the transformer so that nothing moves when it is installed. In some transformers it is also necessary to enclose the transformer in a magnetic shield to prevent magnetic coupling with other components in the same equipment.

Related to this, years ago, an NI customer was demonstrating what they make/control with LV. They make magnetic bearings for rotating shafts and are able to monitor and actively dampen all sorts of disturbances even large ones such as when a compressor turbine loses a blade. Anyway, the presentation included a magnetically supported aluminum shaft they’d attached small pieces of sticky putty to. The DSP controlled device compensated for the imbalance at several kRPM and charted the forces needed to balance onscreen. More impressively, when they shaved the material off with a business card, it rebalanced within a few milliseconds.

For the next part of the presentation, he spun the well balanced shaft to around 15 kRPM and attached a cable to something in his pocket. We sat there waiting for something to happen, and started to hear a buzzing that became somewhat rhythmic. It grew louder and changed in pitch, and then recognition set in. It was a Led Zeppelin intro and the dampening field they normally used to balance the shaft was now being used to drive the shaft to produce the acoustic signal. He had connected the cable to a walkman in his pocket, and the DSP was being asked to cancel that signal. The buzzing was the distorted guitar chords, and while the response if this “speaker” was anything but flat, it was good enough with the mid and high end of the spectrum that you could make out the song and everyone got a chuckle out of it.

Greg McKaskle

Only slightly related, I once saw a demo for Active engine mounts used to counteract engine vibration in some vehicles. During the demo, they played Metallica through the mount.