ARDUINO‎ > ‎PROJECTS‎ > ‎

DUAL TANK LEVEL MEASURING

 About: Measuring the level of a liquid in 1 or 2 tanks(water, Fuel, ..), publishing the level on a build-in webpage and uploading the data to cosm.com (pachube)
 Start date: 16/02/2011
 Last changed: 18/04/2013

INDEX




All YOU NEED TO KNOW ABOUT THIS PROJECT


  1. Introduction

  2. In this project we want to measure the level in a diesel (or any other liquid holding) tank, without having to put something into the liquid itself. There for we will be using a Ultrasonic sensor, which can sense distance. This way we can convert the distance the sensor is measuring from the surface of the liquid, into a percentage of the liquid level. Once this is calculated, we will show the results on on a build in webpage.

    With this code you'll be able to measure the level in 2 different tanks, but on setup page in it's website, you will be able to enable or disable 1 or 2 tanks being shown.

  3. Features
  • easy setup for 1 and/or 2 level sensors.
  • Upload the sketch an start using it.
  • integrated webpage for Ethernet setup.
  • integrated webpage for showing LIVE UPDATED levels in percentage and image
  • integrated webpage for setting up min and max level distance.
  • integrated webpage for setting up connection with COSM (on line data-logger)
  • integrated webpage for showing graphbuilder for both sensors (image coming from COSM)
  1. History
Although I have been tinkering with this project for more than a year, I've never had enough time to finish it. The biggest problem was, that I didn't know how to use 2 sensors at the same time. Not the mention that I didn't know a thing about Arduino. 21-23 October 2012 I participated at the Arduino-Jam at Timelab in Ghent and this became one of the projects. (We ended up 2nd). So now the project has been finished, even better than I had imagined. One of my team members found out how to use 2 sensors at the same time, and he found out how to use the Xbee Explorer. Using the Xbee, one can now use the sensors remotely with a 1,5 km range. We even tested this with small solar panels and 2x 1F capacitors. This combination gave just enough juice to boot the BareBone Arduino, read 2 or 3 measurements and send them over to the main Arduino, after which it ran out of juice. But the whole process started all over again, as soon as the capacitors where at full capacity.

Thanks go to @ToonNelissen for organizing the Arduino-Jam and special thanks to Erik and Wim for being my team members and having solved a lot of problems. We had lot's of fun.

WHEN RUNNING THIS SKETCH FOR THE VERY FIRST TIME, GO TO THE CONFIG PAGE IN YOUR BROWSER AND PRESS "SUBMIT AND RESTART ARDUINO" ONCE. FROM NOW, ON ALL YOUR SETUP PARAMETERS WILL BE SAVED IN EEPROM AND WILL SURVIVE POWER FAILURE OR HARD RESET!!!


HARDWARE + SOFTWARE REQUIRED


