Irrigation controller

Hi All

I am embarking on a rather ambitious project, to design and build an irrigation controller for the home. I guess I have a fairly simple question to ask, but will leave that till the end of my diatribe. ]:smiley:

I haven't been involved with Arduino very long but have found it to be a very worthwhile and rewarding hobby, right up there with Astronomy and Aviation. I recently completed a remote sensor project using a Uno and Nano. The Uno, acting as the host, controlled an NRF24L01, Nokia 5110 LCD, SD card module and RTC module. The Nano, acting as the remote client, had the NRF24 and tem/hum sensor connected. I was able to successfully log date, time, temp and hum data to the SD card and LCD on the Uno.

What I learnt from this, aside from the obvious, was that I maxed out the DIO on the Uno, but more especially kept banging up against its memory limits. Which leads on to the next project, Irrigation controller. Essentially it will monitor and control about 6 irrigation solenoids.

I would like to design a unit that has the following components:

  • 6 (or 8 depending on availability) relay (off the shelf) board
  • 1 (possibly 2) LCD displays
  • 1 keypad (4x4)
  • 1 Ethernet module (not shield)
  • 1 RTC
  • 1 temp sensor (internal to enclosure)
  • 1 power control module (if required)
  • 1 enclosure (to hold the above)

I have been looking at various microcontrollers to acheive the above, but I came to the conclusion that the Mega 2560 board would be the only device capable of doing the job (as there will be about 30 DIO needed by my calclulations). I did toy with the idea of making up an ATmega 1284P prototype, but think that would add additional complexity which I probably don't need for this project.

So the ultimate goal is to produce a reliable unit, that can be used in a real life environment (0C to 50C ambient). Is the Mega 2560 my only option, and can anyone see any major showstoppers with the above?

Thanks
Bob

you should have a look at I2C It uses 4 lines (5V, GND, DATA, CLOCK).
Every I2C device has an unique number (more or less) in the range 1..127 so you could connect a lot of devices to one UNO

I2C LCD screens e.g. - LCD Shield Kit w/ 16x2 Character Display - Only 2 pins used! [BLUE AND WHITE] : ID 772 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits - or use - i2c / SPI character LCD backpack - STEMMA QT / Qwiic : ID 292 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits -
I2C RTC - ChronoDot - Ultra-precise Real Time Clock [v3] : ID 255 : $17.50 : Adafruit Industries, Unique & fun DIY electronics and kits -
I2C Relay boards - http://www.ereshop.com/shop/relays-c-143_178/i2c-bus-high-current-relay-12v-pcf8574a-p-738.html -
Keypads - Arduino Playground - I2CPortExpanderAndKeypads -

That would reduce the number of pins drastically (there are many other suppliers)

Thanks for the reply.

I understand that utilising I2C as much as possible would reduce the number of IO, however I also get the impression that I2C components appear to be more expensive than SPI etc.

So from a price perspective there wouldn't appear to be any difference between utilising a Mega compared to a Uno board, with the added benefit of more memory with the Mega.

Or am I missing something?

Cheers

you should just make up the bill of materials and see what it costs.

my experience with I2C is that it is fast enough for a system as you describe. And you only have to connect 4 wires. Especially for an LCD (normally 8+3) or relay board (8+2) that means 4 versus 21 , I like the oversight, but yes it has a price.

The MEGA has indeed (4x) more memory but I think an UNO should be able to run an irrigation system unless you have a really complicated patterns.

Have you thought about moisture sensors ? Then it can become irrigate only when needed.

One thing you might consider is that since you're going to have ethernet connectivity, you could dispense with the keypad, RTC and LCDs and control the system through a web page, either on the arduino or on a server somewhere that the arduino talks to.

Re moisture sensors, yes I would like to include them at some point, although not a great deal of call for them here. More helpful would be "sun sensors" (so the plants would hide under cover when it got too hot) :smiley:

I did however want to add flow meters at some point, as my pipe system (which covers 5 acres) is prone to "blowouts" because of the extremes in temperature.

Re the use of an Ethernet module versus onsite operation, I like to have both as there will be some people who will prefer to press buttons on a keypad, rather than via the internet. Initially I was only going to use the ethernet module for output to reduce programming complexity as well.