Inspiration

How often do you think about food? Think about the environmental impact of that food which we eat every day. Even a small impact multiplied over the course of many days becomes significant. We can purchase local produce to reduce the energy costs of transporting our food, but when local crops are out of season it becomes more difficult to tell which of the options at the grocery store has reached us with the least environmental impact. Produce is also often stored for extended durations to be made available when it is out of season. This storage leads to increased environmental costs due to energy being spent on temperature control and anti-ripening chemicals. Consumers should be aware of the implications of how far food travels and the processes used to keep it appetizing.

What it does

Our plan is to create an accountable tracking system for food transport by having micro-controllers accompany shipments. The distance and time that it takes for food to travel from "farm to fork" will be stored in a publicly available blockchain. A consumer user interface will allow our program to interact and display a map of the various depots and distribution centers along the journey to the grocery store.

How we built it

AppleTrack has three distinct components: the tracking hardware, the blockchain backend, and the consumer app frontend. The hardware used for tracking shipments are Particle Photon microcontrollers and DragonBoard embedded system. The small Photon runs on batteries as it travels alongside the food shipments as produce tags. The DragonBoards are static at shipment depots and send information about shipments to the blockchain database. After the depot systems search for available wifi devices, the MAC addresses found are compared to known MAC addresses for tag photons. Once the DragonBoard recognizes a tag photon on wifi, the shipment will be at the depot, so the DragonBoard will then upload this information to the blockchain. The backend was built in JavaScript and utilizes the BigchainDB framework, which is based on MongoDB. Bigchain is decentralized, and is more secure when nodes are operated by a diverse array of companies across a broad geographic and international area. These features make it an industry wide adoption of the blockchain for tracking shipments feasible. The database holds time, and location data about the shipments. The frontend was written in JavaScript making use of the React library. The positions of these checkpoints along the produce's journey is then displayed using the Google Maps API. The user will select which produce to search for and their location will be automatically used to query the database.

Challenges we ran into

One major challenge that we faced was implementing communication between the produce shipment tags and the depot controllers with the limited hardware that we had access to. Our team was more familiar with the raspberry pi than the DragonBoard, however we found ourselves without a functional OS for the pi, and the internet access situation precluded a fresh download of Raspbian. We were also challenged by the limitation of the Particle Photons to only communicate via wifi protocols.

Accomplishments that we're proud of

By the end of the hackathon the team was happy to produce a solution that enabled hardware to track shipments, and store that data to a blockchain database, which could then be referenced through the frontend user interface. The team was able to overcome obstacles faced in terms of things such as the poor state of wifi at the competition. We are also proud to have successfully used hardware that we were initially unsure of in addition to finding a solution to the challenge of communicating between our hardware devices using only wifi protocols.

What we learned

We learned a lot about implementing blockchain. We practiced getting the interactions between the front and backends of our JavaScript programs. We expanded our knowledge of bash. We learned to combine the various strengths and weaknesses of different team members to work efficiently.

What's next for AppleTrak

Connection between the shipment tags and depot controllers would likely be more efficient with bluetooth than wifi. If different hardware were to become available, communication about and between the produce tag and the depot controllers could be done directly, rather than requiring a MAC address lookup. Additionally there is plenty of room for improvement in the frontend. The query function is very limited and will only return one result.

Built With

Share this project:
×

Updates