close

Quick Reference NEMA size 17 1.8° 2-phase stepper motor(參考手冊)

https://reprap.org/wiki/NEMA_17_Stepper_motor (簡單規格)
Step Motor 42BYGH47-401A (規格),

1.8° It has 200 steps per revolution, and can operate at at 60 RPM,

Step Angle: 1.8°
Voltage: 24
Phase Current: 1.5A/Phase
Phase Resistance: 1.6ohm/Phase 
Phase inductance: 2.8mH/Phase
Holding Torque: 5500g.cm
Lead Wire: 4
中文規格說明

https://tutorials-raspberrypi.com/how-to-control-a-stepper-motor-with-raspberry-pi-and-l293d-uln2003a/ (程式)

https://www.electronicshub.org/raspberry-pi-stepper-motor-control/ (接線)

https://www.raspberrypi.org/forums/viewtopic.php?t=55580 (接線)

undefined

import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)
control_pins = [7,11,13,15]
for pin in control_pins:
  GPIO.setup(pin, GPIO.OUT)
  GPIO.output(pin, 0)
halfstep_seq = [
  [1,0,0,0],
  [1,1,0,0],
  [0,1,0,0],
  [0,1,1,0],
  [0,0,1,0],
  [0,0,1,1],
  [0,0,0,1],
  [1,0,0,1]
]
for i in range(512):
  for halfstep in range(8):
    for pin in range(4):
      GPIO.output(control_pins[pin], halfstep_seq[halfstep][pin])
    time.sleep(0.001)
GPIO.cleanup()

 

arrow
arrow
    全站熱搜

    stanley 發表在 痞客邦 留言(0) 人氣()