Pages: [1]   Go Down
Author Topic: DC motor driving with L298  (Read 1194 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

Hi guys

I am trying to control the direction of rotation of my DC motor using L298. I am having some problems with the connections.
Vs must be applied at Pin 4 and Vss must be applied at pin 9. I am using two different power supplies for the same. I should also connect pin 8 to ground. So which supply's ground should I be connecting this to?

Thanks in advance. Any input regarding this is highly appreciated.
Logged

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

I think you should be more specific as to what Vs and Vss are. The way H-Bridge motor driver ICs work is you supply a DC voltage to the board for motor power (Spec is 6-35Volts) and it will use that to drive the motors. On the L298 that is the green insert at the bottom near the pins. You plug each motor into its respective green insert.

The GND and 5V pins are regulated output pins if you want to use them (assuming you use the recommended configuration http://www.canakit.com/Media/Manuals/UK1122.pdf ).

IN1 or 2 are used to control the direction of motor A.
IN3 and 4 for motor B. *I am not sure why there are two direction pins for each motor... They're digital. Low and it'll turn one way, High and it'll turn the other.*

The speed of motor A or B is controlled by a PWM signal to ENA or ENB respectively. The greater the duty cycle, the faster the motor runs.

*EDIT: Okay, so I remember why there are two. To drive a motor in one direction, one is held High and the other held Low. To reverse direction, the state of each line must be flipped.

Hope that helps!
« Last Edit: December 29, 2011, 01:57:44 am by dgonz » Logged

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

Thanks for the reply. Yeah I should have been more specific with regard to Vs and Vss. Well Vs is the power for the motor and Vss is the power for the logic blocks(+5V).

I will wire it up as you have pointed out.
« Last Edit: December 30, 2011, 05:04:11 am by Vyatta » Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6619
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Vs must be applied at Pin 4 and Vss must be applied at pin 9. I am using two different power supplies for the same. I should also connect pin 8 to ground. So which supply's ground should I be connecting this to?

Connect pin 8 to the ground of the +5v supply (Vss). Connect the ground of the motor supply to pins 1 and 15 (through current sense resistors if you are using them). Connect the grounds of the two supplies together.
« Last Edit: December 30, 2011, 01:04:17 pm by dc42 » Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

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

Thanks!

Yeah it works! smiley
Logged

Pages: [1]   Go Up
Jump to: