Monitoring Analog Tank Sensors at the Edge with TinyML
"No more inconsistent manual readings, climbing tanks, or inventory run-outs."
Continuous monitoring of liquid and gas storage tanks is critical for many industries and individuals, but the current default solution includes manual in-person tank checks that are hazardous, inefficient, and error-prone. With remote tank monitoring using cellular IoT, you can implement a modern monitoring and reporting system that is accurate, efficient, and convenient. Retrofitting legacy machines and equipment with TinyML and the IoT allows you to add intelligence to any older device that has an analog display without modifying the existing system.
Learn how to build a TinyML and cellular IoT analog tank sensor monitoring prototype for less than $300, using only 5 hardware components.
Remote Tank Monitoring
Wireless IoT tank monitoring securely routes sensor data to your cloud, allowing you to check fluid levels in multiple tanks, across multiple sites in urban or rural settings. Get real-time data insights from anywhere in your custom dashboard. Identify trends and losses that help you reduce costs, improve efficiency, and expand your business. With cellular IoT, organizations can take advantage of liquid and gas tank monitoring solutions that are secure, reliable, cloud-enabled, and generate meaningful insights without taking on the troubles of connecting and staying connected to Wi-Fi. Tank monitoring with IoT devices help businesses with:
- Regulatory Compliance - Create cloud-based reports with tank levels and environmental data to ensure that you are in compliance with local, state and federal regulations.
- Active Monitoring - Real-time data on the status of tanks and materials in storage and transit ensures you’re operating at peak efficiency.
- Remote Updates - Control pumps, sensors, and hosts remotely and change configurations with cloud-based Over-the-air updates and management.
- Supply Chain Cost Reduction - Generate custom reports to track inventory, storage and usage metrics and identify trends to make your business more efficient.
- Environmental Sustainability - Monitor leaks and spills with automated alerts, and reduce your carbon footprint with optimized delivery schedules.
The challenge for many organizations is that they have decades-old analog dials and meters monitoring their systems. They’re functional, but have relied on manual readings, until now. By using TinyML on an edge device, you can turn your analog system into a smart system. Machine learning and cellular IoT can detect the various states of the needle on a manual gauge and send that information to a custom cloud-based dashboard. Using TinyML for this application helps your business:
- Avoid an expensive system overhaul
- Reduce the amount of data sent to the cloud
- Accelerate the time to send an alert
- Consume less energy
Behind the Remote Tank Monitor
Follow this project if you’re looking to create a wireless IoT device that can pump analog sensor data to the cloud and provides reporting and alerting. The Notecard is the quickest and easiest way to add cellular connectivity to this device, and it comes with 500 MB of data usable over 10 years. You can find the complete project assembly instructions on Hackster and the full source code on GitHub.
Project Time: 8 hours
Lines of Code: 17
- Blues Wireless Notecard SoM
- Blues Wireless Raspberry Pi Starter Kit
- Raspberry Pi 4 Model B
- PiJuice HAT
- Raspberry Pi Camera Module V2
Software apps and online services
The main parts of this project are:
- Set up an edge vision device.
- Build, tune, and deploy an image classification model that detects the various states of the needle on a manual gauge.
- Send results to the cloud.
- Create a route to receive text message alerts when readings fall out of normal range.
Using Cellular at the Edge to Send Inferencing Results
We recommend working with Edge Impulse to streamline the ML portion of your build. Their tools help you go from training data to an optimized model in just a few hours. Using Blues Wireless, you can send your inferencing model results to a cloud app without streaming across bandwidth-hogging, privacy-skirting image data. Blues Wireless provides full-stack IoT infrastructure, with hardware, firmware, and cloud communication components, and can be built into any device:
- Notecard: A tiny 30mm x 35mm System on a Module (SoM) with an m.2 connector, the Notecard is a cellular and GPS-enabled device-to-cloud secure data-pump that comes with 500 MB of data and 10 years of cellular for $49.
- Notecarrier: To make integration in an existing project easier, Blues Wireless provides host boards called Notecarriers. For this project, use the Notecarrier Pi HAT and put it between the PiJuice Hat and Raspberry Pi.
- Notehub.io: On the cloud side, the Notecard ships preconfigured to communicate with Notehub, which enables secure data flow from device-to-cloud. Notecards are assigned to a project in Notehub. Notehub can then route data from these projects to your cloud of choice or integrate with third-party services like Twilio.
Blues provides a Python SDK and it can be installed with a single pip command. Then, to add the Notecard to an existing Python app running an Edge Impulse model, you’ll do the following:
- Initialize the Notecard and configure it for communication with the Notehub.io cloud service.
- Send an event (called a “Note”) with the result of each inference run from the model.
- And finally, if the result indicates that the readings are out of range, send a second alert event that will be picked up by Notehub and forwarded to Twilio.
The final steps will be getting tank level data securely pumped to your cloud with Notehub and custom text message alerts routed through Notehub and Twilio.
Applications of This Project
From companies storing or transporting liquids and chemicals for treating wastewater, to facilities with liquids or gases in short- and long-term storage, IoT tank monitors can have a positive impact across many areas of a business. There are many use cases for this type of device, including:
- Gas stations and underground petroleum stores
- Fuel delivery and inventory
- Lubricants delivery and inventory
- Oil field support
- Specialty chemical transportations
- Used oil and waste liquid collection
- Back-up generators monitoring
- Agricultural crop monitoring
- Commercial building utilities monitoring
Ready to Discuss Your Project With Us?
Blues Wireless makes it easy to make connected devices. In the article above, you’ve seen how little effort it takes to build an initial proof-of-concept device that reports sensor data over the cellular network. In some cases, it’s best to start with one of our proof-of-concept applications, then swap out sensors or cloud apps until you get what you want. In others, it would be best to take a different tact entirely.
We can help. Our team of experts will discuss your project idea with you and help you find the shortest path to a proof-of-concept device so you can get your product or device connected to your cloud.
Frequently Asked Questions
By adding a host MCU, you are able to capture any type of information and communicate it to the Notecard using our JSON interface over UART or I2C.
If you have questions about acquisition or compatibility, please Contact Us.
The Notecard is compatible with any microcontroller (MCU) from an 8-bit Arduino to 32-bit ESP32 or STM32 and every major Single Board Computer (SBC) platform. Some popular examples include the Adafruit Huzzah32, STM32 Nucleo, Arduino Nano, ESP32-WROOM, among many others. The Notecard communicates over either I2C or UART, so it acts as a peripheral that you can connect to a product’s existing I2C bus or UART connection.
Different models of the Blues Wireless Notecard are available that connect to LTE-M, NB-IoT, and Cat-1 networks globally. When LTE-M, NB-IoT, or Cat-1 aren’t available, the Notecard is also supported by UMTS/HSPA+ and GSM/GPRS/EDGE wireless standards.
Yes! Blues Wireless can support your project whether you need 10 devices or 10,000. We also have relationships with device building firms and contract manufacturers to help bring your vision to life.
Please Contact Us.
Global coverage is available in 135 countries, with direct support provided by leading providers and carriers. For a full list, please see our documentation article on Notecard’s supported countries.
Various Notecard models are available that connect to LTE-M, NB-IoT, and Cat-1 networks. In global regions without these capabilities, coverage is also supported by UMTS/HSPA+ and GSM/GPRS/EDGE wireless standards.
No! The Blues Wireless Notecard is a small 30mm x 35mm system on module (SoM) that is able to be embedded in any IoT project on its own via its M.2 edge connector.
However, Blues Wireless provides a variety of Notecarrier host boards for easily adding cellular connectivity to a new or existing IoT solution for prototyping purposes. The Notecarrier also provides antennae for both the GPS and cellular capabilities of the Cellular Notecard (and the cellular antenna is also compatible with the Wi-Fi Notecard).
We’re making IoT quick and easy.
Start your IoT journey with us!
Subscribe to our newsletter
Expert tips, exciting projects, and IoT insights delivered every month