DC motor driving with L298

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.

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!

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.

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

Thanks!

Yeah it works! :slight_smile: