Arduino Tank Monitor

by zezarandrade in Circuits > Arduino

1389 Views, 3 Favorites, 0 Comments

Arduino Tank Monitor

TANK MONITOR

Introduction

Level measurement together with Pressure, Temperature and Flow are the most important and common variables in refineries, textile, food, pharmaceutical and chemical plants. At the level of plant automation also HMI (Human Machine Interface) is required.

In this project I included both: Measurement and HMI, in an easy way…

Supplies

COMPONENTS AND SUPPLIES

⦁ Arduino Uno, Rev 3 (1)

⦁ Potentiometers, 10K (2)

About This Project

Tank Monitor_1.jpg

This project consists in monitoring the level of water in two tanks.

Information about the level of the liquid in the tank will be shown in a screen, where you will be able to see the numeric values and the graphic values. There are many ways to sense level. You could use pressure sensors, ultrasonic or discrete (switches) sensors. I use potentiometers attached to a floating mechanism to bring “analog data” information to the Arduino board For the HMI I found an application for Arduino in the web, develop by Ulrich Albert Maassen.

The web address to download this application is: www.SerialComInstruments.com

In the figure I show the screen for my project. Blue boxes represent the tanks, in the upper side are the numeric values expressed in % (0%-100%). At the top of the screen you can see the trending of both levels of the tanks.

About the Software

Instruments.jpg
Interface.jpg
Show.jpg

SerialComInstruments allows you to create environments to see Trends, X-Y Graphics, Numeric Displays, Vertical Meters and Digital Displays.

Selecting the field “Instruments” you can select a diversity of resources for your project

Then you can select the Serial “Interface”, where you specify: Com Port, Baud Rate, also you can change the Data Protocol

If you select “Show”, you will be able to Connect and Disconnect the interface, and you can go to the Edit Mode. In this mode you can build your display

ASSEMBLY

IMG_0301.JPG
IMG_0299.JPG
IMG_0297.JPG
IMG_0298.JPG

Picture 1 - Detail of one tank

Picture 2 - The complete system

Picture 3 - Detail of the potentiometer

Pictre 4 - Detail of the pot

SCHEMATICS

1) Circuit Diagram

2) Wiring

CODE

// This routine let you to monitor level in two tanks:

// Standard protocol to select instruments:

void SendString(byte InstrNr, int MW) {

Serial.print('#');

Serial.print(InstrNr);

Serial.print('M');

Serial.print(MW);

Serial.print('<'); }

void setup() {

// initialize serial communication at 9600 bits per second:

Serial.begin(9600); }

// the loop routine runs over and over again forever:

void loop() {

// read the input on analog pin 0:

int sensorValue0 = analogRead(A0);

// read the input on analog pin 1:

int sensorValue1 = analogRead(A1);

// Convert the analog readings (which goes from 0 - 1023) to a level value(0 - 100%):

float voltage0 = sensorValue0 * (100.0 / 1023.0);

float voltage1 = sensorValue1 * (100.0 / 1023.0);

// print out the value you read:

SendString(2,voltage0); // Instrument #02 - Vert Meter

SendString(3,voltage1); // Instrument #03 - Vert Meter

SendString(41,voltage0); // Instrument #41 - Num Display

SendString(42,voltage1); // Instrument #42 - Num Display

SendString(90,voltage0); // Instrument #90 - Min Trend

SendString(91,voltage1); // Instrument #91 - Min Trend

delay(100); }

Downloads