Author Topic: Moteino Based Sprinkler Controler  (Read 20784 times)

billchurch

  • NewMember
  • *
  • Posts: 12
Moteino Based Sprinkler Controler
« on: October 27, 2013, 10:52:45 AM »
Not a completed project, but just starting. I have a 2 zone sprinkler system currently (will probably expand) and I hate the controller.

I've seen some of the projects out there, but I really like the Moteino platform.

My thoughts are:

- Ability to turn the zones on and off remotely at will
- Ability to load and run a schedule
- Input for rain sensor
- Input for soil moisture meter (to bypass a schedule if ground is saturated)
-- Maybe add the ability for a "MoistureMote" to locate this sensor farther away from the controller, could be polled periodically.
- Input for external temperature / humidity sensor (why not?)

What we'd need for a shield:
- an RTC (if you wan to run schedules, could make this optional and have the schedules controlled by a Rpi or something else).
- SSRs / diodes for a few zones, I have to see what the current ratings are for a "typical" sprinkler valve are
-- These from GarageMote **should** work I think http://lowpowerlab.com/shop/JRC-23F-003
- screw terminals for connection to sprinkler valves and sensors

Any other thoughts?



Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6531
  • Country: us
    • LowPowerLab
Re: Moteino Based Sprinkler Controler
« Reply #1 on: October 27, 2013, 08:00:41 PM »
Spot on, another one of the things I want to get to eventually.
My controller is fairly good, but still hate it a little bit. I'd love something I can control at will, or use a moisture sensor like you said. Mine has a rain sensor but I think soil moisture sensor would make more sense. There's the OpenSprinkler project which looks pretty nice.
I think triacs would work better than relays, easier to control and assemble. That's what my current controller has and the same thing in OpenSprinkler I believe.

So yes it's on my long list of things *TO GET TO*. Hoping sooner rather than later, cause it's one of the cooler things.
I think this project would be a little more feasible than other mains powered things since it's low voltage, so less to worry about.

KanyonKris

  • Full Member
  • ***
  • Posts: 113
Re: Moteino Based Sprinkler Controler
« Reply #2 on: November 26, 2013, 09:06:48 AM »
Lots of good ideas.

I switched to a new controller this year based on a RaspberryPi. OpenSprinkler has an interface board for the Pi that's very nice but also $80, so I used a cheap relay board instead (solid state relay boards are also available at ~2x the price of a relay board, but still fairly cheap). The standard program is Python and works well, also very easy to change to your needs. It would be easy to add a Moteino to the Pi. Check out the OpenSprinkler project for more info, especially the forums, lots of good info there.

merge

  • NewMember
  • *
  • Posts: 5
Re: Moteino Based Sprinkler Controler
« Reply #3 on: March 07, 2014, 12:11:15 AM »
I stumbled upon Moteino a few days ago, and like you thought of the sprinkler controller.

However the approach I'd like to take is to make a Moteino shield  to switch 24VAC loads with triacs.  4 loads per shield, with a header to cascade a second shield.   The smarts would come from the linux server in the garage.  The two would talk over RF of course with some simple protocol, including a watchdog of some sort

so planned design details include...
- Moteino power sourced from 24VAC solenoid power.
- Linux server would need its own Moteino connected to a serial port, or maybe just the USB version.
- Linux scripts to turn on/off relays.
- Cron job to run scripts as needed.
- possible (linux) web page for remote status and control
- possible (linux) connection to weather report.
- possible 7-segment display on shield.

Plan to make the board on oshpark.org, but the arduino coding will be a new thing for me.
anyway, let me know what you think...

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6531
  • Country: us
    • LowPowerLab
Re: Moteino Based Sprinkler Controler
« Reply #4 on: March 07, 2014, 07:40:11 AM »
Yeah I was hoping I would get some time to make something like that at some point to wirelessly control my sprinklers. There's the open sprinkler project which I think is worth taking a look at: http://rayshobby.net/?page_id=160

The only small challenge would be to get your low DC voltage from the 24VAC which can be done with a switching regulator.... then add everything else like Ray did, and a Moteino header and you're all set :)
If you end up designing this please keep us updated in this thread, I'd love to see it coming into being :D

merge

  • NewMember
  • *
  • Posts: 5
