Smart IOT Propane Monitoring Pedestal

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);
}

 


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

Leave a Comment

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

Scroll to Top