Pages: [1]   Go Down
Author Topic: l298 motor drive and motor interface  (Read 510 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using l298 motor drive and 300 rpm dual shaft dc gear motor

dc motor details

http://robosapiensindia.com/robosapiens/robomart/index.php?page=shop.product_details&flypage=flypage.tpl&product_id=184&category_id=&option=com_virtuemart&Itemid=64


along with arduino uno for speed control but motor is not rotating.

When I connect the motor directly to 12v dc supply, It is taking 56mA to run at no load full speed.
but when I connect the motor through motor drive, It is not running and the current through it is found to be 26mA.
I am powering the motor with 12V dc from smps.


I found from the data sheet of l298 that the max current in the output channel is 2A

Can some one let me know what the problem is?

Thanks in advance:)
Logged

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could measure the stall current. Block the rotation at 12V and measure the current. But with such a small motor, the L298 should not have any trouble with it.

Can you post a link to the motor driver you are using ? Or did you build one yourself with the L298 ?

Can you upload a photo of your setup ? With wires, Arduino, motor driver and motor ?

Can you upload the whole sketch between [code] ... [/code] tags.
« Last Edit: April 19, 2013, 04:39:51 am by Erdin » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

we bought a l298 ic . We did not make the h-bridge.
Here is the ic L298n datasheet
http://www.google.co.in/imgres?imgurl=http://datasheet.seekic.com/pdfimage/L29/L298P_L298_L298HNpdf1.jpg&imgrefurl=http://datasheet.seekic.com/datasheet/STMICROELECTRONICS_%5BSTMicroelectronics%5D_L298.html&h=1550&w=1200&sz=199&tbnid=dW-2dwxK8RY_RM:&tbnh=90&tbnw=70&zoom=1&usg=__Q8SkjID-YGwUIvRmAKLtXJoa39g=&docid=rPL5hq_Ab5SUIM&sa=X&ei=tDBxUbrmFITVrQeH_IC4BA&ved=0CD8Q9QEwBA&dur=40

Here
is the code we are using
Code:
//Define Pins
int enableA =7;
int pwm_pinA1=5;
int pinA2=6;

 
//Define Run variables
void setup()
{
 
 pinMode(enableA, OUTPUT);
 pinMode(pwm_pinA1, OUTPUT);
 pinMode(pinA2, OUTPUT);
 
}
void loop() {
 
   digitalWrite(enableA, HIGH);
   analogWrite(pwm_pinA1, 255);
   digitalWrite(pinA2, LOW);
   delay(1000);
   digitalWrite(enableA, LOW);
   delay(2000);
   digitalWrite(enableA, HIGH);
   analogWrite(pwm_pinA1, 127);
   delay(1000);
   digitalWrite(enableA, LOW);
   delay(1000);
}

I have one more doubt sir. Is it necessary to ground the current sensor of a motor drive using resistor?
If we ground the current sensor pin directly, will it effect the motor drive
Logged

Johannesburg. UTC+2
Offline Offline
Faraday Member
**
Karma: 82
Posts: 3855
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You might try a slightly different approach: put the PWM onto the enable pin with analogWrite, and set the other two pins high and low with digitalWrite. In fact for testing, maybe ignore PWM completely, and make the enable high with digitalWrite also.

Also post a schematic of your circuit.....
Logged

The Elders of the Internet know who I am.....
Get me on LinkedIn: za.linkedin.com/in/jimbrownza/

Offline Offline
Edison Member
*
Karma: 58
Posts: 2078
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Using the enable for PWM is the normal way to use th L298.
I think that one of the other signals should be high. In the datasheet is a table in figure 6, with 'C' and 'D' and how they are used.

The current through the motors is also going through the sense resistors.
You can tie it to ground (without resistors), but using sense resistors is a nice extra feature and it is safer.
Logged

Pages: [1]   Go Up
Jump to: