Protecting PCB, multiplexers and MCU in vending machines

Thread Starter


Joined Nov 15, 2022
Hello everyone, I am working on a low cost vending machine with the ESP32 and as you may know, it is necessary to properly protect the components to prevent users from trying to steal money or damage the components. The PCB has a TFT display and several multiplexers to communicate the ESP32 with the buttons, coin acceptor, bill acceptor, hopper sensor, etc. It's common for people to try to give any of these components a small electrical shock, and multiplexers are the most vulnerable.

That is not my only problem, since the +5VDC and +12VDC power supply is not of very good quality, so I also need to protect/stabilize a bit the current that it supplies to the ESP32 and other components.

So I'm looking for what low cost components I should use to protect everything or at least the essentials. For now it has only occurred to me to add some electrolytic capacitors, some SMD capacitors and to protect against electrical shocks I don't know if I should implement a current limiter or Low-Dropout Linear Regulator or zener diode or some other component. I would greatly appreciate your suggestions. Regards.


Joined Jan 13, 2021
Decades ago I had to solve the same problem with commercial video games where kids would use a modified piezo gas lighter to spark into the coin box for a few thousand more credits.

What I did back then was to make a simple analog spark detector that reset the game for 30 seconds and this stopped the problem. You could add a piezo alarm sound to draw attention to the machine and person trying to steal the vending stock.