Food Re-distribution

Made by Ariel Yu, Hongxun Jin, Tiancheng Yang and xinyixu

Found in DioT 2019: Connected Communities

An IoT project that helps re-distribute community food to reduce food waste.

IOT Final Proj
TC Yang -


According to the US Department of Energy, there are 61.2 million tons of food waste across the United States every year, an amount that can feed 112 million people for one year. What's worse, among all the amount of food wasted, 60 million tons is avoidable, the amount that accounted for 29% of the overall annual production. Because of the development of society, food wastage has become a more and more severe issue, the overall food waste has increased by 50% during the past 45 years. With the increased accessibility to abundant resources, people tend to over-acquire and fail to consume the resources.

Within companies and governmental or educational institutes, people order food for all kinds of events and meetings. We observed that in order to minimize the risk of not getting enough food for everyone, event/meeting organizers often over-order food. In addition, especially within campuses, a lot of people are not showing up for the events they registered for, leading to the overestimated number of people for events. These phenomena happening every day and everywhere are causing a huge amount of avoidable food waste. As a result, in order to truly avoid these food waste, our project combined the IoT technology to aim at the realization of re-distributing excess food resources within communities. 



Describe how you define community and the kinds of support and perceived needs you identified for that community. Back up your claims with relevant citations and references.

Our eventual goal of the project is to re-distribute food within the community of generation. For example, over-ordered food from a meeting of one department of a company should be resolved within the company (multiple departments and colleagues). In this particular project, we started from the community of Carnegie Mellon University Pittsburgh (short as CMU) Campus. CMU is an educational institute with nearly 15,000 students and 1,400 faculties. Within the campus, there are academic, career-oriented, leisure, extracurricular, cultural, etc. events/meetings going on every day, and nearly every event provides snacks or meals. Our team members, as CMU students, observed a considerable amount of excess food thrown away or left randomly somewhere after events. Meanwhile, students in CMU are always hungry and fond of food or snacks. Hence, within the CMU community, we foresaw a balance between supply and demand for the over-ordered food. And thus, we decided to start our project in the community.


Inspiration and Context

What are the precedent projects? Describe what informed your ideas and your outcome? How does your outcome relate to other work in the field? 

Similar ideas have been explored by multiple groups including MIT media lab and some CMU departments. However, we want to take a step further. There are dedicated tables for leftover foods on the CMU campus, but they have shortcomings in two ways: First, people don't know if there is food there, or if the food is still there. Second, they are isolated and not easily accessible. In this project, we want to build a system of connected leftover food tables to connect all of them together. 



Outline your approach to the project? What ideas did you generate, and how did you refine or reject them? What did you research and explore? What were the design choices? What challenges were encountered, and how did you resolve them?

We researched the CMU community through observation and brief interviews, we know that there are over-order food and people seeking for snacks. Also, since people are all from the same community, they feel good about communicating with each other if there are conversation starters. Hence, under the operation of our project, we can connect people in the CMU community to re-distribute food and to build networking. With the goals in mind, we ideate the part of implementation with the combination of IoT technology. Initially, we had the basic concept in mind that we will be building a system that helps re-distribute excess food resources. The technic is quite simple: on the selected spots on campus (usually located within the hall of each department building), there is a food station (a table for food placing), a food switch on the button (for people with excess food to notify people in the community), and a map with light bulbs that indicates the availability status of food at each food station.

However, after further researches and understanding of the community, we found out that most people are not aware of the severity of food waste generated and do not feel they can be part of this issue. As a result, we eventually decided to go one step further to add an educational layer to our project. We want to raise awareness of the severe food waste problem but also to convey the idea that by a few steps of efforts, everyone can deliver significant contributions to the issue. To realize this, we added a food waste meter to the food station to show the "potential" food waste amount and the deduction of the food waste when it is re-distributed and taken away by people from the community. The technic of this part is to add a load cell to the food station to provide input data of the food waste weight and connect it to the food meter so that the increase and decrease of food can be visualized.  


Conceptual Design 

At the end of the day, there are three expected goals to be achieved in this project. Firstly, to raise awareness of the food waste issue, how much food waste is generated among the community, and how everyone in the community can go one step further to make changes and prevent the excess food actually to become waste. Secondly, to encourage people to communicate with others. We expected this project to be a good conversation starter because we know that food is always a good thing for people to start the conversation. Last but not least, to create the connection among the dots of the community to make relationships closer. Currently, departments in CMU are mostly isolated without too many interactions. We expect this project to bring all the departments and institutes together to the network of the whole community.  

In this stage of the project, we selected three spots on the CMU campus to implement our food stations. Each table was installed with a load cell amplifier and meter to indicate the amount of available food, and a noticeable food switch ("food here" on one side, "I took the last one" on the other side) is designed to show the availability. The map with inserted LEDs was put on the panel to display the availability in different spots on the campus.



To see how our project works, we created prototypes with foam board and cardboard, and they consist of the following parts:

Food Station- With a load cell attached to the bottom, the food station is the input of the IoT system. It can not only act as a location where people re-distribute excess food but also measure the weight of the "potential" food waste so that people can visually see how much surplus food is generated and can be avoided. 

Food Switch- The input of the IoT system. A switch located on the food station which is connected to the cloud with Particle Argon. When the switch is turned on, as an indicator of food available, it signals to light up the light bulbs on the food map. Each switch at a location is connected to the light bulbs on a specific site, representing the food availability of that location. 

