arduino+microphone+stepper motor

Hi,Im a beginner with arduino. Could someone tell me how to connect a microphone to arduino and how to 'tell' it to move stepper motor according to sound volume?
I found some similar projects but have no idea how to combine command codes from different projects and what kind of stepper motor I should use. This will be connected to a bulb (high voltage).
Can anyone help me please?
xx :wink:

You may find its easiest to approach your project in two parts.

One part would be to get a stepper motor working using commands from the serial port or from a pot. Do whichever one seems easier for you.

You also need to get output from a microphone, perhaps start by using the signal (suitably amplified) to control the brightness of a led or display the level using the serial port.

You say you have found some projects for these, why not get these going first and once you have some experience with them it will be easier to think about combining them

Good luck!

Thanks a lot!
Woul you be able to tell me what kind of stepper motor I should use with arduino to make it easy for the first time? I've read some information about stepper motors but in my project I need the motor to move the shade of a lamp up and down and the distance is about 40cm. Should I use bigger size of a motor and unipolar or biopolar? Thank you.

Can you say some more about what you want to do and what characteristics matter to you.

Do you have a specific lamp in mind? How much force does it need to move it. How accurate do you need the movement? How fast?

It may also help if you explain the purpose of the project.

Im a product design student. My project is about interactive lighting. It will be designed for meetings with friends. In the begining of the meeting it's quiet because everyone is starting to drink and talk,so the first position of the shade (made out of paper) is to give bright light. When the conversation is getting lauder the microphone will send a signal to a stepper motor to move (extend) the shade down (about 20cm) so the light is dimmer (second position). When people will get drunk they will make more noise so the microphone will send another signal to the motor to extend the shade to the max (40cm) so the shade will close like a flower to create mood light. I need the stepper motor to have 3 positions and to stop in each of them until the volume of sound reaches the higher range. Hope this is clear enough and thank again for ur reply.

You may find that a radio-control (R/C) servo is a better choice. The servo's output shaft turns through 180 degrees (max), on command from the Arduino. It's controlled by a pulse-width control protocol, which is supported by a library on the Arduino. So, you could choose three pre-determined positions for the servo/lampshade, code them into the sketch, and then select them according to audio volume. You can read volume level by amplifying a microphone, averaging the signal level (resistor/capacitor filter) and feeding it to an Arduino analog input.

Thanks a lot! It's a huge help for me.Will search for it and try to make it work!

Hi,
I'm trying to connect my servo (Futaba FP-S148) to my arduino duemilanove using different codes found on this forum,but none of them seems to work. I connected servo with arduino by mechanical cable..maybe this was wrong..I am a total beginner. Could someone help me fix it please?

OK, start with the "Sweep" example sketch from the Arduino site.

Could you say what you mean by a "mechanical cable"? Doesn't make sense to me! You should have three wires from Arduino to servo, 5V, Ground and the pulse signal.

It is a red thin cable for arduino(somebody told me). I tried again to upload sweep and servo turned once a little bit and than I received a command:'couldn't determine program size' and it is still not working. Any other ideas what went wrong?
thank u for help.

Ok the uploading worked this time but servo is still doing nothing and it suppose to move 180 degrees...can somebody help me please..

Well, the sketch is known to work, so the problem must be in your wiring. Can you draw a diagram of how you've wired it up? Tell us more about the "red thin cable"? Does it have three wires? Have you connected 5V and Ground? Have you connected the control pulse wire? To which pin? Poorly-lit mobile phone photos of your setup will probably not help!

i would include a smoke detector in your project. in case people start to smoke weed you need to reverse your algo :slight_smile:

Can somebody please help me how to combine sound level in mic and speed of motor.
I managed to control motor speed with potentiometer, but thats it, really cant think how to put it together.

I'm doing college project now, where people will speak or blow into microphone, and accorording to the volume level, motor suppose to spin faster and turn some paper platform connected to it all 360 degrees.

Can somebody please explain me how to do, and even better if you have any pictures or codes of similar staff.

Thanks

Olesya