Hi all,
I've been working on a PID temperature controller and have been loving the Tinkerforge system overall.
The only issue I haven't been able to solve is an intermittent "sticking" of readings from my thermocouple bricklet V2 with a K-type probe. I'm using the thermocouple callback to give me a value every 1 second as reccomended by the docs, with 'value_has_to_change' set to False.
This works great 99% of the time. But occassionally and apparently randomly, the bricklet returns an identical reading for a short period of time. You can see in my attached image: the two little plateaus in the graph, even though the real temperature is steadily rising (the X-axis here is 1 second per point). In this example I was using 16-sample averaging, but the issue seems to persist for all averaging values. The data on the graph is processed obviously, but I've confirmed that the thermocouple callback itself is being called with identical values.
I haven't been able to pin down why this is happening. I'm using the Python bindings on a Hat Zero brick alongside a SSR and LCD bricklet. The only thing that seems to help is reducing the frequency of the callback, but I suspect it's just masking the problem. I'm fairly sure the probe and connections are fine: I don't experience the sticking with an external thermocouple reader, and the apparatus isn't moving around or subject to any other external interferrence that I can see.
Has anyone else experienced anything like this? Anything I could try? My next idea would be to try an isolator bricklet, but that would just be a guess! Other ideas: possible performance issues on my Pi Zero, causing the various callbacks in my script to compete with each other? Not sure. From what I can see the callback is firing on time, just with the same value over and over!
The thermocouple configuration section of my code is here, for reference: https://github.com/BenVosper/heated/blob/master/regulated.py#L238:L256
Let me know if you need any more info about my setup. Thanks!