Re: Moteino Based Sprinkler Controler
« Reply #5 on: March 10, 2014, 01:25:06 AM »
I went ahead and designed something up.  4 channels, 40x60mm with pluggable terminal blocks (1x8 for output, 1x2 for AC in).  images attached.  Still at placement stage - not routed yet, but that shouldn't be a  problem.  Any comments are appreciated.

It would be helpful to have a model of the Moteino in both forms, just to be sure there is no interference problem.  If anyone has step files I'd appreciate it.


Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6531
  • Country: us
    • LowPowerLab
Re: Moteino Based Sprinkler Controler
« Reply #6 on: March 10, 2014, 09:00:34 AM »
Nice design!
Unfortunately I don't have a model for Moteino, maybe someone else has one...
A few thoughts:

- I see you have 2 boards with the 2x4 mating headers, from what I can tell the Moteino ends up between them, so that might be a tight fit, even though Moteino is not a very thick PCB
- I have a 12 zone(9 wired/used) zone sprinkler system, so it would be nice to have an expandable main board. How about a shift register expandable driver solution? I don't know what is main stream in terms of zoning, but maybe a multiple of 4 makes sense. I'm thinking 8 is a good starting number which should cover most houses. Then 4X and 8X expansions could be added.

merge

  • NewMember
  • *
  • Posts: 5
Re: Moteino Based Sprinkler Controler
« Reply #7 on: March 10, 2014, 06:34:03 PM »
the motieno would be on top.  I don't know if I have the order correct or not in the design, but that's the idea. 

I kept it small because OSHPark will give you 3 copies of your board but charge by sqin of one board, and in my case it works out to have the doubled board in front of the house and the single out back.

The serial idea is good.  If I were to do it, I'd use one of the Microchip SPI or IIC expansion chips, but ths would be a different design - a different board.   I don't think there's anything stopping on from using the expansion header for that purpose, other than it's on the wrong side of the board.

I'll think it over and maybe change it around to support that method of expansion better.

Thanks for your comments.

merge

  • NewMember
  • *
  • Posts: 5
Re: Moteino Based Sprinkler Controler
« Reply #8 on: March 18, 2014, 10:28:20 PM »
Well, I took your advice and changed it somewhat.  There will be a carrier with Moteino, AC-DC converter and two "grove" connectors for LCD and sprinkler output.  These will provide 5VDC and I2C.

Then you connect an 8-channel 24VAC solenoid driver to it.  You can use the other connector to add an I2C LCD screen/keypad, and you can cascade additional 8 channel boards if needed.  These driver boards use Microchip MCP23008 expansion chips, and have a 3-bit address switch, so you can add up to 8 MCP23008's.

the driver board is 45x65mm, the carrier will be about twice the moteino size.

schematic and images attached.  Any input, including links to using MCP23008 with Moteino would be appreciated.

I'll try to post the carrier soon, and layout the attached unit.  May take some time to get around to it.

Please note that this will not be 120/230VAC capable!  spacing will be too tight - It'd have to be about 2x the size for that.  Plus I don't want to be responsible for that!

luisr320

  • Sr. Member
  • ****
  • Posts: 255
  • Country: pt
Re: Moteino Based Sprinkler Controler
« Reply #9 on: August 15, 2014, 02:38:14 PM »
Hi!
Any new developments on this project?

merge

  • NewMember
  • *
  • Posts: 5
Re: Moteino Based Sprinkler Controler
« Reply #10 on: August 20, 2014, 01:49:37 AM »
some.  i re-did the 8x triac driver board to take in I2C, thinking that would make it more flexible.  one could add an I2C keypad, or more boards and connect it to a moteino over i2c.  anyway, i can restart that soon i think, and more importantly start work on the software.

here's the link to the shared board project...
https://oshpark.com/shared_projects/Ic23AFof

also i'm in california and stopped watering due to drought.  looking forward to a el-nino winter though and hope to see some changes soon.

hexibot43

  • Jr. Member
  • **
  • Posts: 78
Re: Moteino Based Sprinkler Controler
« Reply #11 on: August 26, 2014, 12:33:56 AM »
also i'm in california and stopped watering due to drought.  looking forward to a el-nino winter though and hope to see some changes soon.

I second that! 


ieris

  • NewMember
  • *
  • Posts: 38
  • Country: lv
Re: Moteino Based Sprinkler Controler
« Reply #12 on: November 06, 2014, 03:05:06 AM »
Hello,
  first I would like to say big thanks to Felix for his superior work! I'm reading your blog from early begging. Keep going the same way!

