Skip to content

mannysvb/WPI-Heat-Audit-Public

Repository files navigation

Creating A Network of Heat Sensors Using Google Sheets

A subgoal of this Interactive Qualifying Project (A partial fulfillment of a Bachelors of Science Degree from Worcester Polytechnic Institute) was to create and implement a method of automated heat tracking for Banksia Gardens Community Services. The final sensor design is centered around utilizing the WiFi-connected Raspberry Pi Pico W micro-controller, with an Adafruit DHT20 Temperature sensor module for temperature readings, and two rechargeable D batteries (recharged and replaced by volunteers every five weeks) to power it all.

It is worth mentioning that if the sensors were outside of the WiFi range, the use of radio transmission is a viable alternative. Transmitters would send data from the sensors to one central “Gateway”, which consisted of a radio receiver and a WiFi-connected Pico W board, that would then upload the data to our database using WiFi available in the main building. This idea was abonded as we realized a WiFi approach would meet the needs of our client just as well.

For an extensive guide of creating and installing these devices, please refer to the instruction manual on our website. If you have any questions feel free to reach out at esvargas@wpi.edu or sefanning@wpi.edu.

Developed by Worcester Polytechnic Institute Students: Stephen Fanning & Emmanuel Vargas

Requirements

This repository relies on the use and creation of a Google Service Account for authentication. It is necessary to create a private key from the service account, and enable Google Sheets API as well as the Google Drive API.

Establishing a Private Key

Please note that this service key is sensitive information and should be kept private.

  1. Go to Google Cloud Console

  2. Select Create Projects

Screenshot 2023-02-23 at 10 42 04 PM

  1. Create a Project Name

Screenshot 2023-02-23 at 10 47 48 PM

  1. Navigate to Service Accounts and Create Service Account

Screenshot 2023-02-23 at 10 54 21 PM

  1. Fill in the Service Account Name, the ID will automatically be filled in.

Screenshot 2023-02-23 at 11 07 05 PM

  1. Select the "Owner" role and click Done

Screenshot 2023-02-23 at 11 18 39 PM

  1. Select the Service Account

Screenshot 2023-02-24 at 2 47 30 PM

  1. Navigate to the Keys tab, and Create a New Key

Screenshot 2023-02-24 at 2 49 14 PM

  1. Create a "JSON" Private Key

Screenshot 2023-02-24 at 2 51 27 PM

  1. This key will be saved to your downloads folder

Screenshot 2023-02-24 at 2 57 04 PM

Converting Your Private Key

This one time process must be completed on a Windows computer, please see the following video for step by step instructions. The description includes links to download the various programs.

IMAGE ALT TEXT

Make sure to drop the key.json file into the "Public Heat Audit Code" folder

Heat Audit Tutorial

This guide is specifically tailored to Banksia Gardens Community Services, but all steps can still be followed by other organizations.

IMAGE ALT TEXT

Databases

There are two databases, the first collects all recordings from the seven sensors, and the second pulls filtered data points to create an organized chart.

The following is a picture of the first database: Raw Heat Sensor Temperature Data

Screenshot 2023-03-05 at 10 23 18 AM

Cell A1 & A2 are user inputed headers

Column D runs on a script that formats Column A when any edits are made in the sheet

Cell G1 is a user inputed header

Cell G2 filters Column D with the following command: =FILTER(A:B, REGEXMATCH(D:D,":00:|:01:|:02:|:03:|:04:"))

Column J & K runs on a script that removes duplicates

Please see the folder Google Apps Script for the code to copy on your own Raw Heat Sensor Temperatre Data Google Sheet

The following is a picture of the second database: Biodiversity and Temperature Database

Screenshot 2023-03-05 at 10 25 42 AM

Cells A1:H1 are user inputed headers

Cells A2:A runs on a script that adds the hour every hour

Cells B2:H2 uses the =IMPORTRANGE formula by inputting the link and defined range.

It is worth noting that this formula only consistently works when using defined ranges as shown in the following picture. Please see the folder Google Apps Script for the code to copy on your own Biodiversity and Temperature Database Google Sheet.

Screenshot 2023-03-05 at 10 29 32 AM

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages