Brain_box build for Research


Hello OpenAg Community!

I have a challenge before me to create a hermetically sealed grow environment for research. This chi square study involves multiple environments with a high degree of environmental accuracy. The nature of the study demands that data is collected from many remote, distributed endpoints to one data center.

Environment is 78"x78"x78" mylar tent. Goal is to gather telemetry and control multiple environmental system for plants in soil

One issue I see is controlling irrigation to each pot to proper soil moisture tolerance. Originally considered amalgamating 16 soil moisture meters to collect the average and irrigate accordingly with the 16 channel relay. Controlling nutrients with peristaltic pumps and irrigation reservoir.

Then someone blew my mind and said, to do this properly, each pot needs independent IO. I’m not sure how I can do this, but I was thinking about a bunch of solenoid valves.

Seeing my tasks multiply, I am calling out for assistance from this community for design considerations and help modifying the software.

My BOM is essentially a modified PFC BOM v2.0 (alpha) with exception of probes, hydro nutrients, materials for enclosure, OpenAg and environmental outputs. Add 6000 BTU AC unit, dehumidifier, weatherproof box, 7" TFT, 25A solid state relays, several tamper proof power outlets, and many soil moisture sensors. Have this BOM x 2 at my house. Boxes everywhere.

I ordered a couple of helper boards from PlantCubed last week. I am hoping this will meet the connection requirements for sensors and relay board.

Currently drilling holes in the weatherproof box to install sensor leads and power outlets for lights, AC, dehumidifier, etc… Modeling it after the brain_box.

However I do this, I need something simple and quick. Any recommendations are uber appreciated.


It sounds like you’re asking for consulting help to design an irrigation and environmental control system for growing in soil. It’s possible somebody here will be into that, but you might have better luck asking somewhere else. Mostly, people here are doing hydroponics.


Very curious to see your build. While I agree that most people here are doing hydroponics, I think that there is definitely overlap in the work we are doing especially in controlling the environmental variables. I would encourage you to use perisaltic pumps if you want to get accurate dosing control. Valves are going to be less accurate in my opinion especially if this is small-scale.


I googled a bit and found a few projects that sound like they might do the sort of thing you want:

A lot of the PFC v2.0 software and design is specifically about maintaining nutrient solutions. The PFC v2.0 software is built around ROS, and it’s difficult to learn and work with compared to other options.

It sounds like maybe all you need is a PID loop where your soil moisture sensors control relays to run water pumps. If that’s the case, then an Arduino or Particle Photon running a really simple program might take care of it for you.

If you care about remote monitoring and control, people seem to like Particle’s stuff a lot.

[edit: You mentioned an air conditioner, but I’m assuming you can just set its built in thermostat. Likewise, if you’ll be running grow lights, you can just put them on regular timers]


Thank you for your replies. @wsnook PID loop definitely. Tuning PID loop with peristaltic pumps and soil moisture sensors is a challenge I can accept.

You’re right about ROS. I would not know how to make an ROS package for this, especially one that would run with other PFC’s… yet, I’m pretty sure I can make a standalone unit.

Your assumptions are correct about the AC thermostat and light timer. However, thermostats and timers are standbys. For AC, set the thermostat lower than needed for environment for a “cold standby” :grin: or hack the thermostat for a hot standby. Bypass the thermostat. Wire the logic normally on (in summertime). Same sort of thing with lights and space heater (in winter). Full remote control of environment while seriously increasing reliability.

I choose openag initially because I thought our study would use hydro or aeroponics. I have been lurking the forum for a while. Intrigued by openag server. Was also looking at OpenSprinkler and a few other solutions including growtronix. OpenAg won out because met requirements out of the box: opensource, complete set of environmental controls, didn’t appear too complicated, within budget.

Thought I had most of it worked out aside from the signal board. So I ordered parts. Then I got the news it was important to study rhizosphere and rhizoplane. Something not doable in hydroponics. :scream:

So I planned another panel for pumps. Cut out the probes, tentacle shield, added more pumps and trying to figure out process. I think one HCJJ021 peristaltic pump will make a good irrigation pump for one single 12 to 14" pot. 16 peristaltic doser pumps mounted into another panel like this below, with 16 soil moisture sensors connected.


Am I crazy?

Update: suggested that I could use the EC probe to check for salts in soil irrigation overflow. If true, flush with water, then add nutrients. I’m thinking there is a lot of complexity in irrigation reservoir.


Looks good. I think your thought process is solid.

Slightly off-topic and related to Hydroponics, but I think this is an exceptional video on pump automation and the design of a dosing system. He really does a great job thinking the problem through in terms of hardware failures which are inevitable with these cheap devices.

