/* Stepper Copal * ------------- * * Program to drive a stepper motor coming from a 5'25 disk drive * according to the documentation I found, this stepper: "[...] motor * made by Copal Electronics, with 1.8 degrees per step and 96 ohms * per winding, with center taps brought out to separate leads [...]" * [http://www.cs.uiowa.edu/~jones/step/example.html] * * * Blu ---> pin 16 di ULN2003AN * Viola ---> pin 15 di ULN2003AN * Giallo ---> pin 14 di ULN2003AN * Arancio ---> pin 13 di ULN2003AN * Rosso ---> pin 9 di ULN2003AN --->(+Vcc) * * Blu ---> pin 8 di Arduino * Viola ---> pin 9 di Arduino * Giallo ---> pin 10 di Arduino * Arancio ---> pin 11 di Arduino * * * pin 9 di ULN2003AN ---> +Vcc * pin 8 di ULN2003AN ___> GND * (cleft) 2005 DojoDave for K3 * http://www.0j0.org | http://arduino.berlios.de * * @author: David Cuartielles * @date: 20 Oct. 2005 */ int motorPin1 = 8; int motorPin2 = 9; int motorPin3 = 10; int motorPin4 = 11; int delayTime = 500; void setup() { pinMode(motorPin1, OUTPUT); pinMode(motorPin2, OUTPUT); pinMode(motorPin3, OUTPUT); pinMode(motorPin4, OUTPUT); } void loop() { digitalWrite(motorPin1, HIGH); digitalWrite(motorPin2, LOW); digitalWrite(motorPin3, LOW); digitalWrite(motorPin4, LOW); delay(delayTime); digitalWrite(motorPin1, LOW); digitalWrite(motorPin2, HIGH); digitalWrite(motorPin3, LOW); digitalWrite(motorPin4, LOW); delay(delayTime); digitalWrite(motorPin1, LOW); digitalWrite(motorPin2, LOW); digitalWrite(motorPin3, HIGH); digitalWrite(motorPin4, LOW); delay(delayTime); digitalWrite(motorPin1, LOW); digitalWrite(motorPin2, LOW); digitalWrite(motorPin3, LOW); digitalWrite(motorPin4, HIGH); delay(delayTime); }
venerdì 19 dicembre 2014
Motori passo passo (stepper) 1a parte.
http://www.mauroalfieri.it/i
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento