ステッピングモーター( PM35S-048 )をArduinoで動かしてみた。
ここを参考に。
https://www.linux.com/community/blogs/133-general-linux/395716
http://www.youtube.com/watch?v=-VWhPt-ws9g
360時計回りに回転して、その後360逆時計回りするようにしてみた。
/* http://www.youtube.com/watch?v=-VWhPt-ws9g I took apart my old Brothers MFC 420CN Print / Scan / Fax machine. Found a PM35s048 stepper motor. The data sheet shows it as having 48 steps (7.5 degree). I just hooked it up with the following: Yellow = Digital 4 Orange = Digital 5 Red = Digital 6 Black = Digital 7 I modified the example code for a stepper motor (MotorKnob) to have the required 48 steps and increased the speed a bit. As well I mapped the potentiometer values to 0-48 instead of using the default 0-1023. Makes for a single rotation and a lot less noise. */ #include <Stepper.h> //How many steps does your motor have #define STEPS 48 //Start new Stepper class with 48 steps (STEPS defined above) //Motor is connected to pins 4, 5, 6 & 7 Stepper stepper(STEPS, 4, 5, 6, 7); //Create starting position for motor / pot int previous = 0; void setup() { //How fast will we try to move the motor //If your motor stutters, its too fast so just lower the value stepper.setSpeed(180); } int _speed = 10; void loop() { for (int i=0;i<48;i++) { stepper.step(1); delay(_speed); } for (int i=48;i>0;i--) { stepper.step(-1); delay(_speed); } }
赤:V+(5V) 茶:6 黒:7 橙:4 黄:5
感想:
トルクは結構弱いが、角度の精度はかなり高く使いやすそうな印象でした。
追記:
本来の駆動電圧は24Vらしい!
http://www.eminebea.com/jp/product/rotary/steppingmotor/pm/standard/pm35s-048.shtml