Foam Farm Activity PFC in Classrooms: Troubleshooting Arduino


Hi! I’ve just finished up our pilot Food Computer Biotechnology class at a high school in West Baltimore where we built three Foam Farm Activity PFCs to learn how to combine old tech (agriculture) and new tech (computers) to solve local food system issues (i.e. food deserts, food insecurity, etc.). While 2/3 PFCs grew lettuce and swiss chard nicely, our third PFC with spinach never really took off—all of the seedlings died within a week of us trying to replant them. Additionally, some parts of our Arduino setup worked well, but other parts (nutrient circulation, humidifier, and RGB LCD screen) only worked on some of the PFCs some of the time.

Has anyone replicated the Foam Farm Activity or have advice on why the system isn’t working for us? I’ll attach some photos of the setup, but it might be difficult to see how things are connected with our tangled messes of wires. I’m teaching a summer session of this course in a few weeks, and I’d like to figure out what went wrong before the next class starts, so any insight is much appreciated!

We programmed and set up Raspberry Pi timelapse cameras to monitor our vegetable growth and I posted the lettuce one [here] if you’re interested!

Finished up our @Raspberry_Pi time lapse gifs of #FoodComputer lettuce today! @MITOpenAG @BMore_Healthy

— Melanie Shimano (@melanieshimano) May 31, 2017

Calling all Educators! Who's using Food Computers in schools?
Calling all Educators! Who's using Food Computers in schools?

@melanieshimano I’m very interested in how the Foam Farm’s worked for you, they were a great starting point for starting to develop our MVP. I’m curious how the foam is holding up, I think @webbhm is using foam for his MVP instead of mylar/PVC like our first prototype.

I think it’s very interesting that you added this on and it wasn’t part of the Foam Farm initially, why would you say the camera was a really important feature?

Were you trying to germinate the seedlings inside of the PFC? If so was your rockwool continuously wet? Do you happen to know what your water temperature is? Were you able to grow the spinach in any other box? It may not have anything to do with the box at all, and everything to do with a different plant! Here’s my guess: Spinach LOVES cold water and can be tricky to keep from getting moldy/rotting. According to the Cornell Spinach Guide:

A chiller must be purchased to maintain the water temperature at a
sufficiently cool level. Water temperature should be maintained at 50-68 F (15-20 C).
Temperature control of the nutrient solution is critical to controlling the pathogen population so
that the entire crop is not lost to disease (See Chapter 1).

Did you find that a humidifier was necessary? I noticed on the V2 PFC there isn’t a humidifier even, and that the humidity from the reservoir evaporating is plenty. What was not working about your peristaltic pump? Hopefully, if you can provide me some more details I will be able to help you out more, keep up the great work.


@Webb.Peter The foam worked out really nicely and is still holding up on all of the PFCs (we started building them ~16 weeks ago)! We used 2"-thick insulating foam from Lowe’s and taped all of the pieces together using gaffer tape and Gorilla Glue Tape (3"-4") on the inside and outside seams of the box. We also left the top foam piece + attached grow light unattached from the rest of the PFC so we could reach into the PFC if needed. I’m not sure how much reflectivity the PFCs need for light, but it might be of interest to add mylar sheet on the inside of the foam if you need a reflective surface?

I added on the camera because I wanted to teach the students how to program with Python + Raspberry Pi (I think the language is a bit more intuitive than Arduino), and I also wanted the students to have an end-of-semester deliverable to show what they made in class (besides the actual vegetables). We culminated our coding “section” with learning how to code a gif in python, and then attached the camera + RPi to the PFCs and ran the code–I think the students really enjoyed seeing the time lapse of the plant growth, so I’d keep it in future iterations, although maybe not essential if you aren’t using Raspberry Pi for other components. Perhaps the sensors and other automation can be connected to Raspberry Pi instead of Arduino in future iterations?

Ah! The cold water for spinach might’ve solved our problem! We did two rounds of germination: one inside the PFC and one outside the PFC. They both lasted for 1-2 weeks and then died. The inside of the PFCs got pretty hot because of the grow lights, and students measured the water temperature bi-weekly, which I think was around 23-28 C. Thanks for the spinach growing resource!

A few things (I think) weren’t connected properly to the Aruduino including the humidifier, water gallon pump, and the fan, so we never actually used the humidifier although it was attached to the PFCs. Since the inside of the PFCs got pretty hot from the grow light, we kept the fan on constantly, and then checked nutrient levels by hand to replace when needed. Our lettuce and swiss chard grew nicely without humidifiers, so it’s probably not necessary (at least for some vegetables). I also built a fourth Foam Farm to conduct experiments on my own, and grew lacinato kale nicely without a humidifier.

