I have a couple of rather cute 10mA panel ammeters, one of which I'd like to repurpose into an air temperature gauge for an enclosure. This can either be controlled by an Arduino, sensing the temperature, then outputting a PWM signal into an analogue circuit to drive the meter; or it could be a straight analogue circuit with no controller - I don't mind which.
Poking around the interwebs, it looks like LM234 could be a suitable device; it talks about temperature sensing, it's got a max current output of 10mA - so should give more or less FSD on the meter - but I'm struggling a bit with the data sheet.
I think the circuit I want is either fig 15 or 16, but they are changing the voltage per degree K, where I'd want to change the current, the voltage doesn't concern me. I think....
Any pointers towards achieving this, would be most gratefully received. If the LM234 is not the device I'm looking for, then please say so, and if you've got any thoughts on more suitable devices, please let me know. I'm not planning to drive anything except the ammeter with this; maybe a resistor so it's not effectively a dead short.
It is not that hard. What you need to do is build a low pass filter. A simple circuit is shown below. You feed R1 with the PWM output of the Arduino. The meter would connect to Vout with a resistor in series. You size the resistor to allow the meter to read full scale when the PWM is at 100%. You should use a rail to rail operational amplifier. There are a lot of variations of this circuit.
If you put a series resistor in line with the ammeter you can drive it direct from a PWM output of your Arduino.
The value of the resistor depends on the ammeter , start at say 1k and reduce to get what you want .
Measure your temperature , convert to an output value to the meter.
I’d use a DS18b20 temperature sensor .
To drive meter use PWM and a single series resistor to set full scale current.
To sense temperature use whatever you want, perhaps a DS18B20, LM35 or whatever, and short bit
of glue code to push the value out to the meter.
Oh, cool, I've obviously been over-thinking* it! Many thanks for the responses.
To answer one of the questions; I'd expect to be measuring between around 20-50 degrees C - any colder and I'm not bothered; any hotter and I need to shut down the equipment. Resolution is relatively unimportant; this is basically for a "steampunk style" enclosure for a bunch of Rasperry Pis, I just need to know if they get too hot.
The nice thing about using an Arduino, of course, is adding a controlled case fan - if necessary - is a doddle.
Meters turned up today, of the two, one still works, and the single resistor+PWM works like a charm, so thanks! Now I just need a new membrane to fix my old IBM "M" so I can actually write numbers.... and I can code up the temperature sensor part