Lately, I've noticed that I feel quite drowsy in class. Now I won't blame the lessons for being boring, and since I've been sleeping well at night, that's not the cause either. After doing some research online (mostly through Google and ChatGPT XD), I discovered that the drowsiness is probably due to excess carbon dioxide accumulating in the classroom. This makes sense, as the weather has been quite cold recently, and we keep the classroom windows and door closed most of the time.
The same issue occurs in my dorm. I feel drowsy while studying because I keep the windows closed, which causes the room to fill with too much carbon dioxide. Here's an article I came across if you’d like to know more: Read
So, I came up with the idea of building a cool-looking CO2 monitor that is very intuitive to understand! It is basically an artwork of SpongeBob SquarePants (from the good old days!) whose eyelids move up and down to indicate how drowsy he gets based on the CO2 levels. When the CO2 levels are low, his eyes are wide open with his eyelids up. As the level rises, his eyelids gradually lower according to the ppm level. If his eyes are completely shut, it means there's too much CO2 in the room, and you better let some fresh air in!
The main components of this project are the MQ135 air quality sensor and a Xiao esp32 microcontroller. The setup also contains five hall effect sensors, each one mapped to a certain CO2 ppm level. A motor is connected to the microcontroller through an L293D motor driver IC. This motor is a DIY linear motor that moves the eyelids up or down depending on the direction of rotation. The eyelids contain a magnet at the long end that can be detected by the hall sensors.
The microcontroller reads the MQ135 sensor’s analog output and converts them to the CO2 ppm levels with some math. This is done for a specific duration (5 minutes in my code) and the ppm values are averaged for that duration. Then, the microcontroller turns the linear motor on until the magnet is in front of the hall sensor that corresponds to the same ppm (within a tolerance range). This way the eyelids move to match the ppm level.
For this project, I decided to design a PCB and have it assembled. I’ve never done it before and wanted to explore this. I’ve seen a lot of other creators at Instructables and Youtube make their own PCB so I thought this will be a good project to give it a go.
I used Easyeda for designing the circuit and PCB. There might be better alternatives out there, but I’ve seen a lot of youtubers use this and it seemed quite easy to learn.
I never designed and got a PCB manufactured before. After seeing a lot of YouTubers do it, I decided to give it a try. I got my PCB manufactured by Seeed Fusion. So, before designing my PCB, I made sure to read all their guidelines.
First, I clicked on the "Design" menu and selected "Convert Schematic to PCB." EasyEDA then generated a new PCB file with all the components from my schematic. From there I designed the PCB and generated the Gerber files.
Well, my design currently features SpongeBob without his SquarePants. However, you’re more than welcome to add the pants yourself, there's no rule against it! For this project, I decided to use Sunboard, a type of low-density PVC board. It's incredibly easy to work with while still being remarkably durable, making it perfect for this kind of craft.
After getting my PCB assembled, I put it all together.
I placed the CO2 sensor behind to hide it from view. If you do this too, make sure the frame is not placed in the corner of the room where there is no air circulation. Otherwise your SpongeBob might always be drowsy!
The eyelids do wobble a bit while moving, but that is not an issue at all. Since they only move when there is a significant difference in the CO2 levels, you will barely see them move. However it does make some noise while moving. Mainly because of my old geared motor grinding. I think a tiny N20 motor would be a better option.
Comments