I am using a L293d driver shield and trying to run a bipolar (4 wire stepper). Can someone confirm if this code will jog the tray about 4cm or so back and forth. I just wish to check if stepper is working fine or not.
At present it vibrates, moves in jerky fashion and there are more vibrations. I am not sure why. I am using a DVD drive motor. Picture/video is attached and the program is below.
Thanks for the reply and links. Unfortunately I don't have data sheet for stepper. I am using a stepper salvaged from computer DVD drive. It's SM 308 from SAMSUNG. I have attached images of the same. Datasheet is not available online.
I am supplying 9V 1A to the shield. The Arduino is powered by USB. The shield is mounted on Arduino as the pins should align.
Yes, the accelstepper library is present in the Arduino code when I try to run Processing with G code. While testing, I don't use it.
I can also see in the serial monitor all the messages that I should see, but motor does not jog.
vigisbig:
Yes, the accelstepper library is present in the Arduino code when I try to run Processing with G code. While testing, I don't use it.
Before trying anything more complicated see if you can get the simplest of the AccelStepper examples to work just to prove that you can make the motor move. Make sure to start with very slow steps.
I see that I mixed up the L298 with your L293D in my earlier Reply. I don't have any experience with an L293. AFAIK the L293D can only provide 600mA - but I have no idea how much current your motor needs. I doubt if the label in the picture refers to the motor.
Can you measure the motor coil resistance with your multimeter?
The library AFMotor was deprecated almost ten years ago.
The 'jerky' behavior and vibration is typically an indication of motor stall when trying to operate outside of the pullin/pullout torque curve band. If you're powering a 5V stepper directly from a GPIO pin without acceleration, you'd be lucky to get 8 rpm.
The power rating you see on the CD/DVD is only applicable during a write (burning) operation. Most of the rest of the time consumption is quite low.
Robin2:
Before trying anything more complicated see if you can get the simplest of the AccelStepper examples to work just to prove that you can make the motor move. Make sure to start with very slow steps.
I see that I mixed up the L298 with your L293D in my earlier Reply. I don't have any experience with an L293. AFAIK the L293D can only provide 600mA - but I have no idea how much current your motor needs. I doubt if the label in the picture refers to the motor.
Can you measure the motor coil resistance with your multimeter?
...R
Thanks for letting me know how images can be posted. Yes, each coil resistance is 8.5 ohms. I am able to move the motor now with the code mentioned before. However, I am not sure if it is moving as the code says. Infact, I am not sure what the code is saying. I need to learn more programming.
Am I correct in understanding that using an adapter that can supply higher current is not a problem. However, I should keep the voltage appropriate or even low?
Thanks for the help! Let me tinker more. I will report back.
The library AFMotor was deprecated almost ten years ago.
The 'jerky' behavior and vibration is typically an indication of motor stall when trying to operate outside of the pullin/pullout torque curve band. If you're powering a 5V stepper directly from a GPIO pin without acceleration, you'd be lucky to get 8 rpm.
The power rating you see on the CD/DVD is only applicable during a write (burning) operation. Most of the rest of the time consumption is quite low.
Thanks for the reply DKWatson!
I am not sure what happens if the library is deprecated. Should we not use it? Can using it have severe consequences.
The motor drivers are powered with the shield, which is getting power from 9V 1A adapter and not GPIO pins.
Should I reduce the voltage applied to the shield?
The tray comment should have ended with a question mark.
Deprecated is typically synonymous with abandoned, as in there are better ones available.
Should I reduce the voltage applied to the shield?
Not if the shield/motor can handle it. A speed limiting factor with stepper motors is the inductance of the coils. The 'harder' you can push power into them (more voltage) the greater the speed potential. A NEMA 23 with 12V tops out at about 300rpm, with 24V closer to 800.
Here's a datasheet for one motor/shaft combo which is used in applications from floppy disk drives to DVD drives.
The dvd drives in computers use devices very similar to this. (I have a few of them disassembled in my stash)
I haven't yet gotten round to using them for anything yet but would like to use them and the laser diodes for an etching machine someday.
I would be interested in how you go with getting your code running.