The peristaltic pump and never worked when hooked up to the Arduino, so I’m not sure if I accidentally set up something wrong in the code or if something wasn’t connected properly? I haven’t yet found anyone else who build this model of a PFC, so I’m not sure if this is my error or not. What additional information do you think could help you figure out what might have gone wrong?


I’m not sure on Foam either, I suspect that you’re getting less than 60% reflectivity though, and mylar is 95%+. We chose that material for the MVP instead of foam because we concluded that even if we had a foam box, we would still want mylar sheeting on the inside, so why bother with the foam at all?

Could you provide any information on what exactly you did to generate this? I’m certain I could find a guide somewhere, but if what you used was relatively simple and easy for the students to understand I would love to learn more about your approach.

@jimbell @ferguman operated a V1 PFC for about a year and had similar issues getting the humidifier to run. I’m curious if you know what your humidity stayed constant at? I will say our V2 kit didn’t come with a humidifer and when I asked about it they said that humidity has remained high enough due to evaporation in the reservoir and they didn’t see it as a necessary component.

I’m not very familiar with the Foam Farm code stack and would have to do more investigation to really offer a helping hand. From what I’m hearing though it sounds like if our MVP software can run a thermostat based on a temp sensor, run lights on a timer, and operate a perisaltic dosing pump then it should meet all of your needs. It also will have a camera, everything runs off the Pi.

From what I’m hearing it sounds like OpenAg/people in general are leaning away from Arduino’s due to variability and inconsistency of operation and issues with serials. It could be that your problems are entirely hardware and not software related. Sorry, I can’t give you more help!


Thanks, Peter!

I used this code ( to teach students about how to take a photo + make a time lapse gif of the PCF Lettuce growth. I think you have a USB computer camera listed in the BOM, but since the RPi has the camera slot, and because they aren’t too pricey compared to USB cameras (I got our RPi cameras for ~$15), I thought this method would be best.

We set up an LCD screen to read out the air temp and humidity temp inside of the PFCs, and I think the humidity stayed at about 40-50%, although we didn’t track this information. I’m teaching another class now, so I’ll have the students keep track of this, and I’ll get back to you!


I am working with Peter on the MVP (Minimal Viable Product), and just about to start building a box. I saw a heavy duty moving box at Lowes and was going to give it a try instead of foam. By lining it with mylar, it ought to handle the moisture better, as well as have better reflectivity.
Did you put a door in the foam box, or do you just lift the box off of the plants, or remove the top to get to the plants? I am trying to think about how to do this with my box.
How have you recorded phenotype data, or are you bothering? It is easy to automate sensor data, but the phenotype data has a lot more value.



Hi @webbhm ! What’s the cost of the heavy duty moving box? We kept the top of the foam box detached from the rest of the frame and lift it up when we want to see the plants, need to clean out the basin, etc. Because our peristaltic pump connected to the Arduino didn’t work, we cut a few small holes in the foam float to easily add more nutrients into the water, check the ppm, and check the water temperature.

We’re not recording phenotype data yet. For high school students who have no background in/little exposure to agriculture and computer science and who have a limited amount of time (~1 hour per day for 20 weeks), learning about and building the PFC system is extremely valuable in itself. In the class, we talk about how we can manipulate the PFC “environment” to change the plant’s phenotype, however, the students’ baseline understanding of how plants behave is more important (initially) than teaching them how to change it. I created my curriculum such that students monitor vegetable plant growth in a PFC and the same plant’s growth in soil. This way, that they understand how technology can be applied to improve systems, but also understand that using technology isn’t always the best approach to solving an issue. For example, community green spaces and urban farms have been shown to provide benefits beyond encouraging residents to eat healthier (e.g. decreasing crime rates, increasing community involvement, etc), so we shouldn’t automatically try to turn all urban farms into giant Food Data Centers.


There is a lot that can be learned from a PFC, and the danger is in trying to do too much. Looks like you set some clear goals.
The box from LOWES was $3.11, and is double thickness cardboard; with $4 for the mylar from Party City. If I was doing more than one box, I would probably get a roll of agricultural mylar, rather than wrapping paper; as the sheets are 20x24 and require some patching to cover everything. Spray adhesive is about $8, and for grins I got a a $3 sheet of plastic to put a window in the side.

For the MVP we are leaving the ‘housing’ specifications open for now. We have one design with PVC and foil insulation, and I am going the box route. I considered sheets of foam, but with transportation and cost I decided to try minimalist, and see how well it will hold up.