Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| schrittmotor [2016/06/28 11:32] – created peltzer | schrittmotor [2023/07/03 10:16] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | ==== Schrittmotor ==== | ||
| + | === PDF aus der Vorlesung === | ||
| + | |||
| + | {{schrittmotorfolienpdf.pdf|}} | ||
| + | |||
| + | === Bild === | ||
| + | |||
| + | === Was ist es? === | ||
| + | |||
| + | Schrittmotoren werden über ein elektromagnetisches Feld gesteuert. Der Rotor ein drehbares Motorteil darstellt, während Statorspulen | ||
| + | ein schrittweise drehendes Magnetfeld erzeugen. Das Magnetfeld verschiebt sich jeweils nur um einen minimalen Winkel, | ||
| + | sodass die zirkuläre Bewegung des Rotors sehr genau bestimmt werden kann. | ||
| + | |||
| + | === Fritzing 1=== | ||
| + | |||
| + | {{schrittmotor.jpg? | ||
| + | |||
| + | === Fritzing 2=== | ||
| + | {{schrittmotor2.jpg? | ||
| + | |||
| + | === CODE Unipolarer Schrittmotor === | ||
| + | |||
| + | <file python schrittmotor.py> | ||
| + | |||
| + | import RPi.GPIO as GPIO | ||
| + | import time | ||
| + | GPIO.setmode(GPIO.BOARD) | ||
| + | GPIO.setup(11, | ||
| + | GPIO.setup(12, | ||
| + | GPIO.setup(13, | ||
| + | GPIO.setup(15, | ||
| + | GPIO.output(11, | ||
| + | GPIO.output(12, | ||
| + | GPIO.output(13, | ||
| + | GPIO.output(15, | ||
| + | for i in range(512): | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | GPIO.cleanup() | ||
| + | </ | ||
| + | |||
| + | === CODE Bipolarer Schrittmotor === | ||
| + | |||
| + | <file python schrittmotor2.py> | ||
| + | import RPi.GPIO as GPIO | ||
| + | import time | ||
| + | GPIO.setmode(GPIO.BOARD) | ||
| + | GPIO.setup(11, | ||
| + | GPIO.setup(12, | ||
| + | GPIO.setup(13, | ||
| + | GPIO.setup(15, | ||
| + | GPIO.output(11, | ||
| + | GPIO.output(12, | ||
| + | GPIO.output(13, | ||
| + | GPIO.output(15, | ||
| + | for i in range(512): | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | GPIO.cleanup() | ||
| + | </ | ||