Food Waste Meter- The output of the IoT system. Connected to the load cell, the meter shows the load of the food on the food station, visualizing the increase and decrease of the food resource to highlight the issue of food waste as well as the contribution of individuals. 

Food Map- With several light bulbs pinned to the selected spots with the food station, the food map is the output of the IoT system. Connected to the food switch, the light bulbs turn on and off according to the signal sent by the switch ("food here" to on and "I took the last piece" to off). This output plays the role of providing and spreading information about food availability to people within the community. 


Toggle switch *3

Particle Argon *3

LED *9


Load cell *3

Micro servo *3

To sum up, we used 3 Particle Argons for the 3 sites of selection on campus (Tepper Business School, Gates Computer Science Department, and Cohon University Center). Each Particle Argon connected 3 light bulbs(representing 3 locations), 1 micro servo(to control the meter), 1 load cell(to measure the weight of food), and 1 toggle switch(receive signals from people providing and taking the last portion of food). 

// This #include statement was automatically added by the Particle IDE.
#include <HX711ADC.h>

// This code is for Siot
// Red signal
HX711ADC scale(A1, A0);

// set up servo
Servo myservo;
int servoPos = 0;
int servoPin = A3;  //declare variable for servo
int pos = 0;        //variable to keep track of the servo's position
int lastPos = 0;        //variable to keep track of the servo's position
bool flag = 1;      //variable to keep track of the button presses
bool motorOn = false;
int difference = 0;

// set up fsr
int forcePin = A5;
int forceVal = 0;

// set up LED
int blueLEDPin = D4;
int yellowLEDPin = D2;
int myLEDPin = D0;
bool blueLEDOn = false;
bool yellowLEDOn = false;
bool myLEDOn = false;

// set up button
int button = D8;
bool lastState = false;
bool currentState = false;

void setup()
    // set up pinMode
  pinMode(blueLEDPin, OUTPUT);
  pinMode(yellowLEDPin, OUTPUT);
  pinMode(myLEDPin, OUTPUT);
  pinMode(button, INPUT_PULLUP);
  // subscribe
  Particle.subscribe(  "diot/2019/final/tea/blue" , handleBlueEvent );
  Particle.subscribe(  "diot/2019/final/tea/yellow" , handleYellowEvent );
  // setup servo
  myservo.attach(servoPin);  //Initialize the servo attached to pin D0
  myservo.write(180);        //set servo to furthest position
  delay(500);                //delay to give the servo time to move to its position


void loop()
  forceVal = scale.get_units();
    currentState = (digitalRead(button) == LOW);
    pos = map(forceVal, 110000, 900000, 0, 180);
    pos = 180 - pos;
    pos = (pos > 180) ? 180 : pos;
    pos = (pos < 0) ? 0 : pos;
    Serial.println(forceVal, 1);
    Serial.println(pos, 1);
    // publish my event
    // you'll want some more complex stuff here
    if (currentState) {
        myLEDOn = true;
        motorOn = true;
    } else {
        myLEDOn = false;
        motorOn = false;
    if (currentState != lastState) {
    // blue LED
    if (blueLEDOn) { 
        digitalWrite(blueLEDPin, HIGH); 
    } else {
        digitalWrite(blueLEDPin, LOW); 
    // yellow LED
    if (yellowLEDOn) { 
        digitalWrite(yellowLEDPin, HIGH); 
    } else {
        digitalWrite(yellowLEDPin, LOW); 
    // red LED
    if (myLEDOn) { 
        digitalWrite(myLEDPin, HIGH); 
    } else {
        digitalWrite(myLEDPin, LOW); 
    difference = lastPos - pos;
    if ((difference > 5) || (difference < -5)) {
        if ((difference < 170) && (difference > -170)) {

      delay(500);           //debounce and give servo time to move
      //Serial.println(pos);  //prints to the serial port to keep track of the position
       lastPos = pos;
        } else {
    } else {
             Serial.println("no change");

    lastState = currentState;
    // delay for a bit

void publishMyEvent()
      String eventName = "diot/2019/final/tea/red" + System.deviceID();
      Particle.publish( eventName, "data goes here" );


void handleBlueEvent(const char *event, const char *data)

    blueLEDOn = !blueLEDOn;

void handleYellowEvent(const char *event, const char *data)

    yellowLEDOn = !yellowLEDOn;
Click to Expand

Next Steps

Since our ultimate goal is to implement the project within all the communities, including companies, campuses, etc., we will learn from the small scale prototype within the CMU community.

During the current stage of prototyping, demonstrating, and feedbacks, we concluded the followings as our next steps:

1. Technically, the inputs we got from the load cell are quite noisy. During the demonstrating process, we had trouble to keep the output of the load cell, the food meter, stable, leading to several confusions. 

2. When we are expanding the scale of food re-distribution into the whole community, we need to take into consideration of the food safety problem. To ensure the hygiene and safety of re-distributed food, we might need to corporate with the cleansing staff of the community to guarantee the freshness of food and install monitor cameras along with the system to avoid food toxins. 

3. Improve the fidelity of our project to make it more engaging and eye-catching. 

Share this Project


49713 Designing for the Internet of Things

· 16 members

A hands-on introductory course exploring the Internet of Things and connected product experiences.

Focused on

An IoT project that helps re-distribute community food to reduce food waste.


December 7th, 2019