Ever went to the restroom to wash your hands and bam! There isn't any soap left? What a bummer having to go to the grocery store to get some more when you have guests coming over in half an hour. We figured, in the 21st century people shouldn't have to deal with problems like this.
What it does
That's when we decided to create Boxera, a smart-device that would automate the process of purchasing consumables, one example being soap. By creating a smart container that relies on a variety of sensors, we can pinpoint whether we are running low on an item and simply order it!
The device will be connected to the supplier of a specific product and whenever the amount of product is low, it will automatically order a new one. We want to push IoT past the notification to the user, and into the realm where IoT devices can stand on their own.
How we built it
Boxera uses the Arduino 101 powered by the Intel Curie module and a Raspberry Pi B for internet communication. We decided to go for light sensitivity as our detection mechanism. Due to the light scattering of the soap, the more soap there is, the less light gets to the photoresistor. At a predefined threshold, the intensity of light received will trigger the functions to order a new soap refill. At this point, the Arduino will output a command through the serial port to the RPi, which will in turn update the database with the serial number we assigned (hypothetical factory settings) to the device. When you get the device, it comes with a QR code and a serial number, reading the QR code with an application such as Snapchat, you will be prompted with a form where you have to write down your address and the serial number of the device. This helps cross-correlate the data we get from the RPi, with the addresses we are supposed to ship refills to. This adds a level of versatility to the devices, you could use them in a different location by updating it with your QR code.
Challenges we ran into
Not being able to get a Wifi Shield for the 101 was a small set-back, but luckily we could use a Raspberry Pi as an interface between the Arduino and Firebase. Getting the communication from the Arduino all the way to the database was easier than we had predicted. Rather, what was a trickier part of the project was the fine tuning of the sensors and ensuring that they would detect a low-soap condition. We did multiple tests with different soap solutions and resolutions for the photoresistor and found the best combination to be semi-clear soap and a 10k resistor in series with the photoresistor.
Accomplishments that we're proud of
Seeing the device built and working for the first time, given the amount of code tweaks we did and last minute additions, was truly exciting. Using a 3D printer for prototype our enclosure was very nice as well, because it allowed us to fit all the otherwise flying wires, in a particular position.
What we learned
The main learning point that we had as a group relates to the usage of QR codes. We realized that it was important to make things as easy as possible for the user and that pairing the device through an app could lead to user error.
What's next for Boxera
Our next step for Boxera would definitely be to switch the Raspberry Pi for a Wifi Shield for the Arduino, by doing this, we could reduce the footprint of the device by at least an inch in all 3 axial dimensions. . In addition, it would be interesting to explore a self-calibration function for the device. This would allow the device to tune its threshold to specific types of soap.
Removing the power cable and having the device being standalone with battery would be another challenge that we would like to tackle. Including wireless charging, capacitive touch switched and a battery would allow the device to become fully sealable. This would allow the device to survive longer in wet environments or be washable if it builds up hard water deposits and soap scum over time. Making it wireless would open a whole realm of possibilities in regards to different products, locations, comfort, etc. One route we are thinking of taking would be to enable a sleep mode for the Arduino until an event (i.e, someone pressing on the nozzle) occurs. It could then check the soap level and alert the database, if below the threshold, or go back to sleep if above.
There is enormous potential for this device as supply chain management is something that many industries struggle with. Industries such as pharmacies, bakeries, grocery stores, suppliers of different materials, vending machines, etc. By having this device you can create opportunities for industries to maximize the product that they would normally sell. In manufacturing lines, you can track how many parts workers use, and when they need to replace those parts.