Skip to content

Commit d048c60

Browse files
committed
0.2.1 ACD10
1 parent b60cc55 commit d048c60

File tree

7 files changed

+43
-32
lines changed

7 files changed

+43
-32
lines changed

libraries/ACD10/ACD10.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// FILE: ACD10.cpp
33
// AUTHOR: Rob Tillaart
44
// DATE: 2023-09-25
5-
// VERSION: 0.2.0
5+
// VERSION: 0.2.1
66
// PURPOSE: Arduino library for for I2C ACD10 CO2 sensor
77
// URL: https://github.com/RobTillaart/ACD10
88
// http://www.aosong.com/en/products-77.html
@@ -255,7 +255,7 @@ bool ACD10::readFactorySet()
255255
// Serial.print(__FUNCTION__);
256256
// Serial.println(": CRC error");
257257
// }
258-
return (buf[1] == 0x01);
258+
return ((buf[0] == 0x00) && (buf[1] == 0x01));
259259
}
260260

261261

libraries/ACD10/ACD10.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// FILE: ACD10.h
44
// AUTHOR: Rob Tillaart
55
// DATE: 2023-09-25
6-
// VERSION: 0.2.0
6+
// VERSION: 0.2.1
77
// PURPOSE: Arduino library for for I2C ACD10 CO2 sensor
88
// URL: https://github.com/RobTillaart/ACD10
99
// http://www.aosong.com/en/products-77.html
@@ -13,7 +13,7 @@
1313
#include "Wire.h"
1414

1515

16-
#define ACD10_LIB_VERSION (F("0.2.0"))
16+
#define ACD10_LIB_VERSION (F("0.2.1"))
1717
#define ACD10_DEFAULT_ADDRESS 0x2A
1818

1919
// ERROR CODES

libraries/ACD10/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88

