I have a 5V (5.3V) switching transformer that goes to a 7805 voltage regulator and powers Arduino, Arduino controls 4 relays using BJTs. those relays getting power directly from the same power source.
Arduino and it's modules + LCD uses ~40ma, each relay consumes 70ma. total current is around 350ma lets say 400ma.
The problem is 5V isn't enough to power Arduino, modules, sensors and relays. LCD gets very dim etc...
it works with 9V but 7805 gets really hot ~70 centigrade while having a heat sink on!
If i remove the 7805 and switching power burns or something bad happens then there's nothing in between to protect the Arduino!
What's the solution for this situation?
EDIT: for anyone who may have the same problem; I solved the problem with using a proper switching power salvaged from an old USB type-C charger and removed the 7805 voltage regulator, there's no heat anymore and it's working perfectly.