Author Options:

Need help to move a solenoid to sound Answered

Hello all,
I am working on a project where I need a solenoid  move to sound.  I was thinking of using an Arduino and a microphone to achieve it but I'm a little stuck.  The goal is to have music playing and have the solenoid move to the music.  I also want it to move to noise so that's why I went down the microphone route.
Unfortunately after much searching on the net I've hit a brick wall.

if anyone can point me in the right direction on how to do this, then I'd be a very happy person.  



3 years ago

If we assume you only want a small movement you could glue a length of dowel to the centre of a speaker, same as a solinoid.


Answer 3 years ago

hey Rick,

I like the way you think. Unfortunately the solenoid needs to push against something with some force (might have to use a servo) so your suggestion prob. wouldn't work.

Thanks anyhow


Answer 3 years ago

I don't see a huge problem here - Microphone - BIG amplifier - solenoid in place of the speaker.

It is likely the coil impedance will be quite low so it won't be all that efficient but that may not be an issue for you.


3 years ago

Hmmmm. Well im not sure what exactly your are trying to accomplish. mostly cause i have no clue what kind of input you are getting from your Microphone.

I'll try to give a suggestion/pointer. If the idea is to have a Sound signal (which tends to be a sine-wave) from something translated into a Analog value that your arduino can quickly read of it's Analog pin and then do stuff with i would suggest to look up the clamper ( https://en.wikipedia.org/wiki/Clamper_%28electronics%29 )

I use clampers for most of my VU-meter like projects. often with a Diode+Capacitor to get a peak value.


Answer 3 years ago


I need to have a sound input (through the microphone) which would be digital, and then convert it to analogue. The analogue signal would be used to determine the voltage to the solenoid and it would move depending on the level of sound. So what I want is sound to move the solenoid - the louder it is the more it will move.

Thanks for your help


Answer 3 years ago

I think you are mistaken. What comes out of a Microphone is a weak analog signal. a small Sine-wave that in it's raw state may not be easy for a arduino to understand. To get a good easy to use analog value the arduino can read (or perhaps to directly push towards the solenoid part). That is why i suggest a Clamper+Rectifier. a Amplifier+Clamper+rectifier could be used to get the Peak value of a audio signal. you would get a voltage that is dependant on how loud the sound is!

The analog output from a Arduino is not actually a analog. it is just a very fast switching PWM output that looks analog when looked at through a led. To get a real analog voltage from 0-5v you will need to use a RC filter behind the arduino output that shapes the PWM into a voltage. or use a DAC/digital-potentiometer.

As for wanting to output the analog value to a solenoid. well you will probably want to use a Voltage Follower to act as a buffer (directly powering a solenoid from Microcontrollers/Amplifiers is a bad idea).

(added is a example of a analog peak-detector. a amplified audio signal goes in, a peak voltage comes out)


3 years ago

Can be done quite simple with these old circuits for a 3 color light show.
People used old traffic lights in the day and had them run to the music.
Not really much on the circuit board either.