sampazzer
Posts: 30
Joined: Wed Nov 13, 2013 7:57 pm

Greenhouse Automation

Wed Nov 13, 2013 8:15 pm

Hi everyone!

Just as a quick background - I work as a technician in the process automation industry and I have a mini project at home to do some automation for a friends greenhouse.

I'm looking to use the Pi as basically a mini PLC. I will be controlling a venting and sprinkling system via temperature and humidity inputs.

My question is.... Is the Pi capable of this type of thing and if so, does it take in 4...20 mA loop current directly so that I can A to D convert it or would I have to do this outside of the Pi? In the future I will also be looking to 'future proof' the system by allowing my friend to control the parameters wirelessly from a smartphone or computer.

If I have confused anything please don't hesitate to ask as I'm really excited at the prospect of this project and the Pi seems a perfect starting place.

Any information would be greatly appreciated.

User avatar
DougieLawson
Posts: 35805
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Greenhouse Automation

Wed Nov 13, 2013 11:23 pm

There's an article on this in Issue 18 of The MagPi.
http://www.themagpi.com/issue/issue-18/pdf/
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Greenhouse Automation

Wed Nov 13, 2013 11:43 pm

Hi,
sampazzer wrote:My question is.... Is the Pi capable of this type of thing
Yes. I'd say that RasPi is currently the best fit.
sampazzer wrote:does it take in 4...20 mA loop current directly
No. Additional converter is needed.
sampazzer wrote:In the future I will also be looking to 'future proof' the system by allowing my friend to control the parameters wirelessly from a smartphone or computer.
Another reason to pick RasPi. ;-)
sampazzer wrote:If I have confused anything please don't hesitate to ask
Your questions were very clear... and general. :-)
sampazzer wrote:I'm really excited at the prospect of this project and the Pi seems a perfect starting place.
Welcome to the club. :-)


Best wishes, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

sampazzer
Posts: 30
Joined: Wed Nov 13, 2013 7:57 pm

Re: Greenhouse Automation

Thu Nov 14, 2013 5:36 pm

Hey guys thanks for your reply's. Ill definitely have a read of that magazine, looks like its got some useful information with the quick glance I had earlier.

With regards to interfacing the 4...20mA signals to the Pi, does anyone have any suggestions for the hardware that would be best to achieve this.

Also what language would be best to code in for the automation control, I'm used to only really using ladder with PLC's.

Again, any information would be great and thanks again for the already swift reply's!

User avatar
FLYFISH TECHNOLOGIES
Posts: 1750
Joined: Thu Oct 03, 2013 7:48 am
Location: Ljubljana, Slovenia
Contact: Website

Re: Greenhouse Automation

Thu Nov 14, 2013 6:19 pm

Hi,
sampazzer wrote:With regards to interfacing the 4...20mA signals to the Pi, does anyone have any suggestions for the hardware that would be best to achieve this.
If you're planning to solder the hardware on your own, needed parts for 4..20mA receiver are:
- a resistor (eg. 150 ohm, tolerance less than 1%)
- A/D converter chip (eg. 3.3V SPI A/D converter - tons of them are available, chose according to resolution required...)
- a couple of capacitors (100nF + 4.7uF) close to A/D,
- optionally, a couple of protection schottky diodes on the A/D input,

A/D measures voltage drop on the resistor.

Pay attention to potentials - eg. if RasPi would have the same power supply as this current loop, make sure that this receiver's resistor is located in the loop located next to GND.
sampazzer wrote:Also what language would be best to code in for the automation control, I'm used to only really using ladder with PLC's.
In this proposed setup, any language that can talk to SPI is ok. I'd say that Python is the preferred one in this forum. (But I prefer C instead anyway. 8-) )


Best regards, Ivan Zilic.
Running out of GPIO pins and/or need to read analog values?
Solution: http://www.flyfish-tech.com/FF32

JMGSE
Posts: 7
Joined: Thu Dec 31, 2015 10:01 pm

Re: Greenhouse Automation

Tue Mar 21, 2017 10:10 am

DougieLawson wrote:There's an article on this in Issue 18 of The MagPi.
http://www.themagpi.com/issue/issue-18/pdf/
Hej
I know that this is little older thread but I´ve tryed use the link and thats a dead end. Did anyone have the pdf and can make it downloadable ?

WBR
Jörg from Sweden

By the way: I´m trying to automateMy greenhouses and searching for all about it. Did exist a list of links or did one have a ready to use projekt. I want to use it for vent and watering and connect it with My weatherstation WH1080

Thanks for hälp



Return to “Automation, sensing and robotics”