Difference between revisions of "Projects/RFIDpop"

From ENTS
Jump to: navigation, search
(V1)
 
(71 intermediate revisions by 5 users not shown)
Line 1: Line 1:
  
== RFID Enabled Pop Machine ==
+
== RFID Enabled Pop Machine AKA Project "Pop-pi"==  
  
  
Line 8: Line 8:
  
 
One major problem was that the coin mechanism would not accept newer loonies and toonies.  A replacement mechanism would be $200 or more.  A bit pricy for a starving hackerspace, so we are doing what all good hackers do, overengineer a solution with parts at hand.  In this case, utilize the door RFID tags the members have anyways and use them to debit from a pre paid pop account.
 
One major problem was that the coin mechanism would not accept newer loonies and toonies.  A replacement mechanism would be $200 or more.  A bit pricy for a starving hackerspace, so we are doing what all good hackers do, overengineer a solution with parts at hand.  In this case, utilize the door RFID tags the members have anyways and use them to debit from a pre paid pop account.
 +
 +
The project has been inactive since late 2013, but has been revisited now (in 2015) to be revamped for use within the space.
 +
 +
== Goal ==
 +
 +
* With the participation and collaboration of the ents membership, bring the donated Pop machine back into service.
 +
* To provide a project for multiple members to collaborate together to create a near 0 administration pop machine/pop account tracking system.
 +
* To create a low hassle method of buying caffeine.
 +
* To promote more collaborative team building projects within the membership that cross disciplines and foster education and participation.
 +
* To engineer a base for a credit-based system within the space.
 +
 +
== Help Wanted ==
 +
 +
Want to help out? Interested in learning something new and expanding your skill set? Have a cool idea you want to include into the project?
 +
 +
Join the Pop-PI project!
 +
We are currently looking for anyone willing to provide input/advice on the progress of the project. Someone to help fix some of the mechanical parts of the pop machine would certainly be appreciated (see below for details).
  
 
== Mechanics ==
 
== Mechanics ==
Line 13: Line 30:
 
