Skip to content

Setting up the coin acceptor

Mike H edited this page Mar 10, 2014 · 7 revisions

In order to use the 6-denomination coin acceptor in the HaterMatic project, you'll need to perform some basic setup first.

For most of the configuration, you'll want to use the pushbuttons and two-digit 7-segment display located along the bottom edge of the unit, on the side opposite the label with operating instructions.

Configuring the baud rate

The first thing you'll need to do is set up the baud rate for the serial port, and tell the coin acceptor to send serial data rather than pulses. Here's the process for changing that:

  1. Press and hold the "B" button until you hear a beep and the 7-seg display reads "AP".
  2. Press and release the "A" button until the display reads "A2".
  3. Press and release the "B" button until the display reads "01".
  4. Press and hold the "A" button until the display reads "88".

At this point, the display will go blank, then the acceptor will chirp and the display will show "00". This is normal; after a time, the display will shut off.

Configuring coin values

You'll need to tell the acceptor what the value of each coin is, as well as teach it to recognize the coins when they are fed in. You need a handful of each type of coin you want to teach it to recognize, preferably all of different years. The more samples you can show it, the less likely it is to reject valid coins.

Extremely Important Fact: You must have the sensor as nearly perfectly vertical as possible during this process. The coin recognition algorithm is partly based on the weight of the coin, which (relative to the internal architecture of the machine) will differ based on the angle of the acceptor. If the device is not perfectly upright, or at the angle it will have during use, the rejection rate of valid coins will skyrocket.

Reasonably Important Fact: You should probably reset/clear the coin parameters before attempting to teach the acceptor new values. To do this, press and hold button "A" until the display reads "CP", then press and hold button "B" until the display reads "CP". At that point, you can follow the instructions below.

To change the value each coin represents:

  1. Press and hold the "A" button until the display reads "CP".
  2. Press and release the "A" button until the display reads "C1".
  3. Press and release the "B" button until the display reads the desired value. For this project, we've simply made the coins equal to their face value: "01" for pennies, "05" for nickels, etc. This is the value that will come out of the serial port when a coin of that denomination is inserted.
  4. Insert coins of the desired denomination (for this project, C1 is pennies, C2 is nickels, C3 is dimes and C4 is quarters; C5 and C6 were left unused) one at a time. The coins will be sent to the coin return, and the display will read "bi" each time a coin is inserted, and the machine will beep.
  5. Continue to insert coins until the machine beeps three times, blinks "bi" three times, and then displays "F".
  6. The LED will advance by one (from "C1" to "C2", or "C2" to "C3", etc). Repeat steps 3-5 for each coin denomination you wish to teach the machine to accept.

When you've taught the machine to recognize all the coins you care about, press and hold the "A" button until the machine displays "88". The display will turn off, then back on to "00", and at that point, you can insert coins to test the recognition. The display will show you the value of the coin that you've inserted, and the coins should drop out the bottom of the coin acceptor rather than going into the coin return.

Dip switch settings

There's a set of dip switches on the side of the machine; switch "3" should be "ON" (up), and the rest should be "OFF" (down).

That's it!

The coin acceptor is now properly configured to work with the code provided for this project. If you want to experiment with other functions of the coin acceptor, please check out its datasheet.