July 04, 2017
This is our first article in what will be a monthly series on what we get up to during our hackathons. First out, we have the winners from our last hackathon in May, Cophi.
As you might already know, we at WATTx do not only enjoy organising hackathons (like we did in the past, i.e. with Clue to advance female health tech), we also love hacking internally: for fun, to gain knowledge, for going wild with our ideas and refresh our brains from the day-to-day work. One of our last hackathon project ideas was “Cophi”, a so-called smart scale.
At WATTx, we employ many coffee addicted peeps that truly love their self-made bialetti cups. In addition to our love for coffee, many of us are also deeply into tech. So, instead of manually jumping into Slack and promoting that there is still some hot black power juice in the coffee pot, we thought ”why not let the pot automatically talk for itself?”
Additionally: Sometimes you simply forget about sharing the good news. And then, in the end, there might be some cold coffee left that will make some people literally cry (No names).
So we had our idea, and we had a goal: to build a smart scale that automatically measures the amount of cups left in a pot and reports it to one of our Slack channels.
Every last Wednesday of the month, before the 2-day hackathon takes place, all interested participants come together and present their raw project ideas. Other people who like the idea can then join the project team - which is how team Cophi finally ended up with three persons: Christian (Data Scientist), Wen (Engineer) and myself (Engineer).
One of the many awesome characteristics of an internal hackathon is the fact that you have the chance to work together with teammates you haven’t worked with for a while - or at all. Even if your usual teammates are nice, smart, and funny, at some point it is very exciting to work with different minds.
On Wednesday evening we discussed the next steps of the project within the team. Luckily, we already owned a load cell, that we needed for our prototype. A tiny piece of metal and some wires that firstly provoked one concrete reaction in us:
“What? Will this ever lead to accurate data?”
We decided to look at home for some additional material we could use in the next two days, such as old wooden plates, screws, cork plates, or similar, and, well, plan B accessoires if the original plan would not work. What you need to know: The goal of a hackathon usually is to come up with a working prototype by the end of Friday evening. That is why our plan B was just a temperature sensor that at least would help us to determine whether there was something hot close to it. Quite far away from telling us how much coffee there was left, but ehm, need is the mother of invention, isn’t it?
How a load cell works There are various types of load cells, but they all have in common that they convert the force they measure into an electrical signal. In our case we are using a strain gauge load cell. Being under tension the strain gauge is deformed. This deformation directly results in a change in electrical resistance that is a measure of the strain and thereby of the force that is working on the component. The signal output ranges usually between a few millivolts - that is why it requires a load cell amplifier in order to be used.
Thursday morning we came up with the physical prototype idea that truly excels by its simplicity. We just needed a base plate and a plate for the pot, both connected with the load cell and - tadaa! Ideally, in between the plates there should be enough space to hide the AD converter which we used to read the load cell and the WeMos micro controller with which we were able to understand the readings from our load cell.
While two of us gathered and prepared the equipment we needed to build the physical body, the other one began to solder the wires of the load cell to the AD converter and then connect it to the WeMos controller. Our initial plan was that, after getting the digital signals out of the analog output from the load cell with the help of the converter, we wanted to transfer the signals into understandable data on the micro controller.
Luckily, we found a usable code base from Sparkfun for the HX711 load cell on their github repository. After doing some calibration and adapting the code to our needs, we came a big step closer to what we wanted to achieve.
The way it looked like at that point of time: We soldered the wires of the load cell to the HX711 amplifier and connected them easily with a small breadboard to the WeMos micro controller.
Now, it was time to bring in the RaspberryPi. We wanted to use it as our central system, where all data could come together and could easily be used in different applications. So we set up the open source MQTT message broker on the Pi and let the WeMos publish the data it got to a Cophi channel every second.
After putting the communication channel in place we needed to integrate Slack. We did that by writing a simple integration layer in python that on the one hand side listens to the incoming data and convert it into an user friendly format and on the other hand side push it into Slack.
Since something that you see and use every day should somehow look… nice-ish, we decided to style our little weight scale with heat-proven cork (that in the end was not as heat-proven as we thought) and some fancy drapery.
In the end our working prototype was ready for a demo:
Cophi is able to know how much coffee is left in which size of pot and send the information directly to our team chat.
Although we all were sceptical regarding the accuracy of the load cell, we ended up being very impressed and fascinated by this piece of engineering art. It worked like a charm!
There are for sure some additional features we could think about: for example a temperature sensor that decreases the amount of false positives (do not put apples on the scale, guys!) and that makes it possible to give even more detailed information as well as send alerts if the temperature approaches a critical low.
But all in all, we are really proud of our project outcome!
Interested in other smart helpers for the office? Check out Ophi!
Why the Internet of Things and the rise of chatbots will change the way we...
Analysing 8 Million IoT tweets in Python
NEWS FROM VENTURES
Sebastian Weyer, CEO of our latest venture, explains how Statice can help you organisation with...