EasyDriver CNC

ATENCION!
Los comandos para configurar GRBL no funcionan en el serial monitor del arduino!
Usar el mismo Gcode sender para configurarlo, o el software de terminal CoolTerm


Quick setup guide
http://blog.protoneer.co.nz/quick-grbl-setup-guide-for-windows-arduino-g-code-interpreter/

Pin layout de EasyDriver
http://blog.protoneer.co.nz/grbl-arduino-g-code-processor-pin-layout/

Configuración de GRBL 0.8
https://github.com/grbl/grbl/wiki/Configuring-Grbl-v0.8

Calculadora GRBL de ShapeOko
http://noblesque.org.uk/ShapeOko/grblcalc/

Software para dibujar para ShapeOko
http://zapmaker.org/projects/grbl-controller-3-0/

Sleep y Enable explicados:
http://xavierstechno.blogspot.com.es/#%21/2012/02/easy-driver-with-arduino.html

Ejemplos de GCODE
https://github.com/grbl/grbl/wiki/G-Code-Examples

Manual de GCODE
http://linuxcnc.org/docs/html/gcode.html

VER SHAPEOKO!
http://www.shapeoko.com/

Usar servo en eje Z
https://github.com/grbl/grbl/issues/220

There is a mod/fork of an old 0.8 grbl version which can use a servo on the Z-Axis:
https://github.com/heise/GRBLDRILL
It was done by the german ct magazin for a small PCB drill.
Unfortunately there is not much documentation about that, as far is i remember the servo does a full movement if you drive Z-Axis from 0 to +5mm via gcode. This can be changed somewhere in the code.
Just try the hex file from the github: https://github.com/heise/GRBLDRILL/blob/master/GRBL/grbl.hex
with a servo connected to analog4 on the Arduino.
Here is the link top the article, but you'll have to buy ist:
https://www.heise.de/artikel-archiv/ch/2012/03/068_Dreiachs-Motorsteuerung-mit-Arduino

Software online para GCODEhttp://www.makercam.com/
Código fuente de GRBL e instrucciones para cargar en Arduino
http://blog.protoneer.co.nz/grbl-arduino-library/

GRBL Arduino Library – Use the Arduino IDE to flash GRBL directly to your Arduino

We have created an Arduino Library of the popular GRBL g-code Interpreter. A great little application that turns your Arduino into a very capable CNC machine.
This library makes it so much easier to install GRBL onto your Arduino. No more issues with making HEX files or trying to find a way to upload the Hex file to your board. Simply install the library and open the right example sketch for your Arduino.
How to install it:
  • Down load the library from GitHub : https://github.com/Protoneer/GRBL-Arduino-Library/archive/master.zip
  • Unzip the library and copy the main folder into the “Libraries” folder in the folder you installed your Arduino software. Eg. C:\arduino-1.0.3\libraries\
  • Rename the folder to “GRBL”. (This will stop the Arduino IDE from complaining about the long folder name)
  • Open up the Arduino IDE.
  • Click on the following menu : File -> Examples – > GRBL (or what ever you renamed the folder to) -> ArduinoUno
  • Upload the sketch to you Arduino UNO board.
If you are interested in the source code, its available at https://github.com/Protoneer/GRBL-Arduino-Library


Configuración de corriente para el Big EasyDriver

Subir este codigo al arduino, y con un destornillador girar el potenciometro para encontrar el punto en que el motor gira bien.



  ////////////////////////////////              
  //TWO WIRE STEP/DIR DRIVER BOARD CODE      
  int Motor1StepPin = 4;
  int Motor1DirPin = 7;

  int Motor2StepPin = 2;
  int Motor2DirPin = 3;  
  
  //The number of steps required for your stepper to make one revolution. (Don't forget to take into 
  //account the settings on your driver board. i.e. Microstepping, half stepping etc.)
  float steps = 200;  
    //Set the travel speed for your stepper motors here. (In Rev/Min)
    //Note: There is a limit to how fast or slow this code is able to spin the stepper motors.
    //You can try experimenting with the "delayMicroseconds" code if you need different speeds.
  int altSpeed=60;
  int azSpeed=60; 
  
  //////////////////////////////// 

  float Motor1Delay, Motor2Delay, doSteps;

void setup()

    Serial.begin(9600);
  ////////////////////////////////              
  //TWO WIRE STEP/DIR DRIVER BOARD CODE  
  pinMode(Motor1StepPin, OUTPUT);
  pinMode(Motor1DirPin, OUTPUT);
  pinMode(Motor2StepPin, OUTPUT);
  pinMode(Motor2DirPin, OUTPUT);
  Motor1Delay = ( 1000000 * ( 60 / (steps * altSpeed) ) ) / 2;
  Motor2Delay  = ( 1000000 * ( 60 / (steps * azSpeed) ) ) / 2;
  ////////////////////////////////  

        pinMode(6, OUTPUT);
//      pinMode(7, OUTPUT);      
//      pinMode(13, OUTPUT);
    

         
}

void loop()
{
  
  delay(1000); 
  digitalWrite(6, LOW);
  delay(100); 
  
  moveToPosition(1, 0, -steps * 1);  
  moveToPosition(1, 0, steps * 1);   
  moveToPosition(1, -steps * 1, 0); 
  moveToPosition(1, steps * 1, 0); 

  digitalWrite(6, HIGH);  

}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//This code moves the stepper motors
void moveToPosition(int limitSearch,  long altsteps, long azsteps){
    
//    Serial.println("altsteps");
//    Serial.println(altsteps);
//    Serial.println("azsteps");
//    Serial.println(azsteps);                 
        
  ////////////////////////////////              
  //TWO WIRE STEP/DIR DRIVER BOARD CODE   
  if (abs(azsteps)==azsteps){digitalWrite(Motor2DirPin, HIGH);}else{digitalWrite(Motor2DirPin, LOW);}  
  if (abs(altsteps)==altsteps){digitalWrite(Motor1DirPin, HIGH);}else{digitalWrite(Motor1DirPin, LOW);}

  for (doSteps=1; doSteps <= abs(azsteps); doSteps++){
     digitalWrite(Motor2StepPin, HIGH);
     delayMicroseconds(int(Motor2Delay));
     digitalWrite(Motor2StepPin, LOW); 
     delayMicroseconds(int(Motor2Delay));
  }
     
  for (doSteps=1; doSteps <= abs(altsteps); doSteps++){
     digitalWrite(Motor1StepPin, HIGH);
     delayMicroseconds(int(Motor1Delay));
     digitalWrite(Motor1StepPin, LOW); 
     delayMicroseconds(int(Motor1Delay));
  }
    
}





No hay comentarios:

Publicar un comentario