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


#1

This thread follows and supports librarians at Akron-Summit County Library and the Culinary Literacy Center at the Free Library of Philadelphia as they build, modify, and use the MVP 1.0 - the minimalist Personal Food Computer developed by OpenAg Community members - at their libraries in 2018.

This exchange is part of the PLIX project, which brings the Akron and Philadelphia libraries together with the MIT Media Lab Open Agriculture and Learning Initiatives to collaborate on building, improving, and creating library programming around Food Computer technology.


#2

Reposting our initial post…
Opened and inventoried boxes of food computer components. Then separated them into the various modules for which they are designated.
Still waiting on a few components to begin building, but so excited to get started!
20171212_173154sm
Inventory
20171212_173143sm


#3

Sorry to post this huge log in all together.
1/17/18
Ready to prepare materials
Main change in our food computer is the addition of 2 clear Plexiglas sides which will allow viewing of the interior.
These panels are 24”x36”. In order to avoid cutting these (they are somewhat fragile) we’d like to increase the height of the food computer PVC to match the 36” Plexiglas.
? Will there be enough PVC?
The instructions indicate that the PVC should be cut into
8 21.5” pieces for the horizontal sections
And
4 30.25” pieces for the vertical sections
The 21.5” sections plus the two elbow sections should be 24”
24”-21.5” = 2.5” (this means two elbow joints add 2.5” to the width of the horizontal bars.)
Therefore, to match a 36” height we should cut the vertical bars 2.5” shorter than 36”
36”-2.5” =33.5
So we need 33.5 long vertical sections instead of 30.25
Each PVC pipe is initially 10 ‘ or 120” long
21.5” X 4 = 86” 120”-86” =34”
Cutting two PVC pipes this way will leave the third to be cut into 2 33.5” long sections and
120-(33.5x2) =53” left over
So… plenty of extra PVC.
Indeed… If cutting uses up more than the available .5 inch extra in the first two sections cut, we can also cut the first into 5 21.5” lengths, the second into 3. Cut 1 additional 33.5” section from the second pipe, and 3 33.5 sections from the third.
21.5” x 5 = 107 21.5” x 3 = 64.5 33.5” x 3 = 100.5
Still plenty of PVC

1/18/18
Prepared parts documentation
I’m having a bit of a hard time reading the print out of these slides with the dark background color.
Slide 2- 3 – Power Supply assembly - clear and straightforward.
Slide 4-9 – Growing Bin Lids - Due to the center brace bar configuration of the bin lids we received, it was impractical to place a net pot hole directly in the center… we decided we would put 4 pot holes on each side of the center brace bar. This will give us a total of 16 pots rather than 12, but there are sufficient pots in the kit to cover these additional spaces. If the seeds we sprout require additional space, we can choose to use only some of the available spaces.
We also didn’t have a keyhole saw, so used a mat knife with much success.


1/22/18

Slide 10-13- Computer Fans - clear and straightforward.
Slide 14-17 – Extension Cord - clear and straightforward.
Slide 18-20 – Light Bulbs - Cut with a dremmel tool.


Deburred with a butter kniffe.

Slide 21-31 – Mylar - Waiting to do this because we’re re-orienting the Mylar sheets to go vertically around the enclosure rather than horizontally.
31-34 – Plywood Top - Pretty clear. Used a little pump hand drill so I got a work out. Having actual dimensions for the side mounting holes (eg. ½” from the side and 1” apart) would be helpful.


#4

38-40 – Temp/Humidity Sensor - Had some problems figuring this out. The description might indicate that the short ends of the pins are inserted into the bottom side (side away from the white square or side which has a star on it.) Then flux is applied to the tops of the pins which stick through the sensor. A close up for this would be helpful… the long shot provided became pixelated when enlarged and was difficult to see.



1/23/18
Prepared parts documentation
35-37 – PVC Tube – Cut with rotating PVC cutter on 1/23/18 which allowed greatest precision with cleanest end and least angular deformation. Might suggest cutting each section before measuring for next section to prevent uneven lengths due to loss of PVC at cuts. Still needed to trim/smooth PVC sections so they would fit into the corner joints.

MVP Software Guide
Since we knew we’d need to program the Raspberry Pi before installing it to the top of the MVP, we decided to do so now.
This process went pretty smoothly once we figured out a workable configuration of hardware. Our library doesn’t have USB connected keyboards, mice, or monitors. Nor do most of the computers have SD card slots. Including these items as required materials (along with an HDMI cable) on the second slide of the instructions would be a big help. We ended up using a presentation monitor connected with an HDMI cable, and a USB keyboard and mouse borrowed from our IT staff.
It would then be great to include a slide between 3c and 4 to show how to connect the various options for IO devices.
Also, on slide 6, you might consider rephrasing the instruction to read
From the terminal, run the software update. Type: sudo apt-get update
We started by typing run: sudo… (guess I’m showing my age with throwbacks to my DOS days.) :slight_smile:


