Tutorial: Connecting Temperature Sensor TMP36 to a Raspberry Pi

myDevices wants the maker community to know that we’ve got your back. If you are new to maker projects utilizing Raspberry Pi or a total pro, we’re here to help you along your journey.

So your project requires temperature readings and you have your TMP36 temperature sensor ready to go, but how exactly do you plug it into your breadboard so Cayenne can automatically detect and add it to your project. Follow the steps below and you’ll be ready to go in no time.

A couple notes before you get started

  • You will need to connect the TMP36 to an analog to digital converter in order for it to work with the Raspberry Pi. For this example, we will be using the MCP3008 A/D converter. This tutorial assumes that you already have the MCP3008 wired up and connected via the dashboard.
  • Make sure Raspberry Pi is powered off when connecting wires.
  • When using a GPIO ribbon cable, make sure the power wire (it’s a different color than the others) is connected to the corner of your Raspberry Pi and the top of your Pi cobbler.
  • The provided diagram is just an example of how to connect the sensor. There are many ways to connect sensors and extensions, so try what works best for you!
  • Some full-size breadboards (used in diagrams below) have a power line that is separated in the middle. If this is the case, be sure your sensors are connected on the same half of the breadboard as your Pi Cobbler.

Step 1 Connect your power line to the TMP36.

Step 2 Connect your ground line to the TMP36.

Step 3 Connect the TMP36 Vout to one of the 8 Channels on the MCP3008. For this example, CH0.

Step 4 You’re done! You can now add the TMP36 sensor to your dashboard, using the MCP3008’s Channel 0.

Recent Articles