Download Print this page

Advertisement

Quick Links

Welcome to our website!
Thank you for choosing our AZ-Delivery A4988 stepper motor driver
module with heat sink. In the following pages we will explain how to set up
and use the device.
Have fun!

Advertisement

loading
Need help?

Need help?

Do you have a question about the A4988 and is the answer not in the manual?

Questions and answers

Summary of Contents for AZ-Delivery A4988

  • Page 1 Welcome to our website! Thank you for choosing our AZ-Delivery A4988 stepper motor driver module with heat sink. In the following pages we will explain how to set up and use the device. Have fun!
  • Page 2 Areas of application Education and teaching: Use in schools, universities and training centres to teach the basics of electronics, programming and embedded systems. Research and development: Use in research and development projects to create prototypes and experiments in the fields of electronics and computer science. Prototype development: Use in the development and testing of new electronic circuits and devices.
  • Page 3 If the product complies with the requirements of the RoHS Directive (2011/65/EU) and does not contain any hazardous substances in quantities exceeding the permitted limits, residues may still be present. Observe the following safety instructions to avoid chemical hazards: Caution: Soldering can produce vapours that can be harmful to health. Note: Use a soldering vapour extractor or work in a well-ventilated area.
  • Page 4 A stepper motor is a type of motor in which the shaft of the motor rotates in steps. The stepper motor is a brushless DC motor. The step-by-step movement enables the shaft to be positioned very precisely without position feedback. All electric motors consist of a rotor and stator.
  • Page 5 Drive types of stepper motors There are several modes for driving the stepper motor: " Shaft drive mode, in this mode we only activate one coil of the stator at a time, then the next, etc. In this mode, only one coil is activated to move the rotor to the next step.
  • Page 6 Another way to increase the resolution of the stepper motor is to increase the number of poles of the rotor and the number of poles of the stator. The image is taken from a Wikipedia article on stepper motors https://en.wikipedia.org/wiki/Stepper_motor...
  • Page 7 That is why we need an electronic driver circuit for each stepper motor. In this eBook we will cover the "A4988" stepper motor driver. This device can control the speed and direction of rotation of the motor shaft, as well as operate the stepper motor in multiple excitation modes.
  • Page 8: Technical Data

    2A, passive cooling, aluminium heat sink " Motor output voltage: 8V - 35V The "A4988" requires two power supply connections. One for logic pins and one for the motor power supply: VDD and GND are used to operate the driver's internal logic (from 3V to 5.5V), so we can use either the microcontroller board or Raspberry Pi as the...
  • Page 9 "NEMA17" stepper motor, it has a step angle of 1.8° or makes 200 steps per full revolution. In quarter-step mode, this motor makes 800 microsteps per full revolution. The A4988 driver has three input pins for microstep resolutions:...
  • Page 10 " " " By setting suitable logic levels on these pins, we can set the drive mode of the motor to one of these five modes: Microstep resolution Full step HIGH Half step HIGH Quarter step HIGH HIGH Step of eight HIGH HIGH HIGH...
  • Page 11 The difference between full step and microstep Microstep excitation modes are all modes in which the shaft of the motor moves between the hardware steps. These modes position the shaft of the motor between the steps, resulting in further steps and a smooth movement of the shaft.
  • Page 12 smooth transition from one coil to another. When the current in one coil increases, it decreases in the next coil, resulting in a smooth step and constant torque. Step and direction pins The "STEP" input pin controls the steps of the motor. Each "HIGH" pulse sent to this pin controls the motor by the number of microsteps set by the microstep selection pins.
  • Page 13 Voltage release pins If you switch the EN pin to LOW, the driver is activated. By default, this pin is switched LOW so that the driver is always activated. Switch it HIGH to deactivate the driver. If you switch the SLP pin LOW, the driver is put into sleep mode, which minimises power consumption.
  • Page 14: Output Pins

    Output pins The output pins of the driver are 1A, 1B, 2A and 2B. Each output pin can supply a current of up to 2A. However, the amount of current supplied to the motor depends on the power supply, the cooling system and the current limit settings.
  • Page 15 1A per coil without overheating. To achieve more than 1A per coil, a heat sink or other cooling system is required. Our "A4988" driver module is supplied with an aluminium heat sink. We advise you to install it before using...
  • Page 16 There is a small trimmer potentiometer on the "A4988" driver that can be used to set the current limit. To set the current limit, you must follow the next steps: "...
  • Page 17 WARNING: Connecting or disconnecting a stepper motor when the driver is switched on can damage it!!! Connecting the driver to the Atmega328P board Connectgo to thedriver with the microcontroller board as shown below: Driver pin > Board pin > 5V Red wire >...
  • Page 18 Remember to place a large 100µF decoupling electrolytic capacitor across the pins of the motor power supply. As close as possible to the circuit board, as shown in the connection diagram above. Keep the microstep pins disconnected to operate the motor in full step mode, or connect the corresponding MS pin to the VDD voltage to use a different excitation mode, as already discussed.
  • Page 19 Code: uint8_t stepPin = 2; uint8_t dirPin = 3; steps = 1000; // you should increase this if you are using // some of microstepping modes usDelay = 950; // minimal is 950 for full step mode and NEMA15 motor // minimal is 35 for sixteenth step mode void setup() {...
  • Page 20 delay(1000); We start the sketch by defining the STEP and DIR pins that are connected to the microcontroller board. We define a variable called steps, which we use for the number of steps for the motor shaft. In the setup function, we designate STEP and DIR pins as digital outputs.
  • Page 21 Sixteen times the number of steps. To bring the motor shaft to the same position as in full step mode, we need to increase the variable steps by a factor of sixteen. And to achieve the same speed as in full step mode (usDelay=950), we need to change the value of usDelay to 35 (minimum).
  • Page 22 GND> GND external power supplyBlack wire Connect the RST pin to the SLEEP pin to keep the driver enabled (black wire). Remember to place a large 100µF decoupling electrolytic capacitor as close as possible to the board as shown in the sketch above. As with the microcontroller board, we do not need to install a library for this driver module.
  • Page 23 sleep(uS usDelay) GPIO.output(STEP, GPIO.LOW) sleep(uS usDelay) sleep(2) # Scavenging work after the end of the program except KeyboardInterrupt: GPIO.output(EN, GPIO.HIGH) We have just converted the sketch into Python code. The only difference is the code for the EN pin. This pin is used to enable the driver. When it is LOW, the driver is enabled, when it is HIGH, the driver is disabled.
  • Page 24 If you are looking for even more high-quality microelectronics and accessories, AZ-Delivery Vertriebs GmbH is the right place for you. We offer you numerous application examples, detailed installation instructions, e-books, libraries and, of course, the support of our technical experts.