Thermocouple with Analog Output Circuit Not Working

I am trying to get an esp-wroom-32ue to read the analog output of a circuit based on LTC1049 datasheet But it is just not working. I am using GPIO2 on the esp datasheet

The circuit design looks like this:
k thermo circuit

When I connect my thermocouple and power the board I am just reading near 0 analog numbers on the serial monitor. The readings I am getting are basically 0C and not responding when I put the sensor in a cup of hot water. I have verified that the connections on the PCB layout below are as intended and I am seeing 5V power to the IC chips and ground connections are there. Here is a screenshot of the PCB. I am

My schematic for PCB

And the code I am using is below. Does anyone know how I should proceed or what the heck the main issue might be?

int greenpower = 32;
int sensorPin = 2;
int led = 33;

void setup() {

  pinMode(led, OUTPUT);
  pinMode(greenpower, OUTPUT);
  pinMode(sensorPin, INPUT);
  digitalWrite(greenpower, HIGH);
  digitalWrite(led, HIGH);  
  Serial.println("power is on");

void loop() {

   int analogsensorPin = analogRead(sensorPin);
   float voltage = analogsensorPin * (5.00/1023.00);
   float temperature = voltage*40; //0 Volts = 0C and 4 Volts = 400C

What values do you see at pin6 of IC201?
Check that before thinking about software and other hardware.

Is there any reason you didn't use one of these?

Does your thermocouple have coloured wires?
Red is Negative and Yellow is POSITIVE.

Did you breadboard your project and prove it functions before going to PCB?

Tomm... :smiley: :+1: :coffee: :australia:

1 Like

I see nothing wrong with your circuit.

I havent personally used GPIO2 as an analog input - I believe its connected to the on-board LED on some devkits.

With the thermistor disconnected you can apply a small positive voltage to Kthermo+ and use a meter to measure GPIO_Temp.

I made a divider box with a chain of 91k/9k1/910/91/9.1/1 ohm resistors to give me an easy way to produce small voltages. Not hugely accurate but useful.

1 Like

Thanks for the responses. While I was checking the voltage I realized IC202 was in the wrong orientation which was a huge mistake. Not sure whether or not this damaged the IC chip but here is a before and after:

After flipping IC202

Close-up of IC202

Now to answer @TomGeorge question pin 6 is showing a steady 0.27V and the GPIO pad is reading 0.106V from the multimeter. But I am just getting analog 0 readings on the gpio2 after the rework. So not sure why I am not reading 0.106V in the serial monitor... Also I do have the breakout board you mentioned but I am going for something on a PCB and it has to output an analog voltage because I have other sensors that need the SPI pins.

Do you have the Arduino 0v and amplifier 0v connected together ?

Disconnect everything from the Arduino and run the sketch , you should get random values from an open circuit analog input .

For now get rid of the maths and just print the raw analog value .

Analog range is 4096 ?
Looking at the right pin ?

Read this

Extract :

“ The same happens for very low voltage values: for 0 V and 0.1 V you’ll get the same value: 0. You need to keep this in mind when using the ESP32 ADC pins.”

1 Like


Do you have the Arduino 0v and amplifier 0v connected together ?
yes the grounds are connected through a ground plane on my PCB.

Disconnect everything from the Arduino and run the sketch , you should get random values from an open circuit analog input .
Not an option for me here as everything is on a PCB. But I have seen this happen, so I understand your point.
Analog range is 4096 ?
I think you might be on to something here.. When I search it does say 12bit 4096 resolution.

I see your point about low voltages reading 0. So let me do a quick calculation on the voltage to expect. Room is at 27C with the range of the circuit being 0 degrees is 0 volts and 400 degrees is 4 volts than I should expect to see 0.27V. If 3.3V is 4096 then 0.27V is 335 analog reading.. So much higher than I am seeing.

So your expected voltage is 0.27V and you're reading 0.106

Is your reading range plus or minus? Do you need to multiply your reading by two? There would still be a 0.05V offset.

This is what my analog read out looks like. The peaks are submersing the sensor in hot water and the troughs are room temperature water.

This is correct I am expecting a higher voltage then what I read.

Why have you loaded down the LT1049 output with < 1k? Its not specced for anything like that low an impedance. 10k load is the smallest mentioned in the datasheet, as is 100k. Perhaps use 100k load.

@MarkT I am not sure what you mean the output has a 246k resistor.

What about R203 and R204?

1 Like

Something may be up here. Looking back I think R203 and 204 may have been a mistake. This is altering my measurement, but I was worried about having more than 3.3V on the GPIO. Should I just remove the voltage divider? I know I won't see 330C which corresponds to 3.3V.

Don't remove the divider if you need it, just don't use impedances well below the datasheet's recommendations. Normally to reduce 5V to 3.3V you can use 10k upper resistor and 22k lower resistor, which actually maxes at 3.4V or so, but that's no problem. The LT1049 then sees about 28k net impedance which is far nicer than 840 ohms.

1 Like

I had no idea this mattered, and this is probably the issue. But don't really understand, if you could explain why the impedance matters...

Took off R203 and R204 and shorted R203's pads together getting much better readings now. But they are still off, I am going to post a temperature curve shortly.

Did you prototype board before committing to PCB?

Can you please post a complete image of your PCB please?

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

Not looked at your circuit in detail , but do you have cold junction compensation .

IMO as the output of thermocouples is so low , they are are not good for low temperatures , you also need that second , different technology sensor for the cold junction, further increasing error routes .

The LT1025 is a thermocouple cold junction compensator IC.

Tom.. :smiley: :+1: :coffee: :australia:

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.