How does an ATM work and How does a cash machine give an exact amount of money?

When you hustle to the bank for some quick cash, it’s easy to wish that that anonymous machine would just once spit out a few extra bills, or accidentally hand out fifties instead of tens. But such fortuitous errors are rare.

Why? Inside an automatic teller machine, or ATM, are bricks of cash in various denominations, stacked in open-ended boxes with up to three thousand bills in each box.

When you punch in your secret code and your withdrawal request, of, say, one hundred dollars, a computer in the machine sends signals to your bank’s computer, telling it who you are and how much cash you want. If you’re good for the money, the computers activate mechanical arms inside the teller machine, and they instruct the arms which bills to select and how many of each. In this case, the computer might designate five twenty-dollar bills.

At the end of the mechanical arm is a suction cup similar to that on a rubber dart toy. A vacuum hose within the cup strengthens its grip. Each arm picks a single bill off the top of the cash brick and passes it into a set of rollers. The arms’ movement and suction make the noises you hear while you wait.

A less-common system contains rollers that use friction to peel bills off the cash brick. As the bills roll one by one through the conveyor system, they pass between a light beam and a sensor, which measures the typical opacity of a U.S. twenty-dollar bill.

Using the opacity test, ATMs sometimes throw dirty bills into the bin, so banks prefer to use new money if they can get it. Some machines have a sensitive set of rollers that measures the thickness of single bills as they pass through it.

Either way, the machine can calculate how many bills you are getting. If it’s more than your allotted one hundred dollars, the conveyor dumps all the money into a bin and tries the transaction again.

If, on your turn, an ATM runs out of twenty-dollar bills, then it will probably tell you it is out of money altogether. However if the machine has other denominations, ten-dollar bills, for example, then the next person to request a withdrawal will be given his cash in tens.

So if the teller claims to be dry at first, be sure to try your withdrawal one more time.