I'm trying to controll a Nema 34 stepper with a motrordriver(EM-314) and Arduino Uno.
I have gotten the motor to rotate(slowly) by setting pin 5 on the Arduino to high. Pin 5 is connected to Preset 4 on the motordriver. I would like it to speed up, but im not sure how to do this.
Do any of you guys know how i can get it speed up?
Datasheet for the motordriver: http://media.oem.se/Archive/FilesArchive/102826.pdf
Currently i'm using a powerslupply on 0-48V 10A.
Every answer is apprciated!
Edit:
Pin 7 on arduino is connected to STEP IN Pin 6 is connected to DIR/STOP/RESET And i'm using a potentiometer to controll the speed.
Here is the code im using in Arduino.
int sensorPin = A0;
int sensorValue = 0;
void setup() {
//Serial.begin(9600);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
digitalWrite(6, LOW);
digitalWrite(7, LOW);
}
void loop() {
sensorValue = analogRead(sensorPin);
sensorValue = map(sensorValue, 0, 1023, 3600, 1);
//Serial.print(sensorValue);
//Serial.print("\n");
if(sensorValue > 3000){
digitalWrite(7, LOW);
}
if (sensorValue < 3000){
digitalWrite(7, HIGH);
delayMicroseconds (sensorValue);
digitalWrite(7, LOW);
delayMicroseconds(sensorValue);
}
}