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);
}
- Car ice warning circuit sharing
- Build a Smart Garage Door Opener Using a Raspberry Pi
- A simple door handle touch alarm circuit
- Temperature control circuit design and analysis
- Audio interface protection circuit
- Magnetic door and window anti-theft alarm
- A novel and practical power line anti-theft and cutting alarm circuit
- Homemade short circuit alarm device
- Large range laser burglar alarm
- High-sensitivity and high-loudness burglar alarm circuit
- fire smoke control circuit
- Ringtone control circuit
- Mobile phone camera flash control circuit
- Assembly line outage monitoring circuit
- Timing and fire power control circuit
- Microwave heating component control circuit schematic diagram
- Electric heater temperature detection control circuit
- Micro DC motor steady speed control circuit b
- Micro DC motor steady speed control circuit a
- 35W half-wave resistor-capacitor phase-shift trigger actuation control circuit