I’m hacking a vending machine to take BitCoins and I’ve made my work open source.
Multidrop Bus is the international standard “language” (computer bus) used by the different pieces inside a vending machine. The keypad, the coin tube system, the bill acceptor, and other parts all need to talk together in a friendly way. The standard is maintained by the National Automatic Merchandising Association (NAMA) and has been open source since the 1980s.
I’ve been running a vending machine at the Vancouver Hackspace for nearly a year now. People kept asking me when it would take BitCoin, Paypal, and secret knocks. If you follow us at all you know that I take feedback very seriously. I decided to make it a game:
- Level 1: a method to listen and understand the MDB traffic
- Level 2: talk over MDB and pretend to be a part of the vending machine
- Level 3: tell the machine it’s received money
- Final boss: tell the machine to dispense one unit of item N.
Together with the help of some brilliant people from the Nottingham Hackspace and local VHS member SDY we’ve been able to interface with the vending machine and listen to the conversation between the various components.
We started with a circuit described in the MDB standard v4.2 to safetly connect to the machine. Notthingham connected their circuit to a Nanode (part of the Internet of Things). SDY modified it for me to connect to an Arduino through the Arduino hardware serial. Normally the hardware serial is how Arduino talks to my PC, so I added a second Arduino. A1 and A2 are connected through the software serial library on pins 10 and 11, and A2 is connected through hardware serial to my PC. Convoluted much? If it’s stupid but it works then it isn’t stupid.
So now I’ve got human-readable data on my screen I think I’ve reached level 2. I’m going to break MDB silence and start imitating a cashless payment device. Basically I’m going to pretend to be a card reader. Stay tuned for more info
All photos courtesy of my iPotatoPhone.