Hi, First of all, i wanted to tell everyone that i am a mechanical student so don't know much about electronics. :~ I started building one project for which i need to use Stepper motors. So i bought Nema 17 stepper motor, Arduino Mega and the stepper motor driver a4988. So i made the connections like this.... i connected my arduino mega to my laptop via USB cable provided with the board. Then i connected pin 13 of the board to the direction pin of the a4988, pin 12 to the step pin of a4988. Then i connected the reset pin and the sleep pin together, which is in the a4988. Then i connected +5V to the VDD and the respective ground. and then i connected VMOT to +12V and the respective ground. Then i connected my bipolar stepper motor, which has 4 wires to the ports 1a 1b 2a and 2b. Then i copied the program for one of the sites and uploaded that program to the arduino mega. It uploaded succesfully. But the motor was not moving.
I tried many-many different connections but was not able to rotate the shaft of the motor. So finally i started checking each component. I used one of the examples of the arduino, which i uploaded to it and it was working fine. Then i checked the Nema 17 motor by checking the resistance between the 2 wire which i got to be around 4ohms for both the coils. then i connected a 9v battery to one of the coils and tried turning the motor shaft but it was harder to move in comparison to when the battery was not connected. i did the same with the other coil. this proves that the coils are ok and the circuit is complete and the coils are producing magnetic field. this proves that the stepper motor is fine.
then i checked the a4988 stepper motor. i checked the voltage between the vdd and gnd, it was 5v. then between vmot and the gnd, it was 12v. then i checked the voltage difference between direction and step(just like that :P). after that the main problem came out. I checked the voltage between the 2 of the output pins and it was zero. then the other two output pins, which was again zero. i checked whether i was checking the voltage between the 2 wires of the same coil, and it was right.
Now i think that stepper motor driver a4988 is somewhat defective :cold_sweat:. It is not giving any output to the output pins which are connected to the motor.
Please help me with this problem. I tried many different programs that i found on the internet, but none of them are working. the only reason that i can think of is that the a4988 is defective. If you think it is defective then please reply fast so that i can return it back(i bought it from ebay.in).
Thanks in advance.