To summarise this project, let’s make a list of features, as I did with my previous projects:
High-accuracy CO2, temperature, and relative humidity sensors
High-resolution, low-power 3.7″ E-Paper display
Built-in clock and calendar
Configuration and charging over USB
Two user buttons and status LED for easy interaction and self-calibration
Configurable timed standby mode
Very long battery runtime between charges (up to multiple weeks)
In short, I achieved or exceeded all of the goals I set for this project – it was a complete success. And in addition to that, it taught me a lot about low-power designs, EPD technology, sensor technology, and building smaller devices.
I’ve been using the CO2 station ever since, having a dedicated spot for it under one of my monitors, so that it’s always in view. I especially love how it ended up being a “set and forget” device most of the time – all it needs is an occasional charge and clock adjustment (about once every 3-4 weeks, with my settings and 8 hours of standby per day), as well as a quick calibration in outside air once every 3 weeks.
What doesn’t feel great is having to continuously increase the calibration reference value over time, as the atmosphere’s CO2 concentration rises…
So in conclusion, I am extremely happy with this project. This was the first time I completed a project and didn’t have the feeling that it was lacking something (compared to my initial imagination of it). Even multiple years later, at the time of writing, I feel like there aren’t too many things I’d change if I were to design another CO2 Station now.
As mentioned, I designed the enclosure for this project to be CNC machined out of plywood – I won’t show the process of that here, since it’s essentially the same as I showed for the BlockBox v2. After some basic post-processing, I was left with six beautiful enclosure walls – only blemished by some delamination of the plywood near the top and bottom side countersinks, but that’s easy to fix with some small wooden chips (or just ignore where it’s not visible).
Five of the walls (all except the back) were glued together using wood glue, forming a strong box, which fit the electronics assembly very nicely. Some matching screw holes in the side walls hold the PCB in place using its soldered screw terminals. For an easy USB connection, a USB Micro-B jack was glued into the the side and wired to the board, and the SCD30 module was installed on a long pin header.
The back side of the enclosure received four small wooden blocks with threaded inserts, allowing it to be screwed in securely, while still being easily removable.
And with that, the CO2 Station was fully assembled, and looking great, in my opinion!
As usual, the build of this project started with the electronics. The PCBs arrived looking quite good, and you can clearly see that the board design was based around the EPD, with how much space is dedicated to it in the front.
I started by soldering the boost-passthrough voltage converter components, testing them in isolation to make sure the converter works, before assembling the rest of the power supply section and testing it as a whole.
Once I confirmed that the power supply seemed to work fine, there was no reason to subdivide the rest of the circuit into more small sections, as I didn’t really have a way to test them individually anyway – so I soldered all remaining components into place. The EPD was still not attached to the board at this point, for easier testing, and the SCD30 module would be mounted on the 7-pin header in the bottom left later.
The screw terminals for mounting the board are also not soldered yet in this image.
At this point, I could power the board up and start working on the firmware for the controller. Most of the smaller features, like the real-time clock and USB serial communication, were easily handled using Microchip’s official driver libraries. They also provided an EEPROM emulation library, which allowed me to efficiently use some of the controller’s built-in flash memory to store persistent values even if the device lost power, for example, setting values and the time and date. Communicating with the SCD30 module was also not a problem, as the I2C protocol is supported by the controller’s hardware, and the module-specific data transfer protocol was very simple and easy to use.
Driving the EPD was a different story: On one hand, the display and its driver are designed to be powered down between screen updates, to save power, as EPDs don’t require any power to keep their existing image. To update the image, it was necessary to follow a very specific sequence of power-up, sending data, starting the update, waiting for it to finish, before powering it down again – with certain timing requirements specified by the manufacturer.
With some trial and error, I was able to get the display to update, but it behaved quite weird, taking much longer for the update than it should. However, thanks to some very helpful tips from the Pervasive Displays support team, I finally got it to work as expected and display a test image.
Next, I created some very simple bitmap font files, mostly containing numbers and a few special characters for displaying all the required information. I wrote a small program in C# that allowed me to convert these fonts into C header files, containing the corresponding pixel data in array form, for easy inclusion into the firmware.
An example bitmap font file.
Adding a function to process this raw font data and send it to the display, I could now print numbers to the EPD.
With that, the display logic was almost done – I just created a static base design, positioned various number printouts to display all of the relevant information, created a battery charge level icon, and finished it off with a dynamic “status bar” at the bottom, displaying a message for the user if necessary.
After that, only a few pieces of logic were left – like debouncing and handling user button inputs, and giving status indications using the red/green LED at the front. I assigned the two buttons to be “power/standby” and “measure/calibrate”: The former would switch in/out of “standby” mode on a short press (sensor disabled, low power consumption), and completely switch the system off (blank display) on a long press, while the latter would perform an immediate update of the EPD using the latest sensor data on a short press, and initiate the SCD30’s self-calibration procedure on a long press.
The status LED would glow red while charging, turn green once charging is finished, blink red when the battery is low, and blink green when sensor calibration is recommended.
The remaining settings would be configured over the USB serial interface – date/time, calibration values, measurement and display update intervals, etc. The device could also be configured to automatically go into standby mode between certain times – for example, to reduce power consumption at night, when the sensor is not needed.
Finally, after attaching the EPD to the circuit board using double-sided tape, the functional part of the project was complete.
The first design requirement I chose, using a true CO2 sensor, seemed like a good place to start. After a quick search, I found the Sensirion SCD30 module, which seemed like a perfect centrepiece for the CO2 Station design. It’s based on a high-performance infrared CO2 sensor and includes temperature and relative humidity sensors, all in a single device, with an easy-to-use serial interface (I2C).
The next big question was the choice of display. I really wanted a high-quality display that could show the measurement values in a large font, looking as visually appealing as possible. The typical choice for that would be a backlit LCD screen – but here, its high power consumption would make the “long battery runtime” requirement impossible. Reflective segmented LCD displays, like in digital watches, are perfect for low-power use cases, but they’re not very accessible for single-piece projects like mine.
Therefore, I decided to try out a new technology – an “E-ink” or “E-Paper” Display (EPD), as commonly seen in E-Book readers. My search led me to a Pervasive Displays 3.7″ display panel1, which I decided to use for this project, with its form factor and size being great for what I wanted here. Also, it offered an integrated display controller, which was very helpful – worrying about the intricacies of driving an EPD manually would not have been fun.
The EPD needed a corresponding connector for its FFC (flat flexible cable), as well as some support components – essentially an entire external boost converter, controlled by the EPD.
With that, I had the central components of the design. Next, I chose a low-power central system controller (PIC24F GU series), which would communicate with the sensor and EPD, allow user interaction through buttons and a signal LED, time periodic updates using its integrated real-time clock, and offer a USB interface for configuration.
For powering the device, I decided on a single Li-Ion 18650 cell in a holder. It could be charged from USB using a battery charging controller (DIO5508), and would power the system through a voltage converter (boost-passthrough converter followed by a linear voltage regulator), to ensure the system voltage would always be at 3.3V, regardless of the battery’s state-of-charge. For this design, the Texas Instruments WEBENCH Power Designer was very useful, as in past projects. For additional protection of the battery against deep discharging, I also added a MAX6775 battery monitor, to shut down the system if the battery voltage drops too low.
Designing the PCB was a little different this time, compared to my previous projects – I decided that the best way to mount the display would be on the PCB itself, so the majority of the front side area was reserved for that. All other components, aside from the user buttons and signal LED, had to go on the back side. Additionally, I needed some way to mount the PCB assembly in a enclosure later, so I added some right-angle screw terminals in the corners.
Shown here from the back side, looking “through” the board.
Now, the only missing part of the design was the enclosure. Using Fusion 360, I quickly designed a small wooden box for it (out of 5mm plywood). I could have designed it to be built by hand, it wouldn’t have been too much work – but after the BlockBox v2’s success with CNC machining, I decided I might as well do more of that – it’s fun and produces really good-looking results.
With everything designed and planned out, it was time to order the parts, and build this thing!
The exact EPD model I used is no longer available at the time of writing, but equivalent and improved successors exist. âŠī¸
Living at home with my parents during the COVID-19 pandemic, there was one thing that started annoying me after a while. I’d be sitting in my room happily, then my mum comes in, and the first thing she says is “the air in here is awful, open the window”. But… the air feels fine to me, it’s nice and warm, and it’s cold outside… but there’s no point in arguing, I have no way to prove that.
After a while, that annoyance turned into a project idea: What if I build a device to objectively measure the air quality in my room? That way, I would always know when I really need to open a window, and at the same time, have a convincing argument against any potential nagging. đ
Of course, as with any project, I wanted to get more out of it than just the finished item – I wanted to learn lots of new things while building it. After some research into existing solutions, I came up with the following project goals:
Use an actual CO2 sensor (no “CO2-equivalent” estimations)
Measure temperature too, optionally humidity
Display the measurement values in a clear and visually pleasing way
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.