L298N Stepper Motor Driver Controller Board (HCARDU0013)

Stepper and DC type motor drivers
admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

L298N Stepper Motor Driver Controller Board (HCARDU0013)

Post by admin » Fri Nov 23, 2012 10:33 pm

Image


- Uses ST' L298N chip, can directly drive two 3-30V DC motor, and provide a 5V output interface, power for 5V single-chip circuitry, support 3.3VMCU control
- Can easily control the DC motor speed and direction, can also control a 2-phase stepper motor
- Driver: L298N Dual H Bridge DC Motor Driver IC
- Driven part of the terminal supply voltage: VMS 5~35V
- Driven part of the peak current Io: 2A per bridge
- The logical part of the terminal supply voltage: 4.5~7V
- The logical part of the operating current range: 0 ~ 36mA
- Control signal input voltage range: 4.5~5.5V (high) / 0V (low)
- Maximum power consumption: 20W

This controller board can be purchased here.

WARNING: IMPROPER USE OF THIS MOTOR DRIVE MODULE CAN RESULT IN DAMAGE TO BOTH THE MODULE AND ANY ELECTRONIC EQUIPMENT CONNECTED TO IT.
Please check that you have connected this motor drive module correctly before applying power to it. Incorrect connections to this module can result in permanent damage to both module and connected electronic equipment. In particular, please pay special attention to connection to the external motor power supply (VMS), as connecting it to the wrong terminal can result in the motor power supply being applied to a connected controller.

Please also be aware that the 5V terminal is for reference only and should not be used for powering other devices. Using the modules 5V output in this way can cause damage to the on-board 5V regulator, which can also result in damage to other connected components.

Datasheets:
L298N Stepper Motor Driver Controller Board.zip
L298_H_Bridge_HCARDU0013.pdf
You do not have the required permissions to view the files attached to this post.

Big_Tom4
Posts: 4
Joined: Fri Nov 09, 2012 1:19 pm

L298 Motor Driver with Arduino Uno

Post by Big_Tom4 » Fri Nov 23, 2012 11:45 pm

Hi Guys,

I'm new to Arduino, having just started out on my first project a couple of weeks ago. I am trying to drive a DC Motor using the Arduino Uno R3 via a Motor Driver board based on the L298 Chip.

My basic prototype circuit can be seen in the attached photos. I have connected ENA to Pin3, IN1 to Pin4 and IN2 to Pin 2. I am sending a PWM signal to ENA based on the input from a potentiometer I have on input A1. I have checked the physical outputs with a multimeter and everything is working as it should on the Arduino - Pin 4 reads high, Pin 2 reads low and Pin 3 varies with the potentiometer as expected.

Through a bit of trial and error I have managed to get the system working properly with my DC motor changing speed as I turn the pot. However, I have only managed this by removing one of the jumpers (J2/UR3) connecting a pull-up resistor (see photo). The circuit only works if this particular jumper is removed, but I've no idea why I did this and I'm not sure it's right. With the jumper replaced, both IN1 and IN2 measure at around 2.6V, rather than IN1 being high and IN2 begin low.

Can anyone confirm what these jumpers do and whether it is ok to remove them? If not, is there something I need to change in my circuit to get my setup to work properly?

Any help much appreciated
Tom
You do not have the required permissions to view the files attached to this post.

admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

Re: L298 Motor Driver with Arduino Uno

Post by admin » Mon Nov 26, 2012 10:06 am

Hi,

This is very odd as all you appear to be doing is removing a 1K pull-up from input 2. Your Arduino should be able to drive this input low with this pull-up connected. I can’t tell from the picture but can you check what value pull-up resistor is connected to that jumper? It should have a value of 102 on it.

Andrew

Big_Tom4
Posts: 4
Joined: Fri Nov 09, 2012 1:19 pm

Re: L298 Motor Driver with Arduino Uno

Post by Big_Tom4 » Mon Nov 26, 2012 10:32 pm

Hi Andrew,

Thanks for your response, yes I am slightly confused - I have checked and all four pull-up resistors have 102 on them. It is definitely that the arduino can't 'override' the voltage of the motor driver - I have checked again and when disconnected, the arduino outputs are as they should be, but not when connected. I have tested on both the motor A and motor B 'circuits' and the effect is the same, except I have to remove J3 or J4. It wouldn't necessarily be an issue if I didn't require bi-directional control, but as it is I have to manually move the jumpers around to change direction!

