Some days ago I’ve purchased some cheap but powerful stepper motors bundle from china. In the package there is also a nice pul\dir driver, code-named Long Motor DM542A.
My original plan was to use an Arduino to make the motor spinning around. To test if everything it’s working I’ve connected one of these drivers to my Arduino UNO:
- PUL+ to pin 10
- PUL- to gnd
- DIR+ to pin 11
- DIR- to gnd
- ENBL+ to pin 12
- ENBL- to gnd
Then I’ve wrote this simple sketch to make it spinning:
Yes it’s barely a square wave generator 🙂
- Here’s something vaguely similar to a datasheet for the DM542A driver:
- You will need a lot of pulses to see something moving, that’s why I’ve set the loop interval to 1ms.
- It’s nice to play with dip switches and see what happens if you set dip5-8 to off: the motor seems to be almost stationary
- Setting ENBL+ to 0v (logical 0, false) release the motor holding torque, this is really necessary in every project because of the heat produced when ENBL is set to logical 1.
- Setting ENBL+ to 0 cause the red error led on the DM542A to turn on. I don’t think this is an error, but anyway it means that the motor is not holding it’s place.