We must take care of our health and in these times more than ever, considering the fact that we live in increasingly industrialized cities and affected by pollution, for this today's project, which I have called La Cigüita.
Inspired by the use that miners gave to canaries in ancient times, for those who don't know, before all the sensors we have today existed, around 1800, miners explored the mines with a canary in a cage, if the canary suddenly showed signs of poisoning, the mine was evacuated, which meant that there were toxic gases in the area.
What I will show you today is my version of a product called Canairi, it is a device that measures the level of CO2 in the air and if it is very high, it expresses it by making the canary turn downwards, inviting us to open the windows of the place. until the air clears, and we will know this when the canary is upright and happy again. What can I tell you, it's great, and it looks really good, the thing is that it costs almost 200 dollars, and I'll replicate the project, with a budget of about 45 USD more or less.
If you are a visual learner I know that a video is worth more than 1000 words, so here is a tutorial video. (I am a Spanish speaker, so please consider turning on English subtitles):
The Hardware:You will need a few components to build this amazing project:
- RAK19003 Mini Base Board
- RAK1906 BME680 Bosch Environmental Sensor
- RAK4631 nRF52840 microcontroller core.
- Micro Servo Motor.
- 18650 3.7v battery.
- Some wires.
I attached all the 3D files to the project. I used my personal FDM printer (the photo you see) with the second intention of testing and comparing the results of ordering the 3D printed parts with JLCPCB 3D printing service, I'll be updating on that soon with a v2 of the project, I decided on them because they provide several and more advance 3D printing methods and I wanted to try them, also it was cheap to order everything.
To achieve my goal I am going to use a couple of RAKwireless modules that meet my needs in terms of size and power consumption, since our project will be battery powered. I will be using an nRF52840 microcontroller, a base for it, a BOSCH BME680 sensor, a servo motor and a battery. To integrate everything, I designed the 3D pieces, which I printed for this tutorial.
To assemble the project, first we will solder some pins on the motherboard where we will connect the servo motor.
We connect the base microcontroller and fix with their respective screws, we place the sensor on the back and also fix.
On the plastic base, we place the plate aligned with the hole of the USB port and we screw, we verify that the sensor is aligned with the hole we left.
We embed the axis in the servo motor shaft, and we fix it in place with a couple of screws, we glue the battery with double tape, and we connect the servo cables.
Now we assemble the cigua by adjusting the wings with a screw on the back side, and before connecting the battery and hooking the cigua on the axis, we are going to program our microcontroller.
Go to the repository, clone it and open it in the Arduino IDE, you will notice that there are two codes, in short, the one that measures CO2 is more precise but consumes more energy than the one that measures gas, which will affect the battery life, you try both and stay with the one that best treats you.
To program this board we will need to have the RAKwireless card package and the sensor library installed.
- BSEC library repository (Install as ZIP).
- RAKwireless BSP URL:
https://raw.githubusercontent.com/RAKWireless/RAKwireless-Arduino-BSP-Index/main/package_rakwireless_index.json
With that ready, we choose the board and the port, we pass the code and ready, now if we can finish assembling the project.
Final assemblyWe did this so that the motor would go to its initial position and we can align the cigua right now, we connect the battery, the board must be energized.
The servo will move if it was not where it goes, and now we close by putting the cover on the back.
We only have to adjust the cigua, for this we are simply going to place a little glue on the axis, and slide it to the desired position, let it dry and that's it.
We can hang our ciguita on the wall.
In the code we define that the air quality is analyzed every 10 minutes, if the CO2 level exceeds 1000 ppm, the bird will fall, and since then it will measure the air quality every 5 minutes in search of reviving. If the battery is low, the bird will indicate this by lying down, which means that it needs to be recharged.
After a long time with the windows closed, the CO2 level in the house will begin to increase, until puff, the little ciguita falls, to save it, we open a window and it won't take long for it to come back to life.
ConclusionI have really enjoyed doing this project, it looks great anywhere in the house, and its usefulness would seem basic, but it is extremely important for good health.
I haven't had time to measure how long the device lasts working on a single charge, but according to my calculations and my energy measurements while I was doing the code, we could estimate about 21 days of autonomy, taking into account that the battery is 3000mah, and the project works with a current of about 6ma on average, until you have to activate the motor of course, but this will not be happening very often.
Comments