This commit is contained in:
Moritz Münch 2019-12-09 23:26:37 +00:00
parent bdb8b63bc4
commit 100b8e0633
2 changed files with 11 additions and 7 deletions

View File

@ -2,7 +2,8 @@
stepper motor control via RPi
## A4988 driver wiring
# A4988 driver
## wiring
GND 3-5.5V ground DIRECTION -> pi gpio
VDD 3-5.5V logic power supply STEP
1B stepper coil 1 SLEEP --l
@ -11,3 +12,6 @@ VDD 3-5.5V logic power supply STEP
2B stepper coil 2 MS2 -> pi gpio
GND 8-35V ground MS1 -> pi gpio
VMOT 8-35V stepper power supply ENABLE -> pi gpio
## current limiting
Find the two sense Resistors `Rs1` and `Rs2`. They are usually on the same side of the pcb like the chip and have Values like 0.05 Ohm, 0.068 Ohm and 0.1 Ohm. Now measure the Reference Voltage without VMOT power supply but only power supply between the potientiometer and GND 3-5.5V. It should be `VREF = IMAX * 8 * Rs. And set it accordingly.

View File

@ -85,12 +85,12 @@ if __name__ == '__main__':
try:
s = Stepper([22, 27, 17])
s.enable()
s.step(100, 'left')
sleep(1)
s.step(100)
sleep(1)
s.rotate(360)
# s.enable()
# s.step(100, 'left')
# sleep(1)
# s.step(100)
# sleep(1)
s.rotate(360000)
sleep(1)
s.rotate(360, 'ccw')
sleep(1)