I have working on several projects for home automation and one of them are similar to sprinkler hw and can be adapted. What is it, I will keep as secret for now. :)
My initial revision had possibility to control 8 zones(5V logic support), hardware pulse debounce, OneWire connector, but now I need to control more and I'am on the way of building it expandable. There are my initial version picture of RelayMote v1.0:


So, the new one will use shift register to control stuff. And will be expandable with possibility to control <50V devices w/o additional board. But if you want, you can add Relay, SSR, etc board to control bigger power sources.
Currently I'm thinking to include or not include on board 24VAC to 5V switching regulator. I would like to hear your comments. My project do not need it, as I'm trying to keep it small as possible to make it universal, but to be compatible with sprinkler functionality seems it must have it.
If skipping then by example we can add cheap LM2596S Chinese board to get needed voltage for power.
If to include then which one solution to implement LM2596S-5.0, MC34063/MC33063 or some other?

Waiting for comments and questions. :)

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6531
  • Country: us
    • LowPowerLab
Re: Moteino Based Sprinkler Controler
« Reply #13 on: November 06, 2014, 11:22:58 AM »
Regulating from a high voltage to 5V or 3.3V I would recommend the LM2596 switching regulator or an alternative, and not a linear regulator.

ieris

  • NewMember
  • *
  • Posts: 38
  • Country: lv
Re: Moteino Based Sprinkler Controler
« Reply #14 on: November 06, 2014, 01:55:58 PM »
Regulating from a high voltage to 5V or 3.3V I would recommend the LM2596 switching regulator or an alternative, and not a linear regulator.
Thank you. Will think how to add it, maybe as a module.

TomWS

  • Hero Member
  • *****
  • Posts: 1929
Re: Moteino Based Sprinkler Controler
« Reply #15 on: November 06, 2014, 06:08:28 PM »
I agree with Felix, there are plenty of these modules on eBay (even on Amazon), just look for "Buck switching".  The modules are small, reliable, efficient, can take up to 35V DC input, and support up to 3A output.  The output is usually adjustable from ~3V to input-2 volts or so...

Tom


ColinR

  • Full Member
  • ***
  • Posts: 176
CuPID Controls :: Open Source browser-based sensor and device control
Interfaceinnovations.org/cupidcontrols.html
cupidcontrols.com

RGrandall

  • NewMember
  • *
  • Posts: 1
Re: Moteino Based Sprinkler Controler
« Reply #17 on: July 22, 2015, 07:12:13 PM »
Mine has a rain sensor but I think soil moisture sensor would make more sense.
Any suggestions on a sensor that would work? I already have this soil moisture meter and was wondering if it would feasibly work or not. It's extremely low power and seems to be pretty durable. I suppose that I could get a new sensor, but I always like being frugal where I can... Thanks for the help/input.

thinkpeace

  • NewMember
  • *
  • Posts: 27
Re: Moteino Based Sprinkler Controler
« Reply #18 on: July 24, 2015, 05:51:02 PM »
RGrandall,

I made my own soil moisture sensor that works great and is inexpensive to make.  It measures the effect of the surrounding soil on the capacitance between two metal rings. 

There are cheap sensors that measure conductivity and how-to's on making conductivity type moisture sensors on the internet.  The conductivity is effected considerably by the amount of minerals in the water & soil in addition to the soil moisture, so it is not very accurate.  Measuring capacitance works much better, and is how the Vernier soil moisture sensor works.

I used this circuit: http://forums.adafruit.com/viewtopic.php?f=25&p=88077

To make the sensor, I used a 14" sprinkler riser pipe, and put two rings of conductive 1/2" copper tape around the pipe near the bottom end.  The rings are separated by about 2 millimeters. 

I drilled a small hole between the two metal rings. 

Then I soldered 24-30 gauge wire to the rings and fed it through the holes and out the bottom end of the pipe. 

I covered the entire pipe except for the pipe threads with shrink tubing.

I made a small 555 timer circuit which goes inside the pipe and soldered the wires from the rings to the circuit.  The rings are the capacitor being measured in this circuit .   I made a custom PCB for this, though originally I used an SMT breakout board with an SMT 555 IC: http://www.adafruit.com/products/1212. Be sure to use a 555 timer that works at 3.3V.

