Greetings,
I'm working on an IoT project, using Arduino Mega, including various modules like Sim800L, Step motors and ... .
As some modules like Sim800L use around 3.8v to operate appropriately, I need to have 2 power rails (5v and 3.8v). So I'm using 2 buck convertors (LM2596 3a and 5a) and I'm also powering my Arduino directly with 12v power supply.
Here is the issue I'm having:
Everything works fine if my Arduino is connected to both the USB and Power supply at the same time. But when I disconnected the USB cable, Arduino behaves abnormally! For e.g, relays get ON if connected to USB, they get OFF when the board is only connected to the power supply! I have no idea what's the matter with my circuit.
P.S
1- I attached picture of my wiring (only including 2 modules and the power wiring to give a general illustration)
2- I use multiple modules with different current loads, but I'm careful not to exceed the maximum current limit of Power supply, Arduino board and the buck convertors (based on calculation and measuring each module's load)