I am having trouble with making a stepper motor move in any manner with the AccelStepper library. I have looked for people with similar problems but have not found the issue anywhere else. It is most likely because I am new to anything Arduino. I am using an Arduino Giga R1 wifi and a DRV8825 driver. I have gotten the library to work with one of my school's Arduino uno but when I transfer the code to my Giga it doesn't work. I have the latest version of AccelStepper installed. I have made custom code that sends pulses to the driver and that successfully drives the motor at a constant speed so I know the wiring isn't and issue. I get the same behavior with and without the shield. my power supply is 12v and 2 amps
here is a picture of my wiring on a bread board. i have since created a soldered version with identical wiring and the capacitor on the board rather than on the cord and they both behave the exact same
I am supplying 5v logic power to the driver from the Arduino. i have the Arduino's VIN pin tied into the 12v power that is powering the driver. I have ran the Arduino disconnected from the 12v power and powered by my laptop instead and get the same behavior.
You have configured the stepper, but you still need to set a speed (e.g. stepper.setSpeed(50) with stepper.runSpeed()) or a target position (e.g. stepper.move(100) or steppermoveTo(200)) before it uses the configuration to do something.
thank you for helping me with the code. the stepper motor now moves but it moves in a almost crunchy jittery fashion in only one direction. it steps fine when I manually supply 5 volts to the pins but not with the library. ) :
this is my test code for the stepper motor it makes the motor move at a constant speed without skipping steps. Yesterday I got my oscilloscope working again and was able to look at the output voltage of the pins.
here is the output from accelstepper. on the left side you can see a few dots. those are the little blips of voltage coming out of the Arduino. I had to up the intensity greatly and move the base line of no voltage out of the way just to faintly see the dots.
voltage with test code _ - _ - _ -
voltage with accelstepper _ ' _ ' _ '
the issue seems to be that when the library wants to step it sends a very brief signal which is often to short for the driver to detect. is there any function that lets the library increase pulse length?