1313
1414Arduino library for the ACD3100 CO2 sensor (I2C).
1515
16- ** The documentation needs to be updated**
17- ** This is a copy of the ADC10 readme.md**
18-
19- The ACD3100 is very similar to the ACD10 but details differ.
20-
21- ** Work in progress Work in progress Work in progress Work in progress**
22-
2316
2417## Description
2518
2619** Experimental**
2720
21+ The documentation is an adjusted copy of the ACD10 readme.md, as the
22+ ACD3100 is very similar to the ACD10 but some details differ.
23+
24+ ** Work in progress Work in progress Work in progress Work in progress**
25+
2826This library is to use the Aosong ACD3100 CO2 sensor.
2927Besides CO2 concentration this sensor also provides a temperature reading.
3028
3129The CO2 concentration supported by the sensor has a range from 400 ~ 5000 ppm ±(50ppm + 5% reading).
3230This makes the sensor applicable for outdoor and indoor measurements in
3331a normal building setting.
3432The sensor is not suitable for CO2 heavy "industrial" environments.
33+ See also datasheet warning below.
3534
3635** Warning** The temperature range the sensor can measure is ** UNKNOWN**
3736as there is no documentation how to convert the raw data to meaningful one.
37+ As far as information could tell this temperature is for Aosong internal use.
38+ If you can decode the temperature bits please let me know.
3839
3940The sensor can be read over I2C and over Serial.
4041This library only support the I2C interface (see hardware notes below).
42+ The Serial mode is ** NOT** supported by this library.
43+
44+ Feedback as always is welcome.
4145
46+ ### Datasheet warning
4247
43- #### Pre-heat period
48+ _ Do not apply this product to safety protection devices or emergency stop equipment,
49+ and any other applications that may cause personal injury due to the product's failure._
50+
51+
52+ ### Pre-heat period
4453
4554When the sensor starts up it has a pre-heat period of 120 seconds.
4655The library provides functions to check the time since the constructor is called.
@@ -49,62 +58,66 @@ During the preheat period one can make measurements but one should use those
4958carefully as these are less accurate than after the preheat period.
5059
5160
52- #### Calibration
61+ ### Calibration
5362
5463Also important is the calibration of the sensor, although done in the factory,
5564a CO2 sensor needs regular calibration. See datasheet for details.
5665
5766
58- #### Power
67+ ### Power
5968
6069The sensor must be powered with 5V and uses about 225 mW.
6170This implies the sensor uses 50 mA (@5V ) and needs a separate power supply.
6271One must connect GND from the power supply to the GND of the MCU.
6372
6473
65- #### Datasheet warning
66-
67- Do not apply this product to safety protection devices or emergency stop equipment,
68- and any other applications that may cause personal injury due to the product's failure.
69-
74+ ### Operating conditions
7075
71- #### Operating conditions
76+ | parameter | value | notes |
77+ | :--------------------| :-------------:| :--------|
78+ | temperature | 0°C~ +50°C | keep away from freezing cold or direct sunlight.
79+ | humidity | 0% ~ 95% RH | keep in non-condensing conditions.
80+ | Refresh frequency | 2 seconds |
7281
73- - temperature: 0°C~ +50°C ==> keep away from freezing cold or direct sunlight.
74- - humidity: 0% ~ 95% RH ==> non-condensing conditions.
75- - Data refresh frequency: 2 seconds
7682
77-
78- #### Hardware
83+ ### Hardware
7984
8085
8186```
8287 TOPVIEW ACD3100
8388 +--------------------+
84- pin 5 | o |
85- | o o | pin 1
86- | o o | pin 2
87- | o o | pin 3
88- | o o | pin 4
89+ pin 5 | o S |
90+ pin 6 | o C R o | pin 1
91+ pin 7 | o D T o | pin 2
92+ pin 8 | o V G o | pin 3
93+ pin 9 | o G 5 o | pin 4
8994 | |
9095 +--------------------+
9196```
9297
93- | pin | name | description | Notes |
94- | :-----:| :--------:| :------------------| :-------:|
95- | 1 | SDA/RX | I2C data | 3-5V
96- | 2 | SCL/TX | I2C clock | 3-5V
97- | 3 | GND | Ground |
98- | 4 | VCC | Power +5V | separate power supply needed.
99- | 5 | SET | select com mode | HIGH (or n.c.) => I2C, LOW => Serial
100- | 6 | - | not connected |
98+ ** Note the code chars are on the bottom side of the sensor!**
99+
100+
101+ | pin | code | name | description | Notes |
102+ | :-----:| :------:| :--------:| :------------------| :-------:|
103+ | 1 | R | SDA/RX | I2C data | 3-5V
104+ | 2 | T | SCL/TX | I2C clock | 3-5V
105+ | 3 | G | GND | Ground |
106+ | 4 | 5 | VCC | Power +5V | separate power supply needed.
107+ | 5 | S | SET | select com mode | HIGH (or n.c.) => I2C, LOW => Serial
108+ | | | | |
109+ | 6 | C | | | unknown (clock?)
110+ | 7 | D | | | unknown (data?)
111+ | 8 | V | | | unknown (ground?)
112+ | 9 | G | | | unknown (voltage?)
113+
101114
102115If pin 5 is not connected or connected to HIGH, ** I2C** is selected (default).
103116If pin 5 is connected to GND (LOW), Serial / UART mode is selected.
104117This latter serial mode is ** NOT** supported by this library.
105118
106119
107- #### Related
120+ ### Related
108121
109122- https://emariete.com/en/sensor-co2-mh-z19b/
110123- https://emariete.com/en/sensor-co2-low-consumption-mh-z1311a-winsen/
@@ -118,7 +131,7 @@ This latter serial mode is **NOT** supported by this library.
118131- https://github.com/RobTillaart/Cozir
119132
120133
121- #### Tested
134+ ### Tested
122135
123136TODO: Test on Arduino UNO and ESP32
124137
@@ -141,7 +154,7 @@ Every time the power is shut off the pre-heat would run again internally.
141154It is unclear what effect this has on the lifetime and quality of the sensor.
142155
143156
144- #### I2C multiplexing
157+ ### I2C multiplexing
145158
146159Sometimes you need to control more devices than possible with the default
147160address range the device provides.
@@ -161,7 +174,7 @@ too if they are behind the multiplexer.
161174See example ** TCA9548_demo_ACD3100.ino**
162175
163176
164- #### I2C Performance
177+ ### I2C Performance
165178
166179Only test ** readSensor()** as that is the main function.
167180
@@ -176,7 +189,7 @@ Only test **readSensor()** as that is the main function.
176189| 600 KHz | |
177190
178191
179- TODO: run performance sketch.
192+ TODO: run performance sketch on hardware .
180193
181194
182195## Interface
@@ -185,15 +198,15 @@ TODO: run performance sketch.
185198#include " ACD3100.h"
186199```
187200
188- #### Constructor
201+ ### Constructor
189202
190203- ** ACD3100(TwoWire \* wire = &Wire)** optional select I2C bus.
191204- ** bool begin()** checks if device is visible on the I2C bus.
192205- ** bool isConnected()** Checks if device address can be found on I2C bus.
193206- ** uint8_t getAddress()** Returns the fixed address 0x2A (42).
194207
195208
196- #### PreHeat
209+ ### PreHeat
197210
198211PreHeat functions assume the sensor is (and stays) connected to power.
199212
@@ -202,7 +215,7 @@ PreHeat functions assume the sensor is (and stays) connected to power.
202215left before preHeat is complete.
203216
204217
205- #### Request and Read
218+ ### Request and Read
206219
207220The interface of the sensor is made asynchronous as there is a delay needed
208221of around 80 milliseconds between a request for new data and the availability
@@ -230,7 +243,7 @@ Use 5~10 milliseconds above the minimal value the sensor still works.
230243- ** uint8_t getRequestTime()** returns the current request time in milliseconds.
231244
232245
233- #### Calibration
246+ ### Calibration
234247
235248Read the datasheet about calibration process (twice).
236249Incorrect calibration leads to incorrect output.
@@ -242,7 +255,7 @@ from 400 to 5000, the parameter value should be in this range.
242255Note: One should wait 5 milliseconds between the calibration calls (see datasheet).
243256
244257
245- #### Miscellaneous
258+ ### Miscellaneous
246259
247260- ** void factoryReset()** idem.
248261- ** bool readFactorySet()** Read back if factory reset was successful.
@@ -252,7 +265,7 @@ Minimum length off arr is 11.
252265Minimum length of arr is 11.
253266
254267
255- #### Debug
268+ ### Debug
256269
257270- ** uint8_t getLastError()** returns last error of low level communication.
258271
0 commit comments