The project described below uses a MH-Z16 or MH-Z19 CO2 sensor and a DHT-22 (or DHT-11 if less accuracy is required) to measure the Temperature and Humidity. It has a 4 line by 20 character LCD Display to show the current readings and status, a warning alarm and two relays which can be triggered on a low CO2 (Generally above 1000 ppm) normally to switch on an extractor fan and a high level (4000 ppm) which will trigger a warning device such as an external alarm. There are two models I used the 0 to 5000 ppm device here but the code will be the same for the 0 to 10000 ppm model.
The idea comes a few months ago, talking with a friend. He needs something to monitoring temperature and humidity inside a sea container, for a three weeks travel from Spain to China. Low consumption is important, in order to have maximum autonomy with a small battery. I use a HDC1050 temperature and humidity sensor, and a TEMT6000X01 ambient light sensor. The collected data is stored on a micro SD card. Also the board has a RTC for timestamp, a Li-Ion battery charger, user pushbuttons and leds, and a MCP2221 USB bridge to communicate with the board and configure some parameters through software.
This is the second in a series of posts about designing a mains frequency monitor using the Microchip PIC 16F1619 microcontroller. In this post we will take a look at the first revision of the board that I designed for the project and some of the features that it adds.
Be sure to read Part 1 of the project write-up if you haven’t done so already.
The PIC16F1938 is a versatile 28-pin MCU belonging to Microchip’s extreme low power microcontroller family featuring nanoWatt XLP technology, 28KB of programming memory, 1KB of RAM, 11 ADC channels, and tons of other peripherals. A while ago, I designed a development board for this MCU and I thought it would be worth sharing this design here. The development board features an onboard USB-UART bridge to support the ds30 Loader for easy programming of the PIC MCU. All I/O pins are accessible through 2×5 headers.
I credit the maker movement with bringing electronics back from the crusty old and lonely electronics hobby back into the main stream. The Arduino is the micro of choice for this army of makers and I conceded it made sense… you install the IDE, plugged in your board into the USB port and a couple clicks later and you have an LED blinking.. the most exciting blinking LED you’d ever seen in most cases. I stuck with the PIC micros because I didn’t see any need to put back on the training wheels.
I got invited to a conference call earlier this week as they rolled out MPLAB Express. I almost passed the email up as spam, I’m glad I didn’t… a quick half hour later and I was in shock. Microchip is now relevant in the hobbyist realm.. They just leapfrogged over Arduino in usability for the beginner. They just released Microchip MPLAB Express a new, free, online cloud-IDE. Write your code (or pick a sample), press the compile button and the .hex file downloads.. DRAG AND DROP the .hex file on to the dev board. … the dev board looks like a plain flash drive… just drag and drop and the code is automatically programmed to the device… DRAG AND DROP.. brilliant.