thefekete / LM75

Arduino library for the LM75 I2C temperature sensor
GNU General Public License v3.0
10 stars 11 forks source link

Texas Instruments LM75B will not wake from shutdown #3

Open TOHSNBN opened 9 years ago

TOHSNBN commented 9 years ago

Hello! First, let me thank you for uploading your library! :)

There seems to be a little problem with the power down mode on the LM75B from TI.

After enabling the shut down and then disabling it it will not update the temperature annymore. The Thyst and Tost registers cann still be read and be written to though. As far as i can make it out, it should work just fine, but i am not that smart ;^^

Maybe you can have a look, i am using the demo code from the library without anny changes.

Greetings, Peter

gknauf commented 8 years ago

I can confirm this issue also with a LM75A from NXP - so seems this is not related to different brands; also I looked at the code and there seems nothing wrong; so I assumed this to be a timing issue and added a 'delay(100)' right after the call to 'sensor.shutdown(false)' in the example and that fixed it for me ... we should probably add such a delay to the shutdown routine in the library, but 1st we should experiment a bit with the value and test what we really need; maybe a 10ms is already enough ... @TOHSNBN please check if a delay fixes it for you too, and report back.

Edit: I tested a bit more, and for me it starts working with minimum 80ms, so the 'delay(100)' seems to be a good workaround.