These are the SenseAir Miniature (Carbon Dioxide) CO2 Sensor featuring a non-dispersive small package infrared (NDIR) sensor, a new optical design that enable a precise and accurately measures carbon dioxide level up to 5% that runs on 30mA design for long-term battery or solar power application. This device has a full control integration from the host system, a flexible CO2 measurements period to minimize power consumption in the fields of implementation. For one measurement requires only 3.6 mC energy 11.8 mJ at 3.3v on the battery.
This device provides a flexible and simple communication protocol which lets you change the measurement period, compensate for barometric pressure, control and calibration in real time. background ABC and (0) gas calibration method are both implemented in a simple ways. There are two types of model which this devices has, the SenseAir S8 and LP8. S8 has also two version each version has its own sensing percentage of detection base on applications, 0-1% sensor is design for residential, while the 0-5% sensor is designed for commercial. The LP8 and S8 devices provides simple communication via UART that you just hook to any MCU, RTU, SBC and PC. for more readings please refer to the datasheet below. For this demonstration we will going to use raspberry pi see below for the wiring diagram. if your using microPython please refer to this article
Required Components
- Raspberr Pi,NanoPi, Beaglebone, Thinker Board, Snapdragon Board, Lemon Pi, LattePanda, Banana Pi, Orange Pi,
- If your running microPython > ESP8266, ESP32, ESP32S (Please refer to there respective pin-outs) Flashing esp8266 & ESP32 refer to this link
- If your running microPython in STM32 > Teensy, pyCom, micro:bit, pyBoard, STM, x86, x86-64, ARM, ARM Thumb, Xtensa. (Please refer to there respective pin-outs) Bootloading STM32 please refer to this link.
- LP8/ C8 Carbon Dioxide Sensor Module (See below on this article)
- Jumper Wire / DuPont Wire
Wiring Guide with LP8
Wiring Guide with S8
Python Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import serial import time ser = serial.Serial("/dev/ttySO", baudrate = 9600, timeout = .5) print "14CORE | SenseAir CO Test Code for SBC\n" print "Running SenseAir Via UART\n" ser.flushInput() time.sleep(1) for i in range(1,16): #print 15 data from the sensor ser.flushInput() ser.write("\xFE\x44\x00\x08\x02\x9F\x25") time.sleep(.5) resp = ser.read(7) high = ord(resp[3]) low = ord(resp[4]) co2 = (high*256) + low print "index:", i, "Carbon Dioxide=" +str(co2) time.sleep(.1) |
Downloads
- Download CO2 Sensor LP8 Sensor Datasheet | PDF
- Download CO2 Sensor LP8 Sensor Manual | PDF
- Download CO2 Sensor S8 5% Sensor Datasheet | PDF
- Download CO2 Sensor S8 1% Sensor Datasheet |PDF
Pingback:SenseAir LP8/S8 IR CO2 Sensor CC3200 XL MCU IOT | 14Core.com
The diagram shown here is the pinout for the LP8.
The S8 has a different pinout.
So hopefully no S8 sensors were harmed while following this post :)
Updated. :) no worries it will not harm the sensor. – :)the only thing is you cannot communicate to the sensor, because the UART of LP8 is different from S8.