I have read this on another forum [http://www.societyofrobots.com/robotfor ... pic=9753.0]: "It took me a few hours to figure out you HAD to connect the current sense to ground to get the hbridge to work." Has anyone seen this before, and is there any truth in it? Or am I getting the wrong end of the stick?

Thanks,
Tom

admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

Re: L298 Motor Driver with Arduino Uno

Post by admin » Tue Nov 27, 2012 1:17 pm

I have tested on both the motor A and motor B 'circuits' and the effect is the same, except I have to remove J3 or J4. It wouldn't necessarily be an issue if I didn't require bi-directional control, but as it is I have to manually move the jumpers around to change direction!
Are you saying that even with both jumpers removed the Arduino can't drive the two inputs to the correct state?


have read this on another forum [http://www.societyofrobots.com/robotfor ... pic=9753.0]: "It took me a few hours to figure out you HAD to connect the current sense to ground to get the hbridge to work." Has anyone seen this before, and is there any truth in it? Or am I getting the wrong end of the stick?

That looks correct to me. I think it’s left disconnected so that you can insert a low value 'current sense' resistor to monitor the amount of current being supplied to the motor. By the looks of the data sheet if you were not driving the enable pins, and with the right value sense resistor connected to the appropriate enable pin, you could have an automatic over current protection.

Andrew

Big_Tom4
Posts: 4
Joined: Fri Nov 09, 2012 1:19 pm

Re: L298 Motor Driver with Arduino Uno

Post by Big_Tom4 » Tue Nov 27, 2012 11:01 pm

Are you saying that even with both jumpers removed the Arduino can't drive the two inputs to the correct state?
Yes this is true. It seems that manipulating the jumpers is the only way to control the state of the pins - whatever combination of jumpers is used, the arduino has no control over them. Even with all 4 jumpers removed, and the L298 board unpowered, the two digital control lines from the arduino still change from their 'disconnected' voltages of 5V and 0V to 1.7V each. I have checked that the boards share a common ground, which was my first thought.

I've realised the discussion on the other forum about current sense pins applies to a bare L298 chip I think - not my pre-built motor driver which already grounds these lines.

Could this be to do with the fact I'm powering my arduino from my laptop USB port? I am running out of other ideas. What else should I test/measure to try and solve where the problem is?

Thanks, Tom

admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

Re: L298 Motor Driver with Arduino Uno

Post by admin » Wed Nov 28, 2012 7:36 am

I’m going to set one up and test this myself. Even though I know this is obviously not correct behaviour I’d like to check this for myself just to make sure that we both not missing something. I’ll try and get back to you today.

Andrew

admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

Re: L298 Motor Driver with Arduino Uno

Post by admin » Wed Nov 28, 2012 8:08 am

A couple of things you could check, can you disconnect the Arduino and check that the DIO on your Arduino board are correctly changing state? Also with the enable and input pins disconnected on the module and all the jumpers in place, can you drive the motor by physically connecting either IN1 or IN2 to GND with a wire?

Looking at your pictures I don't see anything wrong with your setup connection wise.

Big_Tom4
Posts: 4
Joined: Fri Nov 09, 2012 1:19 pm

Re: L298 Motor Driver with Arduino Uno

Post by Big_Tom4 » Wed Nov 28, 2012 8:20 pm

Problem found I think - or at least I've found a problem. Checked all the DIO's on the Arduino - everything as it should be. However I've found that with everything else disconnected, just the L298 Motor Driver plugged into a 12V power supply - the 5V output pins actually supply 12V (see photos). In other words I think the 78M05 5V regulator IC is faulty or has shorted somehow such that the VMS and 5V logic lines are connected. Having said that, IN1 IN2 IN3 & IN4 actually still measure 5V with the same setup and the jumpers connected....

Is that right?
You do not have the required permissions to view the files attached to this post.

admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

Re: L298 Motor Driver with Arduino Uno

Post by admin » Thu Nov 29, 2012 7:50 am

Ah yes it does look like you have a faulty regulator. It is normal to have the input voltage on the output of a regulator when it is damaged. I’m going PM you to resolve this issue.

Andrew

Post Reply

Return to “Motor drivers”