Introduction: Windmill Mini Golf

This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com). My project is the classic windmill obstacle course that you will find in most mini golf courses. The items that I used were:

  • Arduino Uno
  • IR senor and remote
  • LCD display
  • DC stepper motor
  • ball bearing with 35mm OD, 18mm ID
  • 3D printed parts

Step 1: Step 1: Making the 3D Model in Solidworks

This was the most challenging part of the construction in my opinion. Every piece needed to be sized correctly and designed so that it could be assembled. Because of the size of the windmill I have created, the windmill tower had to be printed in three separate pieces and bonded together with plastic epoxy. I had to do this with the shaft and blades as well. I recommend modifying the shaft and blade files so that the blades can be inserted into the shaft. It was VERY difficult to bond the blades to the shaft without them breaking off at some point with my current design.

Step 2: Step 2: Arduino Code

I included the StepperAK.h, wire.h, LiquidCrystal_I2C.h, IRremote.h, IRremoteInt.h libraries in my sketch:

int RECV_PIN = 12; //assign the IR receiver to pin 12

int gearratio =100 ; // set initial gear ratio

IRrecv irrecv(RECV_PIN);

decode_results results;

LiquidCrystal_I2C lcd(0x27,16,2);

const int stepsPerRevolution = 100; // a full revolution would be 2048, but the number is set very low so that the loop repeats rapidly so that the ir receiver is constantly awaiting a new input

Stepper myStepper(stepsPerRevolution,2,3,4,5);

void setup()

{ Serial.begin(9600);

lcd.init();

lcd.backlight();

irrecv.enableIRIn();//start receiver }

void loop()

{ myStepper.setSpeed(0.15*gearratio); // use a variable when setting the speed of the motor myStepper.step(stepsPerRevolution); // this will indicate how much the motor will rotate each loop

if (irrecv.decode(&results))

{ Serial.println(results.value,HEX); // shows the input value coming from the IR remote. This will show what button was pressed

// each "if" statement corresponds to the three buttons on the IR remote that will change the motor speed and lcd display:

if (results.value == 0xFF30CF)// button 1 on the remote

{ lcd.clear();

lcd.print("Windmill Golf");

lcd.setCursor(1,8); // moves the next message to the second line of the screen

lcd.print("Setting: Easy");

gearratio = 300; }

if (results.value == 0xFF18E7)// button 2 on the remote

{ lcd.clear();

lcd.print("Windmill Golf");

lcd.setCursor(1,7);

lcd.print("Setting: Normal");

gearratio = 800; }

if (results.value == 0xFF7A85)// button 3 on the remote

{ lcd.clear();

lcd.print("Windmill Golf");

lcd.setCursor(1,8);

lcd.print("Setting: Hard");

gearratio = 1200; }

irrecv.resume();//receive next value } }

Step 3: Step 3: Putting the Windmill Tower Together

I inserted a ball bearing in the shaft hole so that the blade shaft could rotate freely. I mounted the DC stepper motor to the platform on the back of the windmill with screws and nuts. I made a small hole on the end of the shaft so the motor could fit into the shaft. Every piece of the tower was bonded together by epoxy.

Step 4: Step 4: Putting the Box and Circuitry Together

All of the electric components are inside the black box behind the windmill other than the DC stepper motor. The LCD display is screwed to the large opening on the side of the box. A small hole was made for the IR sensor to be exposed, but I had to drill the hole larger so I recommend modifying the box in SolidWorks so that issue can be avoided. There is another hole in the back of the box meant so that a power supply cable can be inserted and plugged into the Arduino.

The breadboard and wires look like a bit of a mess inside the box, but I made a Fritzing diagram so the wiring can be understood better. I hope this is enough information if you would like to create your own version of my project. Leave a comment if you have any questions and I will try to answer them as soon as I can.