Automatic Fan ME208 Project
Say hello to the automatic fan and goodbye to hot summers and getting up from that comfy bed. Is it too hot in your room but you don't wan to bother with turning on the fan to cool down? Well don't worry with making the automatic fan it turns on and off by sensing the temperature of the room, AND it adjust the fan speed when it gets hotter all so you don't have to.
Supplies
- Cardboard
- Tape (or any adhesive)
- SparkFun Kit
- 1 Gear Motor
- Wires
- 1 Servo Motor
- H-Bridge
- 1 Temperature Sensor
- 1 Wheel
Project Video
A helpful video of the instructions if needed.
Downloads
Wiring Overview
The full Arduino board set up for the Automatic Fan is shown above.
ADVICE:
When setting up your own breadboard the placement of parts does not have to exactly match the diagram, HOWEVER, when connecting wires to the Arduino Uno R3 board what pin number it is connected to which parts DOES matter for the code to recognize it and work. (e.g. the servo motor connected to pin 9)
Wiring Breadboard
Start by wiring the Arduino Uno R3 board (red board) to the breadboard (white board) by connecting a black wire to ground (GND) in the Arduino board to a negative (- side, black) on the breadboard, and a red wire to 5V on the Arduino board to the positive (+ side, red) on the breadboard.
Wiring H-Bridge
a) Add an H-Bridge Motor Driver to the breadboard. Connect Ground (GND) to the ground of the breadboard near the Arduino board. Then use another black wire to connect Groud (GND) to the ground side of the breadboard at the top as indicated in the picture. Next, connect the two powers (VM) and (VCC) to the positive charged side of the breadboard near the top. This is shown using two red wires.
b) Connect a wire from the ground (- side, black) on the bottom of the breadboard to the top of the breadboard. This shown using a black wire. Then connect a wire from the power (+ side, red) on the bottom of the breadboard to the top of the breadboard.
Wiring H-Bridge Part 2
Attach a wire (blue) to the input on the H-Drive Motor Board labelled AI1 and connect it D12 on the Arduino board. Attach another wire (white) to the second input on the H-Drive Motor Board labelled AI2 and connect it to D13. Attach the last wire (green) to the power slot on the Motor Board labelled PWMA and connect it to D10
Summary:
Below is components on the H-Bridge and connections to:
VM - power for motors --->Vin (on the Arduino board)
VCC – power for driver --->5V (positive ,red side of bread board)
GND – ground --->GND (negative, black side of bread board)
A01/B01 red(+) output to motors red motor wire
A02/B02 black(-) output to motors black motor wire
PWMA – speed motor 1 ---> D11 (needs PWM)
AIN2 – direction motor 1 ---->D12
AIN1 – direction motor 1 ---> D13
STBY– for internal Hbridge ---->5V (positive ,red side of bread board)
Wiring Motor Gear
Connect the black wire on the gear motor to the Output on the H-Bridge Motor Drive slot labelled A02. Connect the red wire on the gear motor to the Output on the H-Bridge Motor Drive slot labelled A02.
Wiring Servo Motor
ADVICE: The servo motor has a white, red, and black wire these are your signal, power, and ground slots, respectively.
Instructions: Connect a wire to the black wire slot on the servo motor to the top ground slot (- side, black) on the breadboard. Then connect a wire from the red wire slot on the servo motor to the top power slot (+ side, red) on the breadboard. Finally, connect a wire from the white wire slot on the servo motor to a section of the breadboard. The one shown in the picture is in G3.
Wiring Servo to Boards
Attach a wire below the wire (white) that connected the signal slot on the servo motor to the breadboard. This wire (green) is placed in J3 in the picture and is then attached to D9 on the Arduino board.
Wiring Temperature Sensor
CAUTION: The flat side of the temperature sensor should face you while wiring. If wired incorrectly there is risk of burning yourself. If the sensor feels hot, QUICKLY unplug your board to avoid any further damage to the board.
Instructions: Add a temperature sensor to the breadboard. With the flat side of the temperature sensor facing the Arduino Uno R3 board connect a wire (blue) from the left side of the sensor to the positive red side of the breadboard, a wire (yellow) from the center of the sensor to A0 on the Arduino board, and a wire (green) from the right side of the sensor to negative black side of the breadboard.
Constructing Base of Fan
Using cardboard, create a base large enough to let the breadboard sit in. Next to that portion of the base, create a small boxed in area for the servo and fan to rest in. Within this box, take two strips of cardboard and bend the short sides into an "L" shape. This will help hold the servo in place.
NOTE: When making the walls, be sure to have them low enough to ensure the fan can still fit and move.
Gear Motor & Servo Connection
Connect the servo to an L shaped piece of cardboard using tape to connect the two. Then attach the motor to the top of the cardboard using a screw and a bolt. This can be done using duct tape. To secure the motor to the cardboard better, wrapping duct tape around the motor and the cardboard would be beneficial.
Making of Fan
Cut a circle into another piece of cardboard that resembles the radius of one of the wheels. Tape the cardboard to the wheel. Cut out 4 small rectangular pieces of cardboard and connect them to the circular cardboard piece.
NOTE: You can customize the fan to your liking/convenience with use of different supplies e.g. spoons, popsicle sticks, or a 3D printed part.
Attachment of Fan to Gear
Slide the wheel onto the motor. Place the servo in between the "L strips" so that it can be fastened in. Note: Duct tape can be used to help secure the servo.
Circuit Into Construction
Slide the breadboard into the base after wiring the circuit. See "Circuit" for information on how to wire the servo and breadboard.
Code
Above is a simple flowchart of how the code works.
Download this code to upload to your built project and enjoy! :)