Menu
Simon Gosney
  • About
Simon Gosney

Building an IoT temperature sensor with a Raspberry Pi

Posted on 2 July, 20192 July, 2019 by Simon Gosney

Whilst away on holiday earlier in the summer, I decided that I’d investigate how to put together an IoT device based on a Raspberry Pi to gather environmental data, initially temperature only but then moving on from there as I become more familiar with putting the hardware together.

I found a tutorial online, and ordered myself some hardware:

  • Raspberry Pi 3b (frustratingly, the Pi 4 was announced the day that my order was delivered!)
  • Micro SD card
  • A breadboard
  • Some resistors (4.7k ohm)
  • some jumper cables
  • Temperature sensor

It’s been many many years since I built any electronic circuits (I was relieved that a soldering iron wasn’t required), so I did wonder if I was going to order this kit and never manage to get it to work.

I followed the linked tutorial to get a Pi up and running without a monitor and keyboard. All fine, so that was the straightforward part out of the way. After about an hour, I had the temperature sensor working too.

Rather than repeat all my steps, I’ll summarise:

  • this blog is a very useful additional / replacement reference. Using terminal blocks was a great help and definitely recommended, and the wiring diagram worked for me.
  • when the sensor drivers are loaded and the sensor is correctly connected, the device’s directory is created, eg /sys/bus/w1/devices/28-020491763b5d3. I found that if the directory was not created, then the circuit was not wired correctly (specifically in my case, the temperature sensor was not correctly wired to the breadboard).
  • execute cat /sys/bus/w1/devices/<deviceid>/w1_slave to show the temperature data that’s streamed to the file from the sensor

Now that your Pi is grabbing temperature data, it needs to do something with it. Stand by for post on how to stream that data to the cloud.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Adding PowerApps connector to Excel workbook (OneDrive)
  • Where is the user provisioning tool on D365FO dev VMs?
  • Storage and display of dates and times in Dynamics 365 for Finance and Operations (D365FO)
  • D365FO 10.0.x: where has the Trace menu item gone?
  • Building an IoT temperature sensor with a Raspberry Pi

Categories

  • Data
  • Dynamics
  • Dynamics 365
  • Finance and Operations
  • IoT

Tags

AX2012 Connector d365 D365FO dates development Dynamics Dynamics 365 Excel F&O Finance and Operations Pi PowerApps Raspberry sensor temperature times Timezones Trace vm

Twitter

Twitter feed is not available at the moment.

Archives

  • October 2019
  • July 2019
©2019 Simon Gosney