Comments (60)
getAddress() and isConnected() tested working fine so far
from acd10.
here is the output
from acd10.
those 2 function looks good
from acd10.
The readSensorCode functions should not be printed as HEX as it are chars and digits.
I'll change the code.
The other works well.
from acd10.
this may be useful to understand
from acd10.
Sorry for bit delay reply. I am outstation for few days due to holidays here.
from acd10.
Looks good!
Current commit implements
- bool preHeatDone() returns true 120 seconds after constructor is called.
- uint32_t preHeatMillisLeft() returns the time in milliseconds left before preHeat is complete.
- ACD10_preheat_test.ino
- ACD10_readSensorCode.ino
please give those examples a try
from acd10.
Changed the signature of the readSensorCode() function
added the readSensor() function + some related.
added a demo sketch how it can be used.
Please verify.
Still open is calibration, which will be later this week.
from acd10.
Seems the value does not looks OK. Do you agree ?
from acd10.
Seems the value does not looks OK. Do you agree ?
1400 CO2 can easily be true for an indoors level.
Furthermore the sensor probably need calibration.
With other CO2 sensors it was needed to be 24++ hrs outside before it gave good readings.
The temperature around 13350 does not make sense to me. I will check the code and the datasheet.
from acd10.
The readSensorCode now looks very informative.
We're going in the right direction.
from acd10.
have you updated codebase ? Do you want me to test again ?
As per datasheet it says its pre calibrated . Do we need any manual calibration ? Or do you suggest you leave it power up for 24 hrs to make it calibrated ?
from acd10.
Do you understand why temperature looks odd ?
from acd10.
Also 1400 ppm Co2 in indoor is not very good result unless its due to calibration issue
from acd10.
have you updated codebase ? Do you want me to test again ?
No, tomorrow I'll continue with this lib.
from acd10.
As per datasheet it says its pre calibrated . Do we need any manual calibration ? Or do you suggest you leave it power up for 24 hrs to make it calibrated ?
The latter, datasheet states it calibrates after 24 hrs. After start. I assume it should be outside to have ~400 ppm
from acd10.
Do you understand why temperature looks odd ?
No, not investigated yet.
What is the temperature (approx).
from acd10.
Also 1400 ppm Co2 in indoor is not very good result unless its due to calibration issue
It is high but not uncommon level for indoor.
from acd10.
Also 1400 ppm Co2 in indoor is not very good result unless its due to calibration issue
It is high but not uncommon level for indoor.
I understand but i tested it in a large room with myself only thats why i am worried its giving right value or it may sorted after 24hrs of continues run. Its true it does not ran 24 hrs yet after i started using that sensor
from acd10.
Tomorrow i will try outside & let you know the value.
from acd10.
Do you understand why temperature looks odd ?
No, not investigated yet.
What is the temperature (approx).
25 - 28 c
from acd10.
To understand the CO2 concentration and temperature I also read the UART interface in the datasheet.
For I2C the CO2 math uses 4 bytes of the answer.
For UART the CO2 math uses 2 bytes of the answer.
As the range support is 400-5000 one should say that 2 bytes is sufficient.
I saw that read temperature is not supported in the UART interface!
( table skips command 2, should that be a hidden / reserved one?)
I need to implement the CRC checking to see if the data fetched is correct.
Will try to have a new version today.
from acd10.
@fuzonmedia
Hi, I uploaded a new version.
Can you please post the output of all the examples?
The ACD10.cpp file has some commented lines, these could provide more info about the data (CO2 and temperature).
First version of calibration functions included, but I did not review them yet (other tasks need attention).
Also no example code for calibration exists.
from acd10.
@fuzonmedia
Send an email to aosong as some information is missing in the datasheet.
About temperature scale and some differences between UART and I2C interface.
from acd10.
@fuzonmedia
Got your email and changed the interface of the library as 80 ms delay is an eternity for a microprocessor.
Updated all examples to match the new insights.
Still no information about the temperature, although that could be good after 80 ms too.
In fact it might be that only the temperature needs the 80 ms delay.
Need to think how to find out.
from acd10.
Can you post the output of the examples as TEXT (not as image)
Parts can be useful for documentation.
from acd10.
Ok will do
from acd10.
@fuzonmedia
Any progress to report?
from acd10.
@fuzonmedia
I am going to release a 0.1.0 version so more people can provide feedback.
from acd10.
@RobTillaart Sorry for delay reply as I was traveling.
I tested the latest code but it gives some error during compile
from acd10.
21:33:21.219 -> /Users/nil/Downloads/ACD10-master/examples/ACD10_readSensorCode/ACD10_readSensorCode.ino
21:33:21.219 -> ACD10_LIB_VERSION: 0.1.0
21:33:21.219 -> FIRMWARE: AS V1.0.00
21:33:21.219 -> SENSORCODE: 0188152356
This one is working fine as expected
from acd10.
But read sensor one is showing compile error
from acd10.
Remarkable as the build (continuous integration) compiles all examples.
Have you fetched the latest branch.
from acd10.
Yes I tried both 2 branch examples files. Both branch read sensor example shows same error. Can you please check the code again as this issue was not present in the earlier codebase
from acd10.
For which board are you compiling
from acd10.
The examples compile for 5 platforms in the build CI.
- uno
- m4
- esp32
- esp8266
- rpipico
See: https://github.com/RobTillaart/ACD10/actions/runs/6419162887/job/17428429730
If your compiler cannot find requestSensor() you are somehow using the old version 0.1.0.
Maybe your compiler cached it?
from acd10.
Looking at the screenshot (Please copy TEXT not screenshots of errors) shows your 8266 environment cannot find some .h file.
from acd10.
@RobTillaart Sorry for delay reply as I was traveling.
I tested the latest code but it gives some error during compile
For this I used arduino Uno board
from acd10.
You should download the develop 0.1.1 branch as the error indicates you are using the 0.1.0 master branch.
from acd10.
@fuzonmedia
Any progress to report?
from acd10.
@fuzonmedia
Merged and released 0.1.1 => update readme.md + some minor edits
from acd10.
I downloaded the latest release but its showing same error
from acd10.
Compiling sketch... /private/var/folders/xs/8m8thf7x4d968sw4vqxp2g5w0000gn/T/AppTranslocation/AC51C3D8-AD07-4EED-B8C3-D26D1FB573F9/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/private/var/folders/xs/8m8thf7x4d968sw4vqxp2g5w0000gn/T/AppTranslocation/AC51C3D8-AD07-4EED-B8C3-D26D1FB573F9/d/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/private/var/folders/xs/8m8thf7x4d968sw4vqxp2g5w0000gn/T/AppTranslocation/AC51C3D8-AD07-4EED-B8C3-D26D1FB573F9/d/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard -I/private/var/folders/xs/8m8thf7x4d968sw4vqxp2g5w0000gn/T/AppTranslocation/AC51C3D8-AD07-4EED-B8C3-D26D1FB573F9/d/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src -I/Users/nil/Documents/Arduino/libraries/ACD10-develop /var/folders/xs/8m8thf7x4d968sw4vqxp2g5w0000gn/T/arduino_build_652482/sketch/ACD10_demo.ino.cpp -o /var/folders/xs/8m8thf7x4d968sw4vqxp2g5w0000gn/T/arduino_build_652482/sketch/ACD10_demo.ino.cpp.o /Users/nil/Downloads/ACD10-0.1.1/examples/ACD10_demo/ACD10_demo.ino: In function 'void loop()': ACD10_demo:29:12: error: 'class ACD10' has no member named 'requestSensor'; did you mean 'readSensor'? mySensor.requestSensor(); ^~~~~~~~~~~~~ readSensor ACD10_demo:30:19: error: 'class ACD10' has no member named 'requestReady'; did you mean 'lastRead'? while (mySensor.requestReady() == false) delay(10); ^~~~~~~~~~~~ lastRead Using library Wire at version 1.0 in folder: /private/var/folders/xs/8m8thf7x4d968sw4vqxp2g5w0000gn/T/AppTranslocation/AC51C3D8-AD07-4EED-B8C3-D26D1FB573F9/d/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire Using library ACD10-develop at version 0.1.0 in folder: /Users/nil/Documents/Arduino/libraries/ACD10-develop exit status 1 'class ACD10' has no member named 'requestSensor'; did you mean 'readSensor'?
from acd10.
Compiling sketch... /private/var/folders/xs/8m8thf7x4d968sw4vqxp2g5w0000gn/T/AppTranslocation/AC51C3D8-AD07-4EED-B8C3-D26D1FB573F9/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/private/var/folders/xs/8m8thf7x4d968sw4vqxp2g5w0000gn/T/AppTranslocation/AC51C3D8-AD07-4EED-B8C3-D26D1FB573F9/d/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/private/var/folders/xs/8m8thf7x4d968sw4vqxp2g5w0000gn/T/AppTranslocation/AC51C3D8-AD07-4EED-B8C3-D26D1FB573F9/d/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard -I/private/var/folders/xs/8m8thf7x4d968sw4vqxp2g5w0000gn/T/AppTranslocation/AC51C3D8-AD07-4EED-B8C3-D26D1FB573F9/d/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src -I/Users/nil/Documents/Arduino/libraries/ACD10-develop /var/folders/xs/8m8thf7x4d968sw4vqxp2g5w0000gn/T/arduino_build_900459/sketch/ACD10_readSensor.ino.cpp -o /var/folders/xs/8m8thf7x4d968sw4vqxp2g5w0000gn/T/arduino_build_900459/sketch/ACD10_readSensor.ino.cpp.o /Users/nil/Downloads/ACD10-0.1.1/examples/ACD10_readSensor/ACD10_readSensor.ino:11:16: warning: invalid conversion from 'TwoWire*' to 'uint8_t {aka unsigned char}' [-fpermissive] ACD10 mySensor(&Wire); // explicit default, not needed. ^~~~~ In file included from /Users/nil/Downloads/ACD10-0.1.1/examples/ACD10_readSensor/ACD10_readSensor.ino:8:0: /Users/nil/Documents/Arduino/libraries/ACD10-develop/ACD10.h:22:3: note: initializing argument 1 of 'ACD10::ACD10(uint8_t, TwoWire*)' ACD10(uint8_t address = ACD10_DEFAULT_ADDRESS, TwoWire *wire = &Wire); ^~~~~ /Users/nil/Downloads/ACD10-0.1.1/examples/ACD10_readSensor/ACD10_readSensor.ino: In function 'void loop()': ACD10_readSensor:32:14: error: 'class ACD10' has no member named 'requestSensor'; did you mean 'readSensor'? mySensor.requestSensor(); ^~~~~~~~~~~~~ readSensor ACD10_readSensor:36:16: error: 'class ACD10' has no member named 'requestReady'; did you mean 'lastRead'? if (mySensor.requestReady()) ^~~~~~~~~~~~ lastRead Using library Wire at version 1.0 in folder: /private/var/folders/xs/8m8thf7x4d968sw4vqxp2g5w0000gn/T/AppTranslocation/AC51C3D8-AD07-4EED-B8C3-D26D1FB573F9/d/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire Using library ACD10-develop at version 0.1.0 in folder: /Users/nil/Documents/Arduino/libraries/ACD10-develop exit status 1 'class ACD10' has no member named 'requestSensor'; did you mean 'readSensor'?
from acd10.
That is a lot of info, need some time to analyze what happens in the code.
from acd10.
Ok I understand . It was my fault. It was pulling library from the old codebase. Now I made it correct
17:01:42.501 -> /Users/nil/Documents/Arduino/libraries/ACD10-0.1.1/examples/ACD10_demo/ACD10_demo.ino
17:01:42.501 -> ACD10_LIB_VERSION: 0.1.1
17:01:42.572 -> 1651 12187
17:01:44.673 -> 1647 12183
17:01:46.766 -> 1643 12186
17:01:48.857 -> 1640 12186
17:01:50.973 -> 1638 12187
17:01:53.048 -> 1637 12186
17:01:55.137 -> 1635 12183
17:01:57.243 -> 1634 12186
17:01:59.324 -> 1632 12183
17:02:01.420 -> 1631 12185
17:02:03.504 -> 1630 12184
This is what I am getting now from 0.1.1
from acd10.
Seems the temperature is still not correct. but Co2 is showing as needed
from acd10.
If you divide temperature by 512. ?
Would give ~23.8 °C
from acd10.
Does the CO2 match the testcode you got from aosong?
from acd10.
Does the CO2 match the testcode you got from aosong?
Similar
from acd10.
Does the CO2 match the testcode you got from aosong?
17:10:00.136 -> CO2:1894PPM
17:10:02.221 -> CO2:1897PPM
17:10:04.308 -> CO2:1901PPM
17:10:06.374 -> CO2:1904PPM
17:10:08.486 -> CO2:1907PPM
17:10:10.561 -> CO2:1910PPM
from acd10.
What happens if you breath towards the sensor?
Does it peak?
And slowly falls back?
from acd10.
17:11:22.785 -> 1805 12048
17:11:24.868 -> 1801 12048
17:11:26.982 -> 1798 12045
17:11:29.058 -> 1795 12047
17:11:31.168 -> 1792 12051
17:11:33.262 -> 1789 12053
17:11:35.335 -> 1786 12050
17:11:37.430 -> 1783 12054
17:11:39.537 -> 1780 12054
17:11:41.616 -> 1777 12056
17:11:43.729 -> 1774 12059
17:11:45.786 -> 1771 12058
17:11:47.913 -> 1769 12056
17:11:49.992 -> 1767 12054
17:11:52.101 -> 1763 12056
17:11:54.172 -> 1761 12057
17:11:56.251 -> 1759 12063
17:11:58.366 -> 1757 12059
17:12:00.451 -> 1756 12061
17:12:02.546 -> 1755 12061
17:12:04.698 -> 1754 12063
17:12:13.129 -> CO2:1751PPM
17:12:15.218 -> CO2:1750PPM
17:12:17.286 -> CO2:1749PPM
17:12:19.382 -> CO2:1749PPM
17:12:21.479 -> CO2:1748PPM
17:12:23.561 -> CO2:1747PPM
17:12:25.619 -> CO2:1747PPM
17:12:27.716 -> CO2:1747PPM
17:12:29.795 -> CO2:1746PPM
17:12:31.879 -> CO2:1746PPM
17:12:33.968 -> CO2:1746PPM
17:12:36.063 -> CO2:1745PPM
17:12:38.139 -> CO2:1745PPM
17:12:40.234 -> CO2:1745PPM
17:12:42.375 -> CO2:1745PPM
17:12:44.378 -> CO2:1744PPM
First few from this code
last few from ASAIR
from acd10.
Ok that confirms the Concentration CO2 is working.
What is the current temperature in the room?
from acd10.
Ok that confirms the Concentration CO2 is working.
What is the current temperature in the room?
~27 C
from acd10.
So we have a bit pattern value ~12000 that should represent 27. Assuming it is the outside temperature and that the raw bit pattern has scale Celsius.
Dividing by 512 gives a temp in the right order of magnitude.
from acd10.
Dividing 12000 by 27 gives a factor 444 which is a non expected number (powers of two are).
from acd10.
It could be that the bit pattern 12000 also include status bits so not all bits are temperature. The datasheet does not tell (or I missed it).
from acd10.
As I don't have appropriate documentation the temperature mapping will remain unsolved.
If you can provide a table with 10 or more raw measurements at (substantial) different real temperatures (e.g. measured with a DS18B20) the mapping from raw to real can possibly resolved. The derived formula / mapping should be confirmed with at least two other ACD10 sensors.
In short getTemperature() will return raw temperature and we cannot convert it to Celsius (or F or K)
from acd10.
As there are no questions anymore I close this issue.
from acd10.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acd10.