Comments (4)
@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.
Hope this helps
from sht31.
Hello!
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.
Regards!
from sht31.
The only stupid thing is when you do not learn from this experiment ;)
failures are far better teachers than success!
If no questions remain, you may close the issue
from sht31.
Good one. Thank you!
from sht31.
Related Issues (12)
- Exposing the raw temperature and humidity? HOT 6
- SHT31 library two I2C interfaces: example, advice needed HOT 31
- Add lastHeaterStopTime variable to prevent switching on the heater too early HOT 2
- Return 0.0C and 0.0% HOT 5
- SoftWire library + SHT31 library HOT 23
- prototype for 'bool SHT31::begin(uint8_t, uint8_t, uint8_t)' does not match any in class 'SHT31' HOT 6
- Using SHT31 in High Humidity Environment HOT 9
- check SHT2x functions added HOT 1
- Heater HOT 5
- SHT31 library with Arduino-ESP32 v2.0.5 HOT 8
- Question on i2c error handling HOT 23
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sht31.