Electronic – arduino – I need a circuit that allows current to flow in both directions through a load, and I came up with this. Is it good or is there a better way

arduinocurrentswitches

this is one of my first circuit "designs" (quotes on since it's simply switches). I need current to be able to flow in both directions through a certain load, and the direction of travel should be electronicaly commanded. This is what I thought of:

schematic

simulate this circuit – Schematic created using CircuitLab

Sorry if it's too messy. This way, making pins 1/2 high (but never both at the same time) makes current flow in each direction. Is this a good way or is there a simpler one?

Best Answer

That looks pretty close to a classic H-Bridge style design though individual component selections may be problematic. You also need a small resistor on the gate line to the bottom MOSFETs, switching current to charge/discharge the gate will be excessive for the ARDUINO.

The circuit you show uses the rather problematic single control method which can allow shoot through currents to occur. A fuse is warrented.

Obviously turning on both sides is a big no-no, so get the software right. However, even then, the 10K pull-up on the top gates means they will be quite slow to turn off. You need to take that into account in your controlware.

If that is an inductive load, flyback will be handled by the diodes in the MOSFETS however, you may have issues sending that current back at the power supply. Especially if the Arduino is hooked up to the same supply. See this question for more info. That link also shows you why it is better to drive with four lines instead of two, see recirculation fly-back.

Ultimately though, you would be better off choosing one of the many one piece full bridge drivers out there. But then again, that's not nearly so satisfying and you miss out on a great learning experience.