I try to make a system to lift up and down a door for a chicken coop. When I did it on a breadboard, everything was working correctly but now that I use a PCB, when the H-Bridge is connected, the microcontroller doesn't turn on although I did the same routing as the breadboard and the motor turn but slower than it should and after a few seconds the motor speed decrease more and the H-Bridge is burning but if I don't connect the motor to the H-Bidge, it is burning after a few seconds too.
I use a esp32 as microcontroller, a SN754410E for the H-Bridge, the system is powered by four batteries of 1.5 volt each and I use a OKR-T/20-W12-C DC/DC converter to convert the 6 volts from into 3.3 volts for the esp32 and my oled screen. The motor is connected throught the pin head with the name X2. Three push buttons in pulldown are used for the microcontroller and activate the motor in forward or backward. X1 if for a switch to turn on or off the system without touching the batteries.
I tried to change the routing on the PCB and power the H-bridge by the Vin input of the DC/DC converter but it doesn't work and I have still the same problem although on the breadboard, it works without overheating.
Thank you in advance