Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TH02 sensor does not work on Edison Arduino breakout. #351

Closed
g-vidal opened this issue Feb 19, 2016 · 10 comments
Closed

TH02 sensor does not work on Edison Arduino breakout. #351

g-vidal opened this issue Feb 19, 2016 · 10 comments

Comments

@g-vidal
Copy link
Contributor

g-vidal commented Feb 19, 2016

Hello,

I am using TH02 grove sensor connected to a grove board plugged on I2C connector of an Edison Arduino breakout.

With i2Cdetect -y -r 6 I can see that the sensor is recognized (0x40) but when I use the functions getHumidity() or getTemperature () in my python script I get the classical -50 -24 values corresponding to 0 0 measured by the sensor.
A dump confirms that it is sending only 0 .
Trying the same sensor on an arduino gives correct values. I have compiled UPM and I'll try to investigate but I am not a dev ;-( .....
Maybe I am doing something wrong or there is a bug in the python script in upm lib.
Here is the step by step python script

import mraa
import pyupm_th02
import thread, time
th02 = pyupm_th02.TH02(6,0x40)
print th02.name()
TH02
print th02
<pyupm_th02.TH02; proxy of <Swig Object of type 'upm::TH02 *' at 0xb76a74a0> >
 temp = th02.getTemperature()
 print temp
-50.0
 th02.getStatus()
True
hygro = th02.getHumidity ()
print hygro
-24.0

Thanks for any help

@g-vidal
Copy link
Contributor Author

g-vidal commented Feb 21, 2016

Hi,
I was suspecting a bug in TH02... I found some other people that got the same problem -50 -24 values only.

After wasting hours I finally come accross this post :
https://community.hallard.me/topic/124/issues-about-th02-with-nodemcu-v1-0/2
Where Charles explain that TH02 does not fully comply on I2C standard ant it must be the only sensor on the bus.... I suppose that on the Arduino the I2C bus is used for some other household functions then the TH02 does not work.
If anybody can crosscheck this explanation it could be nice to write a warning on TH02 upm module !

Thanks and hope my contribution is right....

@g-vidal g-vidal changed the title TH02 sensor visible [0x40 on i2c bus 6] but no measurement value transferred TH02 sensor does not work on Edison Arduino breakout. Feb 22, 2016
@Propanu
Copy link
Contributor

Propanu commented Feb 22, 2016

Thanks for reporting the issue, I will update the list of known limitations once I confirm it!

@g-vidal
Copy link
Contributor Author

g-vidal commented Feb 22, 2016

OK Perfect I stay tuned
Thanks

@HenkLaracker
Copy link

When i use the arduino ide and the groove indoor environment demo this sensor works fine, when i use eclipse (inteliot) with java and this library the TH02 sensor produces -50 -24 values. But ones in a while the correct temperature is shown. Any idea

@g-vidal
Copy link
Contributor Author

g-vidal commented Mar 2, 2016

Sorry Henk, I have stopped wasting my time with that sensor... As Charles says in his post better to switch to another more reliable sensor.

Tried to get it working on ULPNode with a TSL2861 (see this post), no way, this device claim as an I2C device, it’s just not, so I decided to switch to SI7021 sensor but this one seems now had it price raised twice on each reseller, no luck. !!!
Meanwhile your observation may suggest that the cpp library from "indoor environment demo" may have a trick to make this sensor work. Maybe it could be worth to compile ithis code inside upm and check what happens...If it works then pull a request to upgrade upm library. :-)

Good luck !

@HenkLaracker
Copy link

Hi, i'm unfortunately not an expert in this area but i found out that they use : https://github.com/Seeed-Studio/Grove_Temper_Humidity_TH02

@randomswdev
Copy link

If I switch Edison to 3V and set the switch on the Grove Shield to 3V, the sensor starts to work fine.
But the LCD backlight monitor stops working. Which is the correct configuration to have both of them working?

@randomswdev
Copy link

Setting Edison to 3V and the Grove Shield to 5V appears to solve the issue both with the temperature sensor and the LCD display. Is it the correct configuration?

@Propanu
Copy link
Contributor

Propanu commented Jul 14, 2016

If you don't plan on adding any more sensors yes. However keep in mind that with the board at 3V3 and the shield at 5V you won't get the full range for the ADC, and adding another I2C sensor might make the bus unstable again.

@Propanu
Copy link
Contributor

Propanu commented Aug 29, 2016

Sensor is now listed on known limitations page as it is only usable at 3V3 on the Intel Edison with the Arduino board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants