A vending machine is an automated machine that provides items such as snacks, beverages, cigarettes, and lottery tickets to consumers after cash, a credit card, or other forms of payment are inserted into the machine or otherwise made.
The first modern vending machines were developed in England in the early 1880s and dispensed postcards. Vending machines exist in many countries and, in more recent times, specialized vending machines that provide less common products compared to traditional vending machine items have been created.
One thing is for sure, the efficiency of the power supply is key. A highly efficient switch mode power supply reduces energy losses to a minimum which in turn saves money. Besides, it keeps the vending machine cool(er) which increases both the lifetime of the power supply and the surrounding electronic equipment. Opting for a power supply with high efficiency therefore also means opting for a sustainable solution.
Vending machines have multiple electronics that need to be powered. For instance, the display, control board, sensors for detection or temperature measurement, systems for payments, etc.
This means some loads are always-on, like LED lighting for example, but others are in idle mode up until the moment the vending machine is being used. At that moment, in a snack machine, for instance, a peak load is drawn to drive a motor for the spiral in one of the trays.
Or in a coffee machine, a peak load can be drawn to drive a motor to pump water into a coffee. These functions require a specific power supply solution suitable for the supply of short-term peak loads. The power supply depends on the motors: the voltage needs to match the motor voltage, and the current rating needs to be at least a bit more than the current used by however many motors will be running at once.
A computer PSU is a good source of a lot of power, as long as your motors need 12 V or 5 V. If you go with different motors, you will need a power supply to match it.
Small projects can be powered from the board itself, but you are limited to controlling 5 V low current devices. Unless your motor is VERY small, you will need an external power supply when you are talking about motors Then the rating of the power supply only needs to be based on the draw of the two simultaneous motors, as long as it is your code that is enforcing the limit on the number of motors running at one time.
If it’s simply based on normal button press scenarios, then you need to consider what will happen in an abnormal situation, when someone tries to do something to subvert the system by pressing multiple buttons or using the machine very quickly.
But which motor to use depends on your mechanism: how much room do you have? How much torque do you need? What speed do you need? These are all mechanical factors that depend on your machine design. The more speed and/or torque you need, the bigger motor you will need.
Once you pick a motor, choose a power supply that has the same voltage rating as one motor. Then add up the current draw of however many motors can be running at once, and make sure the Amps rating of the supply is at least 20% to 50% higher than that.