08-01-2019 06:24 AM
Hi everyone,
I'm currently making a PID controller to heat and cool a Peltier cooler. I have everything working right for heating but now that I'm trying to cool, all my graphs show a rise in temperature even though I can feel that the Peltier itself has cooled down.
The first thing I want to do is pump a known amount of current into the system and see what temperature it gives. Again, this works perfectly for heating but for cooling, still just shows a rise in temperature.
Since I can feel the Peltier cooling, it must be something in my code that I need to adjust. Any help would be very much appreciated!
08-01-2019 07:04 AM - edited 08-01-2019 07:18 AM
Why do you think it's the code? How are you measuring temperature? Can you show us how all the hardware (thermistor, Peltier element, etc.) is connected?
(Some coding tip: Use a chart instead of growing arrays forever. No need for shift registers.)
08-01-2019 07:14 AM
I'm measuring temperature using a thermistor which is part of a wheatstone bridge.
I can feel that the Peltier is getting much colder when the code is running but the temperature is still plotting as if its getting hotter (which is why I'm thinking there's something wrong in my code - maybe in my subvi that's converting voltage to temp?).
I've attached circuit diagrams (for the current source I'm using and the thermistor circuit) that show connections to the DAQ, as well as an example of the results I'm getting when the TEC should be cooling (it just looks like it's heating up but I can feel it cooling when I touch the Peltier)
08-01-2019 07:22 AM
Does the thermistor read correctly if everything else is disconnected? Try a few typical temperatures, e.g. room temperature and what you consider "cold".
08-01-2019 08:55 AM
Yes the thermistor is working when disconnected. I can see the resistance changing as it gets colder or hotter.
I tried using the thermistor Voltage to temperature VI that's in labview 2013 and it did give me the right curve but with values that were far too high (it should be starting at room temp and dropping below), so I think it's something wrong with my temperature subVI but I can't figure out what it is.
08-01-2019 01:26 PM
Hi ehalpin,
using plain LabVIEW instead of ExpressVIs makes code much more readable:
(It also exhibits Rube-Goldberg code like your multiply with 10k, then divide by 10k…)
but with values that were far too high
When temperature values are "way too high" then it might help to convert from K to °C - see the image…
08-02-2019 06:11 AM
Thanks for the reply! I cleaned up the code but the main issue was that I needed to change the sign of my integral parameter when the TEC was cooling below room temperature (since the polarity is reversed).
It works fine now, thanks!