Ads

Get STM32 tutorial using HAL at $10 for a limited time!

Showing posts with label Stepper Motor. Show all posts
Showing posts with label Stepper Motor. Show all posts

Sunday, January 31, 2016

ARM Cortex-M3 (STM32F103) Tutorial - Unipolar Stepper Motor

In this tutorial, I will share how control a unipolar stepper motor using STM32F103 microcontroller. If you don't know the basic of the stepper motor, I suggest you to read this article first. To control a stepper motor from microcontroller, we can't directly drive it with GPIO pins because GPIO pins have maximum current that can sink or source from it. To overcome this problem, we can use driver circuit. The driver circuit for unipolar stepper motor can be built by using 4 transistors to drive large current every 4 wires of a stepper motor. It also can be built with ULN2003 IC. This is the circuit for driving a unipolar stepper motor from microcontroller by using ULN2003 IC:


In this tutorial, I will use 28BYJ-48 stepper motor. This motor is very cheap and it also comes with driver module based on ULN2003 IC. This motor runs with 5V supply and has gear inside. The gear reduction ratio is approximately 64:1. If you search from internet, other people say that the gear reduction ratio is actually 63.68395:1.

 

Friday, January 29, 2016

Basic of Stepper Motors

A stepper motor is an electromechanical device which converts electrical pulses into discrete mechanical movements. The shaft of this motor is rotates in discrete step increment when electrical pulses are applied in a proper sequence. Every discrete step of a stepper motor is measured in degree (it can be 1.8° or even smaller depends on the stepper motor type and stepping technique).


This kind of movement is different from DC motors. DC motors is rotates continuously when there is a voltage applied to it and stops when the voltage removed. When the voltage applied to DC motors reversed, the rotation is also reversed. For the stepper motor, we can change the direction of the shaft rotation by reverse the sequence of the applied pulses. The speed of stepper motor shaft rotation is directly related to the frequency input of the pulses. The length of rotation of the stepper motor is directly related to the number of pulses applied.