On another note, this may not apply to the research you are doing, but I do want to make you aware that hydroponics also offers opportunities to study microbial relationships with plants. Especially when you are dealing with media forms like Coco Coir. I have experimented in the past with adding microbes to my reservoirs, and in a few examples where I had the ratio correct had superior root zone health to my other plants. I for a long time struggled with Pythium root rot and discovered these types of solutions in an attempt to solve that problem without just shocking the system with Ozone or Peroxide.

Depending on the requirements of your experiment hydroponics may prove to be a more accurate way to study these relationships:

I’m no expert here, but I would love to learn more about these microbes and what can be done to increase the number of good guys and keep out the bad guys!



Wow very good video. I like it a lot


keep us posted! I’m very interested in the applicability of the FC/Brain to soil-based systems, and think its great you’re working on this

MVP - Product Design

Very good video! Jim is a black belt.

Since my last post I passed along @Webb.Peter’s argument for hydroponics in soil biology experiment. They agreed. Much better to control colonies in hydro than in soil. We will revisit soil later in the experiment. This will buy me some time to develop it. The hydro setup about %70 complete.

ROS is over complicated right now. The soil irrigation PID loop will be much easier to integrate into v1.0.

I was able to use the v2.0 docker image to simulate sensor and actuators, but I need some formal instruction in ROS to get comfortable with it.

I ran into several problems trying to install v2.0 dev environment on the pi. @wsnook, followed your guide on github and couchDB failed first try. Perhaps something else failed further up the buffer or install didn’t complete after couchdb failed. I installed couchdb manually. rosrun appeared to start, but couldn’t see it in process list. I then formatted and installed v1.0.

Hydro is expensive. Aside from a few items, I already have 16 unit deep culture hydroponic system ready to assemble. I am waiting on some supplies. Watercooler, nutrients and a few other things. Germinating super hot chilies to begin with. Yum.

I decided to use 1000W HID lights in place of LED. I have the ballasts and fittings, so why not. I found that LEDs produce smaller yields against HID and fluorescent lights in the same environment. Even the very expensive dimmable spectrum 1000W equivalent. Any thoughts?


That guide is very out of date now. Take a look at this comment from @gordonb for a link to newer instructions: Help needed with Loading the default fixture

Also, take a look at this thread: Need help setting up the development environment?


@seanchoq I am excited to hear you will be doing this with hydroponics.

Are you planning to use the V1 software? Hydroponics is very expensive when you buy off the shelf equipment. Reservoirs can be $60, when in reality they only are worth a few dollars.

I have to disagree with you on this one. Especially when it comes to fluorescent lights. The reality is many people buy LED lights that a misleading and while they may say “1000W LED” some will have 1000W of bulbs, but a 600W driver. There is no doubt that HPS capital cost would be cheaper than LED. There are definitely LEDs though that would be as powerful as HPS and be able to produce flowering plants (peppers). I have a thread on DIY LEDs here. I’d be curious where it is that you found that out, there is a lot of documentation that will say things like that but it tends to be outdated. Most of the real improvements with LED horticultural lighting has come in the past five years.

Post some pictures if you get the chance!


So I got busy with my day job. I have been working on pid loop for the peristaltic pumps (without the ‘d’) to hydrate soil and I think I have a working sketch. My question is, once I get the bugs worked out, could someone help me package this into PFC 2.0?

Currently I am rewiring after an incident :zap: This design is the basic idea, rpi with 7" tft connected to mega. I am uncomfortable with pumps on same panel as AC 110. Just for testing. Sensors wire out the side. .


I would need quite a bit more information/documentation/details regarding your build to be of much use, can you share your GitHub and any other additional documentation you’ve done? I have a few questions as well:

  • It looks like you’ve already got the V2 UI running, is that running openag_brain v1.0.0?
  • Have you connected with @adrianlu? He runs a meetup in San Fran and is building two V2’s.
  • I know last we talked you were thinking hydro but here you mention soil.
  • Are you using moisture sensors? How’s that going?

@pspeth is working on a soil irrigation system using a moisture sensor and perisaltic pump using the MVP software stack as a base. I know he ran into some issues using the moisture sensors which is why I’m curious which you are using. Last I talked to him this was where he was:

So… Looking at the moisture sensor after a few days, I have some concern. It looks corroded. I read that it could be partly do to the power being always on. I decided to look at the weight sensors as you suggested. I think I can come up with a way to place the weight sensor in between the two plant trays where it will support both. In this way I will be responding to the total weight of both. The sensors can be had for $4 to $10 each depending on whether you mind waiting for them.