Project tutorial
Electronic Wind DIY Pinwheel

Electronic Wind DIY Pinwheel © GPL3+

A DIY pinwheel controlled by Arduino using a DC motor recycled from a portable CD player.

  • 9 respects

Components and supplies

A000066 iso both
Arduino UNO & Genuino UNO
DC motor (generic)
I took this engine from an old portable CD player
Omron b3f 1000 image 75px
SparkFun Pushbutton switch 12mm
Mfr 25frf52 10k sml
Resistor 10k ohm

Necessary tools and machines

Scotch tape

About this project

Hi everybody!

I will show you a project that will entertain your children or even yourself. It is a pinwheel (which I will show you how to build your own) controlled by Arduino and a button for switching.


Building the Pinwheel

That is all you need:

  • a perfect square made of cardboard (with the side of about 12cm / 4,7in)
  • a ruler
  • a pen
  • scotch tape
  • scissors

With the aid of a ruler, track with the pen the two diagonals of the square. The point where these two diagonals intersect will be the center of the square.

We see that we have divided the square into four triangles.

With a steady hand, cut along the newly marked lines from the corners and going towards the center; we pay attention to stop approximately 4 cm (1,6 in) before reaching it (watch the picture below for clarity).

Once you make the four cuts raise the left corner of the first of the four triangles, with the greatest care not to ruin the roundness and attach it on the center using the tape.

You can also make small cuts around the center where tuck the corners and secure them with tape from the back.

Now make a hole at the center of the pinwheel, where we're going to attack the axis of our engine.

Ok the pinwheel is ready. Let's go to do all the nerdy things.

Recycling the DC Motor

As I said at the beginning there is no need to buy the engine. We can recycle an old portable CD player which you may have in your home and that you will not use more. Let's see how.

Open the CD player:

Now we have to disassemble the piece inside the red rectangle.

The piece inside the red rectangle is the DC motor that we need: unmount it.

Ok. Now we have everything we need. We finish the installation, and run the pinwheel. 


Follow this scheme to assemble all the pieces:

Now download the Arduino sketch or copy it in a new one.  Click on upload, and good fun!


Arduino SketchArduino
// It starts the engine when the button is pressed, keeping it on when you release.
// We press a second time to turn off the engine

#define MOTOR 5               // motor to pin 5
#define BUTTON 7              // input pin where the button is connected
int val = 0;                  // it is used to store the state of the input pin
int old_val = 0;              // it is used to maintain state in the previous step of the input pin
int state = 0;                // stores the motor status: 0 for off, 1 for on
void setup() {  
  pinMode(MOTOR, OUTPUT);       //sets the pin output 
  pinMode(BUTTON, INPUT);     // sets the pin input 
void loop() {  
  val = digitalRead(BUTTON);  // reads the input value and saves into val
  // checks if something happened 
  if ((val == HIGH) && (old_val == LOW)){  
    state = 1 - state;  
  old_val = val;            // ricordiamo il valore precedente di val  
  if (state == 1) {  
    analogWrite(MOTOR, 255);   // starts the motor. 225 is the speed value. You can modify it from 155 to 255
  else {  
    analogWrite(MOTOR, 0);    //turn off the motor 


Project schematics


Similar projects you might like

DIY Anemometer: Wind Speed Sensor Device

Project tutorial by Achindra Bhatnagar

  • 45 respects

Electronic Piano Keyboard With Preset Songs

Project tutorial by Lindsay Fox

  • 158 respects

Electronic Playground With Arduino and Scratch 2

Project tutorial by MJRoBot

  • 16 respects

Electronic Safe with Arduino

Project showcase by chummer1010

  • 54 respects

Portable Arduino Temp/Humidity Sensor with LCD

Project tutorial by ThothLoki

  • 185 respects
Add projectSign up / Login