Pages: [1] 2   Go Down
Author Topic: Arduino/L298 schematic  (Read 11818 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 209
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does anybody know of an Arduino/L298 schematic?  
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 23
The Roboduino Rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I made this a while ago

http://bp0.blogger.com/_DLeG8x1l9dw/R__OZ0Pg0RI/AAAAAAAAAEA/jHWmi9gPqm0/s1600-h/L298.jpg
« Last Edit: March 02, 2009, 08:00:45 pm by airman00 » Logged

Check out the Roboduino Arduino-compatible board!


0
Offline Offline
Full Member
***
Karma: 0
Posts: 209
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Your schematic is the most detailed I have seen after endless hours of searching but I am still at a loss deciding which pins go where,  specifically, the IN and ENABLE pins.  How do these connect to Arduino? Thanks for the help.  
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 209
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Your schematic is the most detailed I have seen after endless hours of searching but I am still at a loss deciding which pins go where,  specifically, the IN and ENABLE pins.  How do these connect to Arduino? Thanks for the help.
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 354
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

l298 allows you to control 2 motors.

So for Motor 1:

Output 1 & output 2 to motor
Input 1 & 2 & enable A to arduino.

Enable A has to be high for motor to work
If input 1 is high and 2 is low, motor will go one way.
If input 2 is high and 1 is low, motor will go other way.

hope this help
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 209
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I forgot to mention that the motor is a unipolar stepper. Does this change the pin configuration?  
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 132
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The L298 drives bipolar stepper motors.  Luckily, a 6+ wire unipolar stepper motor can be wired bipolar and in fact may be "better" to do so because you get more torque.  I'm doing here in this video: .  The video is actually about my first Arduino shield so you'll have to fast-forward to the end to see the motor go.

This is how you wire it:

1. Measure the resistance across the 6 wires.  You should find 2 pairs of 3 wires that are connected together.
2. Within each group of 3 wires, measure the resistance.  You should find that 1 pair has twice the resistance as the other 2 pairs.  This "pair" is going through BOTH coils, so those are what you want to connect to 2 of the the L298 output pins.

I have a L298 driver C code if you want it.




Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 209
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How does the ENABLE pin connect to Arduino?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm using a L298 too but with a normal brushed motor.
just put it in a digital pin, then you made a digital write HIGH or LOW if you want to turn the motor on or off.
I wonder if you could put two diodes that run from the input pins to the enable pin and then save a pin on the arduino.
It's assumed that if you have at least one of the input pins high, it means that you want the motor running smiley-grin
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 627
Posts: 34239
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
How does the ENABLE pin connect to Arduino?

A wire to an output pin?  :smiley

When high the chip is enabled, that is it outputs a high or low, when low it is disabled, the outputs of the chip are high impedance.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 132
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, just connect it to a digital output.  The enable pin lets current flow though that H bridge (there are actually 2 enable pins).  For DC motors this would be how the motor is stopped.

For stepper motors, shutting off the power removes the torque caused by the electromagnets in the stepper motor, so essentially, it makes the shaft easier to turn by hand.  So in english, if you want to "apply the brakes" on a stepper motor, keep enable on and set the output of both H-bridges to be the same.  If you want to "coast to a stop", de-assert the "enable" pins.  Personally, I never want to coast, so I just tie the enable pins high.

Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 209
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My students and I appreciate your assistance.  Thank you.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

newbie to all this here... trying to build a simple stepper motor pulley system for a camera... based on this guy's setup....  canon-hf100.blogspot.com/2009/07/diy-camera-motion-control_09.html

anyways, not sure how i ended up at this point but right now, i am working with an Ardunio Nano, an L298N IC chip and a 12v stepper motor (sparkfun.com/datasheets/Robotics/SM-42BYG011-25.pdf )

what i am confused about is which wires to connect on the motor side... you say Output 1 & output 2 to motor but to which motor wires? also, how does the motor get power? am i supposed to hook the Motor V+ Supply from the L298N to one of the motor wires?

thanks in advance for all your help...
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 627
Posts: 34239
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but to which motor wires?
A motor has two wires,  connect one of them to Output 1 and the other to Output 2.
Quote
how does the motor get power?
Down these wires from the Vin line of the shield.  
Quote
am i supposed to hook the Motor V+ Supply from the L298N to one of the motor wires?
No
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 616
Posts: 49444
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you have a stepper motor, it has more than two wires. It will have 4, 5, or 6, depending on the type of stepper motor it is. The one in the pdf file you posted is a 4 wire.

I suspect you're going to want to spring for one of these:
http://www.sparkfun.com/commerce/product_info.php?products_id=9402

Logged

Pages: [1] 2   Go Up
Jump to: