Page 1 of 2

DIY Grow Controller

PostPosted: Tue Sep 24, 2013 10:23 pm
by godzilla
DIY hacking my way through to a functional grow controller!

Re: DIY Grow Controller

PostPosted: Tue Sep 24, 2013 10:29 pm
by godzilla
Hi Folks,
Thought I would start up a log on my pet project for the moment, a "grow controller". idea is to stay within a reasonable budget and get to a system that can measure and alter the growing environment, show historical data, manage time-lapse camera's and more :)
Hopefully I'll try and do it in a way that others could repeat or find useful reference at least!

So far Im already a way into this little adventure, I've been keeping a blog on AFN also but thought you guys might also find it interesting. So next few posts is really a summary catchup to where I am at the moment....

Re: DIY Grow Controller

PostPosted: Tue Sep 24, 2013 10:43 pm
by godzilla
First thing I started wondering about was measuring the main things to be measured. EC, pH, temperature etc.

For Deep Water type projects it would be interesting to be able to measure EC, in feed solution and also in the tank, some fixed probes should be necc. I fished around at what eqpt is available and also a bit shocked by how much good eqpt costs. I wondered if I couldn't DIY something good. I played with putting together a couple probes to see how they fared but in the end I decided a better thing would be to source a couple good, reasonably priced probes that could be recommended to others and figure a circuit that could do a good job of reading the EC.
There are a few EC meter reading circuits on the web, there is an EC shield for the Arduino also, but in the end I decided to try and go better performance and started out simulating some new circuits to get somewhere.

For this a few links that I trawled helped a lot (google the titles, I couldn't figure how to add links on this thing yet... );

EC/TDS/PPM Meter On Limited Budget : good explanation of what it is we are measuring and how it needs to be measured. There is also a circuit diagram provided for the kit Isabella has setup and used successfully. There is a nice model there on something cool called molecular workbench that lets you actually see the simulation of what happens applying AC or DC to the water.

Conductivity Theory and Practice, by Radiometer Analytical : Great doc explaining the basics as well as the different types of probes or conductivity cells available, their advantages and disadvantages, temperature corrections and more.

EC-Sensor circuit on CircuitLab

EC Shield for Arduino : Nice and low component count with this method using a simple 555 timer. I stopped to consider whether a bunch of these would not suit my purpose. I simulated this design and also have put it together to test against the other methods for accuracy and stability.


The thing to learn here was that the probe is quite an important part. Its a fair part of the cost of the eqpt. It needs to fare well under water for long periods with out needing calibration. On the market there are various types from platinum to graphite to carbon electrodes. Platinum probes are very expensive, >£100 a pop. The others can give good results and we only need it for a limited useful range , 0-5000uS lets say.

Re: DIY Grow Controller

PostPosted: Tue Sep 24, 2013 10:54 pm
by ledbud
you got some crazy thing going bro.
good to have you on forum, your engineering kung fu is crazy.
I see it on AFN.
keep up good work mate.
:-P :cool: :grin:::: :grin:::: :grin::::: :grin:::::

Re: DIY Grow Controller

PostPosted: Wed Sep 25, 2013 8:41 am
by teetee
What's AFN?

Re: DIY Grow Controller

PostPosted: Wed Sep 25, 2013 12:55 pm
by ledbud
AFN is auto flower forum
:cool: :cool: :cool: :cool: :cool:

Re: DIY Grow Controller

PostPosted: Thu Sep 26, 2013 5:47 pm
by LEDDWCRigger
ledbud wrote:AFN is auto flower forum
:cool: :cool: :cool: :cool: :cool:



Too bad they rely upon total myths to determine what is an isn't an autoflower.

They think if there's no preflowers then it isn't an autoflower.

I have had dozens of indica and sativa strains that produce preflowers while in a regular lighting cycle. That's how you know when they're properly mature for flowering.

AFN may have great autoflower grows, but knowledge and education is something they lack.

Re: DIY Grow Controller

PostPosted: Wed Oct 02, 2013 12:00 am
by godzilla
Hi Guys,
Let catch up with where I am today with my little project.

I've built up a box to house the project, its like the motherboard which runs with an Arduino Mega 2560 board. On there I have quite a few things already connected up and running, like the SainSmart LCD with touch control, on board temp sensors, real time clock, and connections out for ambient temp & humidity readings. Also there are a bunch of sockets for "expansion cards". These will be used as I come to develop the EC reading circuit, pH reading circuit, CO2 etc etc.
I also made a special power supply for the thing, it includes +-5V and +-12V split rail supplies for op-amps ill be using to make measurements..
13.jpg

21.jpg


I got some of the basic stuff up and running already from the sensors I started with.

24.jpg


Then I came to start playing with the EC probes that I got for this project. I wanted to find a source of good probes that other might be able to repeat with, so I got a couple of types in, one from RS by Lutron for about 30 quid, and a Chinese graphite probe for about the same. With either of these, as with another probe you guys might acquire in future, the specs are not so accurate.
The probes have temp sensors inside as well as the conductors for the E.C reading, so first is to get them to read accurately. I plugged them in to the Arduino and used the standard math for a 10K thermistor but I found the readings were out by 2 or 3 degrees!

So, I concluded I would need to be able to calibrate those temp sensors inside the EC probes, before Im going to get readings with exceptional accuracy, which is what Im after. I want the performance to match the expensive bluelabs stuff, better it and be on its way lab-grade.

Double checking the accuracy of the digital or otherwise temp sensors I already had, they were poor. TMP100 , the I2C device on the PCB, gives +/-1deg absolute accuracy. There are lots of other on the market and you can find 1/2 degree , 1/4 degree , but only a handful that are better and reasonably priced.
You average hi-low temp equipment will also have an error, and with five or six different temperature measuring things I could muster, I grew annoyed since everyone said the temperature was different. In the worst case there could be 2 or 3 degree difference between readings from different units.

so, I started playing with some better sensors. The TSYS01 from IST , accurate to 0.1deg C. But to use it I had to build me a home PCB reflow oven so I could mount the bugger on a board and connect to it. I found it was sensitive to the mounting, which would make it difficult for you guys to reproduce if you wanted to.
So I searched out more sensors and came across the TSIC 506F, which is a through hole pre-calibrated sensor, accurate to 0.1deg.

I also built up a special program in Visual studio to connect to the arduino and log the temp sensor outputs, this I can use to view the temp signal, log it, or run a temp sweep with several sensors and see the difference - this will be useful to calibrate thermistors and those EC probes with :)

