@@ -18,9 +18,9 @@ Arduino library for CHT832X temperature and humidity sensor.
1818
1919** Experimental**
2020
21- The CHT8320 and CHT8325 are temperature and relative humidity sensors.
21+ The CHT8320 and CHT8325 are temperature and relative humidity sensors.
2222They both have the same interface, the CHT8325 is slightly more accurate.
23- The CHT832X are factory calibrated and have an unique NIST number
23+ The CHT832X are factory calibrated and have an unique NIST number
2424(48 bit) to be globally trackable.
2525
2626This library implements the most important functionality of the sensor.
@@ -35,6 +35,11 @@ The library is tested to work with hardware, see issue 3.
3535Feedback as always is welcome, please share your experiences.
3636
3737
38+ ### Breaking change 0.4.0
39+
40+ Fixed CRC for humidity - see #9
41+
42+
3843### Breaking change 0.3.0
3944
4045Fixed temperature above 40 degrees Celsius - see #5
@@ -76,7 +81,7 @@ Always check datasheet for connections.
7681Pull ups are needed on SDA, SCL.
7782
7883
79- ## I2C
84+ ## I2C
8085
8186### Performance
8287
@@ -90,18 +95,18 @@ TODO: fill table
9095
9196| Version | Speed | Read | getManufacturer |
9297| :---------:| :--------:| :--------:| :----------------:|
93- | 0.3 .0 | 50000 | | |
94- | 0.3 .0 | 100000 | | |
95- | 0.3 .0 | 200000 | | |
96- | 0.3 .0 | 300000 | | |
97- | 0.3 .0 | 400000 | | |
98- | 0.3 .0 | 600000 | | |
99- | 0.3 .0 | 800000 | | |
98+ | 0.4 .0 | 50000 | | |
99+ | 0.4 .0 | 100000 | | |
100+ | 0.4 .0 | 200000 | | |
101+ | 0.4 .0 | 300000 | | |
102+ | 0.4 .0 | 400000 | | |
103+ | 0.4 .0 | 600000 | | |
104+ | 0.4 .0 | 800000 | | |
100105
101106
102107### Addresses
103108
104- The CHT8320 supports one fixed address, however one can order different
109+ The CHT8320 supports one fixed address, however one can order different
105110versions with different addresses. Max 4 sensors per bus.
106111
107112CHT8320-A-DNR .. CHT8320-D-DNR == 0x44 ..0x47
@@ -114,15 +119,15 @@ Pull ups are needed on SDA and SCL.
114119
115120Sometimes you need to control more devices than possible with the default
116121address range the device provides.
117- This is possible with an I2C multiplexer e.g. TCA9548 which creates up
118- to eight channels (think of it as I2C subnets) which can use the complete
119- address range of the device.
122+ This is possible with an I2C multiplexer e.g. TCA9548 which creates up
123+ to eight channels (think of it as I2C subnets) which can use the complete
124+ address range of the device.
120125
121- Drawback of using a multiplexer is that it takes more administration in
122- your code e.g. which device is on which channel.
126+ Drawback of using a multiplexer is that it takes more administration in
127+ your code e.g. which device is on which channel.
123128This will slow down the access, which must be taken into account when
124129deciding which devices are on which channel.
125- Also note that switching between channels will slow down other devices
130+ Also note that switching between channels will slow down other devices
126131too if they are behind the multiplexer.
127132
128133- https://github.com/RobTillaart/TCA9548
@@ -136,7 +141,7 @@ too if they are behind the multiplexer.
136141
137142### Constructor
138143
139- - ** CHT832X(const uint8_t address = CHT832X_DEFAULT_ADDRESS, TwoWire \* wire = &Wire)** Constructor
144+ - ** CHT832X(const uint8_t address = CHT832X_DEFAULT_ADDRESS, TwoWire \* wire = &Wire)** Constructor
140145with default address (0x44) and I2C bus.
141146- ** int begin()** initializes internals.
142147Returns error status.
@@ -179,17 +184,17 @@ Will return the same value until **read()** is called again.
179184
180185### Offset
181186
182- Adding offsets works well in the "normal range" but might introduce
187+ Adding offsets works well in the "normal range" but might introduce
183188under- or overflow at the ends of the sensor range.
184189These are not handled for temperature by the library, humidity is constrained.
185-
190+
186191- ** void setHumidityOffset(float offset)** idem.
187192- ** void setTemperatureOffset(float offset)** idem.
188193This function can be used to set return temperature in Kelvin, with offset = 273.15
189194- ** float getHumidityOffset()** idem.
190195- ** float getTemperatureOffset()** idem.
191196
192- If the offset is not the same over the operational range,
197+ If the offset is not the same over the operational range,
193198consider a mapping function for temperature and/or humidity.
194199e.g. https://github.com/RobTillaart/MultiMap
195200
@@ -201,8 +206,8 @@ Check datasheet for details.
201206The heater can be used to remove condense from the sensor - think humidity.
202207It is unclear how long the sensor may be heated. (feedback welcome).
203208
204- The heater must be disabled when making measurements as the heating
205- affects both the temperature and humidity.
209+ The heater must be disabled when making measurements as the heating
210+ affects both the temperature and humidity.
206211Note it might take some time to stabilize to "environment temperature" again.
207212
208213- ** void enableHeater()** switch on.
@@ -226,7 +231,7 @@ Check datasheet for details.
226231| :-----:| :----------------:| :--------------|
227232| 13 | heater status | 0 = Heater disabled, 1 = heater enabled
228233| 4 | reset detected | 0 = no reset, 1 reset since last clearStatus
229- | 1 | command status | 0 = executed, 1 = not executed
234+ | 1 | command status | 0 = executed, 1 = not executed
230235| 0 | checksum | 0 = pass, 1 = fail
231236| other | reserved |
232237
@@ -240,14 +245,14 @@ Check datasheet for details.
240245
241246### Meta data
242247
243- In issue https://github.com/RobTillaart/CHT832X/issues/7 it is reported that
248+ In issue https://github.com/RobTillaart/CHT832X/issues/7 it is reported that
244249the CHT8320 does not have an unique NIST identifier (any more).
245250At the moment it is unknown if this is for one manufacturer or for all.
246251Feedback on this topic is welcome.
247252
248253In short, the getNIST() function is probably not usable to identify your product.
249254
250- - ** uint16_t getNIST(uint8_t id)** id = 0, 1, 2; returns 2 x 3 = 6 bytes of
255+ - ** uint16_t getNIST(uint8_t id)** id = 0, 1, 2; returns 2 x 3 = 6 bytes of
251256the device ID. As said above, not guaranteed unique.
252257- ** uint16_t getManufacturer()** Returns 0x5959 according to the datasheet.
253258Other manufacturers may return different number.
@@ -269,16 +274,26 @@ Resets internal error to CHT832X_OK.
269274| -21 | CHT832X_ERROR_CRC |
270275
271276
277+ ## ReadDelay
278+
279+ The datasheet states 60 milliseonds is needed for conversion,
280+ but some devices might be just slightly faster.
281+ So this function allows to gain a few milliseconds.
282+ Use with care!
283+
284+ - ** void setReadDelay(uint8_t rdel = 60)** set conversion delay.
285+ - ** uint8_t getReadDelay()** returns set value.
286+
287+
272288## Future
273289
274290#### Must
275291
276292- elaborate documentation.
277- - test with hardware if all works.
293+ - buy and test with hardware if all works.
278294
279295#### Should
280296
281- - make read-delay of 60 ms configurable uint8_t (0.4.0 ?)
282297- test heater functions.
283298- test softwareReset().
284299- operational modi
0 commit comments