Author Topic: Using a L298 motor controller H bridge  (Read 5994 times)

0 Members and 1 Guest are viewing this topic.

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Using a L298 motor controller H bridge
« on: December 05, 2009, 04:38:15 PM »
Has anyone used these chips before? How have you wired them?

Each channel on this h-bridge has three control lines; In1, In2, and enable.

In order to get the motor to spin, In1 = !In2 and enable is high. depending on which In is high determines the direction.

If i want to only use one hardware PWM per channel, should PWM the enable line and just hold the In's steady, or will that cause me trouble?


Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Using a L298 motor controller H bridge
« Reply #1 on: December 06, 2009, 08:00:19 AM »
That could work. Look at the truth table in the data sheet to see what the state of the drive FETs are when the PWM signal is high and low.
Also do a search in these forums, the L298 is well discussed.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Using a L298 motor controller H bridge
« Reply #2 on: December 06, 2009, 08:36:14 AM »
Hi,

If i want to only use one hardware PWM per channel, should PWM the enable line and just hold the In's steady
Yes, that's the way to do it.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline madsci1016Topic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: Using a L298 motor controller H bridge
« Reply #3 on: December 06, 2009, 11:17:58 AM »
Thanks guys.

I did do the mandatory googling but got answers either way, so i figured i'd ask the experts.

Man, the spec sheet is confusing. It took me a few hours to figure out you HAD to connect the current sense to ground to get the hbridge to work.

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Using a L298 motor controller H bridge
« Reply #4 on: December 06, 2009, 04:51:48 PM »
Its confusing since the L298 can be used in many ways. But you figured it out and this will make it easier for you to learn the next new chip.

Offline Rahulvyas

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: Using a L298 motor controller H bridge
« Reply #5 on: October 14, 2012, 09:06:50 AM »
I also want to control the motor through only one PWM channel. What do I do? I want to interface a dc motor 12v (1amp current requirement) like a servo(has three pins- gnd,vcc and pwm)

Please help

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Using a L298 motor controller H bridge
« Reply #6 on: October 14, 2012, 04:51:14 PM »
Hi,

Please start a new topic, rather than bringing a 3 year old thread back from its grave :)

I also want to control the motor through only one PWM channel. What do I do? I want to interface a dc motor 12v (1amp current requirement) like a servo(has three pins- gnd,vcc and pwm)
You need to describe your project a little better.
Do you have the motor?
Is is a plain old DC motor with 2 terminals, that you want to add a PWM line to, or...?
Do you need it to be bidirectional (i.e. capable of rotating both CW and CCW), or will a single direction do?
Why do you want to add the extra line? It isn't really needed, as you can just PWM either of the two terminals.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Batienzaxcore

  • Full Member
  • ***
  • Posts: 58
  • Helpful? 0
  • Just me. Really.
Re: Using a L298 motor controller H bridge
« Reply #7 on: October 21, 2012, 06:00:05 AM »
If he wants to turn a DC motor into a servo motor, he could always use a servo amplifier. You could always try something like this.


http://www.e-gizmo.com/KIT/SERVO%20AMPLIFIER.html


Although I'm not really sure if you'd be able to find any kinds of these in your place.
Music is really my thing. But I am haunted by my fantasies of seeing robots rock out - A literal metal band.

 


Get Your Ad Here