Go Down

Topic: DC motor driving with L298 (Read 1 time) previous topic - next topic

Vyatta

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.

dgonz

#1
Dec 29, 2011, 07:40 am Last Edit: Dec 29, 2011, 07:57 am by dgonz Reason: 1
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!

Vyatta

#2
Dec 29, 2011, 08:44 am Last Edit: Dec 30, 2011, 11:04 am by Vyatta Reason: 1
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.

dc42

#3
Dec 30, 2011, 07:01 pm Last Edit: Dec 30, 2011, 07:04 pm by dc42 Reason: 1

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

Vyatta


Go Up