Three wires run from the circuit up through the opening on the other end of the pipe, into a box containing a Moetino: 3.3V, Gnd and Signal.

I closed up the bottom of the pipe with a threaded end-cap.

I calibrated it using a Vernier soil moisture sensor ($95) as a reference.  The manual for the Vernier sensor also has instructions on how to calibrate their sensor.  These instructions could be used to calibrate any soil moisture sensor: http://www.vernier.com/files/manuals/sms-bta.pdf.

It's been working great, and is in my garden now.   The information from my sensor is published to a web-server, so I can view data from anywhere.  The data goes to a Rapbery-Pi Gateway, and from there is sent to the web-server .

TomWS

  • Hero Member
  • *****
  • Posts: 1929
Re: Moteino Based Sprinkler Controler
« Reply #19 on: July 24, 2015, 06:45:38 PM »
Interesting.  I've heard of using capacitance before but haven't seen a circuit.  Do you know (approximately) what the capacitance range is?  Or, alternatively, what timing resistors and resulting frequency range is?

When you said you run the wires from inside to the bottom of the riser, but then wire to the 555 circuit inside the riser, I have to admit being confused by this.  Wouldn't you just keep the wires inside the pipe?

Finally, do you place the riser horizontally or vertically and how deep are the copper tape bands?

Thanks for posting, I'm always looking for a reasonably accurate moisture sensor.

Tom

thinkpeace

  • NewMember
  • *
  • Posts: 27
Re: Moteino Based Sprinkler Controler
« Reply #20 on: July 25, 2015, 12:17:08 AM »
TomWS, 

I used the same resistors and capacitor as shown in the schematic, http://forums.adafruit.com/viewtopic.php?f=25&p=88077.  This seems to work well for the soil moisture sensor.

I run the wires from the rings out the bottom of the pipe, and 3 wires from the top of the pipe to the bottom of the pipe.  Then I solder the wires coming out of the bottom of the pipe to the PCB, and push the PCB into the riser pipe, so nothing is coming out of the bottom.  Then there are three wires coming out of the top of the pipe.  These connect to the moteino.  The 1/2" riser pipe can thread into an outdoor outlet box.

I place the riser pipe vertically in the ground about 10" deep.  It's a 1/2" x 14" or 18" pipe.  You'll want it to be in the root zone of the plants.

I'm thinking of making one with multiple sensors on one pipe, to measure moisture at different depths.

TomWS

  • Hero Member
  • *****
  • Posts: 1929
Re: Moteino Based Sprinkler Controler
« Reply #21 on: July 25, 2015, 10:17:40 AM »
TomWS, 

I used the same resistors and capacitor as shown in the schematic, http://forums.adafruit.com/viewtopic.php?f=25&p=88077.  This seems to work well for the soil moisture sensor.

I run the wires from the rings out the bottom of the pipe, and 3 wires from the top of the pipe to the bottom of the pipe.  Then I solder the wires coming out of the bottom of the pipe to the PCB, and push the PCB into the riser pipe, so nothing is coming out of the bottom.  Then there are three wires coming out of the top of the pipe.  These connect to the moteino.  The 1/2" riser pipe can thread into an outdoor outlet box.

I place the riser pipe vertically in the ground about 10" deep.  It's a 1/2" x 14" or 18" pipe.  You'll want it to be in the root zone of the plants.

I'm thinking of making one with multiple sensors on one pipe, to measure moisture at different depths.
Ok, makes sense now.  Thanks.

