I'm working on a relatively simple soldering iron circuit. I'm using a T12 tip, which consists of a resistor and thermocouple in series.
I'm driving the gate of the N channel mosfet with 20V via a NPN transistor. The base of the transistor is directly connected to a digital pin of an Arduino. First I run current through the soldering tip so it heats up. In order to measure the electricity produced on the thermocouple aka the temperature, I want to turn off the power supply or at least its path to ground and just measure the differential voltage generated between the two connections on the soldering tip. Because I'm using a N type mosfet, with its source connected to GND and its drain connected to one of the soldering tip connections, I included an opamp as a differential amplifier to measure the generated voltage between the two connectors of the soldering iron/thermocouple. I didn't want to have problems with the GND of the power supply, PC and oscilloscope, so I put a display on the Arduino which displays the generated voltageX50, so instead of getting 0.02V I should get 1.00V. I also powered the Arduino via its Vin pin, but I used a buck converter in between the PSU and the Arduino Vin pin to lower the voltage to 5V. The code is pretty simple, so I won't include it. It basically turns ON the NPN transistor, thus turning OFF the mosfet. It waits 2seconds, then measures the amplified voltage. After that, it turns the transistor OFF, thus turning the mosfet ON and heating the soldering tip. It does this over and over. I'm also powering the opamp (rail to rail) with the Vin and GND. I'm not using any filters, since I just wanted to see if the circuit works well enough to keep working on it. The issue is that while I do get a voltage reading, it's always around 0.60-0.90V I'm not sure what I should test or what the possible issues could be. Am I missing something obvious?
I've simulated the circuit in LTSpice and it works fine, but the real world is a whole different story.
EDIT:I've tested it by heating the soldering tip with a lighter and the voltage measurement works fine. Problems only happen when I shut off the heating via the mosfet.