$300 Food Computer - MVP


#166

I am not sure what YouTube videos you are referring to, could you please provide a link?

Are you running our Food Computer software stack?


#167

We reformatted the SD card and went through the buildScript again. The camera is now working and taking photos. We will check tomorrow for new photos. The sensor is on but is now giving us a reading of -46.9 C.


We are not sure why or how to fix this. Also, the light has not come on at all in this entire process.


#168

We figured it out!

@sjolliff @mmcneal The reason you were getting the error on your render.sh is there seem to be two files named “.” and “…” in /home/pi/MVP/pictures - I believe this is due to an edit in permissions? Perhaps our Debian friends can offer some improvements for configuring Stretch permissions @dashohoxha

If you go into your File Manager: /home/pi/MVP/scripts/render.sh
Right-click on the file, and then click “Open” - a prompt will appear - click “Open” again
On line 19, change ls -latr to ls -ltr
Save this file
Open your Terminal
Type in: /home/pi/MVP/scripts/render.sh
You should now have no errors

It may very well be the case that for most of you this wasn’t a problem. I hope this is clear to everyone, and we’ve updated the GitHub so that in the future this won’t be an issue for anyone.

Lastly, regarding the lights - the problem here is that cron (default install) schedules two things: lights on, lights off. All it knows is that at 10:30 PM (localized) it should turn off the lights - and at 6:00 AM turn them back on. If you happen to boot up the Pi at 6:00 PM - it won’t turn on the lights until 6:00 AM. Let me know if that isn’t clear.

@ferguman @webbhm @bennis @drewthomas89
Outstanding issues / possible improvements:

  • Permissions seem to default to no one can edit/execute - this was a problem when trying to save the initial buildScript.sh command from GitHub.
  • Initial reading of SI7021 reads as -46.9 C
  • home/pi/MVP/scripts/startup.sh script is required upon reboot
  • localhost:8000 doesn’t refresh - it requires that you delete the browser history - this is likely more of a problem with the Chromium browser.
  • charts display time as UTC - not localized to timezone
  • Pi boots up with lights off - if possible it would be nice to have lights default as on - perhaps through the startup script?

#169

@Webb.Peter I have no idea what is going on, but I promise to have a look at it soon and see if there is any thing that needs to be fixed or improved. I don’t have much experience with Debian, but it should not be much different from Ubuntu. I also have a RPi, which may help me for testing.


#170

Thank you for your reply.

My reference to YouTube is a video uploaded to YouTube by MVP.

The YouTube link is "https://youtu.be/TTdPuLTeddA ".

Thank you


#171

I was looking around the project and I was much confused. First of all, I was looking at this code: https://github.com/OpenAgInitiative Only after reading this whole discussion thread things started to become clear that MVP is a different project an the code for this project is here: https://github.com/webbhm

So what is the relation between these two projects:

Does their code share some common parts or they are totally different implementations, unrelated to each-other? Why MVP does not use an organization in GitHub for managing the code of the projects (like the first one)? GitHub organizations have great features for team and project management.

I also think that MVP needs a homepage with all the basic info and related links, which can help to avoid the confusion for the newcomers. GitHub helps for this too (offers free webpage hosting for all the projects and users).

Another thing I would suggest is using GitHub for reporting and discussing problems, new features, etc. It is much suitable than a discussion forum, and anyway I think that it is better to keep software related issues separate from the rest (agriculture, etc.)

Another suggestion is to use Docker for automating the installation steps. The other project (OpenAgInitiative) already does it:

