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.
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.
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!!!
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)
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/
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.