Introduction: Arduino Temperature-Controlled Fan

Picture of Arduino Temperature-Controlled Fan

I and a few group members have decided that, for the summer, it would be beneficial to create a fan that turns on at 70 degrees Fahrenheit and continues to increase in intensity with the heat. So that's what we did. :)

Step 1: Gears

Picture of Gears

First, we laser cut our gears. We have a 1:2 motor-shaft ratio with 8 and 16-tooth gears, respectively. You can choose to use whichever gear ratio works for you depending on your motor. (Ours is 12 volts)

Step 2: Gear Shaft

Picture of Gear Shaft

Next, we drilled the center of our larger gear to exactly the diameter of a 1/4" dowel. We then used some elbow grease to slide the gear where we wanted it, then secured it with wood glue.

Step 3: Base

Picture of Base

The base of our fan included a rectangular piece of stock for foundation, as well as two smaller blocks of wood secured with wood glue to act as guides for the axle. In the guide blocks, a 1/4" drill bit was used to make a hole to fit the axle. A dremel was then used to slightly increase the holes to allow rotational movement.

Step 4: Securing the Gear to the Motor

Picture of Securing the Gear to the Motor

This part was simple. we used hot glue and epoxy to secure the smaller gear to the motor. A power source was then used to test the system thus-far.

Step 5: Making the Blades

Picture of Making the Blades

We cut out three fan blades out of 1/8" board. We used a simple pointed rectangular design for all three, then used a triangular connector piece to keep them together with wood glue. For extra precaution with regard to flying blades, we cut some aluminum brackets, smoothed them with a grinder, and screwed them to the blades. This was to create an extra-secure connection.

Step 6: Arduino

Picture of Arduino

This part was slightly complicated. Above is our schematic, and below is our code.

Code:
float temp; int tempPin = 9; int tempMin = 70; int tempMax = 100; int fanPin = 7; int fanSpeed = 0; void setup() { pinMode(fanPin, OUTPUT); pinMode(tempPin, INPUT); Serial.begin(9600); } void loop() { temp = analogRead(tempPin); temp = (temp * 5.0 * 100.0)/1024.0; temp = (temp * (9.0/5.0)) + 32.0; Serial.println(temp); delay(1000); if (temp < tempMin) { fanSpeed = 0; digitalWrite(fanPin, LOW); } if ((temp >= tempMin) && (temp <= tempMax)) { fanSpeed = map(temp, tempMin, tempMax, 32, 255); analogWrite(fanPin, fanSpeed); } }

Step 7: Finished Product!

Picture of Finished Product!

Comments

JonathanK23 (author)2017-01-10

cool idea, could you use this to switch a 230v (australia) ceiling fan? using a 12v relay or something maybe?

syphilishorn (author)2016-06-03

Great

tipigeon (author)2016-05-28

Is the code in farenheit or in celcius?

Farenheit

About This Instructable

3,643views

58favorites

License:

More by I Make Bad Planes:Arduino Temperature-Controlled FanWingin' It: Make The Best With What You Have
Add instructable to: