First trial using the Pycom WiPy

Hi everyone,
getting more and more frustrated with corrupt readings with my Pi-Zero setup, i ordered a WiPy and i want to share my first results with you.

Very simple Code, just reading 1 DS18B20 and 1 HX711 every 0.5sec and store the values in a txt file.
Maybe i should wait longer?

todo: running the code with the HX711-Lib using the SPI Interface.

What are your experiences?

Code.zip (5,1 KB)

1 Like

In case you read the DS18B20 with 12bit accuracy, the sensor needs at least 750 ms conversion time. so a delay of 500 ms between readings is too fast. Timing is critical, so you should use a proper lib to read the sensors. Perhaps you may have a look at GitHub - hiveeyes/hiveeyes-micropython-firmware: Hiveeyes MicroPython Datalogger -- Data logging for humans it is not ready yet but on a good way! The other version is GitHub - Hiverize/FiPy what is running in Bremen with good results (I have still problems to get it running, Wifi makes problems on my side) but would be great if you can test it.

We will integrate both development branches to one software in the future.

1 Like

Thx, i am using your libs now and i increased the time between 2 readings to 1 sec.
Tomorrow we will see if this was the problem.

1 Like

Here the test with this Lib and 2 sec. time between readings.

Looks better, but still a few wrong readings, but compared to my RasPi setup (about 5% wrong HX711-readings), this is way better.

1 Like

My recent Wifi problem was a SSID-issue. On the area with my hive two SSIDs were present. First one was ‘blabla’ and second one ‘blabla guest’. I wanted to use and configured the ‘blabla’ but the wifi library always tried to connect to the ‘blabla guest’ - with the configured password of ‘blabla’

annoying problem - my solution: 2nd SSID is now ‘guest blabla’

I have the same constelation here but this was not the reason for the problem. I had other code on the FiPy before and thought only that I purged the device but the old code was not cleand up before. After cleaning up code is now running, see Hiverize code läuft auf meinem FiPy nicht - #14 by clemens

Dear Martin,

Thanks for sharing your observations. Bummer!

Maybe that’s the reason some people are running the raw readings through a “median” function like @clemens with

https://github.com/hiveeyes/arduino/blob/master/node-gprs-http/node-gprs-http.ino#L774-L775

and @RalfL with

https://github.com/hiveeyes/hiveeyes-micropython-firmware/blob/master/lib/hx711_heisenberg.py#L69-L84

in order to mitigate these “misreadings”? Of course, I would be interested to find the root cause for that instead of mitigating them.

Ahh, correction: I believe the original reason to introduce the median was to compensate against influences from fluctuations related to wind pressure. Right, @clemens?

However, I have always kept myself asking whether this compensation might also lead to not even seeing those misreadings in Grafana?

Cheers,
Andreas.

Sure, you have to do a clever processing of the data.
I take a measurement every 30sec. The value can not de or increase more than 1 kg from one reading to an other. And then i do a median of all collected values every 5 min.
But still, i know there are wrong single measurments and i want to get rid of them ;)

1 Like

… Bingo! …