Signal Output function :
- Brand new and high quality.
- Voltage: 5V.
- Diameter: 28mm.
- Step angle: 5.625 x 1 / 64.
- Reduction ratio: 1 / 64.
- 5 Line 4 phase can be driven by ordinary uln2003 chip can also be connected in phase 2 development board used for.
- supporting the use of a direct plug and easy to use stepper motor used in the development board.
- Dimensions of the Board : 31mm × 35mm.
- Stepper motor driver board with ULN2003.
- A, B, C, D four-phase LED indicates the status of the stepper motor work.
- Stepper motor with a standard interface, when used directly pluggable.
- Drive Module Board Size:2.8cm x 2.8cm x 2cm - 1.1inch x 1.1inch x 0.79inch.
- Stepper motor Size:3.2cm x 3.2cm - 1.26inch x 1.26inch.
- 1 x Drive Module Board ULN2003
- 1 x Stepper motor
That’s quite the explanation. Most anything that requires motion control will use a step motor. So how do we get a BeagleBone to work a step motor? We need four things:
- Step Motor – The motor steps (rotates) when the power is applied to the motor’s windings.
- Driver – The driver receives a command, interprets it, and send the necessary power to the step motor to achieve a step.
- Controller- A device (microprocessor) capable of sending a command to the driver.
- User Interface (UI) – A physical or virtual device that provides a user with effective interaction and control of the step motor.
There are all sorts of variations when it comes to integrating these four pieces. For example you could run a UI on a BeagleBoard that communicates, using one of a number of methods (i.e. USB, Ethernet), with a dedicated controller. That controller is cabled to a driver which in turn is wired to a motor. All well and good but I wanted a simpler and cheaper example.
In this example the BeagleBone will provide the UI and controller. The initial UI will be a shell script. While not very interactive it’s demonstrates that everything works. I’ll get more sophisticated later. The BeagleBone’s GPIO interface will be used to send commands to the driver.
I picked up an inexpensive driver and step motor intended for use with an Arduino. The driver board accepts a four bit command from an controller and in turn applies the necessary power pulse to step the motor. At the heart of the driver is a ULN2003AN integrated circuit. The board can supply between 5V to 12V to the motor from an independent power supply. It also has a bank of LED’s that correspond to the input signals received from the controller. They provide a nice visual when stepping.
Some step motor details:
- Model: 28KYJ-48
- Voltage: 5VDC
- Phase: 4
- Step Angle: 5.625° (1/64)
- Reduction ratio: 1/64
Physically connecting BeagleBone to the driver board is straight forward. Pick a free GPIO pin on the expansion header and run a wire from it to one of the input pins on the driver board. The driver board requires power. I tried powering it from the 5V and ground pins on expansion header P9, and an independent 5V power supply. Each worked well. Having wired a GPIO pin to the driver board you can use Linux’s sysfs GPIO interface to use it. Set the GPIO pin high and the corresponding LED on the driver board will illuminate. Set it low and the LED turns off.
Completing the wiring and toggling the LED’s did take long. Here’s now I wired the BeagleBone to the driver.
The motor steps when a specific combination of wires running to the motor are powered. This is just a pulse of power. Just enough to get the motor to step. This driver and motor use a very simple protocol. Applying a signal to an input pin causes power to be sent to the motor on a corresponding wire.
|MCU IO||Code||Wire Color|
The motor steps when specific combinations of its wires are powered and the same combination is used to signal the driver. Discovering the correct stepping commands took a lot of searching on the Internet. The vast majority of information describes Arduino examples that rely on underlying Arduino libraries. I finally found this link and within a few minutes my motor was stepping.
The following codes define the step commands.
8 Step : A – AB – B – BC – C – CD – D – DA
4 Step : AB – BC – CD – DA (Usual application)
Here’s a shell script that will step my motor one full rotation.
Let’s see it in action.
Write a review
Note: HTML is not translated!
Rating: Bad Good