The machine is a Vendo V384. [http://soda-machines.com/index.php?option=com_content&task=view&id=554&Itemid=14 Soda-Machines.com]
 
The machine is a Vendo V384. [http://soda-machines.com/index.php?option=com_content&task=view&id=554&Itemid=14 Soda-Machines.com]
  
Oricanus did much of the work to figure out the mechanics of the machine and how to bypass the coin mech to allow us to dispense product.  It's actually very easy.  On the connector to the coin mech, short pins 1-7 together (all the time) and then momentarily contact pins 1-3 and then make your selection.
+
Orcinus did much of the work to figure out the mechanics of the machine and how to bypass the coin mechanism to allow us to dispense product.  It's actually very easy.  On the connector to the coin mechanism, short pins 1-7 together (all the time) and then momentarily contact pins 1-3 and then make your selection. This is further going to be used with a relay board to allow software-controlled pricing on each button (right now it assumes that when pins 1 and 3 are shorted that any of the 6 selections can be made).
  
The original coke sign is a plexiglass insert, easily replaced.  Behind it is a florecent ballast with a 120v supply line running to it.
+
The original coke sign is a plexiglass insert, easily replaced.  Behind it <strike>is</strike> was a florecent ballast with a 120v supply line running to it, now that line is powering the Pi and all the rest.
  
== V1 ==
+
As of December 13, 2013:
 +
* The mechanical components have been de-greased and lubricated.
 +
* Column #2 was fully rebuilt after it was found jammed.
 +
* All column dispensing mechanisms are working in an empty state (see to-do list).
 +
* 5 columns are >50% loaded and dispensing.
 +
* Proper loading configuration was figured out and instructions afixed inside
 +
* Plastic exit chute was found to be stuck shut from a long ago exploded can.  Removed and washed
 +
* Monitor has been mounted, though mounting scheme may change in the future
 +
* Pi and other components installed and a first run of RFID enabled dispensing is available
  
Version 1 is to basically setup the nessecary hardware to replace the coin mech and to use the RFID tags to debit from an account with little or no modification to the existing electro mechanical dispensing system.  Various options were considered but parts on hand and flexibility came together in the following:
+
To-Do:
 +
* Clean all surfaces, particularly the compressor compartment
 +
* Clean and measure outside surfaces for painting/decals
 +
* Paint trim areas and fix chipping of paint
 +
* Column #1 needs adjustment to sync up the gear works when loaded
 +
* Software needs to be tested on the actual machine: it's (mostly) working on the table top so far though
 +
* Fix column 4 (it's broken apparently)
  
Raspberry Pi (Render)
+
== Photos ==
Parallax Serial RFID Reader (Render)
+
TTL level shifter for 5v RFID reader to talk to 3.3v Pi serial gpio pins (Colin)
+
Solid state relay board (on order)
+
HDMI to DVI Adapter
+
Random LCD monitor from around the space
+
  
Curent Status: In prototype.  RFID via GPIO working.  GPIO relay working.
+
Photo of the internal electromechanical schematic:
 +
[[Media:RFIDpop_mech_schematic.jpg]]
  
Current goals: Users provide cash or paypal to director who adds to account for thier tag via web interface on the pi.
+
Photo of the Prototype system in it's first live test on the machine (it worked!)
 +
[[Media:Pop-Pi_first_test.jpg]]
  
On scan, Pi checks database for balance.  If sufficient balance, deduct $1 and dispense product.  If insufficent balance, then display an unhapy message .  Once product is dispensed display the username and balance remaining for 15 seconds.
+
Photo of the replacement Plexiglass sign in it's test fit (note the blue protective plastic is still in place)
 +
[[Media:Pop-Pi_Plex_Test_fit.jpg]]
  
When 'idle' the screen will goto a slide show of comical and ficticious beverages (Duff, Slurm, Nukacola, etc)
+
Photo of Orcinus playing around
 +
[[Media:Pop-Pi_Orc_face.jpg]]
 +
 
 +
== Software ==
 +
 
 +
The software is written in Python and can be found [https://github.com/turt2live/ENTS-Pop-Pi here]. The gitHub issue tracker is being used to track software-related bugs as well as some minor mechanical problems. For up to date information, please consult the repository. The information below may not be 100% accurate or may be limiting. Feel free to contact the members involved with the feature(s) you are curious about.
 +
 
 +
If you'd like to add something to this list, feel free to suggest it.
 +
 
 +
Note: The feature set has changed as of June 2015. For the old feature set, please see [http://ents.ca/index.php?title=Projects/RFIDpop&oldid=596#Feature_Roadmap the 2013 feature set].
 +
 
 +
<table border="1" width="100%">
 +
  <tr>
 +
    <th>Feature</th>
 +
    <th>Planned Version</th>
 +
    <th>Status</th>
 +
    <th>Associated Member(s)</th>
 +
  </tr>
 +
  <tr>
 +
    <td>Read RFID from spare reader</td>
 +
    <td>1.0</td>
 +
    <td>Completed</td>
 +
    <td>Travis - With help from Robert</td>
 +
  </tr>
 +
  <tr>
 +
    <td>Integrate with vending machine</td>
 +
    <td>1.0</td>
 +
    <td>Untested / Missing brackets</td>
 +
    <td>Travis</td>
 +
  </tr>
 +
  <tr>
 +
    <td>Track and manage a member credit</td>
 +
    <td>1.0</td>
 +
    <td>Comleted</td>
 +
    <td>Travis</td>
 +
  </tr>
 +
  <tr>
 +
    <td>Display for member interaction</td>
 +
    <td>1.0</td>
 +
    <td>Comleted</td>
 +
    <td>Travis</td>
 +
  </tr>
 +
  <tr>
 +
    <td>Inventory control and management</td>
 +
    <td>1.0</td>
 +
    <td>Not started</td>
 +
    <td>''Unassigned''</td>
 +
  </tr>
 +
  <tr>
 +
    <td>"Credit only" mode to top-up credit balance without getting a pop</td>
 +
    <td>1.0</td>
 +
    <td>In progress</td>
 +
    <td>Travis</td>
 +
  </tr>
 +
  <tr>
 +
    <td>Differing costs for each option</td>
 +
    <td>1.0</td>
 +
    <td>Investigating</td>
 +
    <td>Travis</td>
 +
  </tr>
 +
  <tr>
 +
    <td>All the statistics</td>
 +
    <td>1.0</td>
 +
    <td>Not started</td>
 +
    <td>''Unassigned''</td>
 +
  </tr>
 +
</table>
 +
 
 +
== General Documentation ==
 +
Fritzing can be found [http://fritzing.org/download/ here].
 +
 
 +
* [https://drive.google.com/open?id=0B6JIYSBkLkAnUkdyQ1VFejZpVVk&authuser=0 Fritzing layout]
 +
* [https://drive.google.com/open?id=0B6JIYSBkLkAnNzNTYTE4bWhQUFE&authuser=0 Software flowchart]
 +
 
 +
== V1 ==
 +
 
 +
Version 1 (2015) is a complete rewrite of version 1 in 2013. It is still in progress but will have the following flagship features:
 +
* Integration with existing [[MasterControl]] system
 +
* Coin-based credit system
 +
* Single-priced pop selection and working display
 +
* Inventory control
 +
* Per-selection pricing (eg: Coke for $1.00, Beer for $5.00)
 +
* Statistics tracking
  
 
== V2 ==
 
== V2 ==
  
Feature requests:
+
Some of the requested functionality is as follows. The functionality for version 2 has not been set in stone; feedback/suggestions are appreciated.
 +
* Product remaining display
 +
* Random dispense mode (slot machine)
 +
* Twitter integration (<foo> just bought a pop!)
 +
 
 +
== Useful Links ==
 +
 
 +
''Some of these are a bit outdated for the new direction of the project, but they are here for historical purposes.''
 +
 
 +
*[http://www.susa.net/wordpress/2012/06/raspberry-pi-relay-using-gpio/ http://www.susa.net/wordpress/2012/06/raspberry-pi-relay-using-gpio/]
 +
*[http://soda-machines.com/index.php?option=com_content&task=view&id=554&Itemid=14 http://soda-machines.com/index.php?option=com_content&task=view&id=554&Itemid=14]
 +
* [http://stackoverflow.com/questions/372885/how-do-i-connect-to-a-mysql-database-in-python http://stackoverflow.com/questions/372885/how-do-i-connect-to-a-mysql-database-in-python]
 +
* [http://www.sundh.com/blog/2013/09/connect-parallax-rfid-to-raspberry-pi/ http://www.sundh.com/blog/2013/09/connect-parallax-rfid-to-raspberry-pi/]
 +
* [http://zetcode.com/db/mysqlpython/ http://zetcode.com/db/mysqlpython/]
 +
* [http://openmicros.org/index.php/articles/94-ciseco-product-documentation/raspberry-pi/217-getting-started-with-raspberry-pi-gpio-and-python http://openmicros.org/index.php/articles/94-ciseco-product-documentation/raspberry-pi/217-getting-started-with-raspberry-pi-gpio-and-python]
 +
* [https://developer.paypal.com/ https://developer.paypal.com/]
 +
* [http://www.learn2crack.com/2013/10/setup-apache-web-server-php-mysql-raspberry-pi.html http://www.learn2crack.com/2013/10/setup-apache-web-server-php-mysql-raspberry-pi.html]
 +
* [http://www.adafruit.com/blog/2013/09/05/pool-table-accepts-bitcoin-with-help-from-raspberry-pi/ * http://www.adafruit.com/blog/2013/09/05/pool-table-accepts-bitcoin-with-help-from-raspberry-pi/]
 +
* [http://www.vendoco.com/Documents/Super%20Stack%20Service_WHOLE.pdf http://www.vendoco.com/Documents/Super%20Stack%20Service_WHOLE.pdf]
 +
* [http://www.vendoco.com/Documents.aspx?ID=14 http://www.vendoco.com/Documents.aspx?ID=14]
 +
* [http://www.vendoco.com/Documents/Superstack%20Parts%20Manual.pdf http://www.vendoco.com/Documents/Superstack%20Parts%20Manual.pdf]
 +
* [http://soda-machines.com/discussions/index.php?PHPSESSID=iqh2425abe8gmpkv38e6j6i717&topic=13985.10 http://soda-machines.com/discussions/index.php?PHPSESSID=iqh2425abe8gmpkv38e6j6i717&topic=13985.10]
 +
* [http://alexba.in/blog/2013/01/07/use-your-raspberrypi-to-power-a-company-dashboard/ http://alexba.in/blog/2013/01/07/use-your-raspberrypi-to-power-a-company-dashboard/]
 +
 
 +
== Notes ==
 +
 
 +
Power is no problem. The existing light ballast for the original backlight is 120v line that is perfectly placed to power everything.
 +
 
 +
There is lots of room to mount everything behind plexiglass on the outer door or against the inner door. Approximatly 4" depth is available. The new coin acceptor doesn't quite fit, so it'll have to either be pushed out of the machine a bit or some over-engineered rail system could be designed.
 +
 
 +
The credit system works off the impression that any change that would be given is put into an account for later use. For example, if pop costs $1.00 and you put in 1 quarter then 1 loonie, you'll have a $0.25 credit for next time (making the pop only cost you $0.75). The pop machine does not handle change.
 +
 
 +
The mechanics need to be advanced via a couple dispense attempts while empty until the 'bar' is in it's high spot.  Cans are started loading on top of this bar, and not the dispensing 'hopper'area below.  Loading 8-10 cans, advancing two more cycles of dispensing will load the 'hopper' and it will be ready to go.  The machine will trigger 'empty' while there are still 6-8 cans in it.  This prevents having to go through this process again and leaves things 'primed' so one just has to stack more on top.  Do not empty the column completely unless absolutely nessecary.
 +
 
 +
[http://www.vendoco.com/Documents/Super%20Stack%20Service_WHOLE.pdf The service manual] on page 11 shows how to properly load up cans as described above, complete with pictures
 +
 
 +
A video of the loading procedure should be made and uploaded to ensure it is done properly in case others need to do so.
 +
 
 +
A large number of vending machines use the same interface for the 'credit' function. This project can be easily adapted to other models of vending machines. Could be useful for other hackerspaces.
 +
 
 +
== Code Repository ==
  
Product remaining display
+
Code is GPLv2 and available on GitHub at [https://github.com/turt2live/ENTS-Pop-Pi https://github.com/turt2live/ENTS-Pop-Pi]
Tie in with mastercontrol
+
Ability to paypal monies directly to the pi to increase balance (or user added code via web interface)
+
Random dispense mode (slot machine)
+
Ability to dispense products at different prices (water $.25, beer $5)
+
Consumption graphs
+

Latest revision as of 01:19, 23 June 2015

Contents

[edit] RFID Enabled Pop Machine AKA Project "Pop-pi"

[edit] History

After the kind donation of a 70'sish Coca-Cola Vending machine, we started tearing into it to get it working. While there were a few issues off the start, it's in good mechanical order and tests showed it's power consumption was >50% less than the existing smaller pop machine in the space.

One major problem was that the coin mechanism would not accept newer loonies and toonies. A replacement mechanism would be $200 or more. A bit pricy for a starving hackerspace, so we are doing what all good hackers do, overengineer a solution with parts at hand. In this case, utilize the door RFID tags the members have anyways and use them to debit from a pre paid pop account.

The project has been inactive since late 2013, but has been revisited now (in 2015) to be revamped for use within the space.

[edit] Goal

  • With the participation and collaboration of the ents membership, bring the donated Pop machine back into service.
  • To provide a project for multiple members to collaborate together to create a near 0 administration pop machine/pop account tracking system.
  • To create a low hassle method of buying caffeine.
  • To promote more collaborative team building projects within the membership that cross disciplines and foster education and participation.
  • To engineer a base for a credit-based system within the space.

[edit] Help Wanted

Want to help out? Interested in learning something new and expanding your skill set? Have a cool idea you want to include into the project?

Join the Pop-PI project! We are currently looking for anyone willing to provide input/advice on the progress of the project. Someone to help fix some of the mechanical parts of the pop machine would certainly be appreciated (see below for details).

[edit] Mechanics

The machine is a Vendo V384. Soda-Machines.com

Orcinus did much of the work to figure out the mechanics of the machine and how to bypass the coin mechanism to allow us to dispense product. It's actually very easy. On the connector to the coin mechanism, short pins 1-7 together (all the time) and then momentarily contact pins 1-3 and then make your selection. This is further going to be used with a relay board to allow software-controlled pricing on each button (right now it assumes that when pins 1 and 3 are shorted that any of the 6 selections can be made).

The original coke sign is a plexiglass insert, easily replaced. Behind it is was a florecent ballast with a 120v supply line running to it, now that line is powering the Pi and all the rest.

As of December 13, 2013:

  • The mechanical components have been de-greased and lubricated.
  • Column #2 was fully rebuilt after it was found jammed.
  • All column dispensing mechanisms are working in an empty state (see to-do list).
  • 5 columns are >50% loaded and dispensing.
  • Proper loading configuration was figured out and instructions afixed inside
  • Plastic exit chute was found to be stuck shut from a long ago exploded can. Removed and washed
  • Monitor has been mounted, though mounting scheme may change in the future
  • Pi and other components installed and a first run of RFID enabled dispensing is available

To-Do:

  • Clean all surfaces, particularly the compressor compartment
  • Clean and measure outside surfaces for painting/decals
  • Paint trim areas and fix chipping of paint
  • Column #1 needs adjustment to sync up the gear works when loaded
  • Software needs to be tested on the actual machine: it's (mostly) working on the table top so far though
  • Fix column 4 (it's broken apparently)

[edit] Photos

Photo of the internal electromechanical schematic: Media:RFIDpop_mech_schematic.jpg

Photo of the Prototype system in it's first live test on the machine (it worked!) Media:Pop-Pi_first_test.jpg

Photo of the replacement Plexiglass sign in it's test fit (note the blue protective plastic is still in place) Media:Pop-Pi_Plex_Test_fit.jpg

Photo of Orcinus playing around Media:Pop-Pi_Orc_face.jpg

[edit] Software

The software is written in Python and can be found here. The gitHub issue tracker is being used to track software-related bugs as well as some minor mechanical problems. For up to date information, please consult the repository. The information below may not be 100% accurate or may be limiting. Feel free to contact the members involved with the feature(s) you are curious about.

If you'd like to add something to this list, feel free to suggest it.

Note: The feature set has changed as of June 2015. For the old feature set, please see the 2013 feature set.

Feature Planned Version Status Associated Member(s)
Read RFID from spare reader 1.0 Completed Travis - With help from Robert
Integrate with vending machine 1.0 Untested / Missing brackets Travis
Track and manage a member credit 1.0 Comleted Travis
Display for member interaction 1.0 Comleted Travis
Inventory control and management 1.0 Not started Unassigned
"Credit only" mode to top-up credit balance without getting a pop 1.0 In progress Travis
Differing costs for each option 1.0 Investigating Travis
All the statistics 1.0 Not started Unassigned

[edit] General Documentation

Fritzing can be found here.

[edit] V1

Version 1 (2015) is a complete rewrite of version 1 in 2013. It is still in progress but will have the following flagship features:

  • Integration with existing MasterControl system
  • Coin-based credit system
  • Single-priced pop selection and working display
  • Inventory control
  • Per-selection pricing (eg: Coke for $1.00, Beer for $5.00)
  • Statistics tracking

[edit] V2

Some of the requested functionality is as follows. The functionality for version 2 has not been set in stone; feedback/suggestions are appreciated.

  • Product remaining display
  • Random dispense mode (slot machine)
  • Twitter integration (<foo> just bought a pop!)

[edit] Useful Links

Some of these are a bit outdated for the new direction of the project, but they are here for historical purposes.

[edit] Notes

Power is no problem. The existing light ballast for the original backlight is 120v line that is perfectly placed to power everything.

There is lots of room to mount everything behind plexiglass on the outer door or against the inner door. Approximatly 4" depth is available. The new coin acceptor doesn't quite fit, so it'll have to either be pushed out of the machine a bit or some over-engineered rail system could be designed.

The credit system works off the impression that any change that would be given is put into an account for later use. For example, if pop costs $1.00 and you put in 1 quarter then 1 loonie, you'll have a $0.25 credit for next time (making the pop only cost you $0.75). The pop machine does not handle change.

The mechanics need to be advanced via a couple dispense attempts while empty until the 'bar' is in it's high spot. Cans are started loading on top of this bar, and not the dispensing 'hopper'area below. Loading 8-10 cans, advancing two more cycles of dispensing will load the 'hopper' and it will be ready to go. The machine will trigger 'empty' while there are still 6-8 cans in it. This prevents having to go through this process again and leaves things 'primed' so one just has to stack more on top. Do not empty the column completely unless absolutely nessecary.

The service manual on page 11 shows how to properly load up cans as described above, complete with pictures

A video of the loading procedure should be made and uploaded to ensure it is done properly in case others need to do so.

A large number of vending machines use the same interface for the 'credit' function. This project can be easily adapted to other models of vending machines. Could be useful for other hackerspaces.

[edit] Code Repository

Code is GPLv2 and available on GitHub at https://github.com/turt2live/ENTS-Pop-Pi

Personal tools
Namespaces

Variants
Actions
Navigation
Members
Toolbox