Open In App

Project Idea | Instant Notification Tool for indicating low fuel levels

Improve
Improve
Like Article
Like
Save
Share
Report

Project Title: Instant Notification Tool [WebApp] for indicating low fuel levels

Introduction: A vast majority of cars owners/drivers don’t keep extra petrol/diesel for emergency use when the cars run out of fuel. They have to keep an eye on the fuel meter(which in case of some old models doesn’t provide a proper indication as well) and then refuel the car at the nearby fuel station. Our tool makes the job of the user much simpler and fluid.

Requirements[for user]:

  • Web Browser
  • Internet Connection

Flow [how it works]:

  • User opens a web browser on his mobile device.
  • User visits our WebApp URL.
  • User clicks on ‘Allow’ Push Notifications.
  • User views the current fuel level. (in % )
  • As soon as the level reaches (25%) the touchpoint, the user receives a push notification via the web browser. All the stuff is locally hosted.

Mechanism: Node MCU(microcontroller) has analog input pin as well as digital and analog output pin. The only analog input pin(A0) sends a signal. The working range of Node MCU is 0-3V (where 0: Off 3: ON and in-between: variable analog signal). The sensor present in the fuel tank works in a certain range (say 0-xV). We would map that using a resistor in the range of (0-3V). Now, we use a voltage divider from 0-3V. The middle junction value of the sensor would be connected to the analog input signal of the NodeMCU. The value of the sensor would change depending on the level of the fuel in the tank. This changing value would be updated every 2 seconds using AJAX call in JavaScript. The AJAX run would send an HTTP response to our main webpage. In this way, the value of fuel would be updated live without the user having to refresh it.

Utility: We send push notifications to the user’s mobile device as soon as the fuel levels are below a certain limit(which can be decided by the user) and are default set to 25%. Users can also view their fuel levels by clicking on the ‘Show Fuel Level’ button on our WebApp. Also, users’ can view all nearby fuel stations by clicking on ‘Click to Find Gas Stations near You’.

Why we couldn’t implement push notifications as of now?
Notifications service has been withdrawn from the HTTP server in all modern browsers(very recently); only servers with https certification allow notification access. Unfortunately, our ESP8266 is hosting the webpage locally and can only have a self-signed certificate which is again blocked in all modern web browsers thus having only HTTP server in hand. What we can do is have a third party notification sender like Telegram or IFTTT, in which each user has to have an account in the said services, get auth token and use it in the NodeMCU device to have the utility of Notification services.

YouTube Video Link: https://youtu.be/e9E7FsmEafI

Team Members:

  • Ritankar Paul
  • Pravash Jha
  • Abhinav Ghosh
  • College: Kalyani Government Engineering College

    Note: This project idea is contributed for ProGeek Cup 2.0- A project competition by GeeksforGeeks.


    Last Updated : 27 Jul, 2018
    Like Article
    Save Article
    Previous
    Next
    Share your thoughts in the comments
    Similar Reads