Aventuras y Desventuras de un hobbyist

Aventuras y Desventuras de un hobbyist....

Agitador para etching v.1


Luego de un largo periodo de no escribir  pero que he continuado experimentando me dispongo a hacer una herramienta indispensable para el hobbyist; un agitador para etching.


Ya sabéis que cuando queremos realizar una PCB personalizada a nuestros requerimientos tenemos que pedirlas a un fabricante enviándole nuestro diseño, esto sería viable para cuando se necesita hacer una cierta cantidad de PCBs pero cuando solo es una y al menos yo por temas de economía me la fabrico en casa.


Transfiero el diseño a la placa de cobre mediante el método de la plancha y luego procedo a hacer el etching o tratamiento químico de la placa, para ello uso Cloruro Férrico. El procedimiento debemos de hacerlo al aire libre y de ser posible debemos subir la temperatura del cloruro férrico y agitar el recipiente. 


Suena fácil eh?? Pues luego de hacer unas cuantas placas eso de estar moviendo el recipiente es un poco engorroso y aburrido, en el mercado existen agitadores comerciales que hacen que el cloruro férrico este en movimiento y así el etching es mas rápido y efectivo. 
Rapidamente me he hecho un modelo en Sketchup para tener las ideas claras.



Aprovechando que me he encontrado con dos motores DC de unos descolgadores eléctricos de teléfono. 


Los reciclare para hacerme un "etching agitator".


Mi idea es poner un motor en cada extremo del recipiente para que empuje el recipiente hacia el otro lado. Servo 1 envía recipiente a la izquierda luego baja y Servo 2 envía recipiente a la derecha luego baja así sucesivamente. 

Para mantener el recipiente usare dos guías laterales y probablemente algo en la base para un movimiento más suave. 


Para controlar ambos servos usare un Attiny 85(si es que llega desde China) caso contrario un Atmega168 aunque me da pena dejar muchos pines sin uso, cualquiera de los anteriores  con Arduino bootloader  y un h-Briged modelo L293D.





El código que usaré sera el siguiente:
//
/*
 *  CIRC-22 Controlling Motors (L293D)
 * 
 * A demo program which demonstrates how to control two
 * DC motors
 * For more details and links visit: http://tinyurl.com/nsuwln
 */
 
 
//L293 Pin assignments


//Motor one
int enable12 = 9;  //bridge 1 and 2 enable (pin 1 on the 16 pin IC) 
                   //pull this pin HIGH to turn the outputs on and LOW to turn them off
                   //using PWM on this puin will control speed
int in1      = 2;  //in1 (out1 will be HIGH when set HIGH and LOW when set LOW) (pin 2 on the 16 pin IC)
int in2      = 3;  //in2 (out2 will be HIGH when set HIGH and LOW when set LOW) (pin 7 on the 16 pin IC)

//Motor two
int enable34 = 10;  //bridge 1 and 2 enable (pin 1 on the 16 pin IC)
                    //pull this pin HIGH to turn the outputs on and LOW to turn them off
                    //using PWM on this puin will control speed
int in3      = 4;  //in1 (out1 will be HIGH when set HIGH and LOW when set LOW) (pin 2 on the 16 pin IC)
int in4      = 5;  //in2 (out2 will be HIGH when set HIGH and LOW when set LOW) (pin 7 on the 16 pin IC)


void setup(){
  pinMode(enable12, OUTPUT);  //Set the three pins for bridge 1 & 2 to outputs
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);

  pinMode(enable34, OUTPUT);  //Set the three pins for 3 & 4 to outputs
  pinMode(in3, OUTPUT);
  pinMode(in4, OUTPUT);  
}

void loop(){
  setSpeedMotorOne(255);     //Set the speed of motor one 255 = on 0 = off (simply a call to analogWrite on enable12 pin)
  setSpeedMotorTwo(255);     //Set the speed of motor two 255 = on 0 = off (simply a call to analogWrite on enable34 pin)  
  motorOneForward();         //Spin motor one forwards (set one bridge HIGH and the other LOW)
  motorTwoBackward();        //Spin motor two backwards (set one bridge LOW and the other HIGH)
  delay(1000);               //wait for a second
  brakeMotorOne();           //by leaving the bridge on the motors are braked (stop quicker than setting the speed to zero) (sets both sides of the bridge to LOW)
  brakeMotorTwo();           //by leaving the bridge on the motors are braked (stop quicker than setting the speed to zero) (sets both sides of the bridge to LOW)
  delay(1000);               //wait for a second
  motorOneBackward();        //Spin motor one backwards (set one bridge LOW and the other HIGH)
  motorTwoForward();         //Spin motor two forwards (set one bridge HIGH and the other LOW)
  delay(1000);               //wait for a second
  setSpeedMotorOne(0);       //Set the speed of motor one 255 = on 0 = off (simply a call to analogWrite on enable12 pin)
  setSpeedMotorTwo(0);       //Set the speed of motor two 255 = on 0 = off (simply a call to analogWrite on enable34 pin)    
  delay(1000);               //wait for a second  
}

////// Motor One Routines  ////////////

void motorOneForward(){
 digitalWrite(in1, LOW); 
 digitalWrite(in2, HIGH); 
}

void motorOneBackward(){
 digitalWrite(in1, HIGH); 
 digitalWrite(in2, LOW); 
}   

void setSpeedMotorOne(int newSpeed){
  analogWrite(enable12, newSpeed);
}

void brakeMotorOne(){
 digitalWrite(in3, LOW); 
 digitalWrite(in4, LOW); 
} 

////// Motor Two Routines  ////////////

void motorTwoForward(){
 digitalWrite(in3, LOW); 
 digitalWrite(in4, HIGH); 
}

void motorTwoBackward(){
 digitalWrite(in3, HIGH); 
 digitalWrite(in4, LOW); 
}   

void setSpeedMotorTwo(int newSpeed){
  analogWrite(enable34, newSpeed);
}

void brakeMotorTwo(){
 digitalWrite(in1, LOW); 
 digitalWrite(in2, LOW); 
}   
Y este el esquema de conexión del L293D