What's new

Open source pH controller

Mulletsoda

Member
I'm working on a project (I got lots of these :jump: ), trying to come up with a solution to maintaining the pH level in my reservoir. I'm basing it around the Atmega328 microcontroller (think Arduino ) and trying to make it as set and forget as possible. I'm still in the planning stage here, but I've gotten to the point I need to start checking the interest in preordering PCBs. I put together a pretty presentation describing in more detail than I can do in a single post here.

http://docs.google.com/present/view?id=dzsvp43_38fxsnqvxr

Basically, I came up with a pH controller system for $200 per rez. Includes the controller with LCD display, pH probe, 2 dosing pumps for pH adjusting liquids and a stirring pump. If you want a detailed cost breakdown, http://spreadsheets.google.com/ccc?key=0AhuK8wZLN6ibdGJIamx6ODZ5RVZLeGtSZmN0T1VXQlE&hl=en#gid=0. I'm not done with it yet, but it always takes a couple weeks to get people coordinated anyway, so I'm bringing it up now! Anybody want to get in on this?

Thoughts? Comments? Suggestions?

img7408h.jpg
 

Mulletsoda

Member
Because I'm figuring most people won't click through that link there, I'll explain some of it here.

I'm creating an open source line of grow equipment in an effort to help bring automated growing into the hands of the consumer. Honestly, I'm not thinking this will help all the commercial herb growers out there (though it will), they can afford the expensive shit, I think the people who have the most to benefit are the people these medical marijuana laws are here to help: people in need. People with debilitating conditions and severe chronic pain can't tend a garden, can't bend over to check nutrient concentration or pH level, and often can't afford high cost computerized equipment. This is just one step along my path of helping humanity gain from technology.

Compassion and lovingkindness.

Current schematic (May 18) http://img143.imageshack.us/img143/7985/screenshot7i.png

Current PCB (May 18) http://img404.imageshack.us/img404/4028/screenshot8u.png

All work is licensed under the GNU GPL v3.0
http://www.opensource.org/licenses/gpl-3.0.html
 
Last edited:
B

bipotato

Nice work, man. I like your enthusiasm and (assumed) talent.

Been a long while since I've done anything similar, last microcontroller I worked on was a m68hc11 (w/ an assembler).
 

Duckmang

Member
I also admire your work. My last project was PIC based. It took 2 months to build and function test the board and another 2.5 months to write and debug the 1800 lines of code in assembler. That said I really can appreciate the work that is involved in designing a complete embedded system.

Although I admire the project, for my situation, the ph in the res isn't my limiting factor. It stays pretty stable, its my rising ppm of salt concentration that puts me to work. FWIW, I run drip recycling.

Is there a specific type / style of growing that this controller was designed for? I see the potential need for this controller. I know Ph gives some people fits, RO and low ppm tap grower's mostly I'd guess. They are the growers you need feedback from, pay attention to what those guys have to say.
 

Mulletsoda

Member
Ha, funny... there's tons of enthusiasm... maybe a fair amount of talent... but certainly not much skill. That's the first time I've ever tried to design a PBC, this is the first project that will have ever made it off a protoboard.

And as far as why I picked pH... simplicity... one thing was as good as another. I'm a beginner, and can barely tie my electronic shoes (the equivalent would be decoupling, right?) so the less shit going on, the better. I'm an RO user, my water is 400 PPM out the tap and I use it in a recirculating hydro setup, so I need to adjust pH at least once a week. I've come to find out not too many people really need to adjust much. But this project will lay the foundations for the nutrient doser, which is basically a more complicated version of the same ideas, which is just part of my whole grow automation dream.

I was hoping the people with experience with electronics would chime in and give opinions, or maybe a few people who have arduino run grows may have similar designs they'd be willing to share. I'm still using the arduino to program my chip, as I'm traveling ahead with this project pretty quick... I've only glanced at things like port registers, interrupts... one thing that I keep getting frustrated with is op-amps... I want to build this circuit for the pH probe myself.

I'm going to look at the PIC line of controllers in a couple months, do you have any thoughts on the AVR vs PIC?
 

Ras Mason

Active member
Veteran
NIce and interesting. Ihave tried the Hannah one before and, i find that nothin says lovin like good old human carin.
peace
 

sixth6

New member
I am thinking along the same lines for a summer project for some assembly class. The professor was all about it lol.

Sort of a common person grow controller. If Cannabis gets legalized this fall in California, everybody and their moms will be growing their own.

So yeah I am using the baby orangutan 328p. Sensor hunting and a flow chart are how I am enjoying my first week out of school.

Those peristaltic pumps are expensive for how simple they look.

I suppose I will bookmark your thread and google code page.
 

Mulletsoda

Member
Ack... I shopped pumps for a while, this guy sells them at a good price. As far as sensors... what are you looking for? I've spent months tracking down workable part numbers, I've got lots of info about this topic, and I'm more than happy to share. My aim is not just arduino based, so all of my sensors are compatible with most MCUs.

Temp ~ DS18B20 ~ The Dallas OneWire temp probes
RH ~ HIH-4031 ~ An RH sensor that outputs a linear (~0-5v) voltage proportional to the RH in the room.
CO2 ~ if this is for school, you can build up from http://www.futurlec.com/Gas_Sensors.shtml, or just go the easy route : http://www.co2meter.com/collections/co2-sensors/products/k-22-lo-co2-sensor-module
EC ~ 2 simple probes submerged in water
pH will be done with the techniques used here
 

Mulletsoda

Member
The pumps are expensive, though, I agree. I've got somebody checking that out now to see if I can have them fabricated at a cheaper rate, but I got a quote of $850 for 20 pumps, and the guy I've got looking into fabricating said... "Damn. That's cheap"

So maybe I've got to have more than 20 built at a time, but I'm not to the point I need that many.
 
B

bipotato

So maybe I've got to have more than 20 built at a time, but I'm not to the point I need that many.
Maybe you can do a nutrient tank controller made for Advanced Nutrients "2+ program" (aka "30-bottle program") users.
 

Mulletsoda

Member
bipotato ~
A nutrient doser is most definitely in my plans, it's just MUCH more complicated than a pH doser. pH needs to remain the same regardless of how many weeks into flower you are. A nutrient regimine has to be aware of how much it's already put in, what the current nute level is, what week of flower it's at... lots. Definitely in my plans, though.

Ah yes, the pHduino. I used this as a reference, but designing an op-amp circuit is what threw me. I'm a hobbyist, I've never had any actual training or schooling about this stuff. There are a couple dozen arduino based grows (and more general MCU) out there if you look, but often I find they're kind of cobbled together or poorly written. It's my goal to make the whole project as smooth and pain-free as possible; I want people to be able to take the parts that apply to them out of my operation and apply them to their circumstances... hunting through garbled code or trying to figure out what part somebody used has no part in that. ;-)

Sparkfun is a GREAT place to start buying parts. They're pricier, but you get quicker service, they provide good to excellent documentation on everything they have (including eagle files for each part!) and they're US based.

Chef ~
I'm assuming you're referring to the SHT15 when you say temp and RH. I looked at that, looks great, but I found that it's cheaper to go with the HIH-4031. I need only a single point of measurement for RH, but I want to take temp readings of at LEAST 2 places (air and rez) so that would mean either a wasted RH sensor or two types of temp probes in one project. The dallas one wire probes cost me $2 a pop, and I can use a half dozen while only sacrificing one digital pin.

Accuracy is also something I had to weigh... the SHT15 is rated at ± 2% RH and ±.3 C temp, while the HIH-4031 is ± 3.5% RH and the DS18B20 is ± .5 C

How accurate do you need your measurements, ya know? ;-) Close enough is all.
 

chef

Gene Mangler
Veteran
I've been playing around for a few months :) about to get serious about a commercial product or 2
Been thinking about a software based controller forever.
USB in, nice GUI for readouts & to set your controller values, save'em to a flash drive... done! :yes: Maybe a simple 4X or 6X LCD for constant monitoring & alarms.

Since temps are cheap n easy, I want 3, ceiling, canopy & soil temp.

I'm more concerned with consistency than accuracy, don't need to see swings where none exist :D +/- a couple is fine.
 

Mulletsoda

Member
Yes, the dallas OneWire temp probe is accurate to something crazy when compared to itself (consistency). Less than a tenth of a degree if I remember correctly.

Flash drive? There are ready made solutions like this : http://wiki.github.com/nseidle/OpenLog/ that will give you FAT16 SD card capability. You could use that for both loading a new set of parameters into the controller or for logging of conditions in the grow room. Sparkfun carries it for $25.

How's this for a display : http://img43.imageshack.us/img43/3191/img7135u.jpg

That's an in progress display, temps hadn't been worked into the firmware yet, but you get the idea. I think I only paid $25 for that LCD. :D
 

chef

Gene Mangler
Veteran
Cool, similar enclosure :) been hacking waterproof junction boxes, work great!

On your LCD, can you specify X,Y coords to section off the display for different data? or is that date in the pic just justified Right?
 
Wow yea wish I could keep up with all of this awsome stuff. Keep up the great work ohh and put me down for a 1 or 2. Hmmm I'm sure I have a few friends that might would want one also lol
 

dominicangreen

Weed Robot
Veteran
I'm working on a project (I got lots of these :jump: ), trying to come up with a solution to maintaining the pH level in my reservoir. I'm basing it around the Atmega328 microcontroller (think Arduino ) and trying to make it as set and forget as possible. I'm still in the planning stage here, but I've gotten to the point I need to start checking the interest in preordering PCBs. I put together a pretty presentation describing in more detail than I can do in a single post here.

http://docs.google.com/present/view?id=dzsvp43_38fxsnqvxr

Basically, I came up with a pH controller system for $200 per rez. Includes the controller with LCD display, pH probe, 2 dosing pumps for pH adjusting liquids and a stirring pump. If you want a detailed cost breakdown, http://spreadsheets.google.com/ccc?key=0AhuK8wZLN6ibdGJIamx6ODZ5RVZLeGtSZmN0T1VXQlE&hl=en#gid=0. I'm not done with it yet, but it always takes a couple weeks to get people coordinated anyway, so I'm bringing it up now! Anybody want to get in on this?

Thoughts? Comments? Suggestions?


screenshot5xw.png



with each drop of ph up or down make sure there is a delays in time to allow the res water to circulate for the readings so that you dont end up with to much of up and down and there should be a drift level of 3-4 PH diggits so your controller is not always injecting something trying to stablelize.just my 2 cents good luck
 

Latest posts

Latest posts

Top