ArduinoGeneral

2A dual Motor Controller problems

userHead Lucky75 2010-07-16 17:20:41 15669 Views6 Replies

Hi,

I have the 2a dual motor controller (https://www.dfrobot.com/product-66.html), but it seems to be lacking in documentation. I have the l298n motor driver document, but that just seems to be the chip itself and not the entire board.

What is the purpose of the jumper and the Vd, GND, Vs terminals? Vd = logic voltage, Vs = motor voltage?

If the jumper is on, do I only need to connect one of the Vd or Vs terminals?

When doing PWM from a microcontroller, is it only done on the enable pin?

And it seems that when we give it a direct voltage that unless we're sending it a PWM signal that it's always on. Is there a way of making it not output any voltage unless it has a signal on the Motor Direction and Enable pins?

I have a deadline which is coming up for a proof of concept, so a quick response would be greatly appreciated.

Thanks!

2026-04-01 10:18:40

You probably need to check out the latest wiki for this shield. 

The link is: https://wiki.dfrobot.com/dri0002

It addresses the usage of this L298n motor shield.

userHeadPic R2D2C3PO
2010-07-21 21:29:38 [quote="Lucky75"]
So..I need to connect the ground for the HBridge to the ground to our microcontroller?

Where does the negative terminal of the battery go into the HBridge?

My microcontroller is powered by a 9v battery with (Vin = 9v positive) and (GND = 9v negative).

It seems like because there's a common ground on the HBridge, I don't have enough places to connect wires.
[/quote]

Yes. You have to connect ground for the HBridge with your microcontroller.

The negative part of the battery can be connected to the GND.
userHeadPic R2D2C3PO
2010-07-21 12:37:38 So..I need to connect the ground for the HBridge to the ground to our microcontroller?

Where does the negative terminal of the battery go into the HBridge?

My microcontroller is powered by a 9v battery with (Vin = 9v positive) and (GND = 9v negative).

It seems like because there's a common ground on the HBridge, I don't have enough places to connect wires.
userHeadPic Lucky75
2010-07-19 21:59:20 Vd is logical voltage input.
Vs is motor voltage input.

When the Vs is smalller than 12V which means the motor supply volatege is less than 12V, you can apply the jumper to let Vs=Vd.

And Vd has to be connected to your microcontroller if you do not apply the Vs=Vd jumper. 

Once more thing, you must connect GND to your microcontroller's GND. Otherwise, the control will not work.
userHeadPic R2D2C3PO
2010-07-16 23:41:37 Hey,

Thanks for the reply, but that doesn't seem to be the same product. This is what mine looks like:
[img]

The jumper on this one looks to just be for setting Vd = Vs?

I'm connecting a basic micro 40m microcontroller (with it's own power) to this motor controller, and then connecting the motor controller to a motor (with a separate power supply). For some reason it seems that even when I have the vd=vs jumper connected, I need to connect Vs, GND and Vd.

I've hooked up Vs to the (+) motor power supply terminal and GND to the (-) motor power supply terminal, but the motor won't run unless Vd is connected to the microcontroller for some reason, regardless of what signals I'm driving to the E1 and M1 pins.

Thanks for the help!
userHeadPic Lucky75
2010-07-16 22:20:13 PWRIN: External Power
VIN: Arduino Power

The jumpers are for two different speed control modes:

PWM and PLL(Phased Locked Loop) control Modes. The PWM mode uses E1 and E2 to generate PWM signal. The PLL mode uses M1 and M2 to generate phase control signal.

When doing PWM from a microcontroller, is it only done on the enable pin?

YES.

"And it seems that when we give it a direct voltage that unless we're sending it a PWM signal that it's always on. Is there a way of making it not output any voltage unless it has a signal on the Motor Direction and Enable pins?"

IF you pull the enable pin to low, you should have the chance to have zero output.  As stated in L298 data sheet, if the enable pin is low, the output maybe a random number.



userHeadPic R2D2C3PO