#5

1/25/18
Brain Assembly today.
Things moved along pretty well till Slide 13, where we were temporarily flummoxed because the wires were different colors than the ones in the Slide 9 image. Since our relays had many extra wires, we decided to go back and redo the relay attachments using the colors from the Slide 13 image. This made connections pretty straight forward.
When we got to installing the Mylar (slide 17), we ran into a situation where our modifications made us do some refiguring. As we are wraping our Mylar vertically rather than horizontally (because two of the sides are going to be Plexiglas) we figured if we could reduce the number of small pieces of Mylar by using a single piece to form the front door, cover the underside of the top, cover the back and go underneath the entire enclosure on top of our additional piece of plywood, it would reduce the amount of Reflectix tape we’d be using. We figured the piece would need to be a total of 120 inches long:
24” bottom
36” back side
34” top
36” front
120”
We cut the first piece adding a few extra inches to accommodate the corner curvature, the width of the bottom board, and a lip on the front to which to attach the front door. Connecting all this to the top and bottom of the PVC frame was a bit of a logistical challenge, but we got it put together.



#6

A few pictures of our programming day.



#7

1/26/18
Final Assembly today
We started with the installation of the Plexiglas sides, zip tying them to the PVC frame and along the back to the Reflextix. Cutting holes in the Plexiglas was super-fast, and using a heavy duty 3 hole punch. No problems with cracking the Pexiglas and when the protective sheeting was removed, the sides are nicely transparent, providing viewing of the internal working of the Food Computer
The rest of the components went together quite smoothly. We’re going to wait on our final taping of the side, top and bottom edges to be sure that everything is working correctly.

Two issues we discussed as we finished construction:

  1. We should have placed the bottom layer of Reflectix inside the bottom plywood to prevent the wood getting wet. We’ll use a tray or some of the extra Reflectix to cover the bottom if needed.
  2. Due to our environment, we expect that we will want to create some sort of cover for the electronic components on the top of the Food Computer to protect it from both dust and wandering hands of some of our patrons. We talked about using shoe boxes with ventilation slots cut in the ends (at least temporarily.) If these seem to work, we can get some similarly sized plastic boxes and cut slots in those.

Hooked up and restarted the Pi, but no temp or humidity data is registering. Going to have a radio guy take a look at our solder on the sensor to check it’s solidity.

Also noted that the date is wrong, so will investigate how to reset that too.

1/29/18
Radio guy resoldered the pins to the sensor. This didn’t correct the sensor data issue. Is there another way to test the sensor (or camera) input? At this point i’m not sure we’re getting any input from these devices at all.


Date and Time continue to be incorrect, despite resetting them several times.

Tried installing the ntpdate program suggested here: https://atinkerersblog.wordpress.com/2014/01/15/updating-the-system-time-on-a-raspberry-pi/
but got a permissions error and was hesitant to do anything more.

Further reading indicates it may be a problem with our wifi network: https://www.raspberrypi.org/forums/viewtopic.php?t=13313

Might try: https://www.victorhurdugaci.com/raspberry-pi-sync-date-and-time


#8

Went further back in restart procedures and re-enabled the sensors (I thought these would stay enabled once done… but looks like may have to re-enable each time MVP is moved.) Now getting temperature and humidity data!! :grin:

Used the instructions here: https://www.raspberrypi.org/documentation/usage/webcams/ to get the webcam running. I can now take a picture with it using
fswebcam image.jpg
but the MVP is not recording new images yet.


#9

Wow! I am extremely appreciative of your thorough documentation. Already we have begun to dig through your posts and improve the slide decks.

It sounds like you’ve got everything working, other than the webcam being scheduled from Cron? I actually just had a similar problem, perhaps others have noticed this too @drewthomas89 @webbhm. I plan to elaborate on this post within the next few days/over the weekend but wanted to at least make you aware that we’re here to support you if you have more questions.

Can you clarify what you mean by “re-enable”?

Please don’t hesitate to let us know if you’re stuck, I really do appreciate the constructive criticism!


#10

@mmcneal I think I may know what you mean when you say “re-enabled the sensors”. We realized that in our documentation we have been instructing people to preface the build scripts with “sudo” which in turn was causing files to build with the owner being root - and locking everyone else out.

Cron itself wasn’t executing because each line ended with a readout to the cron.log file (which only root had edit rights too). For anyone who has already built the MVP stack we suggest the band-aid that @drewthomas89 just posted here:

We are working to establish a more robust testing process - and apologize if this caused you any headaches. Let me know if you’re confused about any of these steps or continue to have any difficulties with the software.

@bennis @wolverine1018 @DanB


#11

Good afternoon,

Our office environment was such that I needed to unplug the food computer each night before leaving (extension cords created a tripping hazard if left in the space where we were building it.) When I restarted everything last week, it appeared that the camera, SSH, etc. were no longer enabled. However, when I did the same today after moving the food computer to it’s semi-permanent location, everything was enabled from last week. Mysterious, but welcome!

I’ll reset the permissions before I leave tonight.

The new location will allow us to leave the FC on 24/7 to test that everything is now working correctly.

I was also able to set the time and date manually using the instructions here: https://stackoverflow.com/questions/25374570/how-to-update-date-and-time-of-raspberry-pi-with-out-internet

With all the components working, we taped up the final edges and are ready to get some seeds sprouted.

One further modification we made… after looking at the grommets, we were concerned that they were going to leave big holes for air exchange. We decided to use Velcro circles to hold the door closed. These had the added feature of allowing us to open only a small part of the door at a given time… just enough for a needed task.


#12

I am working in conjunction with Michelle on the food computer at the Akron Summit County Public Library in Science & Technology.
Today we checked to see if the camera took new pictures overnight and added them to the MVP dashboard. No new images appeared so we went ahead and ran the render script again with no success. Here is the error message we recieved.


It does not seem to be activating the camera function.


#13

@Webb.Peter @mmcneal @sjolliff
There my be a quick fix for most people. The problem is with ownership; sudo makes root owner, and pi is suppose to be the owner of everything under pi. This happened by running the buld script with sudo.
Try running the following from a command prompt:

sudo chown -R pi:pi /home/pi

  • List item

#14

Let us know if this fixes the error with the webcam.

If it works, but you are still not seeing the most recent image on the website, go ahead and clear your history. For some reason Chromium (Pi Browser) fails to refresh the dashboard every time, clearing history and reloading localhost:8000 should do the trick though.


#15

Happy Monday!
Ran render script again receiving the same error message:
cp: -r not specified; omitting directory '/home/pi/MVP/scripts/render.sh

So we turned everything off and restarted the entire process:
chron script
startup script
render script (same error message)
opened the browser and cleared the cache
viewed the MVP dashboard… still no new pictures.:face_with_raised_eyebrow:

Going to go ahead and start sprouting the lettuce today in the hope that we’ll get these last bits ready by the time the sprouts are ready to move to the MVP.

Also, I’m assuming we still need to program in the appropriate “recipe” for the lettuce seedlings. I didn’t see instructions for this in the Operational Guide slides, and am not sure where to find them.:white_flower:


#16

@mmcneal @sjolliff As mentioned previously, there have been several problems previously with people running scripts as “sudo bash” rather than just “bash”. I think this is precisely what happened in your situation, and the “Pictures” folder currently has its permissions set so that only the owner can make changes. If you ran “sudo bash” with the build script then it’s very-possible that the “pictures” folder has an owner of “root” instead of “pi” which would keep you from making any changes internal to the “pictures” folder. To fix this you need to re-run the “sudo chown -R pi:pi /home/pi” which will change both the permissions folder, as well as the log files to have “pi” as an owner. It’s possible that because you re-ran the build script it overwrote when you ran this before.

  1. What do you mean when you say “startup script”.
  2. Who is the owner of the “Pictures” folder (right click on the folder, and go to the second tab under permissions).
  3. Are the other charts visible from the MVP dashboard?
  4. As of now, the “recipe” is set to have an 18 hour light cycle, as well as maintain the average temperature at 25 C based upon actuation of the exhaust fan. If you’d like to modify that, I can work on some updates to the operations documentation showing how (it’s easy).

Thanks for working with us - sorry for the confusion, I will try to reply quickly so we can get you operational ASAP.


#17

I was at the Science Center today, looking at their system which has been having similar/same problems. It is an ownership/permissions issue.
The root cause is the instructions saying to run build.sh using sudo. This causes folders to be owned by “root” instead of pi, and also creates a root cron file (which runs scripts as root and builds files as root. Changing ownership of everything in /home/pi to be owned by pi solves part of the problem, but I am still investigating how to get rid of the ‘root’ cron file and get one built as owned by ‘pi’. This will have to wait a day or two till I get home. I think there is a fairly simple fix other than redoing the build; we also need to correct the documentation.


#18

Documentation is corrected - please double check me.


#19

So today we reran the buildscript without sudo. We received an error message indicating a failure testing sensors.

We went ahead and ran through the rest of the procedures (slides 19-25.

With reference to your questions…
1 Slide 21 says to run the startup script every time the pi is rebooted. That’s the script I’m referring to.
2 the Pictures folder is owned by "pi"
3 the charts are visible, but the data is somewhat strange. We are not seeing a consistent temperature of humidity being maintained (which is why I thought the “recipe” wasn’t running yet). We are also seeing data logged for times several hours after the current time stamp of the machine (2:40 this afternoon, when it’s only 9:56.)


On an up note… the seeds have sprouted!:grinning:


#20

Should we just reformat the SD card and restart from scratch?