PTL Payment System (Drinking Buddy)

The aim of this system is to provide a simple(and geeky) way to pay for the food and beverages at PTL and eliminate the hassle of paying by coins and handling physical money.

Status du project
Date de début 03/07/2015
Status v1 complete, v2 and admin in progess
Initiateur(s) Achraf El Kashef
Collaborateur(s) Michael Jaussi Alexandre Rosenberg Sébastien Chassot Achraf El Kashef Pierre-Igor pliski

A hackaton during the RHL2016 in St.Cergue resulted in a working prototype.

The following is working:

  • Identify an RFID tag
  • Get list of drinks(items) from server
  • Get balance from server
  • Navigate menu and choose using a rotary encoder
  • Send a buy transaction and receive response
  • Working now on v2.0 wireless terminal with touchscreen LCD

The following remains to be done:

  • [Admin][✓ charafantah, 2016-07-20]Create a cronjob to send an alert when minimum quantity is reached
  • [pliski]Go cash free
  • [PI]Add/edit/view DB items
  • [PI]Assign users to ID
  • [PI]Manage users credit
  • [PI]Integrate with LDAP
  • [PI]Change authentication KEY from the one used in GitHub
  • [Admin][✓ charafantah, 2016-07-03]Deploy on coltello
  • [Achraf][✓ charafantah, 2016-07-03]Mobile debug and management with Blynk
  • [Achraf][✓ charafantah, 2016-07-03]Fix bug in server and terminal with product ID
  • Deduct amount when user buys something
  • Add buzzer to Arduino * Implement magnetic lock (software+hardware) * Make a box for terminal components * Deployment in production * Power with PoE

Please refer to the manual on this page.

  1. Token (an RFID key chain with each PTL member)
  2. Payment terminal (a connected RFID reader on the fridge with a display to accept payments)
  3. Server (a web system used to process payments
  • User choses an item to buy on the payment terminal
  • Payment terminal shows amount to pay and asks for RFID token
  • The terminal sends a buy request to the server
  • The server responds with an accept/refuse of the payment and deducts the amount from the user’s account, it also reduces the item from stock.
  • The terminal either confirms the operation or not
  • The token is only used for identification, no information about how much money is stored on the token.
  • The payment terminal is just used for communication, showing available items and confirming payments
  • The server handles the verification of credit for each user
  • The server handles the amount in stock
  • The server provides a list of available items to the payment terminal
  • The server has 3 interfaces:
    1. Client interface to recharge the token, authenticated using LDAP on coltello
    2. Admin interface to manage bills and stock
    3. API interface to communicate with the payment terminal
  • There is no online creditcard charging in the system, the bills are simply added to the BVR sent by PTL every quarter/semester.
  • Build terminal prototype
  • Build server and APIs
  • Design and print a 3D case for the terminal

List of materials needed to build the project, all of them already exist in the lab.

  • Arduino MEGA
  • Arduino ethernet shield (or wifi shield) Currently using ethernet, PoE.
  • LCD display (2 to 4 lines)
  • 2x Buttons RGB rotary encoder
  • RFID reader MRFC522
  • Buzzer
  • Magnetic lock

We might want to buy some extra RFID tokens. Done

The server side need to be able to do the following tasks.

  • Authenticate admin
  • Manage admins list
  • Assign a token ID to a user id
  • View pending bills
  • Clear a pending bill
  • Manage stock (name/price/how many items left)
  • Authenticate clients against LDAP (or WiKi)
  • Add money to account
  • View pending and existing bills
  • View history of purchases (item/price/date/time)
API interface
  • Get catalog of items (name/price/how many items left)
  • Validate payment (refuse or accept as per available amount of money)
  • Decrease stock value
  • To make the system more fun, the system should randomly (every 30-50 purchases) offer a drink to the user, the payment will be accepted but no money will be deducted and a music should play on the terminal buzzer.

<doodle [PTL_Payment] | Interested in joining this project>

participation in server participation in payment terminal suivre de loins


  • projects/ptl_payment_system.txt
  • Dernière modification: 2021/02/14 11:22
  • de pliski