Here are some photos of my project:
I agree with @Railroader. Delete the above equation. Define a few data points:
i.e. an array of counts corresponding to temperatures,
Trigger on which ever you want, you could also have a switch or switches to select one or the other (hi limit and low limit).
A simple ON/OFF LED got got the cooler and another LED if the cooling device cannot reach temperature in xxxx minutes. or perhaps exceeds 10 °C.
Do you think you need the switching regulator? Perhaps a TO-220 linear? Switching regulators can be noisy (electrical) and can cause issues with analog measurement.
Also you need to put a 0.1µF capacitor at the board input of the NTC/ Resistor divider.
Okey. You want to monitor the temperature interval between 3 and 5 C.
The basic data is the analog reading done by the controller. Note the range is 0 - 1023 for the full range of reading, 0 to 3.3, or 5 volt.
3 to 5 C would be a question about a few bits in the analogRead value. Try to control the cooler "some way". Then using a reference thermometer You could find out the actual readings in the interval 3 - 5C.
The physics, were the sensor is mounted, how air is circulating, You name it, affects the reading. Reading at the correct point, correct position, might call for some testing, trying.
I used the switching regulator to drop down the 13.8V to 7V to drive the Pro-Mini as I did not have a Arduino Nano or a 220 tab regulator. I knew about the noise, but still forgot to add the cap. Noise may be causing problems I can't readily detect. Thanks!
Yes, I knew that final calibrations would have to be done with everything in place with the lid closed. Working on 5V to the NTC, I guesstimated about 6 points per degree, so this is cutting Vo scale pretty fine for my 2C range. Currently at Vo of 350 the thermometer reads 6C. The serial displays 10.72C which is about 5 higher than the actual temp inside. Maybe the Peltier Box will never meet my required low temps? Time to make a larger/thicker metal plate!
As I remember NTC elements I think that such a small interval as 5-3 =2C will not be more then a few bits in the analog reading. I can't give a more precise answer.
Maybe another type of sensing element is needed. I once worked on a precision thermometer using a silicon diode as the source.
Putting the kit in a drawer together with a precision mercury thermometer it was fascinating to see the temperature reading increasing because of the heating radiated by my body when the driver was opened for a checkout.
Do some basic testing, "gluing" the sensor to the cooler and check it.
If not satisfactory, search for other sensing elements.
A genuine "Experimenter 350" - that's been around for a while.
Yup, but I need 2 of them to straddle a ESP-32. Haha
I raised the sketch temps to 12-14C and it cycles ok. Off-time is 6 minutes and On-time is 30 minutes which does not sound very efficient, although the room temp was quite high at 27C. I will glue/fasten the NTC to a larger plate and test the cycle again. The Peltier efficiency seems poor, so may work only as a basic cooler. Thanks for all your comments. Mac
I looked at a "typical" 10k NTC.
The 10K is the resistance at 25 deg C
Looking at the table and calculating the change from 5°C to 3.89 °C the resistance changes -1439 ohms. This comes to -1296 ohms/°C
Using a 25000 ohm series resistor, the delta volts / °C is 41 mv. One bit is about 3.2 mv.
You should have plenty sensor resolution.
As you've found, Peltier efficiency is very poor.
Try and add thermo isolation to the NTC on the surfaces not in contact with the cooler. The surrounding air may have effect.
What brand of data sheet are you using? Should I be using a 25k series resistor? Most circuits use a 10k.
I knew Peltier fridges had poor efficiency, as our old boat had one. It was all it could do to keep it cool enough for milk. Haha
I'm trying the thermistor on a metal sheet 1/2 as big as before, to confirm readings before I screw down a larger/thicker one. Final one will be epoxy bonded.
You should use a resistor having the same value as the thermistor has at the interesting temperature. That gives You the best resolution when reading the analog value. However, don't expect miracles, just a few bits of better resolution. However, the mounting is very important.
I find it difficult to comment Your word description of the installation.
If You could create a controlled test rig to calibrate the system, it would be good. Still, the final assembly needs good work.
Thermal contact to the object, thermal insulation against other medium is important.
There are temperature sensors in TO220 caps. They have a quite large surface picking up the temperature. I've used an SMT172 for that.
What is the physical package of Your thermistor?
Simpler and accurate to use a ds18b20 digital sensor on I2C.
Waterproof ones are available although I'd tend to run a bit of extra sealer around the cable entry point.
Did you read the link about your 2 x 10k resistances?
I only referenced a "typical" 10K NTC. Which will increase to about 25k at 1 to 3 °C. Hence the recommendation to use a 25k for your application.
Just wrt your metal plates, remember to factor in thermal inertia.
You’re well on the way to a solid solution.. there are plenty of good suggestions listed here.
I will try a 25k to to improve the reading next time I dismantle the top. As part of my learning curve I will try find the data sheet for my NTC to confirm.
Surprise! After testing with a smaller 3" x 4" metal sheet, the On and Off times were very similar, within a few minutes. Serial printed this:
Celsius: 11.89 5:03pm OFF
Celsius: 14.13 5:14pm ON
Celsius: 11.98 5:27pm OFF
Celsius: 14.13 5:39pm ON
Celsius: 11.98 5:54pm OFF
Guess I don't need the 3"x9" plate after all.