Principle analysis and demonstration program of deceleration stepper motor 28BYJ-48
Source: InternetPublisher:spectrum Keywords: Stepper Motor Updated: 2024/10/14
The schematic diagram of the reduction stepper motor 28BYJ-48 is shown below:
The middle part is the rotor, which is composed of a permanent magnet, and the side is the stator winding. When one winding of the stator is energized, an electromagnetic field in one direction will be generated. If the direction of this magnetic field is not in the same straight line as the direction of the rotor magnetic field, then the magnetic fields of the stator and rotor will generate a torque to twist the stator.
By changing the magnetic field of the windings in sequence, the stepper motor can be made to rotate forward or reverse (for example, the power-on sequence is A->B->C->D for forward rotation, and vice versa). By changing the time interval of magnetic field switching, the speed of the stepper motor can be controlled. This is the driving principle of the stepper motor.
Since the driving current of the stepper motor is relatively large, the microcontroller cannot drive it directly. It is generally driven by the ULN2003 Darlington array. Of course, it can also be driven by a pull-down resistor or a transistor, but the effect is not so good and the torque generated is relatively small.
The stepper motor demonstration program is as follows:
#include <reg52.h>
sbit key=P2^0; //Button controls the direction of the stepper motor
unsigned char speed=5; //Stepper motor speed
//Eight-beat drive, the order is A AB B BC C CD D DA
unsigned char code cLOCkWise[]={0x01,0x03,0x02,0x06,0x04,0x0c,0x08,0x0d};
void delay(unsigned char z)
{
unsigned char x,y;
for(x=0;x<z;x++)
for(y=0;y<110;y++);
}
void main()
{
unsigned char i;
while(1)
{
for(i=0;i<8;i++)
{
if(key) //Button not pressed, forward rotation
{
P0=clockWise[i];
delay(speed);
}
else //Button pressed, reverse rotation
{
P0=clockWise[8-i];
delay(speed);
}
- Manual automatic air compressor control circuit
- DC motor drive circuit composed of L293D
- Star-delta step-down starting control circuit for squirrel cage asynchronous motor
- Design and analysis of the principle of automatic power-off switch during power outage
- Temperature control circuit design and analysis
- Design and analysis of a four-bit remote control component capable of remote reset
- Design and production of no-load automatic power-off device for household power supply
- Disconnection anti-theft protection circuit
- Practical electric curtain remote control device
- An analysis of the working principle of a kg316t time-controlled switch circuit
- Rural fish farming control circuit
- Pyroelectric automatic door control circuit
- Micro remote control receiving and control circuit
- Ringtone control circuit
- High-rise residential walkway lighting control circuit
- Bedside touch light detection control circuit
- Water dispenser (Aucma) temperature detection control circuit
- Temperature detection control circuit of electric hot water bottle
- Voltage stabilization control circuit in power circuit
- Apply LOGO! Electric gate control circuit b