From 100b8e06332d935cd8c1422663be0c4ca1152968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20M=C3=BCnch?= Date: Mon, 9 Dec 2019 23:26:37 +0000 Subject: [PATCH] update --- README.md | 6 +++++- stepper.py | 12 ++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 990cdaf..2834963 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/stepper.py b/stepper.py index ded0c43..fcdcb18 100644 --- a/stepper.py +++ b/stepper.py @@ -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)