Help for an irrigation system with a few inconveniences



  • Hello all!

    I have been working on a project and I am currently stuck. The project is about building an irrigation controller that works with 9v latching solenoid valves of Rain Bird. I have the valves buried into a plastic box in my backyard. The system consists in a RPi3 gateway and an Arduino pro mini 3.3v battery powered. The gateway will stay inside the garage and the node will be along with the valves and inside another typical waterproof electric box.

    Unfortunately there are many issues that make this project really interesting (at least for me 😄 )

    • I only go to this house during the weekends so the system must be very very reliable
    • The latching solenoid valves and the Arduino pro mini work with different voltages
    • There is no Internet in the house so the RPi3 works like an access point without internet. Once I get to the house, I connect to the internet and I can work with the controller using localhost
    • The radio communication must go throughout walls, the distance in a straight line is about 10-15 meters but there is a wall in between. Also, the node is in that buried plastic valve box.
    • I am a complete noob with electronics 😢

    I have tested with nrf24 pa lna radio modules but the transmission power is not enough, they can't communicate the gateway and the node.

    The node has this components:

    • The radio nrf24 pa lna with the capacitor to increase the power and range (I think...)
    • A 3.3v 8 channel relay board to drive the 3 valves
    • A capacitive soil moisture sensor
    • 2 AA batteries that power the node with a 3.3v step up booster
    • Battery percentage monitor is also implemented as it is explained in the my sensors website

    The gateway works with:

    • RPi3 model B+
    • It works like an access point following the official tutorial -> Tutorial
    • I have installed mycontroller as a smart home controller -> Website

    Here are the links to the mentioned valves, boxes and everything that I currently have:

    Of course, any of this can be changed, I am trying to learn and I think that this solution can work for others with similar problems like, no internet connection and latching valves. The only feature of this system is to be able to program an schedule in order to irrigate. Also, if the ground is moisturised I would not like to irrigate even the irrigation is scheduled.

    Finally, I have been thinking into Lora stuff any related information is also very welcomed.

    Thank you very much in advance



  • @ancalotoru This a test for a replacement Ethan Hunt right?
    A capacitor does not extend the power of a radio module it buffers the voltage to prevent it sagging..
    If I might ask a really stupid question, why on earth bury the Node beneath predominantly moist ground rather then raise a tube with the node on the top?
    No surprise over 2.4GHz issues, 433MHz will get 10-15m no problem, but when surrounded by and below saturated soil I wouldn't bet on it...
    Assuming the Node is parked on top of a pole with a supply tapped off the 9v solenoid supply with a decent 3v3 LDO you can detach the power LED and regulator and breathe fumes for power when it's asleep. Wakening it from sleep I suggest an RTC, how you alter irrigation times could be down to the Gateway commanding the Node to reset the RTC alarms, but with no internet access you would have to rely on tables for sunrise/sunset..
    So do I get to replace Tom Cruise?



  • @zboblamont thank you very much for your reply. You have my blessing to became into the new Ethan Hunt haha.

    The main issue because I can not place everything into a pole is because the buried box is in the middle of the backyard so, having a pole is quite unsightly...

    However, do you think that with a 433mHz radio, or with a 869mHz radio which is a permitted frequency in Europe I will reach to the node? I was thinking in the RFM69 or the RFM95

    Regarding the RTC it is a beautiful idea. However, I am confused. If I sleep the node, can it still be able to communicate with the gateway? I suppose that I will have to get the node up once in a while to check.

    But, suppose that the GW sends a new alarm schedule to the node when the node is sleeping, will the message reach?



  • @ancalotoru If you buried the RF module in the ground it is not surprising at all that you are having trouble communicating with it! - There's a reason you see houses and buildings with aerials on the roof and not buried in the garden.

    What size area are you looking to maintain and is the 'crop' really valuable ( I guess it must be to go to all this trouble).

    Also, if there is no internet there and you are not there most of the time, what is the point of mysensors? Why not just use industrial timers with moisture sensor as an enable?

    And then you bury batteries in the ground? I hope it doesn't get too cold there or worse any ground frost or snow.

    Take a step back and do more research.



  • @ancalotoru
    Unsightly v workable ? Perhaps a disguise as a feature, like a birdtable, fountain, shrub? I know 433 works and is EU legal, a rubber duck is about 150mm.
    The point of the RTCs is that once set to accurate time they run in sync, so everything wakens at the same time, that is your comms window. Once they are both awake the Gateway could then alter the alarm time of the Node.

    If it absolutely must be below ground I suggest you are looking at burying a cable, but there again you might be able to act directly on your valve controls negating need for any Node at all and the cable doesn't sleep...
    But @skywatch makes a perfectly valid point, my own irrigation is on two dedicated timers which are removed and all external lines drained in winter.



  • @skywatch You are totally right. What is the point of monitoring things with sensors if I can not check those values regularly? The thing is that the controller used to be this one from Rain Bird. This controller passed away and I started developping something with easier scheduling options (the rain bird controller is a headache...).

    Another point is that one of the three valves controls the irrigation of my small garden with tomato plants and stuff. As a next step, I would like to place another sensor in order to check the moisture of these plants. Hopefully one day I will be able to get some juicy tomatoes thanks to you haha

    Thank you for answering 🙂



  • @zboblamont 0_1564041826413_Captura.PNG

    This is the current situation of the house. In front of the Buried Box, there is a window in order to let us see the garden, if I place something in front of it... Anyway, as you have suggested, doing something "fancy" in order not to have a pole can be a good solution, I will check it out. I have been thinking on this kind of antenna sticked to the top of the box, but from outside it. It might work...

    Thank you!



  • @ancalotoru If the problem is really the controller replace it surely, they're maybe 100 yoyo?
    I'd prefer the remote version and a cable as it is clearly designed for it, your box version is a feature not a necessity....
    First tomato plants here this year, 2 months later 2m tall and a battle with poles and twine to hold it all up, going to be a massive crop from 10 plants 😳
    Well drained soil, 30 minutes watering with a perforated line every morning and evening... Easy...



  • @zboblamont Absolutely, the controller is the problem, it is just broken. The thing is that I am learning a lot using mysensors. I would like to build my own controller rather than using an aftermarket one.

    When you say that you would prefer a remote version with a cable, are you suggesting to communicate the GW and the node with a cable? That would be nice, but I would need to make some holes and remove some floor tails as the house is surrownded by a tiny path made out of them...



  • @ancalotoru
    My expressed "prefer"... - I saw from your link that the "Rain Bird" head is standard as wall mounted but there was the option of fitting to the valve-box, so what you have is the option, which is in turn determining the awkward solution (or at least I presumed the visible tube was for an interconnect cable...)
    Perfectly understood on the DIY aspect, that is up to you as you still have to control it, but whether you develop one or buy one, you no longer need the NODE in the middle, THAT was my point...
    I guess by tails you meant tiles ? If it is a typical med type cement path with tiles and you can direct your cable to a spot away from the view from the window, why not make a post beside the path? Whether it is a Node or a Controller then is up to you... 😉
    If you elect to wall mount it, you can core drill a hole next to the wall through the path and use a long auger to mine under it, joint a bend then foam inject the void under the path... 😉



  • I'm with @zboblamont on this......

    Do NOT bury batteries.
    Do NOT bury RF devices.

    Do keep these things above ground level and accessible - you know those batteries won't last forever, right?

    You seem to have a good boundry to run a cable along - the cable can be buried or overground and attached to posts.

    What max-min temps are you looking at there? What average yearly rainfall?

    .....and tomatoes are soooo cheap to buy in the shops too, why bother with all this? .... 😉



  • @skywatch TASTE ? 🤗 Home grown and fresh, some olive oil and shredded basil, feta, and olives, to die for... 😉



  • @zboblamont I know 😉 - I used to grow San Marzano here, but in the UK the shops are full of so many different varieties now and it didn't seem worth the bother with compost, watering, pest control, heating/cooling etc. - But you are right, freshly picked are impossible to beat! 🙂



  • @skywatch ok! To keep it in mind, when I say that the node is buried, in fact it is inside a box which is buried...

    I totally agree with you in the sense that if the antennas are buried, I would not be able to communicate with anything.

    Besides, I would try to put the node out of the buried box somewhere. A good idea is to bury a cable which connect the valves. In this way I will be able to place a pole in other, more appropriate places.

    Regarding the rain, where I live, is very rainy. I live in the basque country, north of spain. And about temperatures, I have to say that we could reach -10 during winter, it can be covered with snow also, and in during summer the temperatures reach 35 degrees at most...

    Thank you! I will buy rf69 modules to give it a try. I am also planning to contract Internet service since the basque government is installing optical fiber in the small villages like mine.

    My tomatoes are going ti be the most expensive ones in the entire country for sure, but anyway, I am learning a lot 😄



  • @ancalotoru Glad cabling made sense, it will solve your primary problem of communications with a wall or pole mount.
    I noted "Rain bird" stock 3 core and 7 core cables but in 75m drums. Presumably your dead device will have a short connecting cable in the box to cross check which version you need, then order an equivalent in the market at probably cheaper cost for just over the length you actually require... I suggest putting the cable inside some conduit before burial, that way it gets damaged for some reason you can pull through a replacement.
    If you go for a pole or wall mount for your node, can recommend this type of light switch box (433MHz gas meter node) as an AA battery holder fits neatly under the transparent cover making changing batteries really easy just by unlatching the hinged lid, although still not needed yet after 2 years running... 😜 0_1564133873233_20190726_122956[1].jpg
    Good luck...



  • @ancalotoru OK - It is good that you have not given up and are learning a lot. Bueno! 😉

    Very high temps are not good for batteries in use or stored.
    Very low temperaures are good for storing batteried but not for using them as a power source.
    This is because all batteries are based on a chemical reaction and the colder the temperature the less energy there will be in the atoms. Below 0C the batteries will probably die very quickly in use, but they will last longer if stored this way - I hope that makes sense!.....

    If I were doing your project I would think of 2 possible options.....

    1. Find a safe way to run the house electricity to the point of the node and have power supply there in waterproof box, plenty big enough as there will be no air flow for cooling. Here I put a weatherproof box with mains socket on the ouside wall and connected it to the back of an inside double socket (just added it to the screw terminals on the back). The whole house is on an RCD and so are the sockets.

    2. Use and old mains transformer to send AC of about 9-15V to the node and have it rectified into DC (with bridge rectifier) and then into a voltage regulator.

    Advantages are, no problems with temperature, no batteries to change (that will always happen at the worst moment and in the worst weather anyway and nearly always at night 😉 ).....

    Do not put 5v DC into a cable at the house and expect it to be 5V when it gets down the garden to the node, it won't. There will be losses, so the above are how I would proceed but you could try sending 12V DC to the node and again having a power regulator there for 5V DC output (or 3.3V if you want).

    I guess that once the temps are above 10C at night you could use a solar panel with rechargeable batteries, but again there is a higher risk of failure and you want reliability - having the internet there to tell you there is a problem when you are not actually there to do something about that problem is not going to improve reliability.

    You could also consider a phone module to send text messages to your phone when things go wrong. With a pay-as-you-go card it could be a lot cheaper than internet at the property. But with internet you can expand into home and garden security as well..... 😉



  • @skywatch said in Help for an irrigation system with a few inconveniences:

    This is because all batteries are based on a chemical reaction and the colder the temperature the less energy there will be in the atoms. Below 0C the batteries will probably die very quickly in use, but they will last longer if stored this way - I hope that makes sense!.....

    Having seen this stated previously as a cast-iron fact (and I do not dispute the theory), I remain forever in awe of the cheap alkalines used here surviving -20 winters and 36 degree summers...
    Possibly the type of temperature ?
    The biggest voltage drop found here was when the Gateway crashed and the Node attempted to contact a dead end.... 😉
    0_1564181446199_7dfa3bdf-eeac-4a5d-8728-efc23775c860-image.png



  • @zboblamont There are so many different types of battery with different chemical components that it is harder now to generalise, but I believe that the physics of it still hold true.

    It is the reason that your smoke alarm battery nearly always sounds the warning beeps at night. That's due to nighttime temperatures being lower and as the cell reaches it's last dribble of energy the temperature variation is enough to lower the voltage when the cell cools.



  • @skywatch I'm no chemistry engineer, but this generalisation I've heard said previously as an undisputed fact, hence my posting last year's voltage record for one of the most exposed nodes...
    The decay is no greater than with any of the internal nodes, and with last winter down to -20 you might expect evidence of it, yet the cheap standard alkalines sailed through it unperturbed..
    The voltage drop for a month in summer failing to connect to the Gateway was colossal by comparison, hence the UPS went up my priority list...
    😉



  • @zboblamont said in Help for an irrigation system with a few inconveniences:

    I can't really add more to this other than to say that if the batteries in the remote won't work, warm them under your armpits for a few minutes and try again - I bet they work! 😉

    The voltage drop for a month in summer failing to connect to the Gateway was colossal by comparison, hence the UPS went up my priority list...
    😉

    Won't a UPS have a battery in it too? 🙂



  • @skywatch "I can't really add more to this other than to say that if the batteries in the remote won't work, warm them under your armpits for a few minutes and try again - I bet they work!" - For the cost of a few cells? I'm Scottish, but presume you know it was the Scots who invented copper wire by fighting over a penny....

    Yep Lead/Acid gel on the UPS for the Gateway/Controller, but that's indoors where it is generously warm even when it's Siberian outside...



  • I have nothing more to post but thank you all for the answers. I will have a look at how to get power from the house to the garden as @skywatch suggested. Also, I will see how to place a pole in the garden, similar to the beautiful node of @zboblamont. By the way, it looks very nice!

    Finally, I have seen the GPRS and I also have one at home so, I definitely will give it a chance in this Ethan Hunt's project haha

    Thank you all again!



  • @ancalotoru Please do let us know how you get on - and some pictures of the project would be nice too! 🙂

    Good Luck!



  • @ancalotoru The power demand will probably be dictated by the valve box operating at a different voltage, but since it was designed for battery power it should not be huge.
    Agree with @skywatch recommendation of a PSU if it is viable but perhaps look at battery backup also if you get power cuts as were the bain of my life here...
    Looking forward to your finalised pictures, good luck...



  • @zboblamont @skywatch I am looking forward to post tons of pictures and a full tutorial with code and electronics. I will get all the pieces in September so I will have to wait for a month....

    Besides I have a question. Is better to have a 9v batteries to run the valves and then regulate its voltage to 3.3v in order to run all the sensors and the arduino, or is better to have two separated batteries? One for the arduino node and another exclusive one to drive the valves

    Thank you!



  • Hello,

    I have worked with a lot of home irrigation equipment including both AC line-powered relays and a little with battery-powered 9vDC latching relays. I understand you are interested in learning MySensors, Arduino, etc. It appears that you could easily get a reliable wired commercial irrigation controller and valves working quickly and at low cost. The main reason to use this approach in my opinion is your major requirement - reliability. But also, speed and cost.

    I have worked with hobby electronics for many years, and many hundreds of hours with MySensors and related electronics, and thousands of hours of software development. I use commercial irrigation controllers because I would never be able to build one as reliable even if I had unlimited time to do it. Even if building, writing code, and testing was done, something designed and built wll not have controls, display, and functions anything like a commercial unit.

    I suggest you make your first MySensors/etc. project only for the sensors you want. This is challenging enough for your first project since you mention you are not experienced with electronics. It is better to learn to walk before you learn to run!

    One example of this difficulty: have you bench-tested using an Arduino to activate/deactivate a latching 9vDC irrigation valve? They are not at all like an ordinary relay. If you can do this, I am impressed at what you have learned.

    In your situation suggest you put a commercial AC mains to 24vAC powered irrigation controller (USA $50-$100) at your house with a cable to your valve box, and use non-latching 24vAC valves. If you must use 9vDC battery-powered valves, or must locate the controller underground (no way to use buried cable) you can buy commercial battery powered valves with built-in control for each valve (USA $25-$50 each), or a commercial battery powered controller for multiple valves. (brands: DIG, Orbit, Rain Bird, Hunter).

    I apologize if it sounds like I am trying to discourage you. I am not! But I encourage you to start with a simpler project as it is hard enough to get your first working project even if you are only building one sensor or relay!

    Good luck!



  • @ancalotoru said in Help for an irrigation system with a few inconveniences:

    @zboblamont @skywatch I am looking forward to post tons of pictures and a full tutorial with code and electronics. I will get all the pieces in September so I will have to wait for a month....

    Besides I have a question. Is better to have a 9v batteries to run the valves and then regulate its voltage to 3.3v in order to run all the sensors and the arduino, or is better to have two separated batteries? One for the arduino node and another exclusive one to drive the valves

    Thank you!ed

    I would suggest no. It may seem initially energy economito consolidate supplies, but a separate supply for the Node ensures it tells you when the 9v valve supply is getting close to failure to enable change-out before failure. If you are irrigating twice a day, that gives you a 12 hour minimum to change the valve actuator battery.
    If you look at the mAh capacity of a PP3 v AA the lfespans are starkly different ;).
    Your original control was built as a 9v remote head (?), it stands to reason that a quick low voltage burst to relay/fet the 9v battery at the "Node" should be sufficient to drive the latching valves, secure yet energy separated.
    Hope that makes sense...



  • @zboblamont Ok thank you! I will keep it with two batteries then.

    The original controller was running on one single 9V battery so maybe Rain Bird should revise that security possible issue 😄



  • @grubstake Thank you for your comments! You are totally right, I will probably never get the same quality as a aftermarket unit. I will just give it a try, see if works and if not, buy a new one.

    I have been working with arduino for years but I am a newbe with electronics. I do not know how electronics work in the sense of physical phenomenas and so on. However, I know how to switch a valve with an arduino (that was the very first test) and many other operations like, read an analog sensor etc.

    Regarding the coding, I hope that my degree in computer science helps haha

    Furthermore, I have to say that I am really interested in mysensors because I would like to store as much data about my garden as I can. Why? Because I am currently doing a PhD in Artificial intelligence and going through all the steps of data science is kind a useful stuff

    Hope I can post more advances soon! Thank you all



  • Hi there!

    I have been doing some electronics and here is my thoughts about how to connect things. Any help will be very welcomed. My idea is to create a PCB after testing everything on a breadboard.

    0_1564422473646_IrrigationMyS.png
    0_1564422345400_HBridge.png!



Suggested Topics

  • 3
  • 8
  • 44
  • 7
  • 1
  • 2

60
Online

11.4k
Users

11.1k
Topics

112.7k
Posts