There are several good discussions on the forums remote monitoring. There is a general consensus of a lack of products specific to the needs of AP gardeners, hence a variety of DIY projects.
John R, fueled my thoughts with a post on using a Linux Server as a central hub/webserver that was connected to the Internet for remote viewing/control and connected to a variety of 'modules' in the greenhouse.
It is reminiscent of my early days as a Wireless Internet service provider. There wasn't a ready made solution, so we improvised, and eventually the market caught the vision and developed products. My first 10 mile wireless datalink consisted of a couple linux servers in rubbermaid totes... this can now be done with a variety of INEXPENSIVE mass produced products. Some of these products would make Ideal servers for AP systems. Low power requirements, highly reliable, extreme environments.
If we break it down to 'projects' and 'modules', collectively we could develop a working system relatively quickly.
Tags:
Oh sounds good! Looking forward to hearing more.
Thanks for putting this up. I've been rolling it around trying to find the cheapest possible solutions and a few items seem clear to me now.
Concerning webserver computers -- you can't get cheaper than free. I've easily been given a couple dozen and almost all of them booted right up. People throw out perfectly good working computers all the time. Many just need a network card to be web ready. So maybe one project for me might be to make a very small linux install CD that anyone can drop into almost any old computer and get a basic web server. All the parts to do that seem to be out there but I haven't found a complete one yet.
When it comes to attaching the modules to the computer, I can't think of a better way to do it than RS-485 serial using four wire phone cable. Phone lines and connectors are readily available and almost always have gold contacts which would really help reliability in a humid environment. Two of the wires could be used for communications and the other two for power. Converting the RS-232 serial from a computer to RS-485 can be done simple and cheap.
As far as modules go, I've been looking at the PIC chips quite a bit. They have some issues but when it comes to doing simple things and costing little they really can't be beat. One particular device I was looking at (esp. since I have some) is the 16C71. It has 4 analog inputs with 8 bit resolution and enough I/O pins to do communication. They can be had at single part quantities for about $3.50. My idea is that this unit could provide four 0 to 5V inputs that can be queried from the webserver computer and that multiple ones could be connected in a string to measure parameters over a large area.
I've got lots more but that's probably good enough for now. I'd really like some feedback on these ideas. I think I have all the parts I need to build prototypes so I'll be busy:)
John, I'd say start building. Biggest thing is if you are building such things for others, you will be dealing with helping them figure out how to use them properly.
So I guess my question is, are you working on designing a set up for yourself that you would be willing to blog or start a forum to show others how to do it and perhaps sell kits of the components to get people started? Or are you thinking more along the lines of designing a finished product that you would then get assembled and sell as a finished system?
Thanks for putting this up. I've been rolling it around trying to find the cheapest possible solutions and a few items seem clear to me now.
Concerning webserver computers -- you can't get cheaper than free. I've easily been given a couple dozen and almost all of them booted right up. People throw out perfectly good working computers all the time. Many just need a network card to be web ready. So maybe one project for me might be to make a very small linux install CD that anyone can drop into almost any old computer and get a basic web server. All the parts to do that seem to be out there but I haven't found a complete one yet.
I agree that cost is an important consideration, free computers serve a purpose for development, but the humidity of greenhouses.... I purchased 10 SBCs (single board computers) recently at an auction. They are low power but sufficient to run a web server and monitoring software. I'll attach a picture. The nice thing about these is that they can be mounted into an inexpensive Nema4 waterproof case, can be powered over ethernet (POE) with a POE injector, have two ethernet ports, serial, pcmcia, minipcibus, compact flash drive and are COMPLETELY SOLID STATE, No fans or spinning harddrives. I would be willing to ship a few to members of this group interested on co-developing.
When it comes to attaching the modules to the computer, I can't think of a better way to do it than RS-485 serial using four wire phone cable. Phone lines and connectors are readily available and almost always have gold contacts which would really help reliability in a humid environment. Two of the wires could be used for communications and the other two for power. Converting the RS-232 serial from a computer to RS-485 can be done simple and cheap.
100% agree. RS485, RJ45 connectors. Add to that a power supply sent over the unused pairs of wire in the Cat5 cable. (look up power over ethernet POE). There are watertight RJ45 connectors readily available.
As far as modules go, I've been looking at the PIC chips quite a bit. They have some issues but when it comes to doing simple things and costing little they really can't be beat. One particular device I was looking at (esp. since I have some) is the 16C71. It has 4 analog inputs with 8 bit resolution and enough I/O pins to do communication. They can be had at single part quantities for about $3.50. My idea is that this unit could provide four 0 to 5V inputs that can be queried from the webserver computer and that multiple ones could be connected in a string to measure parameters over a large area.
I am a newbie to controllers but look forward to the learning curve.
I've got lots more but that's probably good enough for now. I'd really like some feedback on these ideas. I think I have all the parts I need to build prototypes so I'll be busy:)
TCLynx -- what you said, ur... Yes! Getting started building something... Done. What I'm going to do later, not so sure. I want to see how it all works first and what the final bill of materials will look like. Ideas are easy, hardware is, well, hard:)
What I'd like to be able to do is provide stuff very cheap, probably giving away the web server software (so that people who want to make it work on other platforms can do it and I don't have to) and selling empty boards and pre-programmed chips plus fully assembled modules. Selling kits would be nice but if there is any quantity at all it becomes cheaper to sell things fully assembled. At least it was the last time I looked into it in detail.
Darrin -- those SBC's sound sweet. I bought a couple of atom based systems from mini-box and I really like them. They use about 12 watts and are decently powerful but not really as powerful as their clock rate would imply. What are your's based on? And how much memory? Have you installed linux on any and what distro did you use? I've been looking for distro's that don't requre much memory or cpu. xubuntu worked pretty well on an old machine I had around. I'm with you that any standard computer won't live long in a greenhouse. But I wasn't thinking that. Most small system (vs commercial) will have a benign place to put the computer in and then run the communications link to the greenhouse.
I wasn't really thinking of POE or RJ-45 or CAT5 since those are all industrial specifications with the associate price premium. Phone cord and connectors are widely available and cost about 10 times less. There are issues and they won't be as robust but its certainly workable for a smaller, residential based system. I think the commercial market is already well supplied. I'd like to keep everything just as cheap as possible. It may not be possible but that's where I'd like to start. I found this circuit for an optically isolated RS-232 to RS-485 converter:
http://freecircuitdiagram.com/2009/03/24/rs232-to-rs485-converter/Just for reference. I think I'll try something non-isolated to start with and have the RS-485 driver powered by the serial port
if possible. It may actually be easier and more reliable to do something similiar to the circuit described and have the RS-485 driver powered by the same supply that powers the module string. Testing will tell:)
John R,
You mentioned that the PIC chip can be queried by the web server. Can you elaborate a little more on how that would work? Is there a C program on the server to do the RS-232/RS-485 communication?
I’ve been thinking of building a control system and also came to the conclusion that using RS-485 to connect to external devices would be the way to go. But in my case, I have no experience in working with hardware, so I was considering using off the shelf components, more specifically components that support the MODBUS protocol. I am more interested in building the application to query and control the devices.
As you stated, prebuilt components are expensive, but I did find this relatively cheap component that connects MODBUS to one-wire devices, and one-wire devices tend to be much more affordable, so I planned to explore that route. But if you come up with a low cost fully assembled solution then I would certainly be interested in that.
TCLynx -- what you said, ur... Yes! Getting started building something... Done. What I'm going to do later, not so sure. I want to see how it all works first and what the final bill of materials will look like. Ideas are easy, hardware is, well, hard:)
What I'd like to be able to do is provide stuff very cheap, probably giving away the web server software (so that people who want to make it work on other platforms can do it and I don't have to) and selling empty boards and pre-programmed chips plus fully assembled modules. Selling kits would be nice but if there is any quantity at all it becomes cheaper to sell things fully assembled. At least it was the last time I looked into it in detail.
Darrin -- those SBC's sound sweet. I bought a couple of atom based systems from mini-box and I really like them. They use about 12 watts and are decently powerful but not really as powerful as their clock rate would imply. What are your's based on? And how much memory? Have you installed linux on any and what distro did you use? I've been looking for distro's that don't requre much memory or cpu. xubuntu worked pretty well on an old machine I had around. I'm with you that any standard computer won't live long in a greenhouse. But I wasn't thinking that. Most small system (vs commercial) will have a benign place to put the computer in and then run the communications link to the greenhouse.
I wasn't really thinking of POE or RJ-45 or CAT5 since those are all industrial specifications with the associate price premium. Phone cord and connectors are widely available and cost about 10 times less. There are issues and they won't be as robust but its certainly workable for a smaller, residential based system. I think the commercial market is already well supplied. I'd like to keep everything just as cheap as possible. It may not be possible but that's where I'd like to start. I found this circuit for an optically isolated RS-232 to RS-485 converter:
http://freecircuitdiagram.com/2009/03/24/rs232-to-rs485-converter/
Just for reference. I think I'll try something non-isolated to start with and have the RS-485 driver powered by the serial port
if possible. It may actually be easier and more reliable to do something similiar to the circuit described and have the RS-485 driver powered by the same supply that powers the module string. Testing will tell:)
Hello!
This is exactly what I needed -- motivation! New, even cooler job, new house in a new city, old house to sell, yada yada. So I've been busy and the AP stuff has taken a back seat. I just got my little inside AP system cycling last weekend.
I've been working on getting my monitoring code released as GPL'ed open source free software but its been slow going with all the other demands. The motivation will go a long way. In particular, I have a program written that queries a MorningStar SunSaver MPPT charge controller on one second intervals. That device uses MODBUS via a RS-485 to RS-232 controller but the underlying library, libmodbus, does understand addressing I believe. I'll try to get that program up on the web very soon -- maybe tonight. It dumps the data into a dated file in text so using some other application to do whatever should be really easy. Its at least a starting point for your own code and its written in C.
About the RS-485 / PIC chip system. I've got a start on it but there is still a lot of work to do. The price sure looks right - I've found a PIC that handles 4 analog channels for less than $3 and with everything else it looks like a module could be less than $10 in parts. If you (or anyone else) is interested in something like this, please let me know and I'll redouble my efforts.
John
daryl55555 said:
John R,
You mentioned that the PIC chip can be queried by the web server. Can you elaborate a little more on how that would work? Is there a C program on the server to do the RS-232/RS-485 communication?
I’ve been thinking of building a control system and also came to the conclusion that using RS-485 to connect to external devices would be the way to go. But in my case, I have no experience in working with hardware, so I was considering using off the shelf components, more specifically components that support the MODBUS protocol. I am more interested in building the application to query and control the devices.
As you stated, prebuilt components are expensive, but I did find this relatively cheap component that connects MODBUS to one-wire devices, and one-wire devices tend to be much more affordable, so I planned to explore that route. But if you come up with a low cost fully assembled solution then I would certainly be interested in that.
John,
Congrats on the new job/house/city, sounds like you have been busy! I’m impressed that you’re able to even think about an AP system with all of that going on!
Thanks for the info on the monitoring software, that gives me some insight on how an external system could interface with it. A text file interface is a good way to do it, although it sounds like the external system would be display only and would not be able to control anything. Depending on the application, maybe that is all that is needed.
I think the ideal setup might be to have lower level systems as completely autonomous systems that are reliable and run automatically (which I think is what you have). Then there could be an external system that could interface with it, and other sub-systems, to display information and set parameters on the sub-systems to allow some level of control over them. I think what I am describing is a SCADA system. That could be over-kill for an AP system but might be a good option if you end up with a lot of sub systems to manage.
I was going down the path of creating a full fledged java J2EE web based application using (Spring, maven, tomcat, and a bunch of other components) and a relational database backend, which is also overkill, but since I do that in my day job It’s quicker for me then using something else. There is an open source java module with a modbus interface, so I planned to query devices directly with that where appropriate. Java is not a programming language that most people think about when they consider control systems, but for a SCADA system it might actually work pretty well.
For now, I already have the modbus to 1-wire hardware module and a couple of temperature sensors. I’m going to try to finish what I started and get that working with my java application. Please keep me posted on the PIC chip system and other projects your working on, I find that very interesting.
Daryl
Great discussion here. I'll probably create a separate discussion for what I'm doing, and itemize all the pieces. But it's a hybrid of some of what was described above. I'm going to start with a laptop running EPICS open-source control system. That has TONS of stuff available from graphical control display editors to state machines, although it's certainly not an out-of-the-box thing, and will talk to just about anything, including MODBUS. I'll do the actual I/O with a cheap Koyo PLC. Then pile on the sensors and actuators. For sensors, I'll start with pH, DO, ORP, and temp. For actuators, remote controlled outlets, and a relay-controllable fish feeder. This should all plug into the PLC easily.
Once up and running, all the sensors and actuators are readily accessed as process variables. Creating web pages for remote control is certainly possible at that point, although I plan to keep it local for the time being.
Hi,
Just an FYI, we are currently in the closing phases of a controller design for aquaponics. We will have 3 different versions, one controller is strickly for thermal control. It is designed to work with our new heat exchanger and facilitate non-electrical water heating, ie, gas, boiler, solar or combinations of those. For example, a gas instant hot water heater providing backup heating to solar heat.
The 2nd version adds 5 more inputs and switches. Inputs can be optional sensors for PH, DO, EC, ORP, Light, Tank Temperature, Outside Temperature, Inside temp, humidity, Motion Dector, etc. Switches (relays) can then be activated using any collected data. For example, If it gets below 40 degrees, turn my pumps off at night, or open the vents, or turn on the fans if it is too hot or humid. Visual Indicator Lights for Sensor and audible alarms are an option. If there is enough interest we can easily add an ethernet and/or wireless option.
Timers are of course available for any switches, to run pumps, fans or what ever, either cyclic or date/time based.
The 3rd version is the same offering but allows for more inputs and switches.
Will post progress, 1st boards due to go to production late next week.
Anybody looking for something special let me know.
Iv'e looked a bit at longer term control system growth issues as well as the emerging front runners, of Linux based Hobbyest/maker embedded Linux control platforms...
As far as out of the Box, and up and running as as an embeaded Web server... I'm not sure how long it will be for Rasbery_Pi ..$35... to catch up with the BeagleBone ..$89 I'm leaning towards this BeagleBoard dirivative as it already runs a Node.JS control oriented web server.. Given that Texas Instruments has apparently decided to take a leading role in the empowerment of the maker oriented community. This seems like a good bet.... I bring up this point as at this point, it remains unclear how open the Broadcom chip on Basbery_Pi will end up being...
For hardwired glue / safety logic to bring all of the digital pieces together... As a staring off point I'm looking at the really cool MachXO2 1200ZE Breakout Board from Lattice Semiconductor..
For driving valves, I might be usingthis Logo's Elec Hi_Side Driver Board until we can design a custom, extensible Aquaponics system interface board that might have one of the above Lattice FPGA's at it core (with logic programmed in Veilog)... Utilizing this FPGA would leave the systems hardware architecture open to further tailoring for longer term growth.
Hope this helps
-Peter
© 2024 Created by Sylvia Bernstein. Powered by