Testing SHT75 humidity sensor on STM F303K8 board.

Dependencies:   SHT75 mbed

Fork of Nucleo-F303K8-SSD1306_OLED by Joseph Ellsworth

Sample code to test SHT75 humidity sensor using STM F303K8 board. Uses a 3.3V from board to power sensor. 10K resistor Pull-up on data. Must not be on same pins as I2C. Uses D0 for Clk and D1 for Data.

I had to modify sample code supplied by https://developer.mbed.org/users/nimbusgb/code/SHT75/ because the sensor failed to read without the softReset() and readStatus() at beginning of measurement loop. I think this is caused by the 72Mhtz speed of the F303K8 but did not attempt to fully diagnose.

The readStatus() method from library seems to malfunction and always return a -1 which never changes even when sensor is unplugged.

See https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/Humidity_Sensors/Sensirion_Humidity_Sensors_SHT7x_Datasheet_V5.pdf section 2.1 for wiring.

Files at this revision

API Documentation at this revision

Comitter:
joeata2wh
Date:
Wed Jul 27 19:54:51 2016 +0000
Parent:
4:2c46c3bc8032
Commit message:
updated comments

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 2c46c3bc8032 -r 4b66dfbc52a5 main.cpp
--- a/main.cpp	Wed Jul 27 19:42:41 2016 +0000
+++ b/main.cpp	Wed Jul 27 19:54:51 2016 +0000
@@ -1,4 +1,5 @@
-/* Test ability to read SHT75 sensor 
+/* Test ability to read SHT75 sensor from F303K8 board.
+
   Note:  Can not be on same pins as I2C due to different pull up 
   requirements.
 
@@ -6,8 +7,19 @@
   Take a look at A2WH.com Producing Water from Air using Solar Energy
   March-2016 License: https://developer.mbed.org/handbook/MIT-Licence
   Please contact us http://a2wh.com for help with custom design projects.
+  
+  Sample code to test SHT75 humidity sensor using STM F303K8 board.    
+  Uses a 3.3V from board to power sensor.  10K resistor Pull-up on data.   
+  Must not be on same pins as I2C.    Uses D0 for Clk and D1 for Data.
 
-  See Also: https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/Humidity_Sensors/Sensirion_Humidity_Sensors_SHT7x_Datasheet_V5.pdf
+  I had to modify sample code supplied by https://developer.mbed.org/users/nimbusgb/code/SHT75/  
+  because the sensor failed to read without the softReset() and readStatus() at beginning 
+  of measurement loop.  I think this is caused by the 72Mhtz speed of the F303K8  but did 
+  not attempt to fully diagnose.
+
+  The readStatus() method from library seems to malfunction and always return a -1 
+  which never changes even when sensor is unplugged. 
+
   
  */