They use docker-compose, but I would suggest docker-scripts (https://github.com/docker-scripts/ds) which are better in my opinion (however I am biased on this point).

Creating a website for the project, and installing it with Docker may even be a GSoC project.

By the way, have you ever considered Ubuntu Core for the RPi, instead of Raspbian? From my experience, Ubuntu Stable is usually much more stable than Debian Stable, and Raspbian does not even claim to be stable.


#172

If there was an error during the validation step of running buildScript.sh, the script never fully completed. The last step get things to start on reboot.

  1. Look at /etc/rc.local and see if there is a line that calls startup.sh. If not, the build did not complete.
  2. Run /home/pi/MVP/setup/releaseScript_Final.sh from the command line. This will load the crontab file and place an entry in /etc/rc.local to run startup.sh when booting.

As to the temperature:
From a command line run: python /home/pi/MVP/python/si7021.py
This will run a test, and should give a good reading of the sensor. That you are getting a reading suggests that the sensor is wired up correctly (you have communication), but checking the wiring is an easy first check; make sure nothing is loose or improperly grounded (bare wires touching). Normally if there is a wiring problem, there is an exception thrown and you won’t get any data. After this I am guessing, it may be a bad sensor.


#173

Thanks for the thoughts.
There is no common software (other than possibly sensor code) between the Personal Food Computer (PFC) the MVP. The MVP was a side project to see if something could be built that was simpler and cheaper than the PFC. the MVP was inspired by OpenAg and started with Caleb’s approval, but is basically a separate project developed outside of OpenAg. We share goals and hope to have integrated data.
I wrote most of the MVP code, and totally agree with you that it could have better management. My background in data modeling, not coding; so this was my first use of GitHub, and my knowledge of Python is quite different than when I started. The MVP was a two month project from conception to first release, and all done in volunteer free time. As we mature, we will hopefully use GitHub more fully.
As to Docker it has the deployment advantage; but having worked with the PFC code before starting the MVP, I found the complexity more than the advantages, especially when the goal was a “Minimal Viable Product” (with emphasis on minimal). We also wanted it to be something easy for high school students to hack with only basic Python skills. As we grow, we will likely reconsider many of these decisions.
I have not looked into Ubuntu Core. Raspbian has been ‘good enough’ for now. I am sure there are better options (we have looked at real-time systems and other hardware), but the familiarity for many students has been a factor for the Raspberry Pi and Raspbian.
Thanks for the thoughts.


#174

Thanks for not getting me wrong. People usually look at you as enemy when you criticize their work.

By the way, I just noticed that this GSoC project also refers to the PFC code: https://wiki.debian.org/SummerOfCode2018/Projects/OpenAgricultureFoodComputer


#175

@dashohoxha There is another reason as well for not using GitHub as our only repo is that very few of our intended “customers” have familiarity with it. We are trying to make this project appeal to high-school students as well as teachers. While I do agree and intend to utilize GitHub more for revision control, as you can see from the organic discussion that has developed here - many more builders are comfortable with the forums.

Also, here is the wiki page for the MVP. I will add it to the first post on this thread as well.

https://wiki.openag.media.mit.edu/mvp_1#additional_help

Lastly, keep in mind when we got started with this we weren’t really sure what the level of interest would be. The fact that so many people now are interested and want to participate has us playing catch up (while also having other full-time commitments) to support this project.

Please - don’t get me wrong - I want a better system for revision control. From what it sounds like you have some good ideas for improvements and I for one am very open to making our project more accessible to other software developers.


#176

Hi. Someone sent me a link to this topic, and this seems interesting. I’m a software engineer and also like to do some electronics development.

I started experimenting with hydroponics a few months ago with the IKEA Växer system: http://www.ikea.com/ch/de/catalog/products/S39158216/ For around 100$ I can get a nice enclosure with white growlights, a germination set with stone wool, a growth container for 8 plants, a bottle with nutrients and a few seeds for salad, basil and others.

Here are the results of the first attempt (BOM cost ~100$):

What I didn’t do is measuring PH or EC. For the germination phase I did not add any nutrients, afterwards I simply added more water with nutrients once the water started evaporating. After harvesting, I simply replaced the entire water. That seemed to work nicely.

In the meantime I have gotten myself an EC/PH meter and calibration solution, haven’t used it yet though.

So my question:

  • What would the 300$ food computer give me besides some temperature stats? Wouldn’t it be enough to simply keep the temperature between 20-25°C (regular indoor temperature)? From what I understood, it also controls an air pump used for oxygen in the water, right? Is there a big benefit from that? (I didn’t use any air pump.)
  • Is there a big advantage from using a Raspberry Pi if the EC/PH measurements and balancing aren’t automated and still need to be done manually? Is it planned to automate that too? (If yes, do you know of any EC/PH sensors that can be talked to via serial or I2C?)
  • Are these bulbs from your BOM suited as growlights? Did you test the spectrum, or was it a random choice?

#177

@webbhm Thanks for the OpenAg-MVP-II code. I made some changes to the code to get the camera to work.

OpenAg-MVP-II/MVP/scripts/MVP_cron.txt
Line 13 MVP_SCRIPT is missing a “S” otherwise line 35 & 38 won’t run (webcam.sh and render.sh)
MVP_SCRIPTS=/home/pi/MVP/scripts

Also in debugging I noticed two of the log files were empty and that the original OpenAg_MVP_UI was slightly different.

OpenAg-MVP-II/MVP/scripts/startCouchDB.sh
Line 12 is missing a “>” right before the log file and should read
nohup sudo -i -u couchdb /home/couchdb/bin/couchdb &>/home/pi/MVP/logs/couchdb.log &

OpenAg-MVP-II/MVP/scripts/startServer.sh
Line 16 is missing a “>” right before the log file and should read
nohup python /home/pi/MVP/python/server_8000.py &>/home/pi/MVP/logs/server.log &


Libraries & Food Computers: PLIX Build (Public Library Innovation Exchange at MIT Media Lab)
#178

Actually I would have started with the code of PFC, disabling the features that are not needed for MVP. But I am not sure whether it would work. Or maybe you already tried it and it was too difficult.


#179

@dashohoxha The reason that we did not take that route was primarily the implementation of ROS as well as the fact that openag_brain uses both Raspberry Pi, and Arduino hardware.

@rbarta Thank you very much! This is great - have you completed your build yet?

As a bit of context for everyone - the MVP project began last May with this post: MVP - Community Development. Much of our discussion around design happened here: MVP - Product Design where we discussed all sorts of things that several of you are bringing up.

@dbrgn To answer your questions in order:

  1. I’m surprised you didn’t have an air pump with the IKEA system. I’m actually a huge fan of what they’ve put out, unfortunately for me (United States) I can’t get one - honestly, I’d love to use what they have as the base platform for MVP. Trying to find that kind of a kit (without getting scammed) is easier said than done. With regards to temperature, you’re correct. @house @webbhm are working on computer vision to record the plant area as well.
  2. @ferguman I believe has already added pH/EC for the Atlas Scientific sensors to our MVP stack. This is what most of us are using right now, though I hope to find a cheaper alternative. https://www.atlas-scientific.com/kits.html
  3. The GE lights aren’t specifically intended for horticulture, that being said, I’ve used a lot of lights to grow with - and for less than $20, I have yet to find a better solution. We have a Quantum meter to measure the output and find that at the top of the reservoir we’re getting 240 umol (using all four BrightStiks as the BOM suggests) - plenty for most leafy greens.

#180

Hm, yeah, you’re right… Seems like the only thing from the Växer series they’re selling in the US is the LED growlights: http://www.ikea.com/us/en/search/?query=växer

Yeah, these sensors look good but are quite expensive.

There are some really cheap EC sensors on Aliexpress but they’d require additional electronics and I have no idea how accurate they are…

Maybe some of the ready-to use measuring kits could be hacked to extract the data in a machine readable form.

Note that different wavelengths have different effects on growth, it’s not just about the total energy :slight_smile: Here’s an interesting video:


#181

@Webb.Peter

Peter, One of “GE Bright Stick” has a 240 PPFD? It is really high value. I want to listen to you about the experiment with the GE bulb : ). Till now I changed GE bright Stick to Growing LED in Local market. Each LED bulb to growing plant has a 66 PPFD ( From the 300 mm ).

