After I upload the code to the Arduino, the motor turns a half round then it starts to make very small steps forward in a very clicky way. But if I don't power the Arduino on the way as it is shown on the link but I use the V_in and the 5 V output from the bridge then the motor rotates fine.
My problem is that I really need the USB plugged in because I plan to drive the motor through the USB.
Any help is appriated, I'm really stuck with this and I'm really a beginner with Arduino.
I am assuming it is not wired correctly, the link shows it connected to a 12V power supply. Since you copied the software I am also assuming it is correct. Why not spend a few moments and draw a schematic as how you wired it, not a frizzy picture. Be sure to show all interconnections, power and grounds.
gilshultz:
I am assuming it is not wired correctly, the link shows it connected to a 12V power supply. Since you copied the software I am also assuming it is correct. Why not spend a few moments and draw a schematic as how you wired it, not a frizzy picture. Be sure to show all interconnections, power and grounds.
Hi, thanks for the answer. I double-checked the wiring. But in any case would a photo be good instead of the drawing? I don't have any good circuit drawing software yet.
On the picture: the light blue and the light brown free wires are coming from the 12 V power supply and the other freely hanging yellow jumper goes to the Arduino board. If I use the yellow wire everything's fine with the plugged USB. If I use the 12 V instead, there's the problem. If the I plug the yellow jumper to V_in and unplugged the USB, then everything's okay again.
Probably it's something really basic but I cannot figure it out.
An L298 is a poor brushed DC motor driver, and a worse stepper motor driver.
Only some steppers can be driven with an L298.
NEMA17 is the size of the mounting plate.
It tells us nothing about the electrical motor specifications.
Please post a link to the specifications of the stepper motor.
Leo..
That motor has 1.7 ohm coils, meaning it tries to draw 12/1.7= 7Amp per phase on a 12volt supply.
That eventually will burn out the supply or the L298 or the motor.
This stepper needs a special current (not voltage) controlled stepper driver, like the DRV8825, set to <=1.2Amp.
Leo..