I worked with Cole Lavelle and Sarah Picciola to create a MVP version of the MIT Food Computer (https://forum.openag.media.mit.edu/t/300-food-computer-mvp/2343). Once completed, a successful project would establish ideal growing conditions for the plant of the owner's choosing and track these conditions and upload them to the internet. The computer would use fans and lights controlled by a Raspberry Pi attached to a relay. The program, run in CouchDB, would track the temperature and humidity inside the computer as well as take a picture of the plants at an interval set by the owner.
I chose to pursue this project because it seemed, and proved, to be a significant challenge that would have a beneficial outcome own both our school and society as a whole if completed well. Our project helps the environment by creating a sustainable and efficient way to grow plants in the modern age of technology.
Our project differed from the source we used in 2 major ways:
1. We used a much safer relay from Digital Loggers to control all aspects of our computer. This relay would be much safer in the unfornate event of a water leakage because it would shut down to prevent anyone from being electrocuted. The implementation of this new relay caused us to have to reimagine how we would lay out the food computer and rewire many of the components we had already implemented.
2. Additionally, we had to alter the python code which ran the food computer. I was specifically tasked with working through all of the code on https://github.com/futureag/mvp to adjust for our new relay, as well as re-wiring the Raspberry Pi no longer according to a slideshow from our source.
Unfortunately our project does not currently utilize solar energy to power itself. However, if we managed to create a very efficient solar cell that could power the relay which controls our entire computer then our project could be entirely self-sustaining.
Note the exposed wire causing a serious safety hazard as our project involves water.
Initally we created a task analysis in order to map out what needed to be completed in our project. We moved through the slideshows detailing how to create the food computer very successfully and were on pace to finish the project as described in our source. However, after speaking with Mr. Dubick we took a vote and decided to follow his suggestion of incorporating the Digital Loggers relay as opposed to the recommended relay. Our rationale was that we could have completed our project for a grade on time, but our food computer would never be able to actually grow food as it was unsafe due to the exposed wires and threat of electrocution. We would have had to fully disassembled our completed project to swap the relays if we ever wanted our project to truly fulfil its purpose. For these reasons we decided to abandon the slideshows and implement the new relay. This was a much larger challenge than we originally anticipated and brought about challenges we could not have forseen. We had to take apart all and discard some of the wiring we had successfully completed because it would not be needed with the new relay. Additionally, we had to reorganize how each component fit onto our computer. Finally, as I will explain in more detail later, the code had to be altered so that the computer could function under the new relay. The combination of these factors resulted in our project not being finished by the original due date as the code could not be install correctly to allow the computer to function as intended.
We utilized the hand drills, PVC cutters, and table saw in creating the physical aspects of our project. As well as the laser cutter on default settings for cutting wood for the roof of the computer for aesthetics in hiding the electronics.
All of the python files used to run our program can be found on https://github.com/futureag/mvp. The files we used to 3D print can be found below in this folder.
For a general procedure the task analysis (found above) can be viewed.
The initial creators of the MVP did an excellent job creating a detailed and easy to follow procedure in separate documents (found below). However, wherever they reference the relay, especially in the Brain Subassembly document, we used the Digital Loggers relay instead. Additionally in the Brain Subassembly, when the wiring was done to the Raspberry Pi from the relay, no 5V wiring is needed, and the rest are connected to the Digital Loggers relay and additional safer relay we used instead. Finally, in the MVP Software documentation I manually built the majority of the setup scripts because the overall setup script that was intended to build all scripts had a bug in building CouchDB. This error was that within one of the python files a website with a European address was listed. This website no longer existed and prevented the rest of the script from being run. After editing this file and re-writing the lighting and fan scripts to account for the new wiring and relay the rest of the documentation is correct.
Our most important decision was whether or not to make the change to the safer relay or not. Our thinking behind this decision was explained above. A video testing and showing the function of this relay can be found above as well.
As a group we had several mistakes that ended up allowing up to become more careful and move forward. Early on in the process we wasted an entire class because we misplaced our Raspberry Pi and SD card. We learned the value of labeling our items and ensuring that every component is put away at the end of each class. After switching to the new relay we became frustrated as a group at the reversal of our progress and failed to quickly redo our work with the new relay, we could have saved plenty of time if we had been more efficient with our time.
Personally, I did not initally take the time to understand our code and how it interacted with and controlled each element of our computer. In an ideal world under the original design I would not have needed any knowledge of python whatsoever in order to complete this project. I would only have simply needed to type around 10 lines of pre-determined code, and simply watch as the program essentially created itself. This was a drastic error that I will never repeat again as I believe that no one in our group truly understood how or why our computer would work. As soon as the code ran into its first issue I was clueless on how to overcome this error. That night I spent 3 hours reading through every single line of code provided by our source. I taught myself how each script interacted with other files and the hardware itself. I now have the complete knowledge of how our computer exactly functions. After I noticed the European website causing the initial error and fixed the problem there was an error in the lights. Due to my dramatically improved understanding of our project I was able to not only quickly fix this issue and turn the lights on, but also edit the schedule of the lights so they turn on and off whenever I choose, rather than what the creators initally decided.
Completing this MVP Food Computer was an incredibly difficult and stressful experience. After its completion I have a much more profound understanding of electronics and the hardware we used to create this computer. Prior to working on this project I had very little understanding of the function of relays in general. Now, I can explain the unique differences of 3 different kinds of relays along with being able to code programs that actually work for each one of them. I have grown tremendously as an engineer by completing this project and am glad that I took part in this immense challenge.
I have never before attempted a project of this magnitude and I know now that relying on your team members is essential to being able to complete a project of this scale. I was able to focus on the wiring and coding aspect of our project. As I explained directly above in the mistakes section, I did not fully comprend what our code fundamentally did. I was able to complete the complicated wiring with ease when I could follow a diagram, but then had to read through and edit certain lines of code to account for the changes we made to our project. For example, I switched the pin number which controls the lights in the code and then had to re-wire the Raspberry Pi accordingly as shown below. After doing this still relatively simple action, I learned that I did not need to follow a set of instructions one after the other to sucessfully complete a project. All my efforts culminated when I managed to find a workaround to building CouchDB, the software which tracks the conditions of our computer. I had run into an error at least 10 times when trying to run different scripts available to me. So instead I researched the problem and found a binary file with thousands of lines of code that claimed to work. I downloaded and implemented this file, and now our Food Computer can track the temperature and humidity of the conditions inside.
Moving forward I would like to actually plant the lettuce seeds we have. I'm confident in our project and believe that allowing the food computer to attempt to do exactly what it was built to do is the only logical next step. Additionally, we can certainly improve the aesthetics of our design as right now it is simply a mylar box with a smaller pink box on top. However, I believe less in appearances and more in function as long as our electronics are hidden, which they are. Should our Food Computer function as intended I believe that an interesting next step would be to power the Digital Loggers relay, which powers our whole computer, using solar energy. If our program relied on solar then it could be kept outside as there would no longer be any need for an outlet to power the project. Growing plants is meant to be an outdoor activity, so this would only be fitting.