Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all,
Vanilla are planning an update to the site on April 24th (next Wednesday). It is a major PHP8 update which is expected to boost performance across the site. The site will be down from 7pm and it is expected to take about an hour to complete. We appreciate your patience during the update.
Thanks all.

Oil Tank Level Monitor

2

Comments

  • Moderators, Sports Moderators, Regional Midwest Moderators Posts: 23,923 Mod ✭✭✭✭Clareman


    davo2001 wrote: »
    I assume you're joking? #confused

    When I say toying I mean looking into alternatives when/if my boiler needs replacing, I've a single zone nearly 20 year old boiler that'll need changing soon, gas isn't an option for me


  • Registered Users Posts: 1,410 ✭✭✭Dr4gul4


    Clareman wrote: »
    When I say toying I mean looking into alternatives when/if my boiler needs replacing, I've a single zone nearly 20 year old boiler that'll need changing soon, gas isn't an option for me

    And here i am thinking of buying a second tank to stock pile due to the low cost right now :o


  • Moderators, Sports Moderators, Regional Midwest Moderators Posts: 23,923 Mod ✭✭✭✭Clareman


    I am and I amn't, I know I'll have to do a big job if/when it goes but I'll deal with that when/if it happens.


  • Registered Users Posts: 5,957 ✭✭✭emaherx


    I've changed my setup from ESP Wifi based to Arduino LoRa based sensor nodes as range and reliabilty are much better for Garden sensors (and beyond by potentially a few KM)

    This StemEdu node is arduino based with on board LoRa and a battery holder, has a number of headers for digital and analog I/O can be used to quickly build any sensor nodes without any need for soldering.
    https://www.amazon.co.uk/gp/product/B07SMZPNR7/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

    50213518898_b8bdf79f2c_c.jpgIMG_20200811_132954 by Farmer Ed's Shed, on Flickr

    I'm using the Mysensors.org Gateway connected to my Home Assistant.
    #define MY_RADIO_RFM95
    #define MY_RFM95_FREQUENCY (RFM95_868MHZ)
    //#define MY_RFM95_MAX_POWER_LEVEL_DBM (100) //1mW = 0dBm 10mW = 10dBm 25mW = 14dBm 100mW = 20dBm
    #define MY_TRANSPORT_STATE_TIMEOUT_MS  (3*1000ul)
    #define RFM95_RETRY_TIMEOUT_MS  (3000ul) 
    #define MY_RFM95_MODEM_CONFIGRUATION  RFM95_BW125CR48SF4096
    
    #define MY_NODE_ID 44
    
    #include <SPI.h>
    #include <MySensors.h>  
    #include <NewPing.h>
    
    #define SENSOR_NAME "Distance Sensor"
    #define SENSOR_VERSION "1.1"
    
    #define CHILD_ID 1  // Each radio node can report data for up to 254 different child sensors. You are free to choose the child id yourself. 
                        // You should avoid using child-id 255 because it is used for things like sending in battery level and other (protocol internal) node specific information.
    #define TRIGGER_PIN  3  // Arduino pin tied to trigger pin on the ultrasonic sensor.
    #define ECHO_PIN     4  // Arduino pin tied to echo pin on the ultrasonic sensor.
    #define MAX_DISTANCE 300 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm.
    unsigned long SLEEP_TIME = 360000; // Sleep time between reads (in milliseconds)
    
    
    NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance.
    MyMessage msg(CHILD_ID, V_DISTANCE);
    int lastDist;
    bool metric = true;
    
    void setup()  
    { 
      metric = getControllerConfig().isMetric;
    }
    
    void presentation() {
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo(SENSOR_NAME, SENSOR_VERSION);
    
      // Register all sensors to gw (they will be created as child devices) by their ID and S_TYPE
      present(CHILD_ID, S_DISTANCE);
    }
    
    void loop()      
    { 
      // use the build-in digital filter to discard out of range pings
      int echoTime = sonar.ping_median(10);
      int dist = metric?sonar.convert_cm(echoTime):sonar.convert_in(echoTime);
      Serial.print("Ping: ");
      Serial.print(dist);
      Serial.println(metric?" cm":" in");
    
      if (dist != lastDist) {
          send(msg.set(dist));
          lastDist = dist;
      }
    
      sleep(SLEEP_TIME);
    }
    

    The range of these devices is pretty amazing.
    For those of you who want a DIY solution but are concerened about range this is the way to go.
    I'm in the process of building several sensors spread over several acres of farmland so these will easily cover anybodys garden.
    My configs here are set for max range so look at "#define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR48SF4096" and you can also "#define MY_RFM95_MAX_POWER_LEVEL_DBM" also if you want to reduce the range of yours. (reducing max radio power will extend battery life)


  • Registered Users Posts: 5,957 ✭✭✭emaherx


    I used this Makerhawk ESP32 based MCU board as the gateway device it also has LoRa built in so no need to add anything else for a LoRa to WiFi gateway.
    https://www.amazon.co.uk/gp/product/B076T28KWG/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

    Gateway sketch Modified from MySensors.org example sketch due to different internal connection between ESP32 and LoRa Radio. Also the device has a built in display so I've set it up to display IP address information
    #define MY_RADIO_RFM95
    #define MY_DEBUG_VERBOSE_RFM95
    #define MY_RFM95_RST_PIN 14
    #define MY_RFM95_CS_PIN 18
    #define MY_RFM95_IRQ_PIN 26
    #define MY_RFM95_IRQ_NUM MY_RFM95_IRQ_PIN
    #define MY_SOFT_SPI_MOSI_PIN 27
    #define MY_SOFT_SPI_SCK_PIN 5
    #define MY_RFM95_FREQUENCY (RFM95_868MHZ)
    #define MY_TRANSPORT_STATE_TIMEOUT_MS  (3*1000ul)
    #define RFM95_RETRY_TIMEOUT_MS  (3000ul) 
    #define MY_RFM95_MODEM_CONFIGRUATION  RFM95_BW125CR48SF4096
    
    
    #define MY_GATEWAY_ESP32
    
    #define MY_WIFI_SSID "WiFi-SSID"
    #define MY_WIFI_PASSWORD "WiFi-Password"
    
    // Set the hostname for the WiFi Client. This is the hostname
    // it will pass to the DHCP server if not static.
    #define MY_HOSTNAME "ESP32_GW_LoRa"
    
    // The port to keep open on node server mode
    #define MY_PORT 5003
    
    // How many clients should be able to connect to this gateway (default 1)
    #define MY_GATEWAY_MAX_CLIENTS 2
    
    #include <MySensors.h>
    #include "heltec.h"
    
    
    void setup()
    {
    	// Setup locally attached sensors
      Heltec.begin(true /*DisplayEnable Enable*/, false /*LoRa Disable*/, true /*Serial Enable*/);
      
      Heltec.display->setContrast(255);
    
     Heltec.display->clear();
     Heltec.display->setFont(ArialMT_Plain_16);
     Heltec.display->drawString(30, 10, "LoRa GW");
     Heltec.display->setFont(ArialMT_Plain_10);
     Heltec.display->drawString(30, 40, WiFi.localIP().toString());
     Heltec.display->display();
    
    }
    
    void presentation()
    {
    	// Present locally attached sensors here
    }
    
    void loop()
    {
    	// Send locally attached sensors data here
    }
    


  • Advertisement
  • Technology & Internet Moderators Posts: 28,791 Mod ✭✭✭✭oscarBravo


    I'm working on an oil tank sensor using a VL53L0X LIDAR instead of ultrasonic, along with ESPhome and Home Assistant. I'll update on progress if anyone's interested.


  • Registered Users Posts: 5,957 ✭✭✭emaherx


    oscarBravo wrote: »
    I'm working on an oil tank sensor using a VL53L0X LIDAR instead of ultrasonic, along with ESPhome and Home Assistant. I'll update on progress if anyone's interested.

    Absolutely, I was looking at the lidar modules too, but ultrasonic works fine. Its always good to see the different solutions to the same problems.


  • Technology & Internet Moderators Posts: 28,791 Mod ✭✭✭✭oscarBravo


    So here's what I've got so far:

    532340.jpg

    I have an ESP32 devkit wired to the LIDAR breakout board. ESPhome is running on the ESP32 and reporting reasonably accurate distances. I'm using a calibrate_linear filter to convert metres to litres, but I'm planning to use calibrate_polynomial to hopefully get a somewhat more accurate conversion allowing for the rounded shape of the tank.

    532345.png

    I've also 3D printed an enclosure to mount the LIDAR in place of my old Watchman probe. I'll run some outdoor Cat5 cable to the ESP32 which will be mounted on the back of a wee solar panel, along with a solar charge controller/battery module.

    I've configured the ESP32 to deep sleep for long intervals, then wake up for a minute, which gives it time to connect to WiFi and update the oil level a couple of times.

    Still working on the design for the solar panel/ESP enclosure. When I have it printed I'll report back.


  • Registered Users Posts: 5,957 ✭✭✭emaherx


    oscarBravo wrote: »
    So here's what I've got so far:

    532340.jpg

    I have an ESP32 devkit wired to the LIDAR breakout board. ESPhome is running on the ESP32 and reporting reasonably accurate distances. I'm using a calibrate_linear filter to convert metres to litres, but I'm planning to use calibrate_polynomial to hopefully get a somewhat more accurate conversion allowing for the rounded shape of the tank.

    532345.png

    I've also 3D printed an enclosure to mount the LIDAR in place of my old Watchman probe. I'll run some outdoor Cat5 cable to the ESP32 which will be mounted on the back of a wee solar panel, along with a solar charge controller/battery module.

    I've configured the ESP32 to deep sleep for long intervals, then wake up for a minute, which gives it time to connect to WiFi and update the oil level a couple of times.

    Still working on the design for the solar panel/ESP enclosure. When I have it printed I'll report back.

    Very nice, the 3D printer made a great job of it. Mines stuck on with a jam jar lid :D

    The calibration method in ESPhome makes it very easy. Its a pity Home Assistant dosen't have something similar for any sensor it receives data from.


  • Registered Users Posts: 2,715 ✭✭✭niallb


    oscarBravo wrote: »
    ... I'll run some outdoor Cat5 cable to the ESP32 which will be mounted on the back of a wee solar panel, along with a solar charge controller/battery module...

    Any chance you can inject some power onto that cable?
    Could save a lot of complexity.


  • Advertisement
  • Technology & Internet Moderators Posts: 28,791 Mod ✭✭✭✭oscarBravo


    niallb wrote: »
    Any chance you can inject some power onto that cable?
    Could save a lot of complexity.

    I'm only talking a couple of feet of cable to connect the sensor breakout to the ESP32, not a cable from the house. The ESP will connect to my WiFi network.

    Complexity is part of the fun!


  • Registered Users Posts: 5,957 ✭✭✭emaherx


    oscarBravo wrote: »
    I'm only talking a couple of feet of cable to connect the sensor breakout to the ESP32, not a cable from the house. The ESP will connect to my WiFi network.

    Complexity is part of the fun!

    How far is the WiFi?
    I had setup an ESP32 using ESPHome originally, but found the WiFi was too unreliable as the tank was just too far from the house. Which is why I switched to the StemEdu LoRa board and MySensors.


  • Technology & Internet Moderators Posts: 28,791 Mod ✭✭✭✭oscarBravo


    emaherx wrote: »
    How far is the WiFi?
    Not far. WiFi is kind of a core competence of mine, so it's probably the aspect of the project I'm least worried about.

    Specifically, the oil tank is about five or six metres from my office window, and I have a repeater on the windowsill.


  • Registered Users Posts: 1,037 ✭✭✭Banbh


    https://www.magnusmonitors.com/solutions/overview
    This Magnus monitor seems to do all that is required.
    A couple of oil suppliers in Galway and doing a deal on them with your next fill.
    Has anyone got one and do they work?


  • Registered Users Posts: 5,957 ✭✭✭emaherx


    Banbh wrote: »
    https://www.magnusmonitors.com/solutions/overview
    This Magnus monitor seems to do all that is required.
    A couple of oil suppliers in Galway and doing a deal on them with your next fill.
    Has anyone got one and do they work?

    Any idea of cost? Is there a subscription? Not much info on the site which seems to marketed at distributors rather than individuals.

    Not much mention of technology, I'm guessing it could be sigfox which would have a subscription.


  • Registered Users Posts: 23,260 ✭✭✭✭mickdw


    emaherx wrote: »
    Any idea of cost? Is there a subscription? Not much info on the site which seems to marketed at distributors rather than individuals.

    Not much mention of technology, I'm guessing it could be sigfox which would have a subscription.

    I think i heard it advertised earlier at 9 quid per quarter with free install.


  • Registered Users Posts: 3,317 ✭✭✭davo2001


    mickdw wrote: »
    I think i heard it advertised earlier at 9 quid per quarter with free install.

    Sounds too cheap, i'd gladly pay that for a quick working solution.


  • Registered Users Posts: 5,957 ✭✭✭emaherx


    mickdw wrote: »
    I think i heard it advertised earlier at 9 quid per quarter with free install.

    Think I'll stick with my DIY solution, I've more than one tank to monitor and at €36 euro per device per year that would be too much. Even using the Sigfox network I could make something for €6 per year per device.


  • Registered Users Posts: 1,037 ✭✭✭Banbh


    It seems you rent the device at €4 a month from 'your' oil company. I should have guessed from the name 'monitor'. I'll stick with the brush handle method as I hate being watched.


  • Registered Users Posts: 5,957 ✭✭✭emaherx


    davo2001 wrote: »
    Sounds too cheap, i'd gladly pay that for a quick working solution.

    Not sure how it sounds too cheap. Connection to Sigfox costs them €6 a year or less for volume discount so at 4 euro a month there is plenty of scope for profit for them. So if you are happy with the price fire away as you won't find a quicker easier working solution. As there is no need to connect to your router and they install it.


  • Advertisement
  • Registered Users Posts: 733 ✭✭✭SchrodingersCat


    We have a Apollo Ultrasonic sensor. It transmits the level to a receiver in the house. We have no issues with it for the last three years, and it appears to be accurate with its level measurements. No subscription is required. I got it 2nd hand off ebay.co.uk for about 50 quid.
    http://www.curranelectrical.ie/apollo-ultrasonic-tank-gauge/


  • Registered Users Posts: 5,957 ✭✭✭emaherx


    I assume thats the basic Apollo monitor. I think they have a smart one also


  • Registered Users Posts: 3,360 ✭✭✭randombar


    Anyone with oilpal on here? The app has stopped recording levels for me for the last while now, site is half down etc. Just wondering if it's on the way out?



  • Registered Users Posts: 2,541 ✭✭✭wexfordman2


    Did you contact them?



  • Registered Users Posts: 3,360 ✭✭✭randombar


    Yup, popped them a mail yesterday. Nothing back yet.



  • Registered Users Posts: 2,541 ✭✭✭wexfordman2


    Still working for me, I just reconnected mine today, had been disconnected (cable problems to the modem).



  • Registered Users Posts: 3,360 ✭✭✭randombar


    Did you have a connection failure light on the modem?



  • Registered Users Posts: 2,541 ✭✭✭wexfordman2


    Yes, oddly enough the device had been failing to connect to the network for months and I tried fixing the cable (re terminated it a few times) and it never worked.


    Only today happened to connect a different nearby cable to it and it connected, and the old cable I connected to a different device and that connected also.



  • Registered Users Posts: 3,360 ✭✭✭randombar


    Ya unfortunately tried different cables, tried resetting, no green light. Wonder is it trying to connect to a different server to yours or something?



  • Advertisement
  • Registered Users Posts: 2,541 ✭✭✭wexfordman2


    Did you have any other luck with it, mine is definitely still working, and I also just got it working with home assistant.



Advertisement