Go Down

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

trs300

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...


http://www.emartee.com/product/41445/Wrobot%20L298N%20Motor%20Driver%20Shield%20V1.0

http://www.emartee.com/product/42001/Arduino%20motor%20drive%20shield%20L298N%20V3.0

Tim

johnwasser

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: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

trs300


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...

johnwasser

Both of those controllers are based on the L298N chip.

http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00000240.pdf

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: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Go Up