NEMA17步进电机的电机底座为17英寸(即42毫米),因此这款电机常被称作42步进电机。
+ 步进电机的基本工作原理
+ 步进电机的基本参数
+ 什么是双极性/单极性步进电机
由于视频插件兼容性的原因,我们的教程在一些浏览器(如Google Chrome,Apple Safari等)中无法播放,如果您遇到这一问题,请更换使用其它浏览器(如Firefox,IE等)浏览本页面或前往以下网址观看本节视频教程:https://www.bilibili.com/video/av35966857/
假如您需要购买A4988电机驱动板,可前往我站的淘宝网店进行购买。链接如下:
https://item.taobao.com/item.htm?spm=a2oq0.12575281.0.0.50111debWWYqm2&ft=t&id=642637978005
本课示例程序:
| 
					 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53  | 
						/*   Arduino控制NEMA步进电机测试程序   by 太极创客()   本示例程序旨在演示如何通过Arduino控制NEMA步进电机。   如需获得本示例程序详细电路信息以及如何使用Arduino控制电机的更多知识,请参考太极创客网站:   http://www.taichi-maker.com/homepage/reference-index/motor-reference-index/arduino-a4988-nema-stepper-motor/ */ // 定义电机控制用常量 // A4988连接Arduino引脚号 const int dirPin = 2;  // 方向引脚 const int stepPin = 3; // 步进引脚 // 电机每圈步数 const int STEPS_PER_REV = 200; void setup() {   // Arduino控制A4988步进和方向的引脚为输出模式   pinMode(stepPin,OUTPUT);    pinMode(dirPin,OUTPUT); } void loop() {   // 设置电机顺时针旋转   digitalWrite(dirPin,LOW);    // 电机慢速旋转   for(int x = 0; x < STEPS_PER_REV; x++) {     digitalWrite(stepPin,HIGH);      delayMicroseconds(2000);      digitalWrite(stepPin,LOW);      delayMicroseconds(2000);    }   // 等待一秒   delay(1000);    // 设置电机逆时针旋转   digitalWrite(dirPin,HIGH);   // 电机快速旋转   for(int x = 0; x < (STEPS_PER_REV * 2); x++) {     digitalWrite(stepPin,HIGH);     delayMicroseconds(1000);     digitalWrite(stepPin,LOW);     delayMicroseconds(1000);   }   // 等待一秒   delay(1000); }  |