Prints (0)
-
No Prints Yet
Be the first to upload a Print for this Design!
Description
Its a great project for the electronic enthuziast and so.
I have look every were and never encountered nothing semi/controled and i had to do it myself. This design ist was inspired from the user Irondmax from Thingiverse.
PARTS NEEDED-
arduino control board i have used LEONARDO but any board will do the job
push on/off switch and conected to power + 12v of the nema
poloulu controler stick
100 k potenciometer to graduade the velocity of the stepper motor
100mf 60v capacitor
protoboard
prototipe wires or any
THE CODE IS THIS
/* Simple Stepper Motor coil winding by Nelujones */
// Defines pins numbers const int stepPin = 3; const int dirPin = 4; int customDelay,customDelayMapped; // Defines variables void setup() { // Sets the two pins as Outputs pinMode(stepPin,OUTPUT); pinMode(dirPin,OUTPUT); digitalWrite(dirPin,HIGH); //Enables the motor to move in a particular direction } void loop() { customDelayMapped = speedUp(); // Gets custom delay values from the custom speedUp function // Makes pules with custom delay, depending on the Potentiometer, from which the speed of the motor depends digitalWrite(stepPin, HIGH); delayMicroseconds(customDelayMapped); digitalWrite(stepPin, LOW); delayMicroseconds(customDelayMapped); } // Function for reading the Potentiometer int speedUp() { int customDelay = analogRead(A0); // Reads the potentiometer int newCustom = map(customDelay, 0, 1023, 300,4000); // Convrests the read values of the potentiometer from 0 to 1023 into desireded delay values (300 to 4000) return newCustom; }
Comments