LM35 and TMP36 wrong values | The problem is not the code!

In this article we will see how to correct the wrong sesnor values you get in Proteus! If you're consistently getting incorrect values from your LM35 temperature sensor despite trying various code solutions, the issue is likely related to wiring rather than the code itself. In this guide, I’ll walk you through identifying the problem and ensuring your wiring is set up correctly.

Troubleshooting Incorrect LM35 Temperature Sensor Readings

If you're consistently getting incorrect values from your LM35 temperature sensor despite trying various code solutions, the issue is likely related to wiring rather than the code itself. In this guide, I’ll walk you through identifying the problem and ensuring your wiring is set up correctly.

Step 1: Check Initial Readings

Before making any adjustments, let’s take a look at the values I'm currently receiving. As you can see, even with the correct code in place, the readings are inaccurate. This indicates that the issue lies not in the code but in the wiring.







Step 2: Correct wiring:

Here’s how to correctly wire the LM35 temperature sensor:

  1. Power Connection: Begin by connecting the power output from the LM35.
  2. Connect to Arduino: Connect this power output to both the temperature sensor and the Arduino's 5V pin.

Now we get the correct values:

Corrected values 1



Corrected Values 2



Conclusion

Once you’ve made these connections, you should see accurate temperature readings from your LM35 sensor. Proper wiring is crucial for achieving reliable data, so always double-check your connections before troubleshooting the code.

Comments