You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm making a small tester for an SHT31 that passes though a connector. I'm making a small test to check if the connetor is well made. I tried using the isConnected function and simulate different connection errors and turns out that the funcion returns true when no power is provided to the sensor.
Is this normal or there is an issue?
Using an Arduino Nano board and a common SHT31 sensor board. To trigger this issue, just attach or detach the respective pins
@ravargash
(No hardware here to recreate the specific effect nearby)
Possible explanations:
one
It could be that some remaining change is in the sensor after disconnecting the power.
To test this assumption you could place your connected test in loop() with a delay(1000).
Then you would get some OK's and when the charge is gone you would get FAIL.
(then you have continuous testing)
two
The sensor is charged somehow e.g. by the CLOCK signal (sort of parasite power.
To test this assumption you can measure with a scope if you see a changing voltage on the 5V pin of the sensor
Another way to check this is to have a pulldown resistor of 10K between the 5V and the GND.
Then if you disconnect the 5V from the sensor, the sensor 5V pin will be drawn to GND so definitely get no
power.
Thanks for the quick reply. Actually, it was very stupid of my part. The SHT31 has such a low consumption that the capacitor installed can keep it powered for a few minutes.
However, I did found that when effectively discharged and unpowered, the code hangs whenever the endTransmission funcion is called. This can be fixed by setting setWireTimeout at setup. I used Wire.setWireTimeout(1000,false), as I don't care if the bus keeps hanged.
Hello!
I'm making a small tester for an SHT31 that passes though a connector. I'm making a small test to check if the connetor is well made. I tried using the isConnected function and simulate different connection errors and turns out that the funcion returns true when no power is provided to the sensor.
Is this normal or there is an issue?
Using an Arduino Nano board and a common SHT31 sensor board. To trigger this issue, just attach or detach the respective pins
Regards!
SHT31tester.zip
The text was updated successfully, but these errors were encountered: