This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| en:iot-open:practical:hardware:itt:avr:stepper [2025/08/26 08:13] – created ingmar05 | en:iot-open:practical:hardware:itt:avr:stepper [2025/09/02 11:30] (current) – raivo.sell | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | < | ||
| ====== Stepper motor ====== | ====== Stepper motor ====== | ||
| - | |||
| - | //Necessary knowledge: | ||
| - | [HW] [[en: | ||
| - | [AVR] [[en: | ||
| - | [LIB] [[en: | ||
| - | [LIB] [[en: | ||
| - | |||
| ===== Theory ===== | ===== Theory ===== | ||
| - | [{{ : | + | [{{ : |
| - | + | ||
| - | Stepper-motors are widely used in applications which demand accuracy. Unlike DC motors, stepper motors do not have brushes nor commutator – they have several independent coils, which are commutated with exterior electronics (drivers). Rotating the rotor is done by commutating coils step by step, without feedback. This is one of the faults in stepper motors – in case of mechanical overloading, | + | |
| - | * Variable Reluctance Stepper (high accuracy, low torque, low price) | + | |
| - | * Permanent Magnet Stepper (low accuracy, high torque, low price) | + | |
| - | * Hybrid Synchronous Stepper (high accuracy, high torque, high price) | + | |
| - | + | ||
| - | Variable reluctance stepper motors have toothed windings and toothed iron rotor. The largest pulling force is when the teeth of both sides are covering each other. In Permanent magnet stepper motor,just like the name hints, are permanent magnets which orientate according to the polarity of the windings. In hybrid synchronous steppers both technologies are used. | + | |
| - | + | ||
| - | Depending on the model of stepper motor, performing one full rotation (360 degrees) of the rotor, demands hundredths of steps of commutations. For stable and smooth movement, appropriate control electronics are used which control the motor according to its parameters (inertia of the rotor, torque, resonance etc.). In addition to control electronics different commutating methods may be applied. | + | |
| - | + | ||
| - | **Unipolar stepper-motor ** | + | |
| - | + | ||
| - | Unipolar-stepper motor has 5 or 6 leads. According to the scheme of the motor only ¼ of the windings is activated. //Vcc// lines are usually connected to the positive power supply. During commutation the ends of windings 1a, 1b, 2a and 2b are connected through transistors only to the ground and that makes their control electronics fairly simple. | + | |
| - | + | ||
| - | **Bipolar stepper-motor** | + | |
| - | + | ||
| - | [{{ : | + | |
| - | [{{ : | + | |
| - | + | ||
| - | Bipolar stepper motor differs from unipolar stepper motor by having the polarity of the windings altered during the commutation. Half of the windings are activated together, this allows to gain higher efficiency than unipolar stepper motors. Bipolar stepper motors have four leads, each connected to a different half-bridge. During commutation half-bridges are applying either positive or negative voltage to the ends of the windings. Unipolar motors can be started using bipolar driver: just connect lines 1a, 1b, 2a and 2b of the windings (//Vcc// will be not connected). | + | |
| - | + | ||
| - | The commutation necessary for controlling stepper-motors with windings at full step mode and half step mode is displayed in the table below. Since in drivers for uni-polar stepper motors only opening of the transistors takes place, the steps are marked by 0 and 1. Controlling of bipolar stepper motors may need more signals and therefore the steps are marked using the polarity of the driver outputs: | + | |
| + | Stepper motors are widely used in applications that demand accuracy. Unlike DC motors, stepper motors do not have brushes or a commutator – they have several independent coils, which are commutated with exterior electronics (drivers). Rotating the rotor is done by commutating coils step by step, without feedback. This is one of the faults in stepper motors – in case of mechanical overloading, | ||
| - | ^ ^ | + | Depending on the model of stepper motor, performing one full rotation (360 degrees) of the rotor demands hundreds of steps of commutations. For stable and smooth movement, appropriate control electronics are used, which control the motor according to its parameters (inertia of the rotor, torque, resonance, etc.). In addition to control electronics, |
| - | ^ Step ^ 1A ^ 2A ^ 1B ^ 2B ^ 1A ^ 2A ^ 1B ^ 2B ^ | + | |
| - | ^ Full step | + | |
| - | | 1 ^ 1 | 0 | 0 | 0 ^ + | - | - | - | | + | |
| - | | 2 | 0 ^ 1 | 0 | 0 | - ^ + | - | - | | + | |
| - | | 3 | 0 | 0 ^ 1 | 0 | - | - ^ + | - | | + | |
| - | | 4 | 0 | 0 | 0 ^ 1 | - | - | - ^ + | | + | |
| - | ^ Half step | + | |
| - | | 1 ^ 1 | 0 | 0 | 0 ^ + | - | - | - | | + | |
| - | | 2 ^ 1 ^ 1 | 0 | 0 ^ + ^ + | - | - | | + | |
| - | | 3 | 0 ^ 1 | 0 | 0 | - ^ + | - | - | | + | |
| - | | 4 | 0 ^ 1 ^ 1 | 0 | - ^ + ^ + | - | | + | |
| - | | 5 | 0 | 0 ^ 1 | 0 | - | - ^ + | - | | + | |
| - | | 6 | 0 | 0 ^ 1 ^ 1 | - | - ^ + ^ + | | + | |
| - | | 7 | 0 | 0 | 0 ^ 1 | - | - | - ^ + | | + | |
| - | | 8 ^ 1 | 0 | 0 ^ 1 ^ + | - | - ^ + | | + | |
| ===== Practice ===== | ===== Practice ===== | ||
| - | The Combo Module has a H-bridges | + | The Combo Module has an H-bridge |
| - | There are functions // | + | There are functions // |
| <code c> | <code c> | ||
| Line 96: | Line 54: | ||
| </ | </ | ||
| - | Usage of the functions is demonstrated by the example program which rotates the motor alternately to one direction and then to the other direction 200 half steps. The speed of rotating the motor is determined by the length of the brakes | + | Usage of the functions is demonstrated by the example program, which rotates the motor alternately to one direction and then to the other direction 200 half steps. The speed of rotating the motor is determined by the length of the breaks |
| <code c> | <code c> | ||
| Line 121: | Line 79: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | |||
| + | ==== Task to be implemented ==== | ||
| + | |||
| + | - Drive the stepper as a clock’s second hand: rotate 6° (one step chunk) every second to complete one full revolution per minute. | ||
| + | - Simulate an analog thermometer: | ||