Introduction: Variable Speed Tabletop Fan
"This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com)"
Over the past semester, I 3D printed and built a mini table top fan. A few parts I originally printed didn't work, so I started building this one. This instructable will outline the steps I took.
Before I begin, I feel it is necessary to go over some guidelines. Please read each of these points thoroughly before starting this project.
-Dealing with 3D printers, there are some things you need to know. Material can be expensive and printing can take time, so design your product properly so that it isn't taking up too much material and cut out anything extra to save both time and material.
-This fan is controlled by an arduino, which uses it's own type of code. It would be beneficial to study and understand arduinos a little bit before moving on with this project.
-Practical knowledge of electronics, coding, and designing are extremely helpful when pursing anything dealing with an arduino and 3D printing.
With that being said, here is what you're going to need for this project.
-7.5" x 4.5" x 2.5" of plastic used to enclose the components controlling the fan. Also a top to cover it with the same dimensions, but a height of .25" instead. This can be designed in Inventor or any other 3D designing software. I was provided with this box through the course I am taking.
-2.5" to 4.5" diameter on the bottom, and 5"-7" tall, depending on how wide of a base you want (if you want it to cover the whole top or just a portion of the top of the box), and how tall you would like the fan blade to sit. (These are just my measurements, you can adjust and make them any size you would like to if you see fit.) This is 3D printed with plastic.
-4"-6" across so that you have enough to give some feel to the air, but not too much to cause a weight issue or be too heavy to not be able to be spun by the basic DC motor and 9v battery. This is 3D printed with plastic.
-Just a simple DC motor was all that I used, but any DC motor that can be controlled by an arduino and breadboard can be used here.
What's inside the box:
-1 Arduino Uno. It fit well inside the box, so I highly recommend it.
-1 1k ohm resistor
-1 TIP 120 Transistor
-2 potentiometers to connect to the breadboard and arduino for controlling the fan speed and LED brightness.
-1 LED (can be any color or super bright or just standard, your choice. Feel free to throw in more if you want to as well)
-1 9v Battery (this will control the power to the arduino, because usb is not powerful enough.
-28 standard wires.
-10 female to female extender wires to help connect the DC motor and the potentiometers.
Step 1: Into the Inventor. the Base.
Inside of the Inventor program, we need to being to build part of our project. Assuming that the Box has been provided or designed already, we will start with the fan base.
I would recommend familiarizing yourself with the Inventor program first if you are not familiar with any 3D design program. Play around with it a little until you get the hang of it.
We first start the base by creating a circle with a diameter of about 3-4.5". This will be the base of the entire design, so make sure that it is correct. From there, we make a new plane that is located about an inch or so above the lower plane. On this plane, we are going to create another circle, with a smaller diameter than the previous circle. So this should be between 2.5-4" in diameter. We can then join the two circles using the loft feature to make a nice joining between the two. This will give us a symmetric shape and a nice look to our base. I would recommend cutting out some of the inside of the bottom piece so that you can save material and time and have it be less dense.
After this part has been completed, we can move on to the main shaft of the fan. This part will need another plane located above the top circle that we placed last time, at about 5-8" above the prior plane. This will also need a small circle that is about 2-3.5" in diameter to be extruded down to the base. With this completed, we need to make a hole that goes through the shaft and the base so that we can run wires up to it. This hole can be pretty close to the same diameter as the shaft, but not too close. We don't want barely any thickness or too much. Just enough thickness to get the job done. I recommend about 1.82-3.32" for the diameter to be just right.
Step 2: The Fan Blade
This is probably one of the most difficult parts of the entire design process.
We first need to create a center piece that is roughly .5-.8" in diameter. The circle should be extruded about .5" so that there is some room to put in the fan blades. Also put a hole in the middle that is roughly .1-.2" in diameter so that we can put in the DC motor later to allow it to spin.
The fan blades can be created separately and by using a multitude of ways. Make sure you only create one and just replicate it later. You can try to bend lines or use arc to create the fan blade, just get a design that you like. Once that is designed, you need to make the base of that blade equal to a hole in the center piece so that you can conjoin the two pieces together. I would recommend using the circular mirror feature after cutting out the hole so that you can have multiples of the same hole. Also keep in mind that this hole has to be slanted at an angle so that the fan blade can be put in at an angle. (The blade itself can be created flat).
Step 3: The Arduino
After everything has been 3D printed, we can move on to the components that allow this baby to run. We have a micro controller, that is the arduino uno, as well as our breadboard and 9v battery.
I have created a schematic of how everything should lay out on fritzing, so check out the following link to see how to put it together. Make sure you have fritzing downloaded so that you're able to view the schematic. I've also uploaded the arduino code that is needed to make everything function, but I will go into more depth here.
The 9v battery will have its power be drained if plugged into the arduino, so leave it inplugged until it is needed for testing purposes.
Below is the code for the arduino with my comments explaining which each portion does.
CODE FOR ARDUINO:
// We'll be controlling the motor from pin 9. This must be one of the PWM-capable pins so that we can vary the speed.
// First, set up the constants.
const int motorPin = 9; const int motorSpeedIn = 0; const int ledPin = 10; const int ledDial = 2; // These are all pin values, each number is associated with a pin function.
int ledBright; int motorSpeed; // These are just values that will be designated later, and just used as placeholders here.
void setup() // Setting up the code. This is allowing our pins to read and send data, depending on how we orientate them.
// Set up the motor pin to be an output:
pinMode(motorPin, OUTPUT); pinMode(ledPin, OUTPUT); pinMode(ledDial, INPUT); pinMode(motorSpeedIn, INPUT);
// Set up the serial port:
void loop() // Here is the actual loop code. Since the potentiometers send digital signals, we need to convert that to an analog number for our motor and LED to read, so we divide that number by 4. PWM can only read 0-255
motorSpeed = analogRead(motorSpeedIn);
//Serial.println(motorSpeed); // This code is commented out, but if you need to check your number values being input, this will output the numbers received into the serial monitor for you to monitor.
motorSpeed = motorSpeed/4;
ledBright = analogRead(ledDial);
ledBright = ledBright/4;
delay(100); // Added delay of 100ms as to not have any confusion happen for some reason with an instantaneous value.
Step 4: Piecing It All Together
Now with everything printed and put together, we can begin to finalize the project and see how it all works together.
The arduino can be glued into the bottom of the box or taped down as well as the breadboard. I personally used a small holder for both my arduino and micro breadboard and taped that down. After that is complete, you can either opt to reprint the top of the box to have holes for inserting the two potentiometers and a hole for the base of the fan for wires to run up, as well as small holes for the LED pins, or you can make the holes yourself.
Once these holes are created, you can run extenders to the potentiometers and have them connect to the breadboard so that they can still operate. Once you turn the potentiometer for the fan speed, it will send a number to the arduino to read in and then divide that by 4 so that the DC motor can output a voltage pertaining to the proper ratio. This way, a low number will give a low speed, and high give a high speed.
The other potentiometer will act the same way, but in turn send a signal to the arduino to control the LED brightness. This is why we use the PWM pins so that we can manipulate our signal instead of have a constant value.
First, begin with setting the fan blade onto the DC motor. I noticed some slip on mine, so I crafted a mini stopper with a heated up Styrofoam piece into the end of the hole where the motor fit in. This helped immensely, and allowed the fan to spin at a high speed without falling off. Once this is done and the fan blade spins without falling off, we can attach the DC motor to the fan base. First, connect any extending wires you may need to allow the wires to reach the bottom of the fan base through the hole in the middle, before we connect the motor to the base. If you created a socket for the motor to slide into, then fantastic, but if not, then we can modify the base with a heated up piece of metal to sort of carve a nice seating position for the motor to slide into. We then can either tape this down, or if you created a latch or cover for the DC motor to be held into place, then you can insert that now. This completes the assembly of the fan.
Now we can super glue the base of the fan to the top of the box after making sure that the wires go into the box as required to reach the breadboard and arduino. After that is complete, we are almost done! We now need to ensure that the potentiometers are secured into place on the top of the board and connected to the arduino and breadboard. We can superglue those down as well if there are no precreated holes on the top of the box. Also, make sure to include a spot for the LED on the front of the fan and box to allow the pins from the LED to go into the box and connect with the breadboard and arduino. Once everything is attached, we are complete! Now we can plug in out 9v battery into the arduino, and watch it run!
Feel free to secure the top of the box down with screws if needed, and also unplug the battery if not in use, otherwise it will drain!
Let me know if you have any questions or need any troubleshooting help, I'm here to help! Good luck and enjoy the project, thank you!
We have a be nice policy.
Please be positive and constructive.