MH Z19b - Running CO2 sensor on batteries
-
I'm trying to run the MH Z19b CO2 sensors interfaced by a PIC microcontroller, powered by 3.6V batteries.
I would like to get the most out of the battery life. So, I have used a transistor and a GPIO pin from PIC to control the power supply to the CO2 sensor programmatically.Please find below, the pseudo code of the programming logic I had used to take CO2 measurements from the MH Z19b sensor. I would like to know if this logic will provide me valid measurements. I am trying to measure the CO2 concentration once in every 15 minutes.
start_PIC(); while(true) { MHZ19_power_on(); PIC_sleep(120 seconds); /** Till 120 seconds, CO2 sensor was giving 400ppm and only after that I started getting realtime values **/ MHZ19_get_CO2_concentration_value(); MHZ19_power_off(); PIC_sleep(900 seconds); }
-
These type of sensors often have a warm-up time, often measured in minutes. The datasheet will tell you. If you don't let it warm up you will get poor readings.
-
The warmup time of the MH Z19b is 3 minutes. So 2 is probably fine, but you could probably do 3 just in case. Although 2 would save your more battery time.
Do you mind explaining your setup a bit more? I would love to do something similar but I do not know where to get started with the PIC microcontroller!
Suggested Topics
-
Battery based atmega328p sensor (no SMD)
OpenHardware.io • 8 Jan 2016, 12:27 • openhardware.io 18 Dec 2016, 11:48 -
My first working Switch with Battery and Temperature ..
My Project • 29 Nov 2014, 17:12 • dzairo 30 Nov 2014, 18:43 -
Air Quality: CO2 Sensor MH-Z14
My Project • 17 Nov 2014, 09:31 • epierre 4 Nov 2017, 17:30 -
Disable external module to preserve battery life
Hardware • 3 Dec 2014, 23:52 • jonnyfishman 3 Dec 2014, 23:52 -
💬 MySX Power Board 18650
OpenHardware.io • 23 Jan 2021, 11:33 • openhardware.io 23 Jan 2021, 11:33 -
💬 MySensor RFM69HCW micro pcb for DHT, Si7021, CNY70, ...
OpenHardware.io • 14 Mar 2017, 09:41 • openhardware.io 13 May 2017, 21:35 -
💬 AC/DC/Batteries capable atmega328p board
OpenHardware.io • 9 Jan 2016, 10:46 • openhardware.io 4 Jan 2017, 12:48 -
Arduino with built-in RF running on a single AA
Hardware • 21 Mar 2016, 02:42 • Michael Moebius 21 Mar 2016, 11:20