No. | Item | Note |
---|---|---|
1 | Seeed / Seeeduino XIAO | Arduino Microcontroller |
2 | EXSEN / RX-9 | Solid Electrochemical CO2 Sensor |
3 | DHT22 (AM2302) | Temperature / Humidity Sensor |
4 | 5V to 3.3V Step Down DC/DC with output current capacity 500mA~ | 3.3V power supply for RX-9 |
5 | 10Kohm | DHT22 pull up |
Since RX-9 could consume 242mA (max) current during warming up, 3.3V power for RX-9 must be separated from Seeeduino XIAO's 3.3V.
Definition | Arduino Pin No. | Attribute | Connected with |
---|---|---|---|
DHTPIN | 2 | Digital In | DHT22 Pin2 |
EMF_pin | 5 | Analog In | RX-9 ETF |
THER_pin | 6 | Analog In | RX-9 THER |
See Getting Started of Seeeduino XIAO
Install 'DHT-sensor-library by Adafruit' from Library Manager of Arduino
Bring RX9QR.cpp and RX9QR.h from the GitHub repository of EXSEN and
put them on 'arduino_Seeeduino_XIAO_RX9QR_DHT22/' direcotry.
Build 'arduino_Seeeduino_XIAO_RX9QR_DHT22/arduino_Seeeduino_XIAO_RX9QR_DHT22.ino' and upload to Seeeduino XIAO.
If the sketch is correctly uploaded, Seeeduino XIAO starts to output in 'Serial Monitor Output Format' manner. Then, scan QR code on the back plate of RX-9 module and send the 21 or 22 charactor string through Serial terminal.
calib 15742214167K0544CAB07A
The calibration parameters are stored to Flash Memory in Seeeduino XIAO and they will be reflected from the next boot.
Please note that every time when the sketch image is uploaded, you need to set the calibration parameters again because they have been cleared to the default values.
Processing Sketch is in 'arduino_Seeeduino_XIAO_RX9QR_DHT22' directory.
Download and install Processing for your host side platform
From Sketch -> Import Library
- Install ControlP5
- Install grafica
See Library Reference from Help -> Library Reference of Processing.
Download fontawesome-webfont.ttf and put it on 'processing_CO2monitor/' directory. It seems like fontawesome-webfont.ttf has several versions. In case that you cannot download from above link, you can try another one.
Connect Seeduino XIAO with the sketch uploaded to USB connector and execute 'processing_CO2monitor/processing_CO2monitor.pde'.
At the first launch of the sketch, select COM port number from the COM Menu.
Once the execution is succeeded, you can migrate to the different platform by the function of 'Export as Application' from File Menu of Processing. In that case, put 'fontawesome-webfont.ttf' manually under the new application directory (application.xxxx).
CO2/Temp/Humi values are sent every 1 second in following format.
# C:452 T:27.80 H:52.40
- C: CO2 (ppm) (432 ~ 6000)
- T: Temperature (Celsius deg.) (can be - minus value)
- H: Humidity (%) (0.0 ~ 100.0)
Number of digit of each value is not fixed.
If the calculated value is NOT valid number, "xxxx" is shown.
(while CO2 sensor warming up / in case of DHT22 sensor's float NaN Error)
Select corresponding COM port number from the serial terminal software on host (PC) side.
Since Serial COM of Seeeduino XIAO is done by USB CDC, it's free from Serial Speed (Baudrate) setting.
reset: Reset System
reboot: Same as reset
enable_monitor: Enable CO2/Temp/Humi Serial Monitor Output
disable_monitor: Disable CO2/Temp/Humi Serial Monitor Output
enable_echoback: Enable Serial Command Echo Back
disable_echoback: Disable Serial Command Echo Back
calib 15742214167K0544CAB07A: Store calibration parameters for RX-9 by QR code string (22 or 21 charactors)
(Ignore case)