Introduction
Indoor air pollution is a growing health concern. With the right materials, you can build your own DIY air purifier using an Arduino for under $30.
An Arduino is an open-source microcontroller that can be programmed to control electronic components. When paired with the right sensors and filters, it can create an effective and affordable air purifying system.
In this guide, I will walk through the entire process of assembling your own DIY air purifier step-by-step. You'll learn:
- The benefits of a DIY air purifier
- How air purifiers work
- What materials you need
- How to assemble the purifier
- How to program the Arduino
- Tips for maximizing effectiveness
Building your own air purifier is a fun electronics project that can lead to cleaner indoor air.
Benefits of a DIY Air Purifier
There are many benefits to building your own DIY air purifier:
-
Cost savings - By sourcing your own materials and components, you can build an air purifier for a fraction of the cost of commercial units.
-
Customization - You can choose the exact sensors, filters, and settings that meet your needs.
-
Educational - Building your own air purifier is an enlightening electronics and programming project.
-
Compact size - DIY purifiers are often smaller than store-bought models.
-
High effectiveness - With the right HEPA filter, DIY purifiers can clean the air just as well as commercial options.
How Air Purifiers Work
Before we get into the DIY build, let's first understand how air purifiers operate.
Air purifiers work by pulling air through a filter to capture airborne particles. This filtered clean air is then recirculated back into the room.
Most air purifiers have a few main components:
-
Fan: This pulls air into the purifier and through the filter.
-
Filter: Traps particles, allergens, and pollutants. HEPA filters are especially effective at capturing tiny particles.
-
Sensors: Test air quality and adjust fan speed accordingly.
-
Additional features: Some units include ionizers, UV lights, and more to kill germs.
By pulling contaminated air through a high-quality filter, air purifiers can capture pollutants and provide cleaner, healthier air.
Materials Needed
You'll need the following materials to build your own DIY air purifier:
Electronics
- Arduino microcontroller
- Breadboard
- DC fan
- Air quality sensor
- Jumper wires
- 9V battery and cable
Housing
- Plastic food container or cardboard box
- Activated carbon filter
- HEPA filter
Tools
- Hot glue gun
- Craft knife
- Needle nose pliers
- Safety glasses
- Soldering iron (optional)
Many of these components can be salvaged from other electronics projects or purchased very affordably online.
With the right materials gathered, you're ready to start building!
Assembling the Housing
The first step is assembling a housing to mount the filters and fan.
For the housing, you can repurpose a plastic food container or cardboard box. The container should be large enough to hold your filter media.
Use a craft knife to cut an opening for the fan on one side of the container. The fan should blow air into the container.
On the opposite side, cut another opening for filtered air to exit. Make sure the openings you cut align with the placement of the filters inside the container.
Use hot glue to adhere the fan and filter media in place inside the housing. Make sure the air flows through the filter before exiting.
The housing helps direct air through the filter to trap particles. Make sure no air can bypass the filter by sealing edges with tape.
Circuit Assembly
Next, we'll assemble the circuit that controls the fan speed based on air quality readings.
1. Connect the air quality sensor
Start by connecting power and ground pins from the Arduino to the air quality sensor. Then, connect the analog output pin of the sensor to an analog input pin on the Arduino. This sends air quality readings to the Arduino.
2. Connect the fan
Power the DC fan by connecting the positive and negative fan wires to the positive and ground rails of the breadboard.
Use a transistor to modulate the fan's power based on a PWM (pulse width modulation) signal from the Arduino. Connect the transistor so it controls power flowing to the fan.
3. Connect power
Use a 9V battery connector cable to provide power to the Arduino and breadboard rails.
Add a switch to easily turn the purifier on and off.
Optional sensors
You can add additional sensors like temperature, humidity, or gas sensors. Connect these the same way as the air quality sensor.
Programming the Arduino
Now that the physical circuit is assembled, it's time to program the Arduino to control the fan speed based on sensor readings.
1. Set analog pin for air quality sensor
In your Arduino code, set the analog pin you connected the air quality sensor to as an input.
c++
const int airQualityPin = A0;
2. Read the sensor
Add code to read the sensor value in a loop. Convert the analog voltage value to an air quality score from 0 (clean) to 500 (very polluted).
c++
int airQuality = analogRead(airQualityPin);
airQuality = map(airQuality, 0, 1023, 0, 500);
3. Adjust fan speed
Use this air quality value to set the fan speed with PWM. Create if
statements to set fan speed higher when air quality decreases.
c++
if (airQuality < 150) {
analogWrite(fanPin, 128); // 50% speed
} else if (airQuality < 300) {
analogWrite(fanPin, 255); // 100% speed
}
This will ramp up fan speed as air quality worsens. Upload the code to the Arduino to control the fan!
Tips for Maximizing Effectiveness
Here are some tips to maximize the effectiveness of your DIY air purifier:
-
Use high quality HEPA and activated carbon filters to filter particles, allergens, and gases.
-
Make sure air cannot bypass filters by sealing edges of housing with tape.
-
Position air intake and outflow properly so air flows through filter.
-
Use a fan with higher CFM (cubic feet per minute) rating to exchange more air per minute.
-
Place purifier near sources of pollution like litter boxes or craft rooms.
-
Replace filters regularly as directed for best results.
Conclusion
Building a DIY air purifier with an Arduino is a great electronics project that can improve your indoor air quality.
The right assortment of filters and sensors can remove particulates, allergens, odors, and gases from the air for better health.
Following this guide, you can create your own effective air purifier for under $30. With a little effort, you'll be breathing fresh, filtered air.