I need advice with brainstorming my farm project



  • Hi, I've been reading through the forum and website and what a great community and fantastic projects!

    I'm a farmer and electronics hobbyist. I've built several Arduino projects to help me run the farm, including automation of our greenhouse, hothouse, orchards irrigation and weather station. It's all great but it's time to integrate everything... It's too many odd projects and they do not talk with each other. I'm so excited when I found the mysensors.org site.

    Thus I have reasonable Arduino experience, but limited Raspberry experience.

    Hardware I have:
    Aduino: Mega's, Uno's, Nano's, NodeMCU's, Pro Mini's
    Raspberry: Pi B+, Pi A+, Pi 2 Model B
    Plenty of sensors etc.

    I need some guidance, advice or tips please!

    My goal is to turn all my existing projects into nodes. This I will be fine with. I will add NRF24L01 for all the nodes.
    But the rest is new territory...

    Do I understand it correct that I need a gateway / controller (Raspberry) with NRF24L01 and then my nodes will all talk with the Raspberry?

    Which Raspberry model will be best to use?
    Which Controller platform is the best to use for my function?

    Any guidance will be appreciated please!

    Kind Regards,
    Peter


  • Hardware Contributor

    Hi @peterrr and welcome!

    @peterrr said in I need advice with brainstorming my farm project:

    I will add NRF24L01 for all the nodes

    If you have a greater distance to cover, have a look at the RFM modules as well...

    Have a look at https://www.mysensors.org/about and go trough the tutorial there. You need a controller of some kind to which you connect a gateway (or if a raspberry you can do both controller and gateway in one). The rest of the nodes talk to the radio (gw) which hands over the message to the controller.

    Which Raspberry model will be best to use?

    Dont know, sorry - I think they all work? Im using 2 and 3 for controllers but have a own GW on a Nano Arduino.

    Which Controller platform is the best to use for my function?

    You have to check them out and see for yourself. All controllers have different things to offer.



  • @sundberg84 said in I need advice with brainstorming my farm project:

    Hi @peterrr and welcome!

    @peterrr said in I need advice with brainstorming my farm project:

    I will add NRF24L01 for all the nodes

    If you have a greater distance to cover, have a look at the RFM modules as well...

    Have a look at https://www.mysensors.org/about and go trough the tutorial there. You need a controller of some kind to which you connect a gateway (or if a raspberry you can do both controller and gateway in one). The rest of the nodes talk to the radio (gw) which hands over the message to the controller.

    Which Raspberry model will be best to use?

    Dont know, sorry - I think they all work? Im using 2 and 3 for controllers but have a own GW on a Nano Arduino.

    Which Controller platform is the best to use for my function?

    You have to check them out and see for yourself. All controllers have different things to offer.

    Great advice, thanks!

    Transceivers:

    Regarding transceivers, yes you are right I will need more distance. The RFM69W and RFM69HW look like excellent options.

    RFM69W
    Transmit power = +13dB
    Receive sensitivity = -120dB
    current consumption transmit = 45mA @ 13dB
    Temperature: -40 to 85 C (-40 to 180F)

    RFM69HW
    Transmit power = +20dB
    Receive sensitivity = -120dB
    current consumption = 130mA @ 20dB
    Temperature: -20 to 70 C (-4 to 158F)

    nRF24L01+ (No power amplifier)
    Transmit power = 0dB?
    Receive sensitivity = -82dBm @ 2Mbps, -104dBm @250kbps
    current consumption = 13mA @ 0dB
    Temperature: -20 to 70 C (-4 to 158F)

    nRF24L01+ w/ PA+LNA and Antenna
    Transmit power = 20dB
    Receive sensitivity = -82dBm @ 2Mbps, -104dBm @250kbps
    current consumption = 130mA @ 20dB
    Temperature: -20 to 70 C (-4 to 158F)

    Gateway / Controller:

    Is it better to have a separate gateway and controller? Or have one device doing both? Mostly in terms of what would be most reliable and easy to maintain...
    I already have hardware for Raspberry Pi or Arduino options...

    Controller platform

    I had a look at the various controllers, and I suppose some of the best options might be between Domoticz, MyController.org and OpenHAB. But I really have no clue. I guess the question is for someone who has tried various controllers, imagine you had a small organic farm, what will you go with?


  • Hardware Contributor

    @peterrr i would choose most based on the actuator and timers/programmable. I think all controllers can handle incoming sensor data but to time actuator and be sure everyone works is more tricky.

    Do you need mean to use irrigation for example?

    I have never used a raspberry for both gw and controller so can't help you.


  • Hero Member

    I would imagine that on a farm you'd be better off with LoRa nodes. Without getting exotic, they have the most range. It used to be very expensive, but the Ra-01 changed all that:
    https://www.openhardware.io/view/395/LoRa-Ra-01-ATmega328P-Node



  • @NeverDie said in I need advice with brainstorming my farm project:

    I would imagine that on a farm you'd be better off with LoRa nodes. Without getting exotic, they have the most range.

    Thanks for the reply!

    I was looking at LoRaWAN, amazing range and reasonably low power consumption for what you get. It's a small farm and the maximum distance from node will be approximately 1000m... thus 'nRF24L01+ w/ PA+LNA and Antenna' or 'RFM69HW' could be sufficient?

    In terms of LoRaWAN, I have not seen many projects and examples on MySensors, thus I was slightly put off. Or maybe I'm missing something?

    Your info on LoRa node is fantastic.
    My I ask what your setup is in terms of nodes, transceivers, controller, gateway etc?


  • Hero Member

    @peterrr
    Most people here aren't bridging 1000m distances, but probably some are. If you have line of sight, maybe (?) an amplified nRF24 will work for you.



  • @NeverDie The penalty of higher amplification electrically is power consumption, gain is also a function of antenna type and directivity.
    Farms are rarely in an urban area likely to cause interference. Even low power uhf on a dipole should link 1km, but for certain a colinear or small yagi should transceive no problem without the penalty imposed of slower data rate on Lora, or the consumption issues of higher power....
    Worth considering I suggest....


  • Hero Member

    @zboblamont said in I need advice with brainstorming my farm project:

    for certain a colinear or small yagi should transceive no problem

    Exactly which antenna (links?) do you recommend he buy?



  • @NeverDie Sorry, as an old time Ham I always built my own antennae except for FM mobile, radio hams had 430 - 440MHz in their allocation, so there is a wealth of info out their on options, if indeed that is frequency selected.
    For simplicity, a dipole with a sheet reflector behind it will punch a lobe toward it's target pretty effectively. Last Yagi I built was a ZL type for 145MHz, cost about $20 in alloy, put it together in a week, 16dB gain... If you can solder SMD components, antenna building is pretty basic really...



  • @NeverDie Sorry, forgot to add, don't ignore quad antennae when considering beams, they are much simpler to build than yagi, fairly wideband, all you need do is consider polarisation. A lump of 2x2 cedar, some cross drilled dowels, copper tube or alloy bar for elements, the hardest part is making the bazooka balun and waterproofing it really... Last one I built was a 3 to 1 elliptical which design theory some Japanese guys came up with, pretty amazing performance compared to it's quad original....


  • Hero Member

    @zboblamont
    Well, all this sounds great, but fairly exotic.



  • @NeverDie I suggest some use of Google may dispel any misunderstandings you may hold, it is far from exotic. Most of what is known today is based on professional and amateur experimentation over many decades, little of it is exotic perhaps refined but not beyond anyone with a basic understanding of what is required, it couldn't be else amateurs would be quite incapable of playing with copper and steel wires, aluminium rods, brass, even helium balloons to hoist antennae. R&D on frequencies and antennae preceded much of what is known today in terms of communications, and probably assisted it's progress. Most of antenna theory and development goes back over 100 years, in the supermarket mentality of modern days, the notion of bending a 6mm alloy rod to fulfill your requirements may seem abstract, but radio experimentation preceded your birth, I suggest you might take off the blinkers and look.... 🙂


  • Hero Member

    @zboblamont
    Yes, but not everyone wants to become a quantum mechanic, because for them the more interesting part comes in actually using it. If it's not exotic, it should be easy to buy pre-made.



  • @NeverDie Oh dear, quantum mechanics? Ok, you want to buy, fair enough, others including the OP might prefer to DIY, but fair enough, first hit on Google... http://www.sandpiperaerials.com/product/13-element-zl-special-yagi/



  • @NeverDie DIY, about 10...


  • Hero Member

    You see, this is where your argument falls apart. £74.80 for a Yagi (it's your link) versus around $2.50 for an Ra-01.



  • @NeverDie Not really, there is no argument to fall apart unless you are incapable of some DIY and can do a bit of research, the very foundation of this particular forum.
    I have never met a farmer yet who could not DIY, and even fewer who would shell out good money for a commercial product where they had bits kicking around the yard which could be re-purposed after a little research.
    A Slim-Jim colinear is easily made from some wire and a water pipe, a dipole and reflector from some fence wire and an old bit of tinplate, the sort of material kicking around the average farmyard at no cost at all but with enough gain to easily cover a km or two with an extremely low output power RF unit, sipping by on a couple of AAs.
    The commercial antenna I exampled would be a solution if you required that level of gain (14dBd) to cover long distances such as the ISS, but there are other cheaper antennae from that supplier, the J-pole for instance, 33 quid, but you could build it for 2.
    Each to their own, none of it is rocket science or 'quantum mechanics'...


  • Hero Member

    @zboblamont
    I see. And anyone can properly tune this DIY antenna you're proposing that's made from barnyard scrap without using a network analyzer, right?



  • @NeverDie Jeez, why so negative?
    Why would anybody want to use a network analyser for an antenna?

    If you meant a Grid Dip Oscillator, I made one many moons ago but never used it once. Go figure... Have used a SWR meter to tweak an antenna to 1:1, but usually found it was <1.5 as built which is fine.

    A dipole using straight wire is well documented on these forums and elsewhere, a plate wire or corner reflector spaced correctly forces the lobe in the intended direction with zero effect on SWR, hence making it higher gain, adding reflectors adds to that gain as it narrows the radiated lobe, simple well established science.
    1km should be easy enough on a dipole anyway with line of sight, a reflector or director simply boosts the gain with no hit on consumed power.

    There are a multitude of Ham origin DIY designs for the same band, the commercial J-pole I pointed to was a DIY design, the Slim-Jim a DIY variant on that (from memory a version using the coax only, the commercial ZL again a Ham DIY original, none of this is ground-breaking or difficult to research, but we are talking very long distances with such gain...



  • I have had great success with OpenHAB. If you're not afraid of learning a scripting language, it can be very powerful and flexible.



  • @peterrr
    As a wet-behind-the-ears but reasonably successful novice with MySensors etc., I recommend first thing that you get something, anything, up and running that will cover the whole range of sensor->transport->controller working in a very simple way. This will dramatically help you figure out the parts and pieces. It can be very frustrating and time consuming getting your "hello world" first example of having sensor data appear on some device, as you really don't know which pieces are working and which aren't until you are there.

    Specific suggestions:

    Controller: Start with Domoticz as your controller. Vastly simpler than OpenHAB to get running, and surprisingly useful. Install it on a RPi connected to your LAN.

    Sensor Node: If you have any practical use for wifi as the transport for some of your sensors (i.e. areas with wifi coverage) the simplest sensor/transport is ESP Easy on a ESP8266 such as WeMos Pro Mini or NodeMCU hardware, with any supported temperature sensor such as NRF24L01 or DHT22 (AM2302). These will talk over WiFi directly to Domoticz on a RPi. No code to write or modifiy with ESP Easy.

    In a fraction of a day you can have a controller and working sensor up and running. Knowing your controller actually works is a much easier place to start from with MySensors radios etc.

    Next steps: MySensors sensor nodes can be run on an ESP8266 client gateway without separate radios where Wifi is available, so you can get ahead on how MySensors code works out of the way before tackling radio hardware.

    Finally, for long range/out of wifi scenarios, you can then start messing around with radio transport, which means you need sensors attached to one or many Arduinos which host one or more sensors. To get at the sensor data, you need a controller (Domoticz etc.) to receive the sensor data and make it available on your LAN with a web browser.

    Domoticz is able to forward data to cool things like Grafana/InfluxDB or other dashboards for graphing, consolidating, presentation, etc.

    None of these parts or pieces are too tough for someone with your background. But working on all of them at the same time is a pretty tough learning/debugging process.

    Have fun,

    Tim



  • @Carywin thanks, it's now in the top 3 of my controller options at this stage. So you can see this for managing some sensors and relays on a farm?



  • @Grubstake this is exactly the type of advice I was hoping for, thank you for your response!
    I have Domoticz in my top 3 options for controller, the other 2 OpenHAB and MyController.

    Controller: I will give Domoticz a try. Will one of my older Raspberry Pi's be sufficient?

    Sensor Node: I have some NodeMCU boards with sensors, currently connected to my Wifi. I can try your suggested procedure from simple to more complex, just to get a feel... but yes ultimately I need to make the node network separate from the wifi network with radios etc.

    The Grafana and InfluxDB dashboard sound interesting, I will have a look 🙂



  • @peterrr Yes absolutely. I have it mixing up RFM69 wireless sensors and actuators with MySensors, MQTT sensors on WiFi ESP8266 via PubSubClient and Sonoff-Tasmota, Zigbee lights via Belkin Wemo, and locally-attached sensors on RPi GPIO and RS485 links. It smashes them all together in a very flexible and adaptable way.



  • 0_1503926240560_farm sensors.jpg

    So if this was your farm, what would you do?
    Thus 11 Arduino projects currently and I would like to turn them into nodes. I have a Raspberry Pi to use that I can place of at any one of the Wifi AP's.

    1 sensing when the gate opens
    2 irrigation controller
    3 water level sensor
    4 weather station
    5 hothouse controller
    6 greenhouse controller
    7 - 11 soil and environment sensors

    • all above is Arduinio


  • @peterrr Now that is more interesting but missing one essential, power distribution v battery power... If you can bridge the range with a power supply (with backup) you could relay your nodes to a gateway at that central point, and collate and re-transmit to your controller possibly? 500m is way easier than 1000m... If you have a sheet metal facing to a building at HQ facing the direction of the nodes or can make a reflective facade, perhaps you could dispense with the remote gateway and combine at the receive end ?
    Thoughts ?



  • @peterrr
    My take:
    Put a RFM69-Ethernet MQTT MyS gateway somewhere central like the greenhouse, with a nice 10+db whip up high, and plug the Ethernet into a WiFi AP. Put RFM69s on the other arduino nodes with MyS. Your OpenHAB controller can go anywhere that has a network or WiFi connection, and talk to the sensor net via MQTT. Monitoring and control via the OpenHAB app on a smartphone will work anywhere there's WiFi. Automation is via the Xtend-based rules language which has plenty of examples to work from.



  • @zboblamont
    Power options as follow:
    1 sensing when the gate opens (mains available)
    2 irrigation controller (mains available)
    3 water level sensor (solar/battery power)
    4 weather station (solar/battery power)
    5 hothouse controller (mains available)
    6 greenhouse controller (mains available)
    7 - 11 soil and environment sensors (solar/battery)

    I would say the most central point is the greenhouse (mains available). I have a Wifi AP there that connects with the main Wifi AP and ADSL station. Thus the greenhouse is probably the ideal location for a gateway and controller. This should bring most distances closer, bringing the maximum distances perhaps down to 500-700m.

    The whole farm is pretty much covered with Wifi but I would have liked to keep the nodes -> gateway off our wifi, and only use the wifi for the controller...
    Do you consider the amplified (and slightly optimised) NRF24L01s sufficient for the node network? Or RFM69HW?



  • @peterrr said in I need advice with brainstorming my farm project:

    0_1503926240560_farm sensors.jpg

    So if this was your farm, what would you do?
    Thus 11 Arduino projects currently and I would like to turn them into nodes. I have a Raspberry Pi to use that I can place of at any one of the Wifi AP's.

    What functionality are you looking for when you say "turn them into nodes"? Receiving/logging data from multiple supported sensors for remote display is the simplest and a controller like Domoticz cat be a hub for many types whether DIY or commercial. Controlling remote switches/lights is fairly straightforward. Controlling custom built projects in an interactive way is not so easy. Having a remote node is not like having your Arduino plugged in to your computer (serial monitor, software updates). If you are trying to integrate monitoring and control of multiple devices the controller and its capabilities become the big issue.

    My experience so far is mostly monitoring sensors and simple controllers (DIY thermostat/humidistat). RPi works fine but is somewhat fragile IMHO with write fatigue on the card storage. If you want something a lot faster and more robust an inexpensive headless desktop computer works well. I got up to speed on a single RPi 3 running domoticz, with a MySensors radio gateway, InfluxDB and Grafana. Once I found it would work I moved it to an Intel NUC computer with SSD storage running Ubuntu Server. Way faster and easy to back up on my LAN.

    If you are a software developer type itching to learn a complex system for maximum flexibility OpenHAB has a good reputation (and steep learning curve). If you want to get get something working quickly and get your bearings Domoticz is a lot closer to plug and play, who knows it may suit your needs.

    I like to try to find the simplest/fastest way to get the job done as I'd rather be using this stuff rather than fussing around under the hood all the time...I already have other hobbies.



  • @peterrr said in I need advice with brainstorming my farm project:

    The whole farm is pretty much covered with Wifi but I would have liked to keep the nodes -> gateway off our wifi, and only use the wifi for the controller...

    I felt the same and monkeyed around with radios for quite a while. (I have a much smaller place, 3 buildings, good wifi everywhere.) Then I tested out the ESPEasy on ESP8266 sensor nodes and it was so straightforward that I haven't gotten past some prototype radio nodes. As has been said you can mix wifi and radio nodes to a single controller. Are you sure more devices on your wifi will create even the slightest problem and you aren't making it more complicated than needed for a good reason?

    Many of my sensor nodes run a handful of sensors on a single ESP8266 (no Arduino needed, but runs code via Arduino IDE), the hardware couldn't be simpler. In this scenario with MySensors nodes the sensor node IS the gateway...no fussing with radios outside the builtin wifi.

    Do you consider the amplified (and slightly optimised) NRF24L01s sufficient for the node network? Or RFM69HW?

    I messed a lot with the NRF radios and for the most part the market is full of dirt cheap clones mostly with counterfeit chips and the consistency and reliability is all over the map. Some radios work OK, but a huge pain sorting them out The RFM radios do not appear to suffer from this problem and I suggest starting with them.

    Tim



  • @Grubstake I suspect @carwywin pretty much ticked all my particular boxes.. Comms is not really the issue even though perceived as such, a central comms link will certainly work, if you can direct link off the side of a sheet clad side of a shed so be it, or make a reflector.
    It is all down to reliable acquisition of the data which informs the system. I would have to agree that the RFM69 solution would be my own personal preference, only because I settled on that as my particular solution after much chewing over options, YMMV. Wifi, here I have 6 different competing signals, on 430MHz only my car fob on a quick scan, but have no idea yet if the node will cause chaos if the local gypsies decide to camp in the car (as the remote locking is de-activated, time will tell 🙂 ... It is a Citroen car, already an electrical and programming challenge as most modern cars are, my lot in life for loving hydropneumatic suspension, the last of their kind I understand...
    I suggest keep an open mind on comms, the 1km range is not insurmountable, concentrate on the what, develop the how later...


Log in to reply
 

Suggested Topics

  • 4
  • 4
  • 3
  • 8
  • 9
  • 2

1
Online

11.4k
Users

11.1k
Topics

112.7k
Posts