the video link
https://vimeo.com/227415473
Inspiration
Some people, including myself, don't eat their food on time because they are either lazy or just don't know how to keep track of what is stocked on their fridges. As a result, the food is found to be rotten or decayed, and the people have no choice but throw it to the garbage, causing their money as well as food to be wasted, and the environment to go bad.
What it does
EatInTime is just like a regular food container people use, but has the sensors that would help its costumers know the condition of their food. Based on the fact that the decomposition of food emits some hazardous gases such as methane, ammonia, and a group of carbon gases, EatInTime uses a gas sensor that would measure the amount of gases, namely methane (CH4), ammonia (NH3), carbon monoxide (CO), and other carbon-attached gases. The measures of harmful gases emitted as a result of food decomposition are believed to be stronger indicators of what stage the condition of food than other indicators such as temperature, humidity, light, and so on.
How I built it
The product has Arduino 101 along with Base Shield V2. On top of the stack, it uses the Grove multichannel gas sensor to read the measures of eight gases, namely . It uses the serial communication to write the data in JSON format.
The data sent is read by the Java code that utilizes the client library for serial communication. One of the data that is a strong indicator of the food decay is the measure of methane (CH4). If it exceeds a certain threshold value, an alert message will be generated and sent to your phone. The alert message is made using Twillo API.
Challenges I ran into
We had a lot to learn about hardware for this project. Coming from the background in software engineering, we were not experienced with Arduino and hardware controllers. One of the challenges was the best sensors to choose. I researched about sensors that detect different kinds of harmful gas. They include a family of MQ sensors. Each MQ sensor detects one or more different gases, which at first glance could be a good solution. But because each MQ sensor detects different kind of gas, I had to purchase three or more sensors, costing too much money. Other problems include the fact that the MQ sensor that can detect different kinds of gases cannot tell which gas is being detected. So the MQ sensors were useless.
As a result, we had to search for an ideal sensor that could detect multiple gases and tell which gas is being detected. After a series of research in the internet, I found the Grove multichannel gas, which is designed to both detect eight kinds of gases, including the gases emitted as a result of food decay, and had client library to give the measure of each individual gas. By having the gas sensor connected to the I2C port in the base shield, the 101 controller is able to detect and give the measure of each gas.
The other challenge was the lack of wireless communication in Arduino 101. Initially, I wanted to design the system such that it would have a web server that handles the request to post new sensor data to the database in the web server. And we wanted the system to be wireless, so we had to research a number of solutions and pick the best one for the project. At first, I decided to use 101's CurieBLE module along with my Intel Edison as a gateway to web server. Because the 101 has Bluetooth Low Energy technology, it can broadcast the data and help the central device grab the data. Because I had Intel Edison with Arduino breakout board, However, the 101 as a peripheral couldn’t make itself active, as it couldn’t be connected to the central.
So I tried to use Wifi connection to send the data to the web server I have, but I couldn’t find a way to make it work seamlessly. Arduino 101 Wifi shield could make my life extremely easy, but it has been out of stock in every hardware shop, causing me to give up on it. Then, I tried Arduino Yun shield, which opened me to a lot of different methods to connect the board wirelessly. But as I did not have much time to experiment with embedded linux and its powerful features, I decided to put the shield into later use.
Still figuring out the connectivity solution for the Arduino 101, I realized that the deadline was approaching. At that point, I had no choice but to use serial communication method to read the data from board using another project. Now it works fine, but I believe that the project I am presenting is just a mere proof of concept and not something to be sold commercially. So I would like to dp more research onto the wireless communication with regards to the 101 board.
Accomplishments that I'm proud of
My accomplishment in this project is that I got to have hands-on experience with the system design of the Internet of Things project. From the hardware design to the data storage to the front-end development, we were in charge of every process, and I was very glad that I go to know a lot about the technical skills useful for the IoT project
The other thing I’m proud of is that I found the fact that some harmful gases are emitted as a result of food decomposition. This led me to realizing that the gas sensors available can be used for this purpose besides air quality measurement, and has a lot of potential to contribute to food & agriculture-related business.
What I learned
I learned about how to program hardware in general and make network connection. I first learned about Arduino and its usability in simple IoT application development. I also learned how to program in embedded linux environment by experimenting with other hardware such as Intel Edison and Arduino Yun. I also learned of the available sensors that are useful for a different kind of projects.
On the software side, I also got to learn about the API endpoint development using Spring Boot project. Building functions that connects to the database server and carries out operation on data was the one of the greatest things I learned for this project.
Moreover, I was very excited to have hands-on experience with developing the data analytics application. Using Apache Spark and Scala, I did simple transformation of data from the database and applied the machine learning function (K-means) to generate the result about the health condition of the food and sends the messages to the user. Not only did I learn how to program in Scala but also I learned about the process in general for data analytics, from data cleansing to machine learning model.
What's next for EatInTime
There are lots of issues to consider with regards to the product. In my opinion, the food container may not be the best solution to solve the problem with food waste. It can be a fridge with the gas, temperature, and humidity sensors attached inside, or a very small, non-bulky portable device that you can put inside any food containers people use regularly. To answer this question, I first have to make rigorous market research. Moreover, I need to have more advice from hardware experts, namely electrical and mechanical engineers, to check if the product I present in this competition can have both an elegant design and great functionality. So I would like to get more talents from different fields to work on this project.
With regards to hardware, I would like to use different micro controllers such as WioLink, Arduino Yun, Intel Edison, and so many more! After I realized that I can use open-source embedded programming tools to develop cool things such as Bluetooth connectivity, wifi connection, and the publish-subscribe model among machines, I would like to explore other hardwares and figure out scalable and efficient connected system.
I am also thinking of using weight sensor in the food container. The weight data can be very useful for recommending the proper amount of the food an user may want to purchase. The detail is as follows. The weight is measured along with gas, humidity, and temperature every second. At the same time, the number of alert messages generated is also recorded and stored in the database. The more weight the food has, the more frequent the food is wasted, and the more alert messages are generated. The correlation I just made can be translated into another machine learning-based model, and it can lead to recommending how much less the user may want to buy his particular food.
With regards to software, I am thinking of using tools to make the system scalable, efficient, and analytical. The detail is as follows.
After reading the data, the Java code or the Aruidno sketch that utilizes the WiFi library then sends the data using http request. The request is handled by the Java Spring Boot project, which has the functions to connect to database (MongoDB) and send the data to the database using POST method. The Spring Boot project along with the MongoDB database is hosted in Heroku server. The data can be viewed in mobile application (React Native is used to develop the app). It displays the measures of gas, the alert message about the health of food, and the information about device. The request to retrieve the data is also handled by The Java Spring Boot project.
With regards to the alert message, it is generated by running another project, which is the background task written in Scala. Using Apache Spark, the project retrieves the data from the database and uses machine learning technique (K-means clustering) to analyze the data and determine whether the food inside the container is at the risk of being rotten and inedible. If the food is determined to be seriously rotten, it generates the message (e.g. “Your food is getting bad!”) and stores the data bout the message in the database.
And this leads me to knowing more the connectivity in Arduino 101. I want to find a way to transmit data without any wires or cables. If I found any suitable hardware designed for Arduino 101 wifi, I would add the Wifi component in the Arduino sketch, and would then let the sketch make http request to send the data to the web server.
I am also thinking of using other cloud services that are more tailored to the IoT. The examples include AWS. Its ecosystem enables developers to use different services from IoT to Lambda in order to create a seamless IoT system.
More importantly, the front-end development is critical. The customer-facing application is not existent, and I am so willing to explore features to be added as well as the technical tools to make them. The features I’m thinking of include the visualization of gas, temperature, and humidity measures, the list of alert messages sent to the end-user, the information about device and food it contains, the order services (such as Button SDK for food order) that helps uses get the fresh food, and so much more!
Log in or sign up for Devpost to join the conversation.