Simulating a thermocouple

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

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?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would suggest software PWM DAC instead of R-2R ladder since its easier-less calculations and resistor matching,only an RC network and for less ripple you can use a second same with first,just 2 10K resistors 2 100nF capacitors and ready.0-5V in 256,512,1024 steps.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Type K goes up 41uvolts per degree C, if that helps.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

fizgig wrote:

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.

Sounds complicated. Why don't you just use a DAC (e.g. xmega or some SPI device)? You can use DAC directly or with a voltage divider.