You might think that a microcontroller would be needed to handle a vending machine’s logic. For one thing, only the correct change should activate them and the wrong change should be returned. If the correct change was detected then a button press should deliver the right food to the dispenser. But if you like puzzles then you might try to think of a way to do with without a microcontroller. After all, the whole circuit can be thought of as a few motors, a power source, and a collection of switches, including the right sized coin.
That’s the way [Little Puffin] approached this donut dispensing vending machine. What’s really fun is to watch the video below and wonder how the logic will all come together as you see each part being put in place. For example, it’s not until near the end that you see how the coin which is a part of the circuit is removed from the circuit for the next purchase (we won’t spoil it for you). Coins which are too small are promptly returned to the customer. To handle coins which are the right size but are too heavy, one enhancement could be to make them fall through a spring-moderated trap door and be returned as well. We’re not sure how to handle coins which are the right size but too light though.
We really like these low tech hacks which do seemingly high tech things. Check out this electromechanical jet engine model which has a clever switch mechanism that’ll have you scratching your head. Or if you’re hungry for more vending machine food, feast your eyes on Venduino, which is the next step up in that it sports an Arduino, an LCD screen, is lit up inside, and sports a laser-cut birch plywood case.
Next thing is to defeat the old coin with a string trick
Nah, its a cardboard vending machine- just feed it wooden nickels…
(rimshot)
I’m 16 and I basically know nothing about stuff like this, but I knew I followed this blog for a reason! I want to make this, it’s about my level.
Starting is the hardest thing, once you find problems to google it all gets simple. Go for it!
This, but with so many unfinished projects due to long delivery times and getting distracted maintaining the discipline to finish a project is also challenging. Good luck!
“You might think that a microcontroller would be needed to handle a vending machine’s logic.”
Cams and gears.
exactly… that’s why I like the Retrotechtacular articles so much. The new technology like microcontrollers is nothing special any more, the forgotten technology from the past is way more interesting, simple because the had to think differently. We are spoiled these days.
Cams and gears used to rule the world…
Yeah, I bought a used vending machine recently and was surprised to discover that all of the logic was motors with wheels with notches in them that flip switches in sequence. Only the bill acceptor had any sort of digital logic…
I mean they had vending machines before microcontrollers didn’t they?
“You might think that a microcontroller would be needed to handle a vending machine’s logic.”
You do realize people deployed vending machines for many years into areas with no electricity, right? If you can get ahold of an old mechanical coin acceptor, they are real marvels.
it is called a coin_rejector_…
Coin rejectors for Pinball machines and arcade games are easy to come by, cheap.
First the coin rolls down a narrow little ramp and bounces off of the back. This checks what type of metal it is. Only the right metal composition will bounce the correct amount. Too far or not far enough and it falls in rejection slots. If it’s too thick, it gets stuck on the ramp. If it bounces just the right amount it lands in a weighted cradle. Too light and it won’t tip. Too heavy and it tips too far and dumps it down a reject slot. If it tips the right amount, it finally exits the acceptance slot at the bottom and triggers a wire on a microswitch. There is also a razor blade to cut any thread or wire attached to the coin. If the coin gets stuck because of being too thick or too light or has soda spilled on it, pressing the button opens it wider and drops the coin in a reject slot.
Or you could get the flat horizontal kind used on the laundromat machines…
Wow, now that you mention it, I’d forgotten about the cigarette dispensers I used to see a lot of when I was a kid. I don’t think they used electricity.
I still see these machines in laundromats, where they dispense single-load detergent and fabric softener packages.
Also… You can implement all the logic in a hardwire fashion using only TTL chips and boolean algebra. But of course it would be less expensive to use a microcontroller nowadays.
a simple vending machine the news paper vending machine it is just a metal box with a door that locks and once you make the correct payment the door is unlocked and you can get a newspaper.
while the coin box is fairly secure you could steal newspapers (pay for 1 and take all)
why theft like that is minimal is because the.
1. the cost of the paper is so small a few cents to $2 depending on location and paper.
2. once that day is over the paper is old news
it is possible for the door to be jimmied or simply closed without locking
of course news paper companies do prosecute theft and vandalism to their machines so it is not a good idea to try to steal from those machines.
cigarette vending machines from the 80’s at least the ones with pull knobs are all mechanical for from taking the payment all the way to dispensing the product.
there may be some electrical just for the marquee light and maybe an anti tampering/theft device.
“while the coin box is fairly secure you could steal newspapers (pay for 1 and take all)”
There was such a machine in front of a store in Denver where someone was stealing all the newspapers every day.
(This was back in the ’90’s) So, the store owner set up a video camera inside the store that watched the machine between the time it was restocked until the store opened.
They caught the thief. It was the owner of a gas station just down the block. He’d put the newspapers on the counter near his till and sell them that day.
1. Insert coin.
2. Click all the buttons at once.
Dammit.
Donut jam
Jam donut.
JELLY donut. Mmmmm.
Jamb up and jelly tight.
Now stop it! Good chatter in a garage… distracting, here.
The last time I interfaced with a vending machine was 1989 (it was a beverage vending machine). The manufacturer had a schematic pasted on the inside panel, but it wasn’t the kind of schematic you’re probably use to! It was what is called a ‘ladder diagram’, and is an old way of depicting logic that typically was physically realized with relays.
http://www.plcacademy.com/ladder-logic-symbols/
Not as “old” as you may think! Ladder diagrams are still used in PLC. Ladder diagrams/symbols developed along with electronics symbols, but in different industries and different disciplines. Electronic techs use electronic symbols and electricians use ladder symbols. When I was a younger (more naive) Electronic Tech, I assumed I could be hired into a PLC environment with no problems. Then I got a book explaining PLC and its logic ladders…
It’s funny that this machine is made out of cardboard because when I was a kid we could use quarter size cardboard coins and it would work to get our gumballs… sometimes it would get stuck and it would work multiple times.
“We’re not sure how to handle coins which are the right size but too light though.” Use a second spring loaded trap door. If the coin DOESN’T fall through, it gets rejected.
“while the coin box is fairly secure you could steal newspapers (pay for 1 and take all)”
There was such a machine in front of a store in Denver where someone was stealing all the newspapers every day.
(This was back in the ’90’s) So, the store owner set up a video camera inside the store that watched the machine between the time it was restocked until the store opened.
They caught the thief. It was the owner of a gas station just down the block. He’d put the newspapers on the counter near his till and sell them that day.