DC Motor Reversing

I am using an XC4488 to drive a DC motor for a project using Arduino Uno. It's all wired up, but I was wondering how to reverse the motor, as it only runs in a single direction. I can provide wiring diagram if that is helpful.

It will reverse when your code commands it to reverse.

Post your schematic and code. Read the forum guide so that you know how to do that correctly.

image

It is not possible to reverse the motor with that driver without physically swapping the motor leads. It cannot be done with just software.

To reverse a motor with code you will need an H-bridge motor driver.

Pololu (for one) has a good line of DC brushed motor drivers. Choose the motor driver based on the stall current of the motor and the motor supply voltage. The stall current can be several times the running current. The stall current will be drawn, briefly, every time that the motor is started. The stall current should be listed in the motor data sheet.

How, the driver OP is using is a simple mosfet

My bad, assumed that was some H-bridge driver I'd never heard of!

We have changed to a L298N, would this work better?

The L298 will allow reversing under software control. However, the L298 drivers are based on ancient and inefficient bipolar transistor technology. They drop from 2V to over 4V of the supply voltage and dissipate that power as waste heat. There are much more efficient modern MOSFET output drivers available. See the link to the Pololu DC motor drivers in my previous post.

We would need to see the specifications of your motor to know if the L298 would even work with the motor. The L298 is good for 2A max.

Hi,
What is your motor?
Can you please post link to motor specs/data?

Thanks... Tom.... :smiley: :+1: :coffee: :australia:

What is the voltage of your motor power supply?
If it is 5V then the 2V drop of L293 will reduce mechanical power considerably. If it is 12V, it should be fine.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.