Thank you : )


#182

Good catch, thanks for the help.
I am running a test environment, so often don’t catch some of these
production issues as I don’t look at my production Raspberry very often.
These have been changed in GitHub

Comment inline

rbarta http://forum.openag.media.mit.edu/u/rbarta
February 13

@webbhm http://forum.openag.media.mit.edu/u/webbhm Thanks for the
OpenAg-MVP-II code. I made some changes to the code to get the camera to
work.

OpenAg-MVP-II/MVP/scripts/MVP_cron.txt
https://github.com/webbhm/OpenAg-MVP-II/blob/master/MVP/scripts/MVP_cron.txt
Line 13 MVP_SCRIPT is missing a “S” otherwise line 35 & 38 won’t run
(webcam.sh and render.sh)
MVP_SCRIPTS=/home/pi/MVP/scripts

Yep, need consistent variable name - fixed this.

Also in debugging I noticed two of the log files were empty and that the
original OpenAg_MVP_UI was slightly different.

OpenAg-MVP-II/MVP/scripts/startCouchDB.sh
Line 12 is missing a “>” right before the log file and should read
nohup sudo -i -u couchdb /home/couchdb/bin/couchdb
&>/home/pi/MVP/logs/couchdb.log &

Fixed

OpenAg-MVP-II/MVP/scripts/startServer.sh
Line 16 is missing a “>” right before the log file and should read
nohup python /home/pi/MVP/python/server_8000.py
&>/home/pi/MVP/logs/server.log &

Fixed


#183

@Webb.Peter
A couple of shell script typos were recently caught. Check your and see if you have these issues. You can simply open the .sh file in a text editor and make the changes.
Sorry for not catching these earlier.


#184

@house I edited my post to clarify - I was referring to if one is using all 4 bulbs as listed in the MVP BOM.

Also, that’s a measurement when inside of the MVP as suggested in the documentation. We went with the mylar because of the light loss/inconsistency that would otherwise take place. This way we can know based upon the “environment” what a users PAR was without them having a $300 sensor.


#185

@Webb.Peter Started a build with this …
MVP%20Start%20Build
With a bit of recycling I ended with this … (an old Hard Drive cable attaches to the Raspberry PI will still need to cleanup those wires)

I have the MVP II software running on top of a OpenHAB (openhabian) environment which takes data from MySensors. The powerstrip of the MVP is plugged into a WeMo Insight Smart Plug so that it can track the power through OpenHAB2.

As for water level I was thinking of implementing something from 3Dponics
manual-non-circulating-8

For now, I’m trying to keep the KISS principle (“Keep it simple, …”), but that never lasts long.