Mostrando entradas con la etiqueta servo. Mostrar todas las entradas
Mostrando entradas con la etiqueta servo. Mostrar todas las entradas

CNC con servo en eje Z

Proyecto Prusa Mendel:
https://sites.google.com/site/basile/hw/reprap/prusa-mendel/0---antes-de-empezar

EJE Z CON SERVO!!!



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

Just tested the hex file with the servo option on an arduino nano - works fine.
It an old 0.8 version, but if i fire Z5 or Z0 the servo on analog4 moves from one end to the other.
Maybe you had a problem on the download. my Link to the hex just pointed to the download page, not the actual hex file (so you saved the html page as hex which causes the corruption error). This is the right link to save as hex file: https://github.com/heise/GRBLDRILL/raw/master/GRBL/grbl.hex
right-click, save as and flash it via avrdude.
btw, you can get an arduino for 6USD:
http://www.banggood.com/Wholesale-New-Ver-Pro-Mini-ATMEGA328-328p-5V-16MHz-Arduino-Compatible-Nano-Size-p-68534.html
Buy a USB to TTL adapter once and use cheap and small arduino nanos afterwords as you wont need the usb connection in most of your cases after programming.




GRBL!!!!

https://github.com/grbl/grbl/wiki/Using-Grbl


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


http://blog.protoneer.co.nz/grbl-arduino-library/

------------------------------------------------------------------

Calibración:
============

http://blog.protoneer.co.nz/configuring-grbl-arduino-based-cnc-controller/


GRBL CON PHASE EN LUGAR DE STEP Y DIR!!!
========================================

https://github.com/grbl/grbl/wiki/H-Bridge-as-stepper-driver
https://gist.github.com/nullsub/3238961

LOS ARCHIVOS DE ESTOS LINKS ANTERIORES FUNCIONAN SOLO CON LA VERSION 0.7 DE GRBL QUE SE BAJA DE ACA:
https://github.com/grbl/grbl/tree/v0_7

INSTRUCCIONES PARA CREAR EL .HEX A PARTIR DE LOS FUENTES!

https://github.com/grbl/grbl/wiki/Compiling-Grbl

PATH REQUERIDO PARA PODER CREAR EL .HEX:

path=%path%;C:\crusso\00. Proyectos\00. Arduino\arduino-1.0.5\hardware\tools\avr;C:\crusso\00. Proyectos\00. Arduino\arduino-1.0.5\hardware\tools\avr\bin;C:\crusso\00. Proyectos\00. Arduino\arduino-1.0.5\hardware\tools\avr\avr\bin;C:\crusso\00. Proyectos\00. Arduino\arduino-1.0.5\hardware\tools\avr\utils\bin


Instructivo gcode interpreter (reprap)
======================================



Instructivo inkscape gcode
==========================



Reprap arduino firmware
=======================




Motores NEMA17:

Sketch para máxima velocidad:

[code]

#include <Stepper.h>

const int stepsPerRevolution = 200;    //estos son los steps per revolution... se calcula asi, cada paso del nema 17 es 1.8º, entonces 360/1.8 = 200

Stepper myStepper(stepsPerRevolution, 4,6,5,7);          

void setup() {
  myStepper.setSpeed(150);   //maximo que soportan los nema17
}

void loop() {
  myStepper.step(400);
}
[/code]


Controlar servo sin Servo library


int servo1 = 9;     //tiene que ser PWM

int myAngle1;
int pulseWidth1;

void servoPulse1 (int servo1, int myAngle1) {
pulseWidth1 = (myAngle1 * 11) + 500; // Converts angle to microseconds
digitalWrite(servo1, HIGH); // Set servo high (turns it on)
delayMicroseconds(pulseWidth1); // Wait a very very small amount
digitalWrite(servo1, LOW); // Set servo low (turns it off)
delay(20); // Typical Refresh cycle of servo (20 ms)
}


void setup() {
pinMode(servo1, OUTPUT);
}


void loop() {
  servoPulse1(servo1, 60);
  delay(1000);
  servoPulse1(servo1, 90);
  delay(1000);
}



360 Servo con Arduino

Conexiones:

Servo 360
    -Negro: a GND de pilas y GND de arduino
    -Rojo: a +6V de pilas (tienen que ser 6v y tiene que ser una alimentacion externa, no la de arduino)
    -Blanco: a digital 2 de arduino

Sketch:

Tener en cuenta que:
    myservo.write(90);    detiene el servo
    myservo.write([valor menor a 90]);    lo hace girar en sentido antihorario
    myservo.write([valor mayor a 90]);    lo hace girar en sentido horario

Cuanto mas grande es el valor, mayor es la velocidad (por ej, un valor de 180 hace girar el servo en sentido horario lo mas rapido posible, 91 lo hace girar en sentido horario lo mas lento posible)


#include <Servo.h>

Servo myservo;

void setup()
{
  myservo.attach(2);  // attaches the servo on pin 9 to the servo object
}


void loop()
{
  //notar que en cada velocidad va a estar 5 segundos girando, no es necesario hacer loops!
  myservo.write(110); 
  delay(5000); 
  myservo.write(180); 
  delay(5000);
  myservo.write(90); 
  delay(5000);
}