Home > Projects > Smart IOT Propane Monitoring Pedestal

Smart IOT Propane Monitoring Pedestal

Summary of Smart IOT Propane Monitoring Pedestal


The Smart IOT Propane Pedestal is a connected device that monitors propane tank weight and detects leaks using Arduino MKR1000, load sensors, and an LPG sensor. It integrates with Amazon Alexa via AWS Lambda and Shiftr.io to provide real-time status updates. The system features a custom aluminum housing with 3D-printed feet for the sensors, ensuring accurate weight measurement and safety monitoring for grilling enthusiasts.

Parts used in the Smart IOT Propane Pedestal:

  • Arduino MKR1000
  • SparkFun Load Sensor 50kg (4 units)
  • SparkFun Logic Level Converter - Bi-Directional
  • SparkFun Load Cell Amplifier HX711 Breakout Board
  • SparkFun LPG Gas Sensor-MQ-6
  • Breadboard (generic)
  • Amazon Alexa Amazon Echo
  • Amazon Alexa Test Simulator
  • Jumper wires (generic)
  • Non-Slip Rubber Pads
  • 3D Printed Raised Feet Mounts
  • Aluminum Sheet Metal Housing Components

Smart IOT Propane Pedestal capable of tracking propane level as well as detecting any propane leaks. Integration with Amazon Alexa.

Smart IOT Propane Monitoring Pedestal

Things used in this project

Hardware components

Arduino MKR1000
Arduino MKR1000
× 1
SparkFun Load Sensor 50kg
× 4
SparkFun Logic Level Converter - Bi-Directional
SparkFun Logic Level Converter – Bi-Directional
× 1
SparkFun Load Cell Amplifier HX711 Breakout Board
× 1
SparkFun LPG Gas Sensor-MQ-6
× 1
Breadboard (generic)
Breadboard (generic)
× 1
Amazon Echo
Amazon Alexa Amazon Echo
Using Amazon Alexa Test Simulator
× 1
Jumper wires (generic)
Jumper wires (generic)
Assorted Quantity Depending on your own setup requirements.
× 1
Non-Slip Rubber Pads
× 5

Software apps and online services

AWS Lambda
Amazon Web Services AWS Lambda
Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Compact Wire Cutter/Stripper
Monoprice V2 Printer
Metal Fabrication of Aluminum Pedestal Components

Story

Tank in pedestal

Inner pan housing hardware components

Inside view

Custom parts and enclosures

Strain Gauge Raised Feet

3d Printed Raised Feet Mounts for each of the 4 strain gauges.

CAD Sheet Metal Fabrication

Housing consists of two Aluminium Pan’s Fabricated from 10 Gauge Sheet Metal


Schematics



Code

Lambda Function

Python

float gas, currentWeight, double propaneLevel
def MAX_WEGHT = 36.6
def TARE_WEIGHT = 16.6


def lambda_handler(event, context):
  # TODO implement
 return 'Hello from Lambda'
 
def isDetected(gas):
  if (gas > 0)
  result = True
  print("Gas Leak Detected!")

  else:
  result = False

  return result

print(isDetected(x))

def checkLevel(currentWeight):
  if (currentWeight <= MAX_WEGHT):
  propaneLevel = currentWeight - TARE_WEIGHT

  else
  print("Careful, your tank is too full!")

  return propaneLevel
  print("The current level")

Amazon Skill

JavaScript

{
  "languageModel": {
    "intents": [
      {
        "name": "AMAZON.CancelIntent",
        "samples": []
      },
      {
        "name": "AMAZON.HelpIntent",
        "samples": []
      },
      {
        "name": "AMAZON.StopIntent",
        "samples": []
      },
      {
        "name": "GetPropane",
        "samples": [
          "check propane",
          "tell me propane",
          "get propane",
          "get current propane",
          "check current propane"
        ],
        "slots": []
      }
    ],
    "invocationName": "check propane"
  }
}

INo

C#

File Transfer: PropaneMeasurement.ino
#include <WiFi101.h>
#include <MQTTClient.h>
#include <Bridge.h>
#include "HX711.h"

const char ssid[] = "";
const char pass[] = "";

#define DOUT 3
#define CLK 2

HX711 scale(DOUT, CLK);

char username[] = "";
char password[] = "";
char clientID[] = "";

float calibration_factor = -11100;

WiFiClient net;
MQTTClient client;

unsigned long lastMillis = 0;

void setup() {
  Serial.begin(115200);
 
  WiFi.begin(ssid, pass);
  
  scale.set_scale();
  long zero_factor = scale.read_average();
  // Note: Local domain names (e.g. "Computer.local" on OSX) are not supported by Arduino.
  // You need to set the IP address directly.
  client.begin("broker.shiftr.io", net);
  client.onMessage(messageReceived);

  connect();
}

void connect() {
  Serial.print("checking wifi...");
  while (WiFi.status() != WL_CONNECTED) {
    Serial.print(".");
    delay(1000);
  }

  Serial.print("\nconnecting...");
  while (!client.connect("arduino", "try", "try")) {
    Serial.print(".");
    delay(1000);
  }

  Serial.println("\nconnected!");

  client.subscribe("/hello");
  // client.unsubscribe("/hello");
}

void loop() {
  client.loop();
  Serial.print(scale.get_units(), 1);
  Serial.print(" lbs");
  Serial.print(" calibration_factor: ");
  Serial.print(calibration_factor);
  Serial.println();
  if (!client.connected()) {
    connect();
  }

  // publish a message roughly every second.
  if (millis() - lastMillis > 1000) {
    lastMillis = millis();
    client.publish("/hello", "world");
  }
}

void messageReceived(String &topic, String &payload) {
  Serial.println("incoming: " + topic + " - " + payload);
}

 

Quick Solutions to Questions related to Smart IOT Propane Pedestal:

  • How does the device monitor propane levels?
    It uses four 50kg load sensors arranged in a Wheatstone bridge configuration connected to a Load Cell Amplifier and Arduino MKR1000.
  • Can the system detect propane leaks?
    Yes, it utilizes a SparkFun LPG Gas Sensor-MQ-6 connected to the logic level converter to detect if gas is present or not.
  • What integration allows voice control of the pedestal?
    The device integrates with Amazon Alexa by creating a Smarthome Skill, an AWS Lambda function, and using Shiftr.io to communicate with the MKR1000.
  • What software is required to program the microcontroller?
    The project requires the Arduino IDE, specifically using examples like HX711.ino for the load cells and C# code for file transfer.
  • How is the physical housing constructed?
    The housing consists of two aluminum pans fabricated from 10 Gauge Sheet Metal, with hardware mounted on 3D printed raised feet.
  • Does the gas sensor provide varying leak levels?
    No, the current setup keeps it simple by providing a true/false indication rather than varying levels of gas detection.
  • What programming language is used for the AWS Lambda function?
    The AWS Lambda function is written in Python to handle gas detection logic and calculate propane levels based on weight.
  • Which communication protocol connects the Arduino to the cloud?
    The Arduino MKR1000 uses MQTT via Shiftr.io to publish messages and receive commands from the AWS Lambda function.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top