Difference between revisions of "Lesson 38--Microduino Stepping Motor Drive"
From Microduino Wiki
(→Objective) |
|||
(One intermediate revision by one other user not shown) | |||
Line 4: | Line 4: | ||
| | | | ||
==Objective== | ==Objective== | ||
− | This tutorial will show you how to control the stepping motor by Microduino-Stepper module, and welding the | + | This tutorial will show you how to control the stepping motor by Microduino-Stepper module, and welding the stepping motor control board. |
==Equipment== | ==Equipment== | ||
Line 10: | Line 10: | ||
*'''[[Microduino-USBTTL]]''' | *'''[[Microduino-USBTTL]]''' | ||
*'''[[Microduino-Stepper]]''' | *'''[[Microduino-Stepper]]''' | ||
− | *Other | + | *Other equipment: |
**USB cable | **USB cable | ||
**Pegboard | **Pegboard | ||
**Studs, screws | **Studs, screws | ||
− | *Welding | + | *Welding tools: |
**Electric iron | **Electric iron | ||
**Solder | **Solder | ||
Line 21: | Line 21: | ||
==Stepper motor== | ==Stepper motor== | ||
− | *Connection method for the stepping | + | *Connection method for the stepping motor: |
Connect the stepper motor to Microduino-Stepper module: | Connect the stepper motor to Microduino-Stepper module: | ||
**Four wire two phase stepper motor has two sets of coil A and B, each group coil's resistance is very small, only a few ohm. A and B group is absolutely insulation and disconnected. Measured with a multimeter, connected is a set; | **Four wire two phase stepper motor has two sets of coil A and B, each group coil's resistance is very small, only a few ohm. A and B group is absolutely insulation and disconnected. Measured with a multimeter, connected is a set; | ||
Line 27: | Line 27: | ||
**By changing the MS1 & MS2 to change the stepping mode (Microduino-Stepper uses 1/16 stepping mode by default). | **By changing the MS1 & MS2 to change the stepping mode (Microduino-Stepper uses 1/16 stepping mode by default). | ||
− | *Angle | + | *Angle calculation: |
− | Stepper motor | + | Stepper motor parameters: 1.8deg/step, that is stepper motor moves one step turned every 1.8°. |
**Step number=360/1.8*16=3200 step | **Step number=360/1.8*16=3200 step | ||
Line 40: | Line 40: | ||
==Debugging== | ==Debugging== | ||
− | *Step | + | *Step 1: Crop the pegboard as specified size; |
− | *Step | + | *Step 2: Determine the Microduino's base position, then welding the circuit according to the schematics: |
[[File:A4982.png|thumb|600px|center|洞洞板焊法]] | [[File:A4982.png|thumb|600px|center|洞洞板焊法]] | ||
[[File:A4982_Stepper_motor-t.jpg|thumb|600px|center|正面]] | [[File:A4982_Stepper_motor-t.jpg|thumb|600px|center|正面]] | ||
Line 50: | Line 50: | ||
==Programming== | ==Programming== | ||
− | *Used | + | *Used library: 【AccelStepper library'''[https://github.com/adafruit/AccelStepper github下载 ]''' 】 |
*Download test program:'''[[File:Program Test A4982.zip]]''' | *Download test program:'''[[File:Program Test A4982.zip]]''' | ||
*Compile it and select the correct board type to download. | *Compile it and select the correct board type to download. | ||
*Test | *Test | ||
**Connect power (6-25V), the motor won't move in initial state; | **Connect power (6-25V), the motor won't move in initial state; | ||
− | **Press the button, the stepper motor will rotate as | + | **Press the button, the stepper motor will rotate as settled pace, and LED indicator lights, reverse rotation after a few laps, the cycle repeated; |
**Press the button again, close the drive, LED indicator turn off. | **Press the button again, close the drive, LED indicator turn off. | ||
Latest revision as of 08:53, 12 September 2016
Language: | English • 中文 |
---|
ContentsObjectiveThis tutorial will show you how to control the stepping motor by Microduino-Stepper module, and welding the stepping motor control board. Equipment
Stepper motor
Connect the stepper motor to Microduino-Stepper module:
Stepper motor parameters: 1.8deg/step, that is stepper motor moves one step turned every 1.8°.
Multiplied by 16 because Microduino A4982 default use 1/16 step mode. SchematicDebugging
Programming
ResultWe can control the four-wire two-phase stepping motor successfully by Microduino-Stepper module. Video |