Super Cheap DIY Computer Automation / Monitoring / Control

Aleister93

Active Member
There are a couple of great threads on growroom automation on this forum, but most of them seem to me to be high cost and/or require vast technical skill to pull off.

This thread is to present ideas on how to do monitoring/control as cheaply as possible. One good way to achieve this is to use old PCs as the heart of your monitor/control system.

I'm fairly comfortable with PCs. Using a PC to gather data and control devices/processes has the advantage that it facilitates making your information remotely accessible by internet. Plus, I already have a lot of old computers laying around, which thrills my inner Scotsman beyond measure. A few random notes in regard to this follow.

My criteria are: a) cheapness b) cheapness c) ease of implementation d) flexibility e) accessible by internet if at all possible. I welcome all contributions to this thread that are in aid of these goals.

1) Dataq makes some cheap ($25-$50) hobby model data loggers (multi-channel A/D with either serial or USB inputs) these seem to me like they would be highly adaptable to simultaneously measuring temperature, humidity, ph, and EC/TDS. They also have interfaces available in Active X and in the case of the serial model, C++, so development could be done without re-inventing the wheel.
http://www.dataq.com/products/startkit/di194rs.htm
http://www.dataq.com/products/startkit/di148.htm
I used a similar device in an old soil grow I did, to monitor soil moisture. It was the ultimate in ease and cheapness: I attached steel spikes to the device inputs and shoved them in pairs into the soil. As soil moisture decreases, resistance increases, input falls. At the time, Dataq had a much more closed interface, so I didn't do remote monitoring, I just displayed the graphs on a local monitor next to the grow room. (running under Windows 2000)
If you value your labor at zero, you can also build your own A/D boards cheaply. the Gadre book referenced below contains information on how to do this. There was also a good article in Popular Electronics many years back, titled "Build an Eight-channel A/D Converter" by James J. Barbarello. (June 1995, page 45) This project was specifically aimed at temperature monitoring, using a cheap ADC chip, a multiplexer, and a voltage regulator. It was just three chips and a few resistors and capacitors. This project has the disadvantage that it ties up your parallel port, which in this context I was trying to keep free for device control, later. (If I recall correctly, it is cheap to add extra parallel ports to your computer, provided you have a card slot open.)
I know that at least SOME ph probes have built-in amps, so you only have to measure the voltage from them, and convert that voltage to a ph number. There are some notes on the Dataq site about this, but they dealt with an obscure part. I'll try to get more information about ph probes as we go along, so anyone following this thread can use a standard, easily-available (hopefully cheap) part.
I don't know for sure, but I suspect most TDS meters are only measuring the electrical resistance of the water they are attached to. (water with solids dissolved in it conducts better, hence lower resistance) Anyone who knows, please explain if there is any difference between EC and TDS meters, other than the display scale? perhaps the easiest-to-implement input out of the basic four i mentioned, (temp, humidity, ph, and TDS/EC) would be the last.... the probe on at least one of my TDS meters consists of two pieces of metal protruding from a piece of plastic. MAYBE nothing more is needed to measure TDS than to have two steel spikes a fixed distance apart, sticking out of a piece of epoxy, attached to insulated wires, feeding into our cheap dataq box. plus, of course, some way to convert the number the box gives us to either an EC or TDS scale. There might be some electrical hazard in this scheme, since this clearly involves mixing water and electricity. CAVEAT EMPTOR!
I don't know anything about humidity sensors at this time, so that will be addressed later as I learn more.

2) A lot of security can be gotten by use of a simple webcam monitoring program. The house where I kept my grow was burglarized last year, and "Active WebCam" emailed me some lovely photos of my burglar, as well as alerting me within a minute that someone was in the house. There are other programs with similar functionality, allowing you to accomplish a great deal for the price of a cheap web cam, plus software, if you pay for it. If you're very lazy, you could make this double as a temperature monitor by putting a honkin' big thermometer where your webcam can see it.


