GithubHelp home page GithubHelp logo

Comments (4)

RobTillaart avatar RobTillaart commented on July 4, 2024

@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.

ravargash avatar ravargash commented on July 4, 2024

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.

RobTillaart avatar RobTillaart commented on July 4, 2024

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.

ravargash avatar ravargash commented on July 4, 2024

Good one. Thank you!

from sht31.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.