Inverter circuit for motor driver

Hi guys,

While I'm good with the code, I'm a novice with the circuits so I thought I'd ask before I build and burn something up.

I have a motor driver board with a L298N. It's set up for a stepper, but I'm driving a DC motor. So instead of just direction and enable, you have enable and two inputs for direction. I want to save to two pins since one of those will always be the opposite of the other in my case. I have some of these n-channel MOSFETs. I want to use one to invert the signal in a configuration like this.

Driver Input 1 (not inverted) | | Arduino Pin----|--/\/R1\/------- Gate

+5V ----/\/\R2/\/---| --------- Drain | | Driver Input 2 (Inverted)

GND --------Source

I need to know if this transistor is at all appropriate ( I think I bought them for turning on LEDs) or if I need something different and what sort of values would be appropriate for R1 and R2.

The MOSFET seems rather large but should work. The gate resistor is optional but could be anything from 150Ω to 330Ω. Suggested values for R2 could be anything from 1K to 4.7K.

Note you'll be giving up the Fast Motor Stop feature where both L298N inputs are equal.

dlloyd: Note you'll be giving up the Fast Motor Stop feature where both L298N inputs are equal.

I hadn't thought of that, but really don't need the fast stop for this project. It's a tank rover, and it doesn't really go so fast that I need brakes.

Thanks for the other help.

You could alternatively fix the enable high and use two pwm pins for each direction. That gives synchronous rectification so you would get braking if you wanted.