Building our custom-made connected coin hopper
Our hardware team takes up some convenient office automation.
When we talk about automation, it usually relates to our client work. And it’s true: we put a lot of effort into streamlining our operations to make sure our processes help our teams work as fluently and efficiently as possible.
But our automation and hardware teams also keep an eye on our office life - after all, there’s always opportunities to put our skills to good use for our coworkers!
In this blogpost, we’ll go into more detail on our hardware production process using one part of our ongoing office automation efforts: our homemade coin dispenser.
Small problem, great opportunity
In case you’re wondering what those coins are for, a little context. Your basic beverages - coffee, tea, water - are all freely available in our coffee corners, but there are also a number of vending machines for soda in our offices, selling everyone’s favourite carbonated sugary drinks for one euro. They work both with token coins (which are primarily used to fetch drinks for visitors) and with regular small change. Of course, you can already see where this is going: very often, someone sits down for lunch in our cafeteria, realising he doesn’t have sufficient change to grab a drink from the machine. It’s a small problem, but as November Five’s hardware department, we’re always figuring out ways to help make everyone’s office life more convenient.
Our first instinct was, evidently, to hack the vending machine itself. Unfortunately, it doesn’t actually belong to us.
Like most vending machines, ours are rented to us by the issuing company. With that option off the table, we quickly arrived at another practical solution: a small device, attached to the vending machine, where people could retrieve a coin.
Luckily, everyone at our office already possesses an RFID badge, which they use to open the elevator doors - this means we had a simple means to identify everyone and trigger our coin dispenser. We could allow everyone to buy digital tokens, link this info to their existing badge, and let them use the badge to exchange this balance for physical coins.
With these things in mind, Team Hardware went to the drawing table.
Tinkering with RFID
After we decided to use the RFID badges, we started by taking a general look at the required hardware components for this solution. In general terms, we found we’d need an RFID scanner, a microcontroller, a motor and a display to show some feedback to the user. We also started sketching and rendering the different components, which would later be 3D printed into custom parts.
With these elements in the back of our head, we dove into research, looking for the optimal pieces of hardware for this project. For our RFID scanner, we used an ID-12LA from ID Innovations. The coins would be moved by a continuous rotation servo motor from SpringRC, and the necessary visual feedback given by a small, 1.8” SPI TFT 18-bit color display with ST7735R driver. We also decided to add an infrared sensor to check if the coin really dropped, in order to avoid false positives.
We also researched what we’d need as a server side backend. We created a PHP back-end with access to each employee’s basic data, including his or her badge ID. Not wanting to overcomplicate the solution by integrating more complex payment solutions, we decided that our colleagues could simply go to our office manager with some cash to arrange top-ups.
Building a prototype
In order to build the actual end product, we started by creating a test setup using the Arduino Uno. Once we’d discovered that our RFID badges use a Wiegand interface (more specifically, Wiegand26), we started researching and writing libraries to make the badges work with the Arduino. After creating and testing the complete setup, including the screen, we replaced the Arduino with the final, wifi-enabled module, the Photon, and ported our display library to work with this module.
With the final setup complete, we made sure to test every step of the flow.
And how does it work?
Once the user walks up to the coin dispenser and scans his badge, the Photon will read out the badge ID, look for the corresponding team member in our database, and show a message on the screen to notify the user how many coins he has left. If the user has credits available, the machine will dispense a coin; if not, it will show a message to remind him to top up his account.
While testing the device, we started to notice that occasional mistakes would happen: sometimes the dispenser dropped more than one coin, and sometimes it wouldn’t dispense one at all. To counter these scenarios, we integrated a drop sensor in the form of an IR Led with a phototransistor. Now, the motor stops turning immediately when the line of the infrared gets interrupted by the falling coin.
Bringing in our personal assistant
At November Five, we also develop a great tool called Spencer, that helps companies streamline a lot of their many tools and everyday actions. So of course, we created a version of the Spencer app for our own company! The different integrations are still a work in progress, but office automation is one of the categories where the app will prove most useful around our offices – after all, we don’t use things like a large-scale CRM system, to name only one tie-in for Spencer. So of course, once the coin dispenser was up and running, we started working on its integration into our in-house Spencer app. Today, people can use both their badges and a simple button in the app to get a coin.
Of course, as with any project, we’ve been keeping an eye on the usage stats of our dispenser - and we’re glad to see it’s been a success so far! Of our 55 badge-owners, 50 people have used the coin dispenser since it was officially activated on the first of February; 32 of them have used it more than ten times. All of this points to a pretty active group of users, and as the weather turns warmer and ice cold soda sounds increasingly appealing, we’re expecting the frequency to go up some more.
Another fun stat: when we host events after hours, such as our monthly knowledge sharing evening, all drinks are on the house. For these moments, the dispenser has a free mode. So far, no fewer than 153 coins have been dispensed in free mode – and that was only during one event!
Would you like to work on projects like these? Hop over to our Join page - we’re always looking for fresh faces!