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

Plugin values continuously read "Sensor Not Connected" #3

Open
pandaabe101 opened this issue Feb 25, 2019 · 6 comments
Open

Plugin values continuously read "Sensor Not Connected" #3

pandaabe101 opened this issue Feb 25, 2019 · 6 comments

Comments

@pandaabe101
Copy link

When connecting the breakout board to the load cell, every minute or so the plugin on OctoPrint would read "Sensor Not Connected", even while there was no external interference given before or after the faulty reading. I am using female to female jumper wires to connect a Pi 3B+ to the HX711 breakout board, and the given female connectors to the breakout board. The Pi is running OctoPi 0.15.1.

@pandaabe101
Copy link
Author

I am connecting to OctoPi via WiFi through a router to a laptop running Windows 10. I am accessing OctoPi through Opera version 58.0.3135.65.

@ali1234
Copy link

ali1234 commented Apr 19, 2019

I am seeing the same thing, and also occasional incorrect readings of 40x the actual value. It does not happen when I use the sensor with other libraries such as https://github.com/tatobari/hx711py

@ali1234
Copy link

ali1234 commented Apr 19, 2019

Seems that the reason I don't get this with the other library is because it takes 5 readings and then takes an average. I would suggest instead taking 5 readings and discarding the one with the most deviation, and averaging the other four.

@dieki-n
Copy link
Owner

dieki-n commented Jul 14, 2019

I used to take average of 5 readings, but I switched to single readings to improve performance. Some older PIs are already running close to their limit on OctoPrint and taking all those readings every few seconds overwhelmed them.

When I get time I'll probably add it back as an option, since modern PIs don't have a problem with it.

@mark-hahn
Copy link

I would suggest instead taking 5 readings and discarding the one with the most deviation, and averaging the other four.

That is almost a median filter. A median filter is the best for throwing out outliers. You sort the five readings and report the middle value. They work great, much better than a mean filter for this type of application.

@mark-hahn
Copy link

Can you mark this as a feature request to use a median filter? It needs to be a median since it not only gives connect errors but also reports the giant number which would throw off any mean filter.

Of course finding the source of the connection error would also be nice. I have two setups that do the same thing.

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

4 participants