Simple irrigation setup based on pro mini



  • Hello again 😉

    I'm planning to water some of my plants with a quite simple setup.
    Basically I want to use a pro mini with a nrf module and a moisture sensor and pump per plant.

    This leads me to the following "wiring" (sry for the humble presentation 😉 )

    0_1466537035240_upload-fd4f91d3-ccd3-4806-b4bc-374373449ace

    The arduino clone has a strange pin layout, but thats not the problem at the moment.
    Basically a want to know: will this hardware setup work?

    Some hard facts:

    • 12v input because of the pumps are 12V powered
    • arduino pro mini 5v
    • 8x relay 5v
    • HC-SR04 distance sensor for measuring water supply
    • Soil Moisture Sensors
    • 12V peristaltic pumps with max 0.8A

    There are some "problems" IMHO:

    1. too few digitial pins 😉 even when i use D2 as output/relay and not as IRQ for the radio i only have 5 pins for switching the pumps/relays. On the opposite side I can have 8 moisture sensors 😞 Or can i use analog pins as digital INPUT? Then i'd move the distance sensor to A5/A6 which results in 7 relay control pins and 6 moisture sensors => 6 plants instead of 5.
    2. too much current on vcc/GND? not sure if its a good idea to power the 8x relay, the radio, up to 8 moisture sensors and the distance sensor from the tiny pro mini. maybe i should use an external 12V to 5V voltage regulator in order to power all 5V tolerant devices (sensors and relay)
    3. can i connect the pumps directly to the relay? It should protect the arduino from power peaks when switching the pumps? I read something about "neverever power engines directly from the arduino"
    4. Anything i forgot? 😉

    I know there are some "ready2use" irrigation setups, but i want to keep it as simple as possible and want all the logic on the controller side (except some "emergency stop mechanisms 😉 )


  • Mod

    1. Yes you can use analog input as digital input if you like (but not as output). A5, A6 and A7 don't have internal pullups though so you might need to solder external pullups. EDIT: The distance sensor doesn't need pullups so you don't need to add any in this case. However, the TRIG signal to the HC-SR04 needs to be an output pin so you can't move that. You can move the moisture sensors, if you add external pullups (or buy sensors with built-in pullups).
    2. There is no way you can power everything through the voltage regulator on the Pro Mini. The absolute maximum total power rating for the Pro Mini is 150mA when powering through raw. Also note that most Arduino clones do not survive 12V raw input, and that the nrf radio needs approximately 3.3V.
    3. The relays are controlled by the output pins on the Arduino. The relays control power (12V in your case) that is coming from elsewhere. Relays often consume quite a lot of power (from the Arduino) when switching so make sure you add capacitors. You could also consider using FETs instead of relays. We've seen many threads on relay problems that were caused by power issues.
    4. Probably 🙂 But the best way to learn is to try 🙂

    An alternative to getting 8 pumps is to get 1 pump and 8 valves. That will probably be cheaper.



  • Here is my idea for you "lack or ports" 😃
    http://playground.arduino.cc/Learning/4051

    a couple of those and you should be fine watering all your plants and your neighbors ' 😉



  • Are you aware of this project that is in the build section of the site?
    https://www.mysensors.org/build/irrigation


  • Hero Member

    Another option to get more I/O for your project -> http://playground.arduino.cc/Code/I2CPortExpander8574



  • @mfalkvidd said:

    1. Yes you can use analog input as digital input if you like (but not as output). A5, A6 and A7 don't have internal pullups though so you might need to solder external pullups. EDIT: The distance sensor doesn't need pullups so you don't need to add any in this case. However, the TRIG signal to the HC-SR04 needs to be an output pin so you can't move that. You can move the moisture sensors, if you add external pullups (or buy sensors with built-in pullups).

    Ok sounds reasonable. Have to read more about that pullup/pulldown thing 😉

    1. There is no way you can power everything through the voltage regulator on the Pro Mini. The absolute maximum total power rating for the Pro Mini is 150mA when powering through raw. Also note that most Arduino clones do not survive 12V raw input, and that the nrf radio needs approximately 3.3V.

    Ok I'll use one LM2596 in order to power all components directly + another 5V=>3V voltage regulator for the radio. This should work 😄

    1. The relays are controlled by the output pins on the Arduino. The relays control power (12V in your case) that is coming from elsewhere. Relays often consume quite a lot of power (from the Arduino) when switching so make sure you add capacitors. You could also consider using FETs instead of relays. We've seen many threads on relay problems that were caused by power issues.

    Is that a problem too, when powering the relay directly from the LM2596? Otherwise i have to learn something about FETs 🙂

    1. Probably 🙂 But the best way to learn is to try 🙂

    So true 😄 the problem is the "lost" time when waiting for another china package 📦

    An alternative to getting 8 pumps is to get 1 pump and 8 valves. That will probably be cheaper.

    Hmm I did not find any cheap valves. One of the pumps is about $6. And valves cause one problem imho: they need pressure in order to work and this requires to activate the pump some seconds bevor triggering the valve => increased complexity

    @dbemowsk said:

    Are you aware of this project that is in the build section of the site?
    https://www.mysensors.org/build/irrigation

    I saw this one, but it's more a "standalone" solution imho. quite complex. I wanted just a stupid "tell me the moisture values and switch a relay"-solution 😉

    @rest:
    hmm interesting. I will read something about these components, although I'm a little bit afraid of the required code changes 😛


Log in to reply
 

Suggested Topics

  • 87
  • 6
  • 8
  • 9
  • 3
  • 7

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts