Arduino Temperature-Controlled Fan
by I Make Bad Planes in Workshop > Laser Cutting
5186 Views, 63 Favorites, 0 Comments
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. :)
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)
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.
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.
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.
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.
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); } }