3) My personal choice for device control would be the parallel port. My reasons for this are simple, it's cheap to work with, and I understand parallel ports well enough to program them, if i have to. I recommend :
"Programming the Parallel Port" by Dhanajay V. Gadre,
"PC Hardware Projects Vol. 2" by James Barbarello, and "PC Intern" which I believe is available online, hint hint. Also, There are plans online for light show controllers meant to be driven from the parallel port, I don't have the references in front of me.
Here is a kit that might be useful:
http://www.electronickits.com/kit/complete/elec/ck1601.htm
the relays are only 10 amp, I would be loathe to run lights on that without checking carefully with an electrical expert. I would personally look for something with 20 amp relays or more per 1000W light, but what do I know? A 400w light nominally draws a little over 3 amps @ 120v , IF I remember correctly, but might use a lot more when firing up?? My general inclination would be to put lights on their own circuit, on a dedicated mechanical timer. But, I would feel fine using a board like this for lighter stuff, pumps, fans, etc. If you're away for long periods of time, I'd get a UPS for the computer you're using as a controller. and for your router/dsl modem/cable modem, if you want to be sure you can check on the computer.
 

SOG

Well-Known Member
Best of luck bra, ill be watching ;-)
what were you able to automate so far


btw:
labor = parts x 3


:joint::peace:
 

GrowTech

stays relevant.
Temperature@lert - $129 USB Temp Sensor with email...

You could probably use the drivers for this hardware and integrate it into your own software bundle using C or VB :)

check it out here
 

GrowTech

stays relevant.
what about making adjustment remotely?



:joint::peace:

I would recommend setting up an RDP service, changing the port for security, and just using a remote desktop application to terminal into whatever device is hosting the system... from there you have full control to everything via PC :)

you can add more hoops and authentication if security is a big concern (which it SHOULD be)... would suck to have some smart kid fucking with your op without you knowing :lol:
 

Aleister93

Active Member
Best of luck bra, ill be watching ;-)
what were you able to automate so far


btw:
labor = parts x 3


:joint::peace:
As I said before, the only thing I've actually automated before, was monitoring soil moisture. I'm short on funds, so it may be awhile before I buy a relay board. I need to research ph and humidity sensors, so I'll go for the low-hanging fruit and see if I can do EC/TDS without buying a sensor, and I'll order some thermistors this week so I can do temperature, using the dataq box I already have.
 

SOG

Well-Known Member
interesting, after all the effort developing and time invested
you think you will still be coming out cheaper?
factor, parts x3 = labor



:joint::peace:
 

poopmaster

Well-Known Member
Am I missing the DIY part or is it just over my head? I would really like to add computer monitoring, but what specifically would one need and what steps must be taken to make it work?
 

GrowTech

stays relevant.
Am I missing the DIY part or is it just over my head? I would really like to add computer monitoring, but what specifically would one need and what steps must be taken to make it work?
This type of stuff (on the DIY level anyhow) is still new and basically you're going to need to hack a bunch of different products and services together to get it going, and even then it will need a lot of research and testing... The more people involved with such a project the better, as it can become quite costly buying parts that MAY OR MAY NOT work. :-|
 

GrowTech

stays relevant.
Regarding the above post.... you don't HAVE to hack a bunch of things together, you COULD go buy grow automation systems... but they will set you back a great deal. I think this would be a fun thing for the community (or at least the technically inclined portion) to work together and figure out.
 

Aleister93

Active Member
I have some 100k thermistors on order, since i'll be using my dataq box, and that's what they recommend on their web site. When they come in, my project will start with temperature, and I'll see if I can get useable TDS readings by shoving steel spikes into the water in my hydro tank. If nothing else, i should be able to set it to alarm when my water level goes low.
 

hengis

Member
Great thread.
I think the EC meter needs an AC source to work as a DC source will polarise. By that I mean the spikes will get covered in charged ions and will stop working. Perhaps takin apart an old meter wouod be the easiest way if you can find a way to get the correct connections from the meter and connect them to your ADC. Whatever I wish u all the luck
 

Aleister93

Active Member
thermistors arrived. slogging through dataq documentation. decisions, decisions
I'll probably just start with windaq lite, and then snoop the port, from qbasic, VB, or Visual c++, or just hook up the RDP as GrowTech suggested. I'd like to eventually get email alert and phone call if something happens. (Active WebCam can email on motion detection, as previously stated) Tired, thoughts disjointed. sleep calls.
 

