Using Sensors and Motors with Arduino.

Hello! I was hoping someone could lend a helping hand. I am in need of a serious "Dummy's Guide to Using Arduino".

I would like to create a windmill. I will need a motor to make the wings spin. I also want to control the speed of the wings by using a sensor. The closer an object is to the windmill, the faster the wings will spin.

I feel like this is rather simple however, can you please tell me I could go about doing this? Especially as far as Arduino coding goes? :exclamation

Thanks, I appreciate it!!! :)

I would like to create a windmill. I will need a motor to make the wings spin.

I thought that the wind made a windmill "wings" move.

I also want to control the speed of the wings by using a sensor. The closer an object is to the windmill, the faster the wings will spin. I thought that the "wings" spun faster when the wind blew faster.

I feel like this is rather simple

It is.

however, can you please tell me I could go about doing this?

Well, you need an Arduino, a windmill with "wings", a motor to move the "wings", a motor controller shield to control the motor, and some kind or proximity sensor.

Then, you need to connect them all together, and write some code to read the sensor and set the motor speed and direction.

Got a specific question?

Yes I guess my specific question is how I connect them all together and what I will need to write in my code. I'm new with Arduino and the ideal situation would be to find an example of the code and perhaps visuals of how to connect everything. Thanks for your response, would you be able to help me out with that?

If you want to experiment on the cheap, you could get one of the below servos and modify for continous rotation for the variable speed motor part. They currently have free shipping in the US.

http://www.hobbypartz.com/kahaoubrmo14.html http://www.hobbypartz.com/topromisesg9.html

Thank you! However this project is a little too last minute and I don't live in the US so this may pose an issue. Thanks anyways though!

kay sorry for the confusion. I will be using a standard servo motor to power the wings and a infrared sensor that will measure an objects distance from the windmill (which by the way is about 7" tall.. very little) thus increasing the speed when someone is close to the sensor. I am assuming I need a GVS shield to connect to the Arduino? Is there anything else I need to do?

I will be using a standard servo motor to power the wings

Do you have this servo in hand? Have you done any experiments to see if you can vary the speed of the servo? Typically, you can't. They run at some design speed, and that's it.

I will be using a standard servo motor to power the wings

I think you might mean sails not wings.

A servo is not the best motor to use as you can't control the speed of it. You need a DC motor and a motor control shield. Use the PWM pin to control the motor speed. http://www.thebox.myzen.co.uk/Workshop/Motors_1.html and http://www.thebox.myzen.co.uk/Workshop/Motors_2.html

There are several distance measuring techniques, but ultrasonic or IR are probably the best.

you could setup something like this…
one dc motor with a h bridge ( http://en.wikipedia.org/wiki/H-bridge )
or a h bridge ic
( http://www.extremeelectronics.co.in/avrtutorials/pdf/avr_tutorial7---motor-control.pdf)
and a ping ultrasonic range finder (http://www.pololu.com/catalog/product/1605)
and use the ping library and do some thing like
if cm< set value increase speed
its a realtively easy project and can be dont in a few hours :slight_smile:
though i caant make sense or making a windmill rotate using a motor :wink: ;D