The number of ridges that one can find on a quarter. Ridges came about as a fraud-prevention device, and most vending machines can recognize those ridges. Vending machines are generally smart enough to figure out the relative dimensions of a quarter, a dime, and a nickel—and the number of ridges are an important part of that equation as they help give the coins their basic shape. Despite being significantly smaller than quarters, by the way, dimes have 118 ridges, just one less than their higher-in-value cousins.
Five methods that vending machines have used to verify a dollar bill.
Magnetic tape heads: Much like your 8-tracks of lore, early dollar-eating vending machines relied on a tape-head-style mechanism to detect whether a dollar had the correct amount of iron content that a dollar does. This eventually proved easy to defeat, because laser printers created output with similar amounts of iron-laced ink.
Optical sensors: Starting in the early 1990s, vending machines switched to using what could best be described as low-resolution digital cameras to verify a dollar bill’s validity. The device would look for specific patterns in the dollar, and if they didn’t work, they didn’t accept your dollar. That’s why your crumpled-up bill never works.
Size analysis: All U.S. dollar bills made in the last 85 years or so have roughly the same dimensions, and as a result, a dollar-scanning machine can figure out whether a bill is the right weight, thickness, and size to be accepted by the machine.
Infrared detection: Most modern dollar bills have a strip of infrared tape baked into the bill. This strip is detected by the machine, making it easy to figure out whether a bill is real or fake. Often, counterfeiters will take lower-denomination bills, turn them into $20s or $100s, and pass those off as the real deal. Unfortunately for them, the infrared strip doesn’t lie.
Ultraviolet lights: That $20 in your pocket has a tiny little strip of mylar woven through. Not that you’d ever see it by just looking at it—you need an ultraviolet light to detect its fluorescence. That just happens to be something a dollar-scanner has.