Atarijedi

Well-Known Member
I noticed you were talking about galvanic moisture monitoring, this isn't exactly the best way to do it, as you will slowly leech minerals from the rods into the soil. I found this link to a DIY Moisture Sensor (resistive) after searching for a replacement for one I used at a friends house that I was going to hack, but now I make my own! How to make a cheap soil moisture sensor | The Cheap Vegetable Gardener

This is the nice thing about know the technicalities of electronics, you can build this entire thing from scratch, cheaply, like I am doing, even to the point of having active cellular reporting with MMS if I needed. If you are going to make your monitoring application network friendly, I would suggest using a non normal port and then just opening it in your firewall/router. Setup your application, when working over a network, to use sessions that people have to log in to, and after x minutes of inactivity by the user, they are logged out.

So the person would log in, they would be given a session id, and every time they sent a command, it would be prefaced by the session id.

I have bought most of the parts for my grow box, I am doing a recirculating DWC, and since I am an EET, I want to automate it as much as possible. That isn't to say that I won't do things manually, but the option to have automation would be nice. I will build it so everything is manual at first, then slowly integrate my automation parts.

On the monitoring side I am going to be monitoring water temperature (res and grow chamber), grow chamber air temperature, relative humidity, continuous pH, continuous TDS, CO2, and a camera.

On the control side I will be controlling a DIY water cooling device including a water pump and a TEC, the lighting, intake fan, exhaust fan, air pump, recirculating pump, and hopefully a DIY dehumidifier.

The brain is going to be a PIC Microcontroller with a Graphical LCD interface and a 4x4 keypad. I will also have a wireless (ZigBee) connection to my PC. I also hope to add a small UPS, so everything but the lights will run off of it.

I have pretty much all the parts I need for automation, I still need to get some contactors for switching the heavy loads (like the lights), and I still need to buy a continuous pH probe which is about $90
 

Aleister93

Active Member
I got my thermistors, mounted them on the end of some phone cords (10-12 ft each) and I potted the ends with epoxy putty. hooked them up to my dataq D-194RS logger, and tried to calibrate (fresh install of windows 2000, install file from the dataq site called "new194.exe" then i attempted to calibrate, using tepid water as the "high" control, and icewater as the "low" control. this seemed to work ok at first, but the two sensors began showing temps up to 10 degrees difference. my guess is, that water infiltrated the epoxy putty on one of the sensors, allowing some current to cross the leads. maybe this will work out when they're both dry, but this means to me, that epoxy putty may be a sub-optimal solution if you intend to use the sensors in a wet application, such as a hydro tank. Once I have two demonstrably working sensors, I will work on viewing them remotely. They've been drying for a little while, and now they're only 3 degrees apart. much better, but not great agreement. here is a screen cap from about 15 mins ago (no, there isn't, the screen cap wouldn't resize properly to a size RIU would accept
 

Atarijedi

Well-Known Member
I got my thermistors, mounted them on the end of some phone cords (10-12 ft each) and I potted the ends with epoxy putty. hooked them up to my dataq D-194RS logger, and tried to calibrate (fresh install of windows 2000, install file from the dataq site called "new194.exe" then i attempted to calibrate, using tepid water as the "high" control, and icewater as the "low" control. this seemed to work ok at first, but the two sensors began showing temps up to 10 degrees difference. my guess is, that water infiltrated the epoxy putty on one of the sensors, allowing some current to cross the leads. maybe this will work out when they're both dry, but this means to me, that epoxy putty may be a sub-optimal solution if you intend to use the sensors in a wet application, such as a hydro tank. Once I have two demonstrably working sensors, I will work on viewing them remotely. They've been drying for a little while, and now they're only 3 degrees apart. much better, but not great agreement. here is a screen cap from about 15 mins ago (no, there isn't, the screen cap wouldn't resize properly to a size RIU would accept
You can get K-Type thermocouples off of eBay incredibly cheap, like, less than $5 each. At least -50C to 250C, perfect for this kind of application.

You can use them in water too, they generate a voltage based on temperature. The only problem I can for see is that they usually output a small voltage, like uV/C.
 
Top