ADA and optical coin detection.

One of the projects I never wrote a writeup on that I’ve been working on for the past little while is the “auto drink admin.” For those of you who don’t know, CSH has something called DRINK which is basically a group fridge. Using a key-fob based iButton you can log into the machine and it will link to your LDAP account. There is also SNACK which is an addon in the form of an old snack machine. Based on how many credits you have in your LDAP account  you can purchase things in the machine. Now, how do you get credits? You have to talk to a drink admin. They take your money, log into their database front end, and update your credits.

The problem is they can be really hard to find, and they hate taking and counting your change. Auto Drink Admin is essentially a smart coin counter, which measures the coin with a mechanical arm taken from a child’s coin counter. This method is very insecure, as the mechanical measurements can be faked by slipping a wire in, or putting the coin in and taking it out.

In order to prevent fraud, I added an optical coin measurement using photo-interrupt sensors. These consist of an infrared LED on one side, and a matched photo-transistor paired with a high gain amplifier to give digital output on the status of the beam.  With two interrupt sensors, the speed of the coin can be measured by the time it takes to get from one sensor to the next, and the width of the coin can be determined by using this number in conjunction with the amount of time it takes to pass one sensor completely.

With these two methods of measuring the coin, we can reliability determine that the coin was detected. Because there is no mechanical reject method at this time, if the sensors ever disagree, we err on the side of caution and don’t count the coin as any value. This is a low risk for non-malicious users, as the sensors agree unless the coin is pushed incredibly fast, and ‘bumps’ the arm to a larger coin size.

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: