Arduino Temperature-Controlled Fan

by I Make Bad Planes in Workshop > Laser Cutting

5159 Views, 63 Favorites, 0 Comments

Arduino Temperature-Controlled Fan

20160524_104836.jpg

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. :)

Gears

IMG_0066.jpg
IMG_0062.jpg

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)

Gear Shaft

IMG_0067 (1).jpg

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.

Base

IMG_0063.jpg

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.

Securing the Gear to the Motor

IMG_0064.jpg
IMG_0065.jpg
IMG_0143.jpg

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.

Making the Blades

20160524_111156.jpg
IMG_0069.jpg
IMG_0114 (1).jpg
IMG_0115.jpg
IMG_0116.jpg

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.

Arduino

IMG_0142.jpg
arduino-temperature-fan-speed-control-550x494.png

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); } }

Finished Product!

20160524_104831.jpg