Go Down

Topic: Motor Controllers (Not sure where to start?) (Read 1 time) previous topic - next topic


Hi Folks,  I have two motor controlers and cannot make either of them work...  

Truth is my control requirement is pretty simple.  I want to control two motors...  I want to read an analog singnal voltage (0-5V) and use that singnal to control two DC motors from 0-100% duty using PWM...

The devices I have seem to have more capabilities then I need ( stepper motor , reverse, etc..)  

Is there examples both in code and in how I'm supposed to wire these devices to drive two motors using PWM based on an analog input?

Any help is greatly appreciated...

Here are the motor controllers...

I guess my biggest questions are around what pins need to be set to what to get the driver to control the motor...  Anyway, I was just wondering if there were examples out there on how to operate these two motor controllers from Ardunio...





If you don't need directional control then a single MOSFET per motor should do the trick.

A quick search of Digi-Key for "logic level MOSFET" turned up about twenty choices running between $0.91 and $1.76.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp


Yes,  I have a couple of Logic Level Mosfets already working...  It's just a bit frustrating having bought these controllers and not knowing how to make them work...  Even though the Mosfets are inexpensive, by the time you build a PCB and add other components I think it would be less effort to use one of these pre-made controllers...

I'll keep looking for an example of how these things work.  Documentation that I can understand seems sparse...


Both of those controllers are based on the L298N chip.


There are four input pins, two enable pins, four output pins and power connections.

Enable A, when LOW, disconnects Out1 and Out2.  Enable B, similarly, for Out3 and Out4.  Setting those LOW will turn off power to your DC motors.  This is generally used more for driving steppers where you want the stepper to freewheel.

In1 HIGH connects Out1 to +V. In1 LOW connects Out1 to Ground.
In2 controls Out2, etc.

If you don't need direction control you can hook up FOUR DC motors between Out1-4 and ground.  Setting the Enable HIGH and using PWM on the corresponding In1-4 pin will drive the motor.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

Go Up