Here's the circuit I've used for years (http://emesystems.com/pdfs/SMX.pdf - I made my own and didn't use their module) and has been reliable but the Watermark probe is expensive ($35++).  Given its construction, it's relatively immune to minerals in the ground water however.  Note that the circuit is not open hardware licensed.   Personal use ok, sharing isn't...

I use the frequency counter library: http://interface.khm.de/index.php/lab/interfaces-advanced/arduino-frequency-counter-library/  to monitor the frequency due to moisture.

I also added a DS18B20 temperature probe tie wrapped to the Watermark probe because the Watermark probe does need temperature compensation.  Does yours?

I've added this circuit to my latest Moteino based Sprinkler Valve (https://lowpowerlab.com/forum/index.php/topic,1046.0.html) so I have a single control point for monitoring and irrigating a zone.

Thanks for posting,
Tom
« Last Edit: July 25, 2015, 11:03:26 AM by TomWS »

thinkpeace

  • NewMember
  • *
  • Posts: 27
Re: Moteino Based Sprinkler Controler
« Reply #22 on: July 25, 2015, 01:35:05 PM »
TomWS,

The Watermark circuit is probably based on one in the public domain.  Here I found the almost identical circuit elsewhere: http://emesystems.com/OL2mhos.htm.

I'm not doing any temperature correction.  The temperature does have an effect on the measurement of capacitance.  The correction depends on the characteristics of the soil.  One method of calculating the correction factors is by looking at the change in measurement of capacitance along with changes in temperature as the sun rises.  The idea is that as the soil warms in the morning, the amount of moisture will change very little. http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3444127/

Maybe some day I'll have time to write a function to do the calculations and correct for temperature.  If you should implement something like this, please post it to this topic :-)

Eric






TomWS

  • Hero Member
  • *****
  • Posts: 1929
Re: Moteino Based Sprinkler Controler
« Reply #23 on: July 25, 2015, 02:07:31 PM »
The Watermark circuit is probably based on one in the public domain.  Here I found the almost identical circuit elsewhere: http://emesystems.com/OL2mhos.htm.
Well, I wouldn't assume that the owner of that circuit (who is the same as the PDF I referenced) is freely licensing this circuit for commercial purposes since there is no explicit statement to that effect.
Quote
Maybe some day I'll have time to write a function to do the calculations and correct for temperature.  If you should implement something like this, please post it to this topic :-)
Will do. 

Tom

EloyP

  • Jr. Member
  • **
  • Posts: 58
Re: Moteino Based Sprinkler Controler
« Reply #24 on: July 26, 2015, 10:30:51 AM »
For a while I have been keeping an eye on an open source sensor by a guy in Lithuania that uses capacitive humidity sensing. I have not used it yet but I am planning on getting one in the near future. What I like about this sensor is that the author has done a lot of experimentation and research, and his product is being sold on sites like Tindie and Adafruit with good reviews. The project's home page is:

http://wemakethings.net/chirp/

The "Moisture sensing" section has a link to a detailed blog post of how his sensor works:

http://wemakethings.net/2012/09/26/capacitance_measurement/

The "History" section gives an idea of how much effort this guy has put into designing this sensor.

Note that the Chirp is a plant watering alarm. However, the author also sells the standalone sensor for a little bit less:

https://www.tindie.com/products/miceuz/i2c-soil-moisture-sensor/

This sensor has an I2C interface but based on the project's Github repository (https://github.com/Miceuz/i2c-moisture-sensor) the author seems to be working on sensors with analog and RS-485 interfaces.

Cheers,

Eloy Paris.-

TomWS

  • Hero Member
  • *****
  • Posts: 1929
Re: Moteino Based Sprinkler Controler
« Reply #25 on: July 26, 2015, 02:56:58 PM »
I think you should get one! Maybe two.  By Fall!   ;D

Tom

EloyP

  • Jr. Member
  • **
  • Posts: 58
Re: Moteino Based Sprinkler Controler
« Reply #26 on: July 26, 2015, 03:50:51 PM »
I think you should get one! Maybe two.  By Fall!   ;D

Yes indeed! Seems like a good compromise (cost-wise) between the Vegetronix VH400, the WATERMARK and DIY  :)

Cheers!

luisr320

  • Sr. Member
  • ****
  • Posts: 255
  • Country: pt
Re: Moteino Based Sprinkler Controler
« Reply #27 on: July 29, 2015, 08:28:23 AM »
some.  i re-did the 8x triac driver board to take in I2C, thinking that would make it more flexible.  one could add an I2C keypad, or more boards and connect it to a moteino over i2c.  anyway, i can restart that soon i think, and more importantly start work on the software.

here's the link to the shared board project...
https://oshpark.com/shared_projects/Ic23AFof

also i'm in california and stopped watering due to drought.  looking forward to a el-nino winter though and hope to see some changes soon.

Hello Merge.
Somehow this topic drifted to a soil moister sensor and your project got buried a couple of messages back.
As I understand your idea, there will be a board with the moteino to connect to the ones you made available on Oshpark.com (https://oshpark.com/shared_projects/Ic23AFof).
Did you continue your work on this board? And what about the software part? Any new developments?