TMP36 Soldering Troubles


I am noticing a funny problem when working with the TMP36 sensor (data sheet: I have tried to solder the sensor to wires in order to position the sensor against a cup (I am wanting to log the temperature at the surface of a glass cup), but it seems when I solder the sensor the temperature readout average goes down by over 10 degrees Celsius! When I connect the sensor directly to a breadboard and use jumper cables, it seems that the TMP36 reads out a more believable temperature of 73 degrees Fahrenheit.

I was curious if anyone had some insight to why this is happening and how this can be mitigated?

Thank you!

I've attached a few pictures.

Code I'm using for 2 TMP36 sensors:

const int tempPin0 = 0;
const int tempPin1 = 1;

void setup()                    

void loop() {
  int sensVal0 = analogRead(tempPin0);
  int sensVal1 = analogRead(tempPin1);
  float voltage0 = (sensVal0/1024.0) * 5.0;
  float voltage1 = (sensVal1/1024.0) * 5.0;
  float degreesC0 = (voltage0 - 0.5) * 100.0;
  float degreesC1 = (voltage1 - 0.5) * 100.0;
  float degreesF0 = (degreesC0 * 9.0 / 5.0) + 32.0;
  float degreesF1 = (degreesC1 * 9.0 / 5.0) + 32.0;

    Serial.print("Temp1 (C): ");
    Serial.print("Temp2 (C): ");
  delay (1000);

No pictures. When I solder something like that I will hold it by the leads in an alligator clip. The clip will help to prevent heat from getting to the body and keep the unit cooler. Quickly tin the leads, tin the wires. Hold or wrap the tinned wire on the lead and touch with the iron just briefly enough to melt the solder.

You must have cooked it properly and diffused the dopant atoms around.

Correct soldering time is 1--2s or so, if you are taking longer, go and practice, make sure your iron is hot enough, clean, pre-tinned. Melt the solder onto the leads by placing the solder between the iron and the leads and applying a little bit of pressure.

But before you do all that, just confirm that you are using short or shielded cable for your sensor.