2

Author Topic: driving 2 dc motors using single 16F877A help  (Read 2942 times)

0 Members and 1 Guest are viewing this topic.

Offline aruna1Topic starter

  • Supreme Robot
  • *****
  • Posts: 381
  • Helpful? 4
  • I'm an Ordinary guy
driving 2 dc motors using single 16F877A help
« on: October 09, 2008, 09:51:27 AM »
is it possible to drive 2 DC motors using A 16F877A?(through L298) 16F877A has 2 PWM pins(pin 16 and 17) and L298 has 2 input pins per motor(total 4 inputs for bot motors) so is it possible to drive two motors or 16F877A can drive only one motor? ???
I have attached L298 data sheet here
I'm Me

Offline Trumpkin

  • Supreme Robot
  • *****
  • Posts: 1,177
  • Helpful? 5
Re: driving 2 dc motors using single 16F877A help
« Reply #1 on: October 09, 2008, 10:12:02 AM »
The l298 has 1 pwm pin per motor, enable A and enable B. (I think)
Robots are awesome!

Offline ArcMan

  • Supreme Robot
  • *****
  • Posts: 519
  • Helpful? 4
  • Mmmm... Plasma
Re: driving 2 dc motors using single 16F877A help
« Reply #2 on: October 09, 2008, 11:34:32 AM »
Yes it is possible.  I do it all the time.  The 877A has 2 PWM's, the L298 has 2 H-bridges.  Viola!

Make sure you study the L298 circuits.  Search previous posts for a picture of my L298 motor drive.  Don't forget the flyback diodes with the L298.


Offline aruna1Topic starter

  • Supreme Robot
  • *****
  • Posts: 381
  • Helpful? 4
  • I'm an Ordinary guy
Re: driving 2 dc motors using single 16F877A help
« Reply #3 on: October 09, 2008, 12:40:49 PM »
@trumpking and Arcman

I found what i was looking for.Thanks.

by the way is it possible to use 1N4007 as diodes of L298? ???
I'm Me

Offline ArcMan

  • Supreme Robot
  • *****
  • Posts: 519
  • Helpful? 4
  • Mmmm... Plasma
Re: driving 2 dc motors using single 16F877A help
« Reply #4 on: October 09, 2008, 01:25:55 PM »
No.  1N4007's are standard recovery diodes.  You must use fast recovery diodes.

Offline sysysy

  • Beginner
  • *
  • Posts: 2
  • Helpful? 0
Re: driving 2 dc motors using single 16F877A help
« Reply #5 on: November 26, 2010, 12:09:43 PM »
Can anyone tell me what is the purpose of fly back diode use in l298 and motor circuit?

Offline little-c

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 1
Re: driving 2 dc motors using single 16F877A help
« Reply #6 on: November 26, 2010, 02:29:11 PM »
basicly, it stops current from going the wrong way. and therfore stuff frying.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: driving 2 dc motors using single 16F877A help
« Reply #7 on: November 26, 2010, 11:06:45 PM »
Hi,

Can anyone tell me what is the purpose of fly back diode use in l298 and motor circuit?
To stop the fly back voltage of course  :P

Motors are inductive. When you remove power from an inductor, it gives an inductive kick that can easily amount to hundreds of volts for very short periods and which is of the opposite polarity of what it was fed.
Relays and solenoids are other examples where inductive kick back occurs.

Diodes are often the next best way to handle this. It's easy, but a snubber circuit can be tailored for fastest switching, most power transferred switching etc. In some circuits, zener diodes are used for faster switching.

However, it's a bit pessimistic saying that it should always be high speed diodes and I think that statement reveals a person that has never made any actual measurements and spec'd up what's needed - a bit like those saying that any circuit using a 555 needs a 100nF cap on pin 5 (of which more than half probably don't even know or care what its purpose is).
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

 


Get Your Ad Here

data_list