It s a simple circuit that has a input for positive and negative and an output for positive and negative connections.
P channel mosfet high side switch.
The current necessary for the relay coil is too high for an i o pin but the coil needs 5v to work.
Then the p channel mosfet is used to switch the positive supply to the motor for forward direction high side switching while the n channel mosfet is used to switch the negative supply to the motor for reverse direction low side switching.
To switch v with a p channel mosfet use a p channel mosfet with source connected to v either directly or via a current limiting resistor and the load connected to drain.
The p channel high side switch therefore solves the problem of using an n channel mosfet for high side switching.
It can easily be driven by the mcu via a level shifter.
This transistor connects between v and the load.
No charge pump is required for driving the high side switch.
The opposite of the low side switch is the high side switch.
In this configuration when the high side switch is realized with a p channel mosfet the driver design will be simplified enormously.
Usually the source pin must be more positive than the drain however this isn t true when using a p mosfet to provide reverse polarity protection for instance.
Because of how transistors work these can be a little more difficult to use in an arduino or raspberry pi circuit.
In this case use a p channel mosfet to turn the relay on from the arduino s i o pin.
However this cure can also have some side effects.
P channel mosfet high side switch here s my schematic and board design for a simple high side switch using a p channel mosfet.
P channel mosfets generally have a higher r dson compared to n type mosfets having a similar internal chip size.
Typically these use a pnp bjt or p channel mosfet.