class: center, middle, frontpage # Smart Waste Bin ## Mads A. Hansen & Nikolai Å. Magnussen --- class: center, middle, frontpage _A waste collection bin that registers its content and capacity to allow for peer pressure recycling campaigns and dynamic routes for emptying_ ??? Mads --- # Agenda - Initial design and plans - Limiting scope - Final design and prototype - Future work - Conclusion --- # Motivation of idea - In collaboration with Plus Point ??? Nikolai: - Local tech start up -- - Peer pressure ??? Nikolai: - Found the project interesting because * Similiarities between recycling and power usage with smart meters * Peer pressure is one of the most effective ways to change behaviour (studies have shown). * Environmental focus is in line with the activity at UiT. Aim to change recycling and consumption habits. -- - Save the planet and money ??? Nikolai: - Potentially cost saving for renovation. * Dynamic routes based on capacity information * Especially in sparsely populated areas -- - The Thing ??? Mads: Everyone have a waste bin. The right scale. Deployment is in order of magnitude 20-30 k units in Tromsø alone. -- - Ecube labs ??? Mads: - Exist a solution for capacity. Not LoRa. More for malls and hospitals ect. -- - Workload ??? Mads on device, Nikolai on backend and front end. Design iterations and major decisions together. --- class: center, middle, frontpage # Idea and initial design --- ## Device - Color sensor ??? - Sense the color of inputed bags. This also counts the number of bags in the bin -- - Volume ??? - Know the volume of the trash or 1-remaining capacity -- - Weight cell ??? - Other metric for the remaining capacity -- - Temperature and humidity ??? - The local climate in the bin can influence the need for emptying -- - GPS module ??? - Know the position of the bin, send sms if the bin has not been moved to the road for emptying -- - Way of sensing when the lid is open ??? - Know when to do shit -- - Power supply and charging ??? - Longevity, simplicity --- ## Communication and backend - Use the builtin LoRa support ??? Nikolai: - Based on LoPy - Use its built-in LoRa support -- - Parse data in Telenor Cloud Connect ??? Comment -- - MQTT client to transmit emulated data ??? - MQTT client to simulate data Needed to avoid making several prototypes and still do frontend for multiple devices - Due to simulation of many smart waste bins - Not many concrete plans for the backend at this point. --- ## Front end - One view for each household * Statistics on the current state * How much compared to last year? * How much compared to to the neighbours? ??? Nikolai: - Want all households to have information about their own bins * Now, and graphed historical data * This month compared to the same month last year * How you compare to your neighbours (peer pressure) -- - One view for the waste disposal company * Information on a higher level of abstraction * Map view * Dynamic route setter ??? Nikolai: - Waste disposal company need a less personal view over the data - Preferably using a map for geographical grouping (ish) - Possibility of creating a route based on the data collected from the waste bins - Høytsvevende --- class: center, middle, frontpage # Limiting project scope ??? Nikolai: - Earlier descriptions were very ambitious and over the top - So we have to limit the project scope (avgrense prosjektet) - Choose subproblems and plan how to solve them? --- ## Device - Physical design 1. Attachment 1. Easy installment 1. Allow for simple color sensor ??? Nikolai: - Physical design is a natural starting point for limiting the scope - Due to our green focus, we want to let people use their existing waste bins - So make it an attachment - Make it easy to install - Allow for a simple color sensor by having a tiny hole --- ## Device .center[![Sketch of device](images/SWBsketch.png)] ??? Nikolai: - Allow insertion of only one bag at a time - Hinged to allow emptying --- ## Device - Physical design - Color sensing: _TAOS TCS3472_ ??? Mads: I2C, se på endring i tid -- - Volume estimation: _HC-SR04_ ??? Mads: Measuring the distance from the bottom of the inner lid to the level of the garbage and multiplying with the area gives estimate for remaining volume. Two wire self-timed home made standard for communication -- - Temperature and humidity: _DHT11_ ??? Had access to the sensor One wire -- - ~~Weight cell~~ ??? Dropped. Probably not as useful as volume. Sort of redundant. Had to go in bottom of bin. Hard to cable. Probably bad for longevity of sensor to be in bottom of a bin -- - ~~GPS~~ ??? Dropped. Not important for main functionality. Can be iterated in at a later time As for power - chose not to focus on it in the prototype --- ## Communication and backend - Independent of persistent communication ??? Mads: Mekanisme for å få data frem LoRa is best effort Store number of bags -- - Telenor Cloud Connect as backend ??? Mads: The data is already indexed for elastic search. Would make little sense to transfer it to another not as scalable relational database. This adds cost and possible sources of error. Elasticsearch is awesome Any features lacking can be requested: it is still a young platform. Power efficiency not to redundantly store data. -- - Authentication ??? Nikolai: - Because we do not store the data ourselves, there is no need for authentication on our part - Reduces the necessity for us to keep our servers secure(not really, but really) - Let the users use Telenor CloudConnect, and authenticate there -- - Use elasticsearch through Telenor Cloud Connect API ??? - All information is queried through the CC API - Because CC API is authenticated, we do not need to authenticate our users, and leverage the API for it - Allow users to transparently use the CC API, which is authenticated --- ## Front end - Created with reactJS ??? Nikolai: - reactJS and Telenor Cloud Connect API - Frontend framework - Because it allow us to send the user the javascript application and they only communicate with the Telenor CC API - Over HTTPS obviously - Again, emphasizing the security aspect -- > _Households should have very detailed information about their very limited number of waste bins, while a waste disposal company should have limited information about a great number of waste bins_ ??? Oppsummerer designfilosofi -- - One view for each household * Statistics on the current state * ~~How much compared to last year?~~ * ~~How much compared to to the neighbours?~~ ??? Mads: Avgrenset til minste fugerende løsning Pre-grouped bins: Not that hard Simple implementation with Elasticsearch -- - One view for the waste disposal company * ~~Map view~~ * ~~Dynamic route setter~~ ??? Decided to do household instead. Later in the process --- class: center, middle, frontpage # Final design and prototype --- ## Device - Made cardboard prototype ??? Mads Show the magnificent cardboard we shall make! -- - Did not get the RGB sensor: _LS-Y201_ ??? Mads: The camera were a mess. Spent >20h to get it to work. Realized we had no idea how to process JPEG images... Chose to not pour the hours needed Were not able to implement the main feature of the device. Not the right tool for the job. Did not pursue further. -- - Capacity estimation ??? Nikolai: Got the sensor to work. Not stable on 3v3. Used 1kOhm resistor on echo. Does not really estimate the remaining volume, but display capacity. At reset, the reference level is set and sent -- - Temperature and humidity: _BMP-280_ ??? Nikolai: The only sensor working properly. Fried the DHT11 on Friday. Changed it for the BMP-280. Got one that did not work or that we killed messing up 3v3 and GND connections. --- ## State flow .center[![State flow of LoPy](flowcharts/LoPyStateFlow.png)] --- ## Communication and backend - Demo with dummy data ??? Mads -- - Telenor Cloud Connect is a young platform ??? Nikolai: Got it working LoRa is more or less stable Some features lacking before production scale is suitable --- ## Front end - Demo - Issues with elasticsearch ??? - Telenor CC seem to have some issues (elasticsearch) - Not to many problems since limited work --- # Future work - Classify bag ??? Mads Get the main feature working with the right tool -- - Stateless ??? Mads Power management -- - Data packet ??? Nikolai * Reduced to 4 or 5 bytes with limited range and resolution * Send until ACK --- # Conclusion - Did not succeed in making prototype ??? Nikolai Still _the_ device Good application which is doable even though we had some issues Value of the idea -- - General lessons for IoT development * Keep it simple stupid ??? Mads * Fewer sensors decreases + Cost and complexity in production + Longevity: power consumption in sensing, storing and sending - generally: IoT devices shall be minimal - Is it necessary with capacity data in densely populated areas? Make two branches of the device? Been thinking lately: can volume estimation be done just as well with the number of bags? -- * Security and privacy in IoT applications ??? Nikolai - Data sensitivity/privacy: we must not tell - Not sensitive information. Things are close to you, so it is important to secure the information. Punchline: >_selv om det ikke er sensitiv informasjon, er det privat informasjon_