MaattiWare & PiikkiWare
This project has two subprojects:
- MaattiWare is a software for controlling vending machines
- PiikkiWare is a software for managing "tab" when selling goods
SourceForge project page with downloads
and other info.
MaattiWare
What?
MaattiWare is a software for controlling vending machines. It allows users to preload
credits to their user accounts and use them to buy various goods from one or more vending
machines connected to computer via parallel port relay interface.
Actually you can use MaattiWare for many any other tasks you can imagine but this
is how I use it and what it is meant for. On the right you can see a example setup
running MaattiWare in a private place somewhere in Finland.
Why?
Using coins sucks:
- You don't always have them
- You don't have correct amount (most vending machines do not return change)
- Coins can be stolen from the machine
- Someone must empty the coins and deliver them to bank
Note: MaattiWare does not prevent you from using coins if the hardware permits it.
Usually it does.
How does it work
_________
_________ |
____ | | | |
O | \ |B | | |
|_ | \ |E | | |
| ----/ |E | | |
| | [_____]---------[==]-----------|R | |_|
|__|______|
User GUI on PC Relay controller Vending machine(s)
in parallel port
The GUI
The gui runs on Linux and is based on SDL/SDL_image. It requires a
pc that can do 640x400 resolution.. I run it on a old 150mHz debian
pc. I have 2 hard disks in it with software raid mirroring, so a
HD crash won't erase data.
Features:
- Log in with username/password
- Displays remaining credits
- Switch machine if there are several
- Purchase, with different price for different machines
- Donate credits to another user account
- Self-load credits. This requires that 2 other users log in with their u/p to verify loading.
- Admin mode for user management etc
- Logs all purchases to a log file
- Looks good/easy to customize - uses png images with alpha layer for GUI
- Easy to use - even if the user has consumed bought goods
Relay controller
The GUI software turns on a pin in parallel port for less than 100ms if the user
buys stuff. From this point on it's up to you what you'll do with the
signal. In my setup I have a relay controller in parallel port which
switches a relay when the signal is triggered.
Building instructions for relay controller
Vending machine
This is really machine dependant, so I can't give very much information
here. Find out which pins on the machine's electronics you need to
connect to buy item and connect them to the relay in relay connector.
If you're unable to do this, please consult someone with experience
in electronics.
Some newer vending machines support serial port communications, but
I have only the older analog ones.
Compiling
Get the source from sourceforge cvs.
Install the dependencies and just run make. It should compile. Let me
know if it doesn't.
See the source - there's some stuff you might need to take a look at
FAQ
Can there be different priced products in a single machine?
No. 1 machine = 1 parallel port pin = 1 price.
Wouldn't it be better to use some kind of ID card, fingerprint scanner, etc
to identify users?
No. They would just make system more complex and expensive. You don't always
have ID card with you if you come from sauna for example. Username & password simply
works.
Is it safe to use? Does it lose my credits?
I have run it for more than 6 months without restarting software, and it seems
to be very reliable. The code has been made simple and robust on purpose. The
software syncs the updated database to HD after writing so a power-out won't
probably wipe the database. Making the storage secure is up to you - I use
linux software raid to do it. USB flash storage might also be a good option.
What if someone hacks into the computer?
Physically it is possible to hack into the computer, and that can't be prevented by any software.
It is up to you to make sure it is not accessable to abusers physically.
To make software more secure, I use the following tricks:
- BIOS password
- LILO password
- User & root passwords (of course ;)
- Prevent ^Z and ^C from console (shell option)
- Prevent ctrl-alt-del reboot (inittab)
- Prevent killing X with C-alt-backspace (Xorg option)
For now no-one has been able to hack in via keyboard. Let me know if you find a way.
PiikkiWare
What?
PiikkiWare (or just "piikki") is software for managing positive or negative "tab" when
selling goods. It is used when a group of people ("users") should
have possibility to buy stuff and are trusted enough to manage
their own tab. This means usually a small private club and inexpensive
goods.
How
Piikki is just a software that can be run on any decent (say > 200mHz) computer. It
runs on Linux and uses GTK/Gnome libraries. Piikki is programmed in c++.
I'm running it on a 600mHz laptop with Ubuntu Edgy.
The user interface is optimized for easy keyboard control and is
a combination of full-screen controls and traditional GTK GUI.
Features:
- Add/remove users
- Users can create "guest" users
- Account can be locked, so that it must be opened using password
- Locking delay (user stays authenticated for that time)
- Unlocking by presence of bluetooth device
- Users can change their password
- Users can manage their tab
- Log file of all actions
Where
Piikki can be found on MaattiWare project's subversion repository.
Contact
For more info and support mail me at ville.ranki@iki.fi.
Please let me know if you build something working with this software!