tsic vs IST.jpg


To summarise a bit further, after testing various stuff I arrived at a good solution, that others might find also useful if they like tinkering with this kind of stuff.

Re: DIY Grow Controller

PostPosted: Wed Oct 02, 2013 12:07 am
by godzilla
I have 3 of the TSIC 506F sensors now, to make sure the results are good and repeatable with a reasonable effort. All three report in values in close tolerance of each other so this combo will provide the reference to calibrate other sensors by.
I made use of the spare Arduino for the moment to rig these three up.


These sensors were about £6.50 ea from Farnell
The Swiss are pretty well known for accuracy, and these little gems exhibit exactly that. They are good low power (35uA) sensors giving simple temperature measurements (unlike TSYS01 needing some hefty maths to get the reading) and outstanding 0.1deg c absolute accuracy. The resolution is 0.034 deg.
Between the three sensors I have, the readings are within 0.05deg of each other :)
The sensors have some pretty nice features, high precision on chip measurement, built in EEPROM which stores the factory calibration giving a result better than F0.1 Platinum sensors AND the accuracy is unaffected by long extended cables (>10m)

I was able to figure how well they work but the arduino library available is made to keep switching those sensors on and off to get readings. I want to leave them in ON mode and read their 10Hz output instead, which I adjusted the stock library to kind of do but with messed up measurement on some reads. so Im having to meddle with creating a new Arduino library to do it reliably.

Instructions for putting together a TSIC 506F based probe ;

1. First thing is acquire some decent cable, shielded if its going to be a reasonable run, few feet or more. I ordered in a bunch of 5M USB extension leads for about 1.50 ea off eBay. Worked out nice for some flexy shielded four core stuff to use for sensor probe leads.

2. Strip one end back, you'll need three wires for the TSIC 506F , 5V power, Gnd and Signal. In my case I terminated the end with three pin header to attach to an Arduino IO board.

4.jpg
4.jpg (61.25 KiB) Viewed 47448 times


5.jpg
5.jpg (57.39 KiB) Viewed 47448 times


3. The sensor end. Take the TSIC 506F and cut back the pins about 5mm since they are very long. Get a 100nF cap and solder it across the power/gnd pins, the two outer pins. Connect the 5V, gnd and signal lines like in the pictures. Note I soldered directly the green (signal) wire and heatshrunk it prior to soldering the cap and finally the 5V and Gnd pins.

1.jpg
1.jpg (32.24 KiB) Viewed 47448 times


2.jpg
2.jpg (74.29 KiB) Viewed 47448 times


4. Heatshrink over the assembly

3.jpg
3.jpg (64.05 KiB) Viewed 47448 times


5. Your good to go. This can now be rigged up to Arduino . The sensor is sensitive to noise on the 5V line, so put a nice big cap between the arduino's 5V rail and ground, 100uF I used hold it smooth. Head over to http://playground.arduino.cc/Code/Tsic and get the library (version tuned for 506F)and go from the example sketch.

Now you will have an accurate fix on temperature. You can use this to figure out what offset you need with cheaper sensors like thermistors etc, ie calibrate them against this reference.

Hope its useful to someone. I will update you guys after I get the new library working nicely.

Re: DIY Grow Controller

PostPosted: Thu Oct 03, 2013 7:34 pm
by ledbud
bro you like data from star trek. Positronic brain.
LOL.
good work keep it up.
:cool: :cool: :cool: :cool: :cool: