I've got a project where I want to watch a PLC react to different temperature profiles. I thought it would be fun to actually simulate the thermocouple voltage that it senses and then read the output value from the PLC (and then log it).
I'll need to sense the cold junction temperature which I'll use a temperature sensor for - either analog or digital, doesn't really matter to me as I don't anticipate a problem there.
Where it gets interesting to me is generating the analog voltage to fake a type K thermocouple.
I'm thinking about using the R/2R resistor network (discussed at http://www.ikalogic.com/dac08.php) to make a voltage between 0 and 5 volts. I'd use the AVR's GPIO lines to feed the resistor network.
I'd then feed it to an opamp kind of like what is shown in the link but instead of unity gain, I'd like the op-amp to scale down the voltage by a factor of 100 so I get a range out of 0 to 50mV which aligns nicely with the type K mv Range.
All the floating point math will be handled by my PC with instructions to the AVR over serial or something as to what value to put on the resistor network.
Anything sound off?