# Arduino Desk Fan

3,239

22

6

This instructable is made for the course Fablab Making which I followed at the University of Applied Sciences in Rotterdam.

## Step 1: Idea

The initial phase of this project for me was thinking of something useful to make which also challenges my skills. Therefore I wanted to do something with an Arduino, because I am a student for Computer Science and like to code.

Looking further into the requirements of the course there had to be a moving part. This brought me upon the idea to make a desk fan powered by an Arduino, USB and with a display to show the temperature inside the room.

This brought me to make a rough prototype in Sketchup (picture 1).

MoSCoW

• An arduino must power a motor to turn a fan blade. (M)
• The motor must have an on/off button to control the fan manually. (M)
• The fan must have a case. (M)
• The fan must have a fan blade. (M)
• The fan can display room temperature. (S)
• The fan can save temperature data logs to a file and export it. (C)
• The fan can be controlled in speed. (C)
• The fan speed is adjusted by the measured temperature. (C)
• The fan turns on automatically when the temperature drops below a preset value. (W)

This requirements list is quite broad and I only made 3 requirements must-have's because of my inexperience with Arduino, electronic circuits and making physical objects.

Parts

• Computer with Arduino software running and a USB port
• Arduino Uno
• DC Motor which runs off Arduino's 5V
• Jumper cables
• Laser cutter at your disposal
• Plywood

## Step 2: Coding and Building

To start with the project I firstly needed to search what was do-able with an arduino and what isn't.

Therefore I did some research and came to the conclusion that the Stadslab Rotterdam had almost everything in house to get me started.

Pseudocode

This is the initial pseudocode I wrote to get started programming and playing around with the arduino.

P = presetTemp

A = actualTemp

T = (relative)time

def run():

A = arduinoSensor.temperature

if T % 10 == 0:

log A to file

if switch == 1:

on(auto)

elif switch == 2:

on(high)

else:

pass

print.display(A + \n P + T)

def on(power):

motor.Run(power)

while power.on:

run()

This code is relatively simple, and all I try to achieve with this code is to spin a motor.

Trial and error

Firstly I wanted to get a temperature sensor to work with my arduino, so I could simply display the temperature on a log on my laptop.

After finding the tutorial on http://www.hobbytronics.co.uk/ds18b20-arduino I got it working! Real progress has finally been made.

The following code: http://pastebin.com/CD7CaWpX made the display output the temperature!

The next step is to make sure we can get a motor running.

Success! After looking for a DC motor for an arduino I got it spinning. The following code http://pastebin.com/mg02fWGB let the motor run.

In the next step I tried to combine the temperature sensor and the DC motor to make the desk fan practically working. During one of the lessons I tried to make the temperature sensor working again. Sadly with the help of the teachers and the helpful people at the Stadslab we were not able to make it work. Later when I re-visited the stadslab to try again with good hope there were no temperature sensors available at all. Bummer.

After this setback I decided to strip the automatic temperature switch of the fan, and decided to let the fan turn on or off with the press of a button. Nextly I wanted to rebuild the switch quickly during one of the lessons so I could experiment with a switch and/or button. However I was not able to get the DC motor running again after I replicated my previous motor experiment (shown on added picture). This problem essentially wasted 2 weeks for me by trying out various things, taking out anything that might've possibly been different. On my day off I decided to try again and take a little longer than 1 lesson to fix the problem. Turns out I had put in a wrong resistor in the breadboard, a 2.2 kΩ resistor instead of a 270 Ω resistor. After fixing this issue I went on to trying out a button/switch for the engine.

The first thing I did was putting a button in between the cable which goes to the GND on the Arduino board. After you hold the button the motor starts turning. This is not exactly what I wanted but it is a start. I then decided to put a button over the GND cable and to an input port on the Arduino, to not break the DC-GND connection entirely.

