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

Necessity of resetting the MCU? #1

Open
Ravenstine opened this issue Nov 6, 2021 · 2 comments
Open

Necessity of resetting the MCU? #1

Ravenstine opened this issue Nov 6, 2021 · 2 comments

Comments

@Ravenstine
Copy link

Firstly, thanks for writing this library!

One thing I noticed, due to what may be a flaw in my circuit, is that the library resets the microcontroller unit when the sensor reading fails:

https://github.com/TronixLab/SFM3300/blob/main/SFM3300.cpp#L90-L96

Maybe consider removing this? It threw me for a loop (figuratively and literally!) until I read through the code. I'm not sure if it's a typical use case, but I think the reset makes it impossible to hot-swap flow sensors without resetting runtime state.

@TronixLab
Copy link
Owner

Hi Ravenstine,

Thanks for your review, the library I made was tested many times (continuously for few hours), and it work reliable. Soft resetting the sensor in not enough to ensure the reliability, it required hard resetting (reset the MCU). You may refer to product specification.
https://github.com/TronixLab/SFM3300/blob/main/docs/Sensirion_Mass_Flow_Meters_SFM3300_Datasheet.pdf

@TronixLab
Copy link
Owner

Yes your right it is not possible to hot-swap the flow sensor without resetting the MCU. Soft-reset does not work alone.

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

No branches or pull requests

2 participants