Hack-o-mat

Revision as of 23:05, 4 March 2016 by Rcsheets (talk | contribs) (→‎Status: added a photo of the black vending machine and a summary of the things that it still seems to be missing)

Idea

We want to sell all kinds of hackery things from a vending machine in our hacker space! 3D printed objects, usb sticks, mate straws (and mate), caffeinated snacks, arduinos, mesh routers, logic analyzers, lyophilized DNA (biohacking), dogecoins, ear plugs, headphones, batteries, etc! See the hackpack project for more inspiration.

Status

 
The black vending machine is nearly ready to use (Mar. 2016)

There are currently two vending machines, one of which is ready to dispense product (as of March 2016).

Still needed:

  • Product to dispense
  • A lock for the door
  • Something to direct the light from the fluorescent bulb so that it more clearly shows the product, rather than shining into the eyes of innocent bystanders
  • A user interface
    • some way to select a product
    • a mechanism for providing payment

For more information, ask Juul and Jerkey.

Stocking the hack-o-mat with hacker candy

  • Bicycle inner tubes of all sizes! red blinky taillights!
  • Headlamps, gloves
  • $7 universal USB JTAG cable - search ebay for USB Blaster FPGA CPLD NIOS JTAG Altera Programmer
  • Actual healthy snacks!
  • 3D printed magnets!
  • Mate straws!
  • USB sticks with bootable linux and lots of creative commons media!
  • Basic hygiene supplies (yay fewer stinky sudoers!)
  • Tiny mesh routers:

http://www.ebay.com/itm/US-TP-LINK-TL-WR703N-Mini-Portable-802-11-b-g-n-150Mbps-Wireless-Router-V1-6-/321377517019?pt=COMP_EN_Routers&hash=item4ad397bddb

  • Dogecoins!
  • Stickerpacks!
  • Individual packets of Sugru (moldable rubber)
 
homer looking at OUR vending machine

Funding

The vending machine was initially funded by a sudo member stating on the mailing list that he wanted to get a vending machine, stating that they cost about $200, linking to one on craiglist, the member saying he'd put down $20 himself and asking if others would put down $20. After a few days, $120 of the cost had been covered and we figured the vending machine could cover the rest of its own cost going forward. The big robot arm was funded in the same way.

Equipment

Bill of materals

This is incomplete since the project has not yet been completed.

  • Vending machine: $150 via craigslist (+ gas to go get it)
    • Model: Snackshop II (this has been acquired)
  • New bill acceptor: $49 via ebay
    • Model: ICT BL-700-USD4.
    • It accepts $1, $5, $10 and $20 and speaks pulse and serial
  • Bill acceptor update chip for new $5 bills: $21 via ebay
  • Beagle Bone Black: $65 via adafruit
  • A cheap android tablet: $39 online from Fry's Electronics weekly promotions email
  • Micro usb ethernet adapter: $3.35 aliexpress.com
  • USB magnetic stripe card reader: $20.50 from dx.com <--- for what?
  • Multiplexer and de-multiplexers and mosfets for button inputs and to control spiral rotation (for dispensing items): Unknown <--- jake can implement this part for free

Total: ~$350

Prices include shipping and tax.

Vending machine

We found a used Snackshop II vending machine on craigslist and offered $150. This is the kind of machine that has a bunch of metal spirals / huge corkscrews that hold the snacks. These types of machines are good because it's easy to put differently sized non-snack items in them and they're cheap. We're planning to replace its brain with a Beagle Bone Black.

 
Snackshop II vending machine before being converted to the sudo room hack-o-mat

Bill acceptor

The vending machine was working except for a broken bill acceptor and broken coin acceptor. They can likely be fixed but the bill acceptor only takes $1, $2 and $5 bills and doesn't take the new $5 bills.

We bought:

A ICT BL-700-USD4 bill acceptor that takes $1, old $5, $10 and $20 bills for $49 including shipping and an updated chip that allows for $21 that allows the bill acceptor to take the new $5 bills.

Coin acceptor/dispenser

The built-in coin acceptor/dispenser does the following:

  • Accepts 5c, 10c and 25c coins (broken)
  • Sorts the incoming coins into the change dispenser (nearly working, easy to fix)
  • Detects when there are too few or too many coins in the dispenser.
  • Redirects coins when there are too many in the dispenser
  • Dispenses 5c, 10c and 25c coins (nearly working, easy to fix)

The sorting mechanism needs to be modified so it always accepts what it gets, which should be as simple as locking the two solenoids in one position. The detection circuit needs more investigation and the nickel dispenser seems to be broken but we'll probably just control the solenoids directly anyway. Another option is to use a "sorting coin bank" and modify it for our needs. These are cheap at about $25 on ebay and include slots for dollar coins!

Since it looked unlikely that we'd be able to repair the acceptor part of the built-in acceptor/dispenser, we bought a coin acceptor for $28 including shipping on ebay. Since that's an ebay link it may be gone when you read this, but it's the same as this one from adafruit except that the one we got can be programmed to recognize up to five different types of coins.

We will program it to accept these coins:

  • 1 cent (yesss!)
  • 5 cent
  • 10 cent
  • 25 cent
  • 1 dollar

We didn't just get a new acceptor/dispenser of the same general type because the cheap/old models are inflexible, only accepting nickels, dimes and quarters, and if you want support for $1 coins then the pricing seems to begin at $200 for a used model.

$1 coin dispenser

Since we'll be accepting up to $20 bills, we will need better change than quarters. Unfortunately bill dispenser are expensive and you have to buy them used as ATM spare parts on ebay usually with little info on whether they're complete and functional. Another option is to buy a complete ATM of the type that doesn't support 3DES (now a requirement) or not compliant with the latest ADA regulations. We found two of non 3DES ATMs for $100 each on craigslist, and the bill dispenser could probably be hacked fairly easily (the rest of the electronics are likely encased in a large chunk of epoxy). However it was $100 and a two-hour drive both ways, just so we can dispense one type of bill.

Instead we could try 3D printing a dollar coin dispenser. It would be the same design as the built-in machine uses with a tube for the coins and a slot with a solenoid that pushes the bottom coin out the side of the tube on command. Should be pretty simple.

Another option is to use a motorized "sorting coin bank" from ebay and modify it to add solenoids and level detection.

Bitcoin / altcoin acceptor

The vending machine will be networked and will monitor its bitcoin/altcoin addresses for incoming money.

sudo credit

Eventually your sudo room magnetic/rfid membership card + pin will allow you to buy stuff.

Brain, display and selection

The original hardware was wired to use diodes on a board of switches, where the price was set for each product with five on/off switches, worth 5, 10, 20, 40, and 80 cents. The user would press a button for the product they wanted. Since we don't want to use the buttons that way, we need to use triacs (electronic relays for AC) for each of the 40 product motors. We are designing a custom circuitboard to replace the binary coin-counter matrix with 40 charlieplexed triacs:

https://github.com/sudoroom/hackomat

which uses these triacs:

NOTE: the beaglebone black GPIO pins are only rated for 4 to 6mA per pin, which means it is essential to choose a triac with a guaranteed trigger current of 5mA such as the MOC3023 If you instead get a part with a 15mA guaranteed trigger, you may end up with customers who don't get their product even though they paid for it, on days when the temperature or phase of the moon is wrong. That would be really bad.

ALSO: there are two physical versions of the through-hole part. One is "Dual-in-line" and the other is "Wide lead spacing". The former fits in the sockets on this board, at standard DIP width of 0.300" track width, while the "Wide lead spacing" would need to be bent to fit a normal socket, on this board. You don't want to be stuck bending 240 pins for this project because you bought the wrong part, do you?

http://www.mouser.com/ds/2/239/MOC302-201763.pdf

their inputs are basically LEDs, and they're totally isolated from the AC output. So we can charlieplex these 40 triacs to just seven GPIO pins from our controller, as long as it has three-state outputs.

We'll be using a $65 Beagle Bone Black for the brain and a $39 android tablet from Fry's electronics with a web app loaded from the Beagle Bone for display and selection. We're planning to have videos of sudoers presenting each item and headphones so people watch, listen and understand what they're bying. We'll probably still hook up the original dispenser buttons, but that's secondary.

One of the reasons for replacing the brain is that the original dispenser circuitboard has a max programmable price per item of $1.85, which conflicts with our desire to sell usb sticks out of the gum dispenser :) It will also make it easy for us to track how much money is spent on each type of item which means we can let other groups, like Counter Culture Labs sell stuff out of our vending machine and track who should receive how much money without manually counting.

we can even allow purchases online to dispense locally, so you can call your parents and have them buy you a beaglebone black from New Hampshire and the vending machine will shit it out for you while you're on the phone with them. Christmas is coming soon...