Wired version
  • 1 Arduino Ethernet (or an Arduino uno + Ethernet Shield).
  • Connection to your network (and the internet, if you'd like to upload your data to cosm.com).
  • 1 or 2 Ultrasonic sensors type URM37 in TTL mode (reading range 4cm - 300cm).
  • a 4 wire cable or 4 jumper cables (male-female) or an UTP cable, but you'll need connectors as well.
  • TextFinder library: http://playground.arduino.cc/Code/TextFinder


CIRCUIT OR SCHEMATIC


Wired version


PICTURES














SCREENSHOTS







screenshots of version 2.0



For as long as I'm testing, this graphbuilder shows you the updates of my 2 sensors on cosm.com (mind you, this a testing setup)



VIDEO






LINKS


This project mentioned on Arduino-Jam 2nd edition: http://www.arduino-jam.org/arduino-jam-ii-2012/
The URM37 manual page: http://www.dfrobot.com/wiki/index.php?title=URM37_V3.2_Ultrasonic_Sensor_%28SKU:SEN0001%29
cosm.com (used to be know as pachube): https://cosm.com/
TextFinder: http://playground.arduino.cc/Code/TextFinder


CHANGELOG


TankLevelMeasuring1_1: Running version made and tested on the 2nd Arduino-Jam and found on instructables.
TankLevelMeasuring1_2: Removed xbee parts, wired only version (will be put back in, while adding a form to make your choice on the setup page. NOT ANY MORE !!!
TankLevelMeasuring1_3: Page refresh rate & sensor reading interval on setup page, stretching images (not repeating images) and more iframes.
TankLevelMeasuring1_4: Replaced the word tank with container. Changed the image a bit, some more minor changes.
TankLevelMeasuring1_5: Added beta cosm.com (pachube) support, manually add your APIKEY and FEEDID in the sketch. DON'T USE THIS VERSION !!!!
TankLevelMeasuring1_6: fixed version 1_5 and started adding setup for cosm, but you still have to change APIKEY and FEEDID in the sketch itself, not in the browse.
TankLevelMeasuring1_7: You now can use the setup page to fill out APIKEY and FEEDID. This version should work correctly.
TankLevelMeasuring1_8: Added the Graphic bars. Those are downloaded from cosm.com and auto updated on every page refresh (rate can be changed on setup page)
TankLevelMeasuring1_9: skipped the release.
TankLevelMeasuring2_0: final release. all function included. Now you can choose the graphbar interval on the setup page. All setup data is saved in EEPROM.
TankLevelMeasuring2_1: Solved dns problem. Now you can use Arduino IDE 1.0.3
TankLevelMeasuring2_2: Solved dns problem: "Ethernet.begin(mac, ip, dns, gateway, subnet);"  must be "Ethernet.begin(mac, ip, dnsserver, gateway, subnet);
TankLevelMeasuring2_3: cosmfeedid can now be 7 digits long WARNING: I ONLY TESTED WITH 5 DIGITS !!! but it seems to work for Peter Smith with 6 digits
TankLevelMeasuring2_4: Feed ID for Graphic Bars was hard coded with my own feed (whoops) fixed it, now it uses the feed ID filled out on the setup page

TextFinder.zip: Added the library, because you'll need it. Be sure to check http://playground.arduino.cc/Code/TextFinder.


FILES TO DOWNLOAD


ċ
TankLevelMeasuring1_1.zip
View Download
  10k v. 1 27 Sep 2012 06:23 Joeri Gantois
ċ
TankLevelMeasuring1_2.zip
View Download
  10k v. 1 28 Sep 2012 07:22 Joeri Gantois
ċ
TankLevelMeasuring1_3.zip
View Download
  11k v. 1 2 Oct 2012 07:19 Joeri Gantois
ċ
TankLevelMeasuring1_4.zip
View Download
  11k v. 1 4 Oct 2012 01:29 Joeri Gantois
ċ
TankLevelMeasuring1_5.zip
View Download
  13k v. 1 4 Oct 2012 04:37 Joeri Gantois
ċ
TankLevelMeasuring1_6.zip
View Download
  13k v. 1 5 Oct 2012 01:54 Joeri Gantois
ċ
TankLevelMeasuring1_7.zip
View Download
  13k v. 1 5 Oct 2012 05:29 Joeri Gantois
ċ
TankLevelMeasuring1_8.zip
View Download
  15k v. 1 5 Oct 2012 07:37 Joeri Gantois
ċ
TankLevelMeasuring2_0.zip
View Download
  15k v. 1 12 Oct 2012 06:55 Joeri Gantois
ċ
TankLevelMeasuring2_1.zip
View Download
  15k v. 1 10 Jan 2013 01:01 Joeri Gantois
ċ
TankLevelMeasuring2_2.zip
View Download
  15k v. 1 4 Feb 2013 04:30 Joeri Gantois
ċ
TankLevelMeasuring2_3.zip
View Download
  15k v. 1 4 Feb 2013 06:58 Joeri Gantois
ċ
TankLevelMeasuring2_4.zip
View Download
  15k v. 1 4 Feb 2013 07:54 Joeri Gantois
ċ
TextFinder.zip
View Download
  17k v. 1 21 Mar 2013 07:06 Joeri Gantois