Introduction: DIY Anemometer
An anemometer is a device used for measuring wind speed and direction. While there are many different types of anemometers, the most common versions are cup anemometers, vane anemometers, hot wire anemometers, and pitot tube anemometers. This project, based on the vane style, creates a DIY handheld version using readily sourceable electronic components.
Step 1: Fan Significance
This whole project is designed around the average computer cooling fan. Cooling fans typically come in one of three styles, each improving on the controllability of the latter. Two-wire fans are used for the most basic applications. Accommodating only a power and ground connection, these fans will only provide the ability to turn on and off. Three-wire fans add a tachometer output to the original two wires. Typically utilizing a hall effect sensor, this third wire will output a pulse voltage a set amount of times per fan rotation. These pulses can be used to monitor a fan's condition and detect any failure. The final four-wire option creates the ability to have full control over the fan. A duty cycle can be sent to the fan through this fourth wire to vary the speed of the motor.
For this particular project, the third wire option will be focused on. The pulse output, used for measuring rpm, can be connected to an Arduino to measure the average fan rotations that occur during a set time interval.
Step 2: TLDR
This projects uses a timer interrupt to set the fan rpm recording interval.
Another interrupt, connected to the fan's 3rd wire, counts the number of pulses during the set interval.
Once the time interval is complete, I can convert the collected rotations per interval into average rotations and convert to wind speed. The conversion multiplier is found by averaging several readings at a known speed.
Step 3: Materials
Prints:
- 1 Main body - Housing for project
- 1 End Cover - Allows access to both Arduino and battery
- 1 Front Plate - the panel that holds all of the user interface components
- 1 Power Button Cap
- 1 Large Button Cap
- 2 Small Button Caps
Parts:
- 1 Arduino Nano
- 1 3-wire 70x70x15mm fan - AFB0712VHB fan used has a larder flare out on one end. may require resizing the hole on the front plate.
- 1 0.96 Inch OLED Module
- 4 pixels from 144 Pixels/m addressable led strip
- 3 6x6x8 mm tactile push-buttons
- 4 220 Ohm resistors
- 1 5.8x5.8mm DPDT self-locking push-button switch
- 4 M3 3x5mm knurled nuts
- 4 M3 x 0.50x20mm flat head socket bolts
- 4 8x3mm magnets
- 1 Old 9v battery connector
- 1 Working 9v battery
Step 4: Converting the Fan
Computer fans are designed to create a fluid current. Instead of creating airflow, the purpose of the anemometer is to measure current generated from another source. This means that having the fan blades rotate would be counter productive for most velocities. Unfortunately, both the hall effect sensor and fan motor require the same power source. There are several sets of instructions online documenting how to disassemble a fan in order to cut power to the motor coils. I found this process very tedious and time-consuming. After destroying a handful of old fans, I realized that the motor coil pins (highlighted blue) typically protruded from the PCB housing. Since the fan torque is created by these coil sets pulsing in succession, bridging the two together will prevent any generation from occurring (highlighted yellow). An added benefit to this method is the ability to easily convert the fan back to its original state.
Step 5: Assembly
The assembly process is relatively simple when compared to past projects.
The headed inserts need to be added to the four risers at the top of the faceplate. These standoffs will be used to hold the whole assembly together. Since the print walls are very thin, the plastic will inevitably bulge out when inserted. The slight bulge should help create a more secure connection with the fan later in the assembly.
At the base of the main body, there are two cutouts for half of the 8mm magnets. The end cap contains another two holes for the rest. The magnets, once installed, will help secure the end cap to the rest of the assembly. Since the magnets will be separated using only sheer forces, it is not necessary to firmly glue the magnets in place. In most cases, a friction fit will be enough.
Step 6: Faceplate Electronics
The faceplate will contain the entire user interface and allow for easy extraction of the electronics from the main body.
The first part of preparing the faceplate is to add diffusion for the addressable LEDs. Attach a temporary piece of tape to the front of the faceplate which will leave a smooth finish. Generously fill the LED housing from the back with hot glue and add the led strip to the side before everything cools. Once everything has returned to a resting temperature, the tape can be removed, leaving a smooth finish on the front.
The four switches and OLED screen can then be slotted into their designated area on the faceplate and secured with another dab of hot glue.
Step 7: Wiring
Following the circuit diagram, connect all of the components together making sure to leave ample slack between the Arduino and the rest of the circuit.
Step 8: Assembly
Once the electronics are connected, fit the fan, with the wires projecting from the lower-left corner, into its pocket on the main body. Next, the 9v battery adapter can be snapped into place. Coming from the electronics compartment, the Arduino can be slid down the neck of the body and press-fit into the 3d printed slot. Place the faceplate legs into the fan holes and fasten from the bottom with the m3 bolts. Finally, a new 9v battery can be attached and the cover slid into place to render a final result.
Step 9: Code
The conversion multiplier, used to convert from ticks per second to estimated speed, is found by averaging several readings at a known speed. I used a car to achieve that known speed. Making sure to drive in multiple directions, as to try to mitigate additional wind, the reported ticks per second were recorded and averaged. This average, alongside the known speed, can be used to find the average slope. Since we can assume there will be no fan movement with zero wind speed we can use (0,0) as our second point. The formula for slope is (y2-y1) / (x2-x1). The attached code, when connected to a serial monitor, will print the data collected for each interval recorded. By default, the serial outputs are hidden. By changing the boolean "CALIBRATE" to true, the serial monitor will begin displaying the recorded ticks, revolutions, and cycles.
My calculations found a multiplier of 0.093513 for miles per hour. This number can then be assigned to the "conversionMultiplier" float. I do look forward to finding a more accurate number in a better-controlled environment. I highly suggest that anyone doing this project does their own calibration process. Each fan design is slightly different and will add more errors to the number stated above.
You can access my Github for a downloadable version here.
Step 10: Interface
Above is a brief overview of the anemometer's abilities. The refresh rate of the screen did not pair well with the camera's framerate resulting in noticeable streaking. This is not noticeable to the human eye.
Step 11: Print Files
All parts seen in this Instructable were printed on a Creality Ender 3 Pro with PLA plastic.
Constraint issues will probably occur between the printed parts. Every printer is slightly different and I definitely designed this model with particularly tight constraints. Because of this, if you are interested in replicating this project, I suggest designing your own model based on this project. As an alternative, I will be willing to provide the cad model for this project at the end of the week. While not perfect or created with the intention for distribution, I know having the source models can be very helpful.