The Arduino successfully recognized the button presses, with HIGH and LOW voltages changing as the button was pressed. But after I wanted to implement this HIGH/LOW voltage input with the speed of the DC Motor I ran into a bug which I was not able to solve. The DC motor was not running according to the signal coming from the Arduino board, it was running at all times if the circuit was closed.

Next up isdesigning a case.

## Step 3: Designing and Assembly

After finalizing all the code of the project, I wanted to design a case for the Arduino to sit in and a propellor blade which could be put on the axle of the DC motor.

Concrete designing

I had made a rough design at the start of the project, however that was simply a concept of what I firstly had imagined it would be. The initial model would have been way too tall to make, as it would be too tall to cut for the laser cutter. Other than that a cylinder base would not have worked from wood, or I would've needed to drill inside of a solid beam and run wires through.

In terms of features, I scrapped the LCD screen after I ran into difficulties early with the temperature sensor and DC motor. I did not want to put myself into a tougher position by needing to combine it all.

In the first picture you see the first concrete design I made by accurately measuring the arduino and the possible space I need above it for the wires and DC motor. Next I made a layout for the laser cutter in Adobe Illustrator, firstly very rough and then I found the website http://www.makercase.com/ which exported the right dimensions for me perfectly. The only thing missing on the 3rd picture is the hole for the DC motor to go through, I had not yet measured that at the time.

Finally I designed the fan blade. I was initially planning on 3D printing a fan blade, however due to timing concerns I decided to laser cut the blade.

Making designs come to life

Using the laser cutter was a piece of cake, I loaded the Illustrator file onto the PC, laid out the work in Illustrator and it was good to go. I grabbed a piece of already cut wood (6mm) and laid out my work on the laser cutter. It was a bit of tweaking to make it fit onto the wood but it worked out.

The above video is my box being cut at the laser cutter.

Assembly

The excitement was very high when I finished my box, I wanted to assemble this thing as soon as possible. Sadly after taking it out of the laser cutter I noticed that the edges of the box were very thin, and that the material was rather thick. This meant that it had to be glued into place. I did this with wood glue, and left one side opened for the wires to go through, and to retrieve the Arduino afterwards which is after all property of the stadslab.

When I attempted to assemble it, it simply did not stay put, it did not stand upright. This was due to the dimensions of the box I put on the makercase website being the outside dimensions, not the inside dimensions which I needed for the Arduino to fit with some space left over. My fan blade however came out perfectly, which could be put right on the motor axle.

Then I reassembled the arduino circuit and made sure that it was working fully. This turned out to be the case.

All of the parts are loose since I borrowed everything from the Stadslab, everything was taken apart afterwards and stored back in the stadslab for use by others.

## Step 4: Post-course Thoughts

After following this course I must say that it was very interesting and that I heavily underestimated the amount of work which goes into this course. It is simply not enough to follow all the lessons and make stuff there, you will have to work actively outside of the course and at home to complete the course. It was a fun course though, which caused me to learn outside the box and think in a problem focused way. I did not expect this much setbacks as I expected by making an Arduino project.

Next time

The course would have been a lot easier for me if I had my own Arduino kit. I was fortunate enough to work with the kits of the Stadslab, however having one at home would be easier to fiddle with.

Start early! I heavily underestimated this, only being able to work on the project at the Stadslab (which is closed during the christmas break when I coincidentally had a lot of free time) is a major difference than the other keuzevakken you can follow.

Start narrow and think about possible expansions, do not think very broad and think about all the things you will not be able to implement.

Measure properly! Also re-measure after you are about to laser cut your design, in case something went wrong during the design. Also a measurement thing is to make sure you know which kind of wood you are going to use. The thickness of the wood is a key factor in this.

## Recommendations

• ### Arduino Class

76,617 Enrolled

## 6 Discussions

I used Sketchup to design the 3D concept models and Adobe Illustrator to get the layout for the physical 3D model for the laser cutter.

This looks really good :) You could even bevel the edges of the fan blades to get a little more air flow.