9+
## [0.2.1] - 2025-02-04
10+
- update readme.md (some notes about #12 temperature)
11+
- update **readFactorySet()** return test.
12+
913
## [0.2.0] - 2024-06-06
1014
- fix #9 bitwise and bug
1115

libraries/ACD10/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023-2024 Rob Tillaart
3+
Copyright (c) 2023-2025 Rob Tillaart
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

libraries/ACD10/README.md

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,26 @@ The CO2 concentration supported by the sensor has a range from 400 ~ 5000 ppm ±
2525
This makes the sensor applicable for outdoor and indoor measurements in
2626
a normal building setting.
2727
The sensor is not suitable for CO2 heavy "industrial" environments.
28+
See also datasheet warning below.
2829

2930
**Warning** The temperature range the sensor can measure is **UNKNOWN**
3031
as there is no documentation how to convert the raw data to meaningful one.
32+
As far as information could tell this temperature is for Aosong internal use.
33+
See also #12 (closed issue).
34+
If you can decode the temperature bits please let me know.
3135

3236
The sensor can be read over I2C and over Serial.
3337
This library only support the I2C interface (see hardware notes below).
3438

39+
Feedback as always is welcome.
3540

36-
#### Pre-heat period
41+
### Datasheet warning
42+
43+
_Do not apply this product to safety protection devices or emergency stop equipment,
44+
and any other applications that may cause personal injury due to the product's failure._
45+
46+
47+
### Pre-heat period
3748

3849
When the sensor starts up it has a pre-heat period of 120 seconds.
3950
The library provides functions to check the time since the constructor is called.
@@ -42,33 +53,29 @@ During the preheat period one can make measurements but one should use those
4253
carefully as these are less accurate than after the preheat period.
4354

4455

45-
#### Calibration
56+
### Calibration
4657

4758
Also important is the calibration of the sensor, although done in the factory,
4859
a CO2 sensor needs regular calibration. See datasheet for details.
4960

5061

51-
#### Power
62+
### Power
5263

5364
The sensor must be powered with 5V and uses about 225 mW.
5465
This implies the sensor uses 50 mA (@5V) and needs a separate power supply.
5566
One must connect GND from the power supply to the GND of the MCU.
5667

5768

58-
#### Datasheet warning
59-
60-
Do not apply this product to safety protection devices or emergency stop equipment,
61-
and any other applications that may cause personal injury due to the product's failure.
62-
63-
64-
#### Operating conditions
69+
### Operating conditions
6570

66-
- temperature: 0°C~ +50°C ==> keep away from freezing cold or direct sunlight.
67-
- humidity: 0% ~ 95% RH ==> non-condensing conditions.
68-
- Data refresh frequency: 2 seconds
71+
| parameter | value | notes |
72+
|:--------------------|:-------------:|:--------|
73+
| temperature | 0°C~ +50°C | keep away from freezing cold or direct sunlight.
74+
| humidity | 0% ~ 95% RH | keep in non-condensing conditions.
75+
| Refresh frequency | 2 seconds |
6976

7077

71-
#### Hardware
78+
### Hardware
7279

7380
```
7481
TOPVIEW ACD10
@@ -96,7 +103,7 @@ If pin 5 is connected to GND (LOW), Serial / UART mode is selected.
96103
This latter serial mode is **NOT** supported by this library.
97104

98105

99-
#### Related
106+
### Related
100107

101108
- https://emariete.com/en/sensor-co2-mh-z19b/
102109
- https://emariete.com/en/sensor-co2-low-consumption-mh-z1311a-winsen/
@@ -108,7 +115,7 @@ This latter serial mode is **NOT** supported by this library.
108115
- https://github.com/RobTillaart/Cozir
109116

110117

111-
#### Tested
118+
### Tested
112119

113120
TODO: Test on Arduino UNO and ESP32
114121

@@ -131,7 +138,7 @@ Every time the power is shut off the pre-heat would run again internally.
131138
It is unclear what effect this has on the lifetime and quality of the sensor.
132139

133140

134-
#### I2C multiplexing
141+
### I2C multiplexing
135142

136143
Sometimes you need to control more devices than possible with the default
137144
address range the device provides.
@@ -151,7 +158,7 @@ too if they are behind the multiplexer.
151158
See example **TCA9548_demo_ACD10.ino**
152159

153160

154-
#### I2C Performance
161+
### I2C Performance
155162

156163
Only test **readSensor()** as that is the main function.
157164

@@ -166,7 +173,7 @@ Only test **readSensor()** as that is the main function.
166173
| 600 KHz | |
167174

168175

169-
TODO: run performance sketch.
176+
TODO: run performance sketch on hardware.
170177

171178

172179
## Interface
@@ -175,15 +182,15 @@ TODO: run performance sketch.
175182
#include "ACD10.h"
176183
```
177184

178-
#### Constructor
185+
### Constructor
179186

180187
- **ACD10(TwoWire \*wire = &Wire)** optional select I2C bus.
181188
- **bool begin()** checks if device is visible on the I2C bus.
182189
- **bool isConnected()** Checks if device address can be found on I2C bus.
183190
- **uint8_t getAddress()** Returns the fixed address 0x2A (42).
184191

185192

186-
#### PreHeat
193+
### PreHeat
187194

188195
PreHeat functions assume the sensor is (and stays) connected to power.
189196

@@ -192,7 +199,7 @@ PreHeat functions assume the sensor is (and stays) connected to power.
192199
left before preHeat is complete.
193200

194201

195-
#### Request and Read
202+
### Request and Read
196203

197204
The interface of the sensor is made asynchronous as there is a delay needed
198205
of around 80 milliseconds between a request for new data and the availability
@@ -220,7 +227,7 @@ Use 5~10 milliseconds above the minimal value the sensor still works.
220227
- **uint8_t getRequestTime()** returns the current request time in milliseconds.
221228

222229

223-
#### Calibration
230+
### Calibration
224231

225232
Read the datasheet about calibration process (twice).
226233
Incorrect calibration leads to incorrect output.
@@ -235,7 +242,7 @@ from 400 to 5000, the parameter value should be in this range.
235242
Note: One should wait 5 milliseconds between the calibration calls (see datasheet).
236243

237244

238-
#### Miscellaneous
245+
### Miscellaneous
239246

240247
- **void factoryReset()** idem.
241248
- **bool readFactorySet()** Read back if factory reset was successful.
@@ -245,7 +252,7 @@ Minimum length is 11.
245252
Minimum length is 11.
246253

247254

248-
#### Debug
255+
### Debug
249256

250257
- **uint8_t getLastError()** returns last error of low level communication.
251258

libraries/ACD10/library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"type": "git",
1616
"url": "https://github.com/RobTillaart/ACD10.git"
1717
},
18-
"version": "0.2.0",
18+
"version": "0.2.1",
1919
"license": "MIT",
2020
"frameworks": "*",
2121
"platforms": "*",

libraries/ACD10/library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=ACD10
2-
version=0.2.0
2+
version=0.2.1
33
author=Rob Tillaart <[email protected]>
44
maintainer=Rob Tillaart <[email protected]>
55
sentence=Arduino library for the ACD10 CO2 sensor.

0 commit comments

Comments
 (0)