The goal is to control the IRF4905 with the ESP32. From my understanding (which is limited) the IRF4905 will have the lowest RDS(on) with a -15 V VGS. To achieve this voltage difference I have a linear voltage regulator dropping my ~33 V (the power source is a 8s Li-ion, so the voltage range is 28.8 V - 33.6 V) to 15 V. Assuming the voltage regulator connects directly to the gate of the IRF4905 it would have a voltage difference between source and gate of 13.8 V - 18.6 V effectively turning on.
My question is, can I use the BSS138 as shown in the schematic below? From my understanding the BSS138 can have a drain-source voltage of 50 V and a gate source voltage of +/-20 V. I should be within spec on both of these but I don't have any experience with MOSFETs.
Note: I'm using the IRF4905 p-channel instead of a n-channel as I only want voltage at the motor connector when the MOSFET is on (to prevent a shock if someone touches the connector and ground in a n-channel configuration) so I believe that means I need to use a P-channel and switch before the load.
I believe there should be a 10k resistor pulling to ground from pin 1 of the BSS138 to prevent floating the gate.