Let's Make Robots!

Arduino Duemilanove and L298n

Hey,
I bought L298N Stepper Motor Driver Controller Board for Arduino and bought Arduino Duemilanove. I want connect two motors to L298N and L298N connect to my Arduino Duemilanove, but I dont know how to do that. http://img195.imageshack.us/img195/3268/nuotrauka0463.jpg
Maybe someone can help me?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Arduino to l298d connections: Arduino5 to In 1 Arduino2 to In 2 Arduino3 to In 3 Arduino4 to In 4 Arduino12 to Ena1 Arduino13 to Ena2 To run the motor on A, set digital 2 and 5 to high and low ( and reverse them to reverse the motor direction) and analog write pin 12 at a value from 0-255 to control speed. Do the same with 3 & 4 and 13 for Motor B. To brake, you can either set the enable pins to 0 or set both "in" pins to the same value (high or low.) Depending on how your motors are oriented, you may have to experiment with Highs and Lows to get things going the same direction. Screw both leads from each motor into either Motor A or B terminals. You can power the arduino off of one of these by running the 5v line out of the shield to the Arduino Vin and grounding them together (which means your motor power source ground and the line to the Arduino will both attach to the shield's ground terminal.) Put at least 7 volts into the shield vms line. If your motors are less than 6v, you probably have the wrong shield.

read the driver documentation

 

for each motor you will need 3 digital pins... one of these PWM capable

 

the PWM will conect to EBx pins of your driver, and the other to INx

 

well... you will NEED read the manual to program the arduino to control this driver... No magic at all, put the cables is the easiest step.