Posted in: Stepper motor control

Stepper Motor Control with Leadshine DM805-AI

This post shows how easily and effectively, with very few additional components, we can control a stepper motor with Leadshine's DM805-AI Stepper Motor Driver. with Leadshine's DM805-AI stepper motor driver we control the stepper motor. 

The control system shown was used to move the Z axis of the machine with a Nema 23 stepper motor based on manual manipulation of the slow and fast motion switches. The switches are three-position with a return spring and have an intermediate rest position and deviations to one and the other side. There are two limit switches at the end positions of the Z axis.

System operation

You can see the operation of the system in the following video:

What is DM805-AI Stepper Motor Driver?

Unlike most other stepper motor drivers, the DM805-AI has a built-in oscillator. The oscillator allows the driver itself to generate the pulses needed to spin the stepper motor. Therefore, we do not need an external pulse generator (PLC, microcontroller,...), which simplifies and cheapens the entire system. The frequency of the pulses gradually increases and decreases at the beginning and end of the movement, which enables a smooth start and end of the movement with acceleration and deceleration. However, it is necessary to be aware that DM805-AI, unlike PLCs and microcontrollers, does not allow precise positioning. You can read more about the DM805-AI stepper motor driver at the following link: DM805-AI.

The goal and purpose of the final system

1. We move the Z axis up and down with the handle switches via the DM805-AI driver and the Nema 23 stepper motor. Each of the two handle switches allows up and down movement. One switch with a handle is for slow movement, the other for fast movement. 

2. The stepper motor must stop the moment it hits the limit switch at one or the other end of the Z axis. All handle switches are blocked and cannot start the stepper motor rotation. As long as the limit switch is activated, we can only start the movement by pressing the button to disconnect the limit switches (red button in the video below). Then the handle switches must allow movement only in the direction away from the activated limit switch.  

3. Easy to change the slow and fast movement speed of Z axis.

4. In order to achieve the control described above, we want to use as few passive electronic components as possible in addition to the DM805-AI.

Components used

Wiring shematic

The DM805-AI provides four different operating modes. To achieve the desired control, we use High/Low speed mode. For this, we use the Run, Speed, Direction and Disable inputs, which are at the 5 V level via a pull-up resistor. When we want to activate them, we have to connect them to GND:

  • When the Run input is activated, the motor starts to rotate with the acceleration preset with the side potentiometer until it reaches the preset speed (see the next point). The moment we deactivate the Run input, the motor starts to slow down with deceleration, which is preset with the same side potentiometer as for acceleration. 
  • When the Speed input is activated, the motor rotates at a speed preset by one side potentiometer. When the Speed input is inactive, the motor rotates at the speed preset by the other side potentiometer.
  • When we activate Direction, the motor rotates in one direction. When the Direction input is inactive, the motor rotates in the other direction.
  • When we activate the Disable input, the motor stops instantly, without deceleration.

In this example, we used four SPST pushbuttons (each of the two lever and spring return switches effectively combines two SPST NO pushbuttons). If four SPDT pushbuttons were used, the entire circuit could be made without diodes. 

The two limit switches are connected in parallel, which means that the Disable input is activated if at least one limit switch is activated. When the Disable input is activated, the DM805-AI driver does not allow movement. 

The pushbutton for disconnecting the limit switches is intended to interrupt the Disable input in this case. The circuit then allows movement only in the direction away from the activated limit switch. The reason is that the activated limit switch does not allow the connection of the Run input to GND, because the Run input is connected to the NC terminal of the limit switch with a lever switch in between. 

Stepper motor control with DM805-A

Write A Comment

Your email address will not be published. * represents mandatory fields.