-
Mosfet 32 Microstepping Driver Stepper Motor카테고리 없음 2020. 2. 19. 02:23
This article includes everything you need to know about controlling a stepper motor with the A4988 stepper motor driver and Arduino. I have included a wiring diagram, a tutorial on how to set the current limit and many example codes.Although you can use this driver without an Arduino library, I highly recommend you also take a look at the example code for the AccelStepper library at the end of this tutorial. This library is fairly easy to use and can greatly improve the performance of your hardware.After each example, I break down and explain how the code works, so you should have no problems modifying it to suit your needs.If you would like to learn more about other stepper motor drivers, then the articles below might be useful:.About the driverAt the heart of the driver you will find a chip made by Allegro MicroSystems: the A4988 DMOS Microstepping Driver with Translator and Overcurrent Protection. This integrated motor driver makes interfacing with a microcontroller super easy as you only need two pins to control both the speed and the direction of the stepper motor.The driver has a maximum output capacity of 35 V and ± 2 A which is great for driving small to medium sized stepper motors like a bipolar stepper motor.The chip has several safety functions built-in like overcurrent, short circuit, under voltage lockout and over temperature protection. You can find more specifications in the table below. A4988 Specifications Minimum operating voltage8 VMaximum operating voltage35 VContinuous current per phase1 AMaximum current per phase2 AMinimum logic voltage3 VMaximum logic voltage5.5 VMicrostep resolutionfull, 1/2, 1/4, 1/8 and 1/16Reverse voltage protection?NoDimensions15.5 × 20.5 mm (0.6″ × 0.8″)For more information you can check out the datasheet here.
Differences between the A4988 and DRV8825The is quite similar to the A4988 but there are some key differences:. The DRV8825 offers 1/32 microstepping, whereas the A4988 only goes down to 1/16-step.
Stepper Motor Drivers And Controllers
Higher microstepping results in smoother, quieter operation but is not always needed. The current limit potentiometer is at a different location. The relation between the reference voltage and the current limit is different.
The DRV8825 requires a minimum STEP pulse duration of 1.9µs; the A4988 requires 1µs minimum. The DRV8825 can be used with higher voltage motor power supply (45 V vs 35 V). This means it is less susceptible to damage from LC voltage spikes. The DRV8825 can deliver slightly more current than the A4988 without any additional cooling.Note that the pinout of the DRV8825 is exactly the same as for the A4988, so it can be used as a drop in replacement! A4899 (left) vs DRV8825 (right) Microstep settingsStepper motors typically have a step size of 1.8° or 200 steps per revolution, this refers to full steps. A microstepping driver such as the A4988 allows higher resolutions by allowing intermediate step locations.
This is achieved by energizing the coils with intermediate current levels.For instance, driving a motor in quarter-step mode will give the 200-step-per-revolution motor 800 microsteps per revolution by using four different current levels. A4988 pinoutThe resolution (step size) selector pins (MS1, MS2, and MS3) allow you to select one of the five step resolutions according to the table below. M0M1M2Microstep resolutionLowLowLowFull stepHighLowLow1/2 stepLowHighLow1/4 stepHighHighLow1/8 stepHighHighHigh1/16 stepAll three inputs have internal 100kΩ pull-down resistors, so leaving the three microstep selection pins disconnected results in full-step mode.I often use a or expansion board in combination with these drivers. The expansion board has 3 dip switches to set MS1 – MS3 high or low and on the CNC-shield you can install jumpers. If you are using the driver with a breadboard, you can just use jumper wires to connect the selector pins to 5V.
Things used in this tutorial:To follow this tutorial you will need the following components: Hardware components.