Stepper motors are used in various projects like 3D printers and robotics.
This project helps to invest unipolar stepper motor by using 4 MOSFET Hexabitz modules which control motor phases to be operated in a forward/backward direction with a friendly GUI and options to specify important parameters such as rotation direction, angle, speed.
Tools:- Hexabitz MOSFET Switch Module (H0FR7):
- Hexabitz 3.3V/1A DC-DC Buck Power Supply Module:
- FTDI USB to UART Serial cable:
- SMR 300-300-RI/24 Stepping Motor:
- Step 1: (Gathering hardware components together):
We need to use 4 MOSFET (H0FR7) modules, each one of them controls turning one of the motor’s coils on or off. Modules are supplied using 3.3V/1A DC-DC Buck Power supply module (H03R0).
For this project, we are going to use SMR 300-300-RI/24 Stepping motor, which is a four-phase stepper motor with resolution of 9 degrees per one step.
We also need to use FTDI cable in order to send commands to the array of the modules, and finally we will use a power supply (12VDC/1A) for powering the project.
- Step 2: Array firmware:
The array has four programmable modules (MOSFET modules), and each has its unique ID (stating from 1 to 4).
Topology file will only be in the modules (2, 3, 4) firmware, which explains how the modules connect to each other. The main module of the project is module number 1 which receives the required commands for operating the motor, by turning its transistor on or off and sending messages to other modules for turning their transistors on or off and so forth.
For receiving commands, we will create a user-defined command in module 1 like this:
stepper a b c
where:
stepper: the command’s string.
a: parameter that represents number of pulses.
b: parameter that represents delay between phases (m sec).
c: parameter that represents direction (0 for clockwise and 1 for counterclockwise).
To operate the motor, we need to turn on its coils in a specific sequence (1 → 2 → 3 → 4 → 1 … for clockwise direction, and in the opposite sequence for counterclockwise direction), so we need to store the last phase that has been turned on in a variable (index) in order to know the next phase in case of both directions.
- Step 3: Designing a simple GUI for sending commands to the array:
We will write a simple.net software that allows the user to control the motor’s angle, speed, and the direction of rotation.
This software takes some pre-defined parameters from the user, then generates the equivalent command and finally send it to the array. These parameters are:
Angle: we've used this parameter to calculate the number of pulses for turning the motor’s shaft into the required angle (we are using the motor in a full step mode, which means that each pulse is equivalent to 9 degrees).
Speed: we've used this parameter to calculate the delay time between motor’s phases.
Direction: we've used this parameter to determine the direction of rotation.
The GUI also has two buttons, one for making a full revolution (rotation) in clockwise direction, and the other in counterclockwise direction.
I hope you enjoyed reading this article ^_^
Video link:
Comments
Please log in or sign up to comment.