Control a lcd thermometer with an arduino

i want to take a battery powered (3v) lcd thermometer, remove the thermistor and replace it with an arduino, and have the arduino set the temp the lcd display,

i know i should really control the lcd directly, but finding a 3 digit plus *C symbol 7 segment lcd is hard (can get the bare lcd's, but would need a control chip etc) and for £2.33 i got a small lcd thermometer that is in a case that i can use.

So, i'm thinking the thermistor just changes resistance as the temperature changes, the thermometer is just reading the resistance and adjusting the display accordingly.

so i just need to get the arduino to send out a resistance that changes to match the input (which will be from the serial port in the form of strings of numbers and text, one of them which will be for the temp)

my first thought is to use 2 pins as a sort of digital potentiometer, so the voltage on one pin rises as the other falls.

I've never really played with thermometers other than using a thermocouple and reading the resistance of it with an arduino.
i could be really daft and have the arduino heat up a resistor thats held against the thermistor, temps i'll be needing will be from minus 10 to plus 30 C, so getting the temp below ambient wont work with that daft idea.

Can i get some suggestions of how i might do this please.

It's actually fairly straightforward. To measure a resistance, a circuit either provides a constant current, or puts it in series with another resistor to a regulated supply voltage and in either case, measures the voltage across the resistor.

So you don't actually have to emulate a resistance, but provide a voltage that corresponds to what would appear across the given resistance value.

So you need to use analogWrite to generate a PWM value, and filter this with a LPF to a steady voltage. You will also have to check how the thermistor is connected to the original thermometer, you really need it to be already connected to one of the battery terminals so you can arrange a common supply connection.

brilliant, that makes life easy, couple of resistors and capacitors and the arduino.

I plan on powering the lcd from the arduino using the 3.3 volt output, the thermometer runs on 2 x 1.5 volt button cells originally (waiting for them on the post)

And hopefully one of the thermistors wires is connected to the supply,

Why do you want to use the button cells? This is not going to be compact, (alkaline) AA or AAA cells and a twin holder would be more durable.

Oh no, i 'DON'T' want to use the button cells, or any batteries at all,
it's just that the thermometer unit comes with 2 button cells to work normally, which i will remove.

So i want to power the thermometer directly from the arduino, i imagine it pulls very little current, likely in the region of a few microamps (i will measure it)
So i was thinking to just power the thermometer from the arduino's 3.3 volt line... or maybe have it powered via a digital pin (with a resistor or a buck converter to drop the 5 volts to 3,

If i have the thermometer powered via an arduino digital pin, it would give me control to turn the thermometer display on or off on command if i want.

This thermometer will be used in a computer bus driving simulator rig where i am connecting real bus parts to the computer via arduino's,
the thermometer display shows the temperature inside the virtual bus, as changing temperature is hard to simulate in the real world... hmmm, arduino controlling an A/C unit.... later maybe :slight_smile:

But part of the simulation is you need to adjust the heating controls, or open windows in the 'virtual' bus to maintain a comfortable temperature in it, so the thermometer display gives you the feedback on interior temp, and helps stop the passengers moaning at you.

Ah! I was thinking of a "clinical" thermometer - the sort you put in your mouth. But you mean one of these:

Yes, it all makes sense. We answered the same question a year or two back actually. :grinning:

Ahh yes that's the kind of thing, just a little lcd display the size of a small digital clock (well, i hoped for that) and a thermistor on the end of a bit of wire.

Hmmm, it wasn't me who asked about this a few years ago was it? my memory is so crap nowadays i keep forgetting things, but i'm sure i didn't get this far in my bus sim build to be doing the temperature display yet back then.

The thermometers just arrived in the post, bloomin weird getting amazon deliveries at 6pm on a sunday.

As with typical chinese advertising they are smaller than i expected, but still useable,

first thing i found out is they run on 1.5 volts, the 2 button cells are in parallel not series as i first thought, it pulls ~5 milliamps, so more than i was expecting, and hence the need for 2 parallel batteries.

I also found out that providing the lcd more than 1.6 volts and it just wont start up, gets stuck on displaying all digits, but doesn't blow anything, go below 1.6 volts and the lcd first turns on all digits, then shows dashes, then shows the temperature, annoying as i wanted to turn it on and off cleanly.

Of course it's a chip on board blob thing for the controller, so no easy way to find maybe a blanking line for the lcd part.

One of the thermistors wires is connected to negative of the batteries via a capacitor, i'm hoping that will allow me to use the simple pwm and low pass filter thing to control it.

So to power the thermometer from the arduino i made a simple resistive divider, a 120 ohm and a 47 ohm resistor gives me 1.41 volts out at the center of them.

a 10K resistor across the thermistor wires gives me 26.1 to 26.2 degrees C and going lower in resistance raises the temp.

I'm not sure how accurately i will be able to set the temp on this thing, as the temperature does waiver by 1 or 2 tenths of a degree when i have the 10k resistor connected solidly to the wires.

But i need to get on and make the low pass filter then try it out with the arduino.

gazz292:
first thing I found out is they run on 1.5 volts, the 2 button cells are in parallel not series as I first thought, it pulls ~5 milliamps, so more than I was expecting, and hence the need for 2 parallel batteries.

No way!

5 mA will flatten the batteries in a day or two! Just using two batteries is not going to make any significant difference! An LR44 cell (AKA AG13) which is what you almost certainly have, is rated at a maximum 150 mAh so yes, that would be 30 hours per battery. 5 microamps would be more plausible.

gazz292:
I also found out that providing the LCD more than 1.6 volts and it just wont start up, gets stuck on displaying all digits, but doesn't blow anything, go below 1.6 volts and the LCD first turns on all digits, then shows dashes, then shows the temperature, annoying as I wanted to turn it on and off cleanly.

You did not mention turning it on and off before!

gazz292:
Of course it's a chip on board blob thing for the controller, so no easy way to find maybe a blanking line for the LCD part.

Why would you expect to find a "blanking line"? Does this not just display all the time?

gazz292:
One of the thermistors wires is connected to negative of the batteries via a capacitor, I'm hoping that will allow me to use the simple pwm and low pass filter thing to control it.

This is sounding bad. Do you mean it connects to the negative of the batteries via a capacitor and something else - a connection to the "blob" - as well, or does it only connect through the capacitor? If it necessarily has a capacitor in series, then providing DC via a PWM will be of no use.

gazz292:
So to power the thermometer from the Arduino I made a simple resistive divider, a 120 ohm and a 47 ohm resistor gives me 1.41 volts out at the center of them.

A red LED used for the ground side of the divider can act as a Zener, and depending on the LED, will be somewhere around 1.5 V. But I am sure this thing does not require 5 mA, so the resistor could be more like 1k5.

gazz292:
I'm not sure how accurately i will be able to set the temp on this thing, as the temperature does waiver by 1 or 2 tenths of a degree when I have the 10k resistor connected solidly to the wires.

But does it waver with the thermistor? Perhaps your 10k actually is on a border.

Quote from: Paul__B Mon Jan 04 2021 09:06:55 GMT+0000 (Greenwich Mean Time)

Paul__B:
No way!

5 mA will flatten the batteries in a day or two! Just using two batteries is not going to make any significant difference! An LR44 cell (AKA AG13) which is what you almost certainly have, is rated at a maximum 150 mAh so yes, that would be 30 hours per battery. 5 microamps would be more plausible.

Oh hang on .. brain fart time,
it was 5mA through the resistive divider, Doh! i was checking what it would draw from the arduino, when i go back out to my shed i'll check the actual current draw.

Paul__B:
You did not mention turning it on and off before!

I'm sorry, unfortunately i have these ideas of what i will do, then i discover more things i need to add, i'm my own worst nightmare, and i annoy the hell out of people who help me with snippets of code or even full sketches, as i test it out, find an issue, so to get round it totally change the parameters of what i wanted in the first place.... hmm, i'd make a good replacement for BoJo wouldnt i :smiley:

Paul__B:
Why would you expect to find a "blanking line"? Does this not just display all the time?

I'm kinda thinking like a character LCD has a way to turn the display off but keep the data stored,
but the start up sequence of this thing isn't too bad so i can live with just cutting power and reapplying it as needed.

Paul__B:
This is sounding bad. Do you mean it connects to the negative of the batteries via a capacitor and something else - a connection to the "blob" - as well, or does it only connect through the capacitor? If it necessarily has a capacitor in series, then providing DC via a PWM will be of no use.

I will take it appart and have a good look again shortly,
the trace from the thermistor lead goes up right next to the blob, then the capacitor and back down to join the negative / ground plane part o the pcb, so there could well be a trace going into the blob,

I'll use my bench power supply and apply voltage to the thermistor leads and see what i get, if anything.

Paul__B:
But does it waver with the thermistor? Perhaps your 10k actually is on a border.

Yes unfortunately with the thermistor the reading varies by upto .3 of a degree at times, and when i powered it with my bench psu set at 1.5 volts, the reading was all over the place jumping by a few whole degrees, i think that might be input ripple the thermometer is not liking.

I bought 3 of these thermometers, but i just grabbed on and modified it, i might have picked the worst one, i'll have to get the other 2 out of their boxes and compare them.

i've got it working... but it's not stable.

Dang, forgot to measure the actual current it pulls, will try to remember that tomorrow,

but i used a 10uF electolytic capacitor and a 2.6k resistor to make the LC filter,

i found that applying any kind of voltage on the thermister wire that did not connect via the cap internally to ground screwed it up, it'd do a half reset and get stuck,

but apply a voltage to just the wire that goes via the cap to negative of the battery (and hence ground on the arduino) and it works.

just used a simple sketch that did an analogWrite of 95, it'll display 19.5*C,
BUT the display will waiver a full degree, then half a degree, then .2 of a degree and so on.

If i ground the other thermister wire, the display shows 27 degrees, but waivers by upto 6 degrees then,