SourceForge.net Logo

MaattiWare & PiikkiWare

This project has two subprojects: SourceForge project page with downloads and other info. Example setup

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: 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

Screenshot

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:

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: 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:

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!