Introduction: PCB on a Box

Sorry, but I hate cleaning windows, is one of my unfinished business as usual, but I had to do (at least) every time I wanted to etch a circuit board printed by traditional (and perhaps unorthodox) of stick it in cellophane and let natural light do the work.

Lo siento, pero no me gusta limpiar las ventanas, es una de mis asignaturas pendientes de siempre, pero tenia que hacerlo (al menos una) cada vez que quería insolar una placa de circuito impresa por el método tradicional (y quizá poco ortodoxo) de pegarla con celofán y dejar que la luz natural hiciera el trabajo.

I had recently been introduced in the field of microprocessors and their programming with arduino, so I thought to make a timed exposure unit was a good way to start as a first project.

Hacía poco que me había introducido en el tema de los microprocesadores y su programación con el arduino, así que me pareció que hacer una insoladora con temporizador era una buena forma de arrancar como primer proyecto.

To make it I used a plastic watertight did nothing but wander around my desk and not know how to get it out of the way, so the idea of baptizing as "LunchBox isolation".

Para hacerla he empleado una caja de plástico estanca que no hacía más que dar vueltas por mi mesa de trabajo y no sabía como quitármela de en medio, así nació la idea de bautizarla como “Insoladora LunchBox”.

I wanted to choose between one or two sides etch simultaneously, choose the time in minutes and seconds and have a sneak outside to tell me when the process was over. Also want to have to press a button if needed to etch more plates. Also had to be compact, portable, and of course "cheap".

Quería poder elegir entre insolar una o dos caras simultáneamente, elegir el tiempo en minutos y segundos y tener un chivato externo que me dijese cuando había acabado el proceso. También quería tener que pulsar solo un botón si tenía que insolar más placas. Además tenia que ser compacto, portátil y por supuesto “apañado”.

What you will need:

1 x Arduino NANO or similar
1 x Module I2C/TWI LCD1602
6 x pushbuttons
1 x switch
Cables and connectors varied

electronic components

For light plates
64 x LED ultraviolet (you can use high intensity)
64 x 220 Ohm resistors 1/4w
2 x C.I. terminals

For Arduino prototype board
3 x C.I. terminals
4 x connectors C.I. 4 pin
2 x 220 Ohm resistors 1/4w
7 x 10 K Ohm resistors 1/4w
1 x LED red-green single encapsulated
1 x LDR

Que vas a necesitar:

1 x Arduino NANo osimilar
1 x Modulo I2C/TWI LCD1602
6 x pulsadores
1 x interruptor
Cables y conectores variados

Componentes electrónicos

Para las placas de luz
64 x led ultravioleta (se pueden usar de alta intensidad)
64 x resistencias 220 Ohm 1/4w
2 x terminales para C.I.

Para la placa del prototipo Arduino
3  x terminales para C.I.
4 x conectores C.I. de 4 pines
2 x resistencias 220 Ohm 1/4w
7 x resistencias 10 K Ohm 1/4w
1 x led rojo-verde encapsulado único
1 x resistencia LDR

Step 1: How It Works

Anyway, with this in mind I started thinking about what I wanted him to do and most importantly ... how to do it.

En fin, con esta idea en mente me puse a pensar en lo que quería que hiciese y lo más importante... cómo hacerlo.

Finally, after several changes, modifications, extensions and others, I started with the prototype. Design the prototype with Fritzing (wonderful tool) and after modifications I run something like this (fig.1)

The prototype is made on an Arduino Uno which was what I had on hand, and ignoring any buttons, has a painting like this (fig.2)

Al final y después de varios cambios, modificaciones, ampliaciones y demás, me puse con el prototipo. Diseñe el prototipo con el Fritzing (maravillosa herramienta) y después de las modificaciones me quedo algo como esto (fig.1)

El prototipo esta hecho sobre un arduino uno que era lo que tenía a mano, y obviando algún botón, tiene una pinta como esta (fig.2)


It has a display for displaying data, LDR resistance that detects the lid opening after finishing the process, 2 LEDs that make external sneak (red and green in the same package) and six buttons, two up and down the minutes two do the same with the second (in units of 10), you change the faces to etch (1 or 2) and the last begins the process of heatstroke. We also have plates that give light led to the exposure unit, obviously there are two, one for the top face and a bottom face for.

Tiene un display para mostrar los datos, una resistencia LDR que detecta la apertura de la tapa una vez acabado el proceso, 2 led que hacen de chivato externo (rojo y verde en un mismo encapsulado) y seis botones, dos suben y bajan los minutos, dos hacen lo propio con los segundos (en unidades de 10), uno cambia las caras a insolar (1 o 2) y el último inicia el proceso de insolación. También tenemos las placas de led que dan la luz a la insoladora, evidentemente hay dos, una para la cara de arriba y una para la cara de abajo.

Step 2: Building It All

Once the prototype software running and turn to the construction schedule. For reasons of space I decided to put an Arduino Nano, and I wanted to put so much in so little space ...

Una vez el prototipo funcionando y el software programado pasamos a la construcción. Por motivos de espacio decidí poner un Arduino NANO, ya que quería meter tantas cosas en tan poco espacio...

The first thing was to make the PCB where the LED will light. As the design is easy to draw the hair. I have used ultraviolet LED and they had plenty on hand to make another project that did not see the light (pun intended) as my mail is somewhat forgotten chooses the method of diode-resistance seen, certainly not the best, but it works and resistors are cheap .....

Lo primero de todo era hacer las placas de circuito impreso donde van los led de luz. Como el diseño es muy sencillo lo dibuje a pelo. He empleado led ultravioleta ya que tenía un montón a mano para hacer otro proyecto que no vio la luz (valga la expresión) como mi electrónica está algo olvidada opte por el método visto de diodo-resistencia, seguro que no es el mejor , pero funciona y las resistencias son baratas.....

I got to work and cleaned a window (for the last time, at least for circuits), as had largely forgotten the times, the first resulted very low insolation and as I wanted to use the plate (the thing is very "achucha "not to recycle), drew on the ancient and laborious method of permanent marker and ruler. The second came out flawless.

Me puse manos a la obra y  limpié una ventana (por última vez, al menos para hacer circuitos), como tenía muy olvidados los tiempos, la primera resulto muy escasa de insolación y como quería usar la placa (que la cosa está muy “achucha” como para no reciclar), la dibujé por el antiguo y laborioso método de rotulador indeleble y regla. La segunda me salió impecable.

Step 3: Designing the PCB

Just the PCB of light done, went to design the pcb where he would be the Arduino Nano, connectors, resistors and other paraphernalia of the circuit. How was simple and I matched the holes, use a breadboard and after several doodles the thing was as follows.

Hechas ya las placas de luz, pasé a diseñar la placa donde iba a estar el Arduino Nano, los conectores, resistencias y demás parafernalia del circuito. Cómo era muy sencillo y me coincidían los agujeros, use una placa de prototipos y después de varios dibujillos la cosa quedó como sigue.

Once the prototype software running and turn to the construction schedule. For reasons of space I decided to put an Arduino Nano, and I wanted to put so much in so little space ...

Una vez el prototipo funcionando y el software programado pasamos a la construcción. Por motivos de espacio decidí poner un Arduino NANO, ya que quería meter tantas cosas en tan poco espacio...

Step 4: Just Building

Here are a couple of pictures "truth" of how everything is assembled.

Aquí tenemos un par de imágenes “de verdad” de cómo queda todo ensamblado.

Step 5: The Last Test

As we have done all the necessary things, tried to assemble it all together and see that it works as it should, lest it brought them to the box and last minute surprises.

Como ya hemos hecho las placas necesarias, probamos a ensamblarlo todo junto y ver que funciona como debe, no vaya a ser que lo metamos en la caja y haya sorpresas de última hora.

Step 6: All in the Box

Now to put it in the box, here depend on the box that we have, so show the assembly that I have, with the box he had. I thought to put methacrylate transparent lids on both sides, but I needed something thinner for the cover above, since space is much smaller, so I opted for a translucent cover a case purchased in the "all at an euro "corner. To put down the lid of the methacrylate had already cut, gives consistency to the whole and that is where they will be supported clichés and the PCB.

Ahora pasamos a meterlo en la caja, aquí dependerá de la caja de la que dispongamos, así que mostraré el ensamblaje que he hecho yo, con la caja que tenía. Pensaba poner metacrilato para hacer las tapas transparentes de los dos lados, pero necesitaba algo más delgado para la tapa de arriba, ya que el espacio es mucho menor, así que opté por una tapa traslucida de una caja que compre en el “todo a un euro”  de la esquina. Para la tapa de abajo puse el metacrilato que ya tenía cortado, le da consistencia al conjunto ya que es allí donde van a ir apoyados los clichés y el circuito impreso.

Step 7: The Video

And there is a video that show "How it works", But sorry folks, It´s just in spanish.

Aquí pongo un video de como funciona la insoladora. Un saludo.

Step 8: Finally... the Code

// Insoladora doble cara V.1.3
// escrito y dirigido por Paxpan

#include #include
#include

// iniciamos el LCD

LiquidCrystal_I2C lcd(0x27,16,2);

// iniciamos las constantes

const int botonInicio = 7; // definimos la entrada digital 7 para el pulsador de inicio
const int botonCaras = 8; // definimos la entrada digital 8 para el pulsador de numero de caras
const int botonMinUp = 12; // definimos la entrada digital 12 para el pulsador de mas minutos
const int botonMinDown = 11; // definimos la entrada digital 11 para el pulsador de menos minutos
const int botonSegUp = 10; // definimos la entrada digital 10 para el pulsador de mas segundos
const int botonSegDown = 9; // definimos la entrada digital 9 para el pulsador de menos segundos
const int cara1led = 4; // definimos la placa de luz superior
const int cara2led = 2; // definimos la placa de luz inferior
const int ledrojo = 6; // definimos el led de control "no abrir"
const int ledverde = 5; // definimos el led de control "podemos abrir"
const int LDR = A6; // definimos la entrada de la fotorresistencia

// iniciamos las variables

int estadobotonCaras = 0; // variable para el estatus del pulsador caras
int estadobotonMinUp = 0; // variable para el estatus del pulsador mas minutos
int estadobotonMinDown = 0; // variable para el estatus del pulsador menos minutos
int estadobotonSegUp = 0; // variable para el estatus del pulsador mas segundos
int estadobotonSegDown = 0; // variable para el estatus del pulsador menos segundos
int estadobotonInicio = 0; // variable para el estatus del pulsador inicio
int cuentaatras = 30; // variable para la cuenta atras de inicio de insolación
int inicio = 0; // variable para el inicio
int caras = 1; // variable para el numero de caras
int minuto = 0; // variable para el contador de minutos
int segundo = 0; // variable para el contador de segundos
long tiempototal = 0; // variable para la suma del tiempo
int valorLDR = 0; // variable para el estatus de la fotorresistencia
int LDRComp = 512; // variable para el convertidor de la fotorresistencia

void setup()
{

// establecemos las salidas digitales

pinMode(cara1led, OUTPUT); // placa LED arriba
pinMode(cara2led, OUTPUT); // placa LED abajo
pinMode(ledrojo, OUTPUT); // chivato led rojo
pinMode(ledverde, OUTPUT); // chivato led verde

// establecemos los botones como entradas

pinMode(botonCaras, INPUT);
pinMode(botonMinUp, INPUT);
pinMode(botonMinDown, INPUT);
pinMode(botonSegUp, INPUT);
pinMode(botonSegDown, INPUT);
pinMode(botonInicio, INPUT);

// establecemos la fotoresistencia como chivato de apertura

pinMode(LDR, INPUT);

// iniciamos el LCD

lcd.init();
lcd.backlight();

// escribimos el mensaje de bienvenida

lcd.print(" Bienvenido");
delay(1000);
lcd.setCursor(1, 0);
lcd.print(" Insoladora");
lcd.setCursor(0, 1);
lcd.print(" LunchBox");
delay(2000);
lcd.clear();

}

void loop()
{


// Aquí ponemos el tiempo y el numero de caras que queremos insolar

estadobotonInicio = digitalRead(botonInicio);
if (estadobotonInicio == HIGH)
{ inicio = 1;
}
lcd.setCursor(0, 0);
lcd.print("Numero caras = ");
estadobotonCaras = digitalRead(botonCaras);
if (estadobotonCaras == HIGH)
if (caras == 1)
{caras = 2;
digitalWrite (cara1led, HIGH);
digitalWrite (cara2led, HIGH);
delay(500);
digitalWrite (cara1led, LOW);
digitalWrite (cara2led, LOW);
}
else
{caras = 1;
digitalWrite (cara1led, HIGH);
delay(500);
digitalWrite (cara1led, LOW);
}
lcd.print(caras);
lcd.setCursor(0, 1);
lcd.print("Tiempo = ");
estadobotonMinUp = digitalRead(botonMinUp);
if (estadobotonMinUp == HIGH)
{
minuto++ ;
}
estadobotonMinDown = digitalRead(botonMinDown);
if (estadobotonMinDown == HIGH)
{
minuto-- ;
if (minuto < 0) // evitamos que de números negativos
{
minuto = 0;
}
}
estadobotonSegUp = digitalRead(botonSegUp);
if (estadobotonSegUp == HIGH)
{
segundo = segundo + 10;
if (segundo == 60)
segundo=0;
}
estadobotonSegDown = digitalRead(botonSegDown);
if (estadobotonSegDown == HIGH)
{
segundo = segundo - 10;
if (segundo < 0)
segundo = 0;
}

lcd.print(minuto);
lcd.print(":");
lcd.print(segundo);
delay(300);

// Ya hemos acabado de poner el tiempo y el numero de caras y pulsamos inicio
// A continuación tenemos 30 segundos para posicionar la placa y cerrar la tapa

if (inicio == 1)
{
inicio = 0;
lcd.clear();
lcd.print("Prepara la placa");
for (cuentaatras=30; cuentaatras != 0; cuentaatras --)
{
lcd.setCursor(0, 1);
lcd.print("Inicio en ");
lcd.print(cuentaatras);
lcd.print(" seg ");
delay(1000);
}

lcd.clear();
minuto = minuto * 10000;
segundo = segundo * 1000;
tiempototal = minuto + segundo;

if (caras == 1)
{
lcd.noBacklight();
digitalWrite (cara1led, HIGH);
digitalWrite (ledverde, LOW);
digitalWrite (ledrojo, HIGH);
delay(tiempototal);
digitalWrite (cara1led, LOW);
digitalWrite (ledrojo, LOW);
digitalWrite (ledverde, HIGH);
while (valorLDR < LDRComp)
{
valorLDR = analogRead(LDR);
}

}
if (caras == 2)
{
lcd.noBacklight();
digitalWrite (cara1led, HIGH);
digitalWrite (cara2led, HIGH);
digitalWrite (ledverde, LOW);
digitalWrite (ledrojo, HIGH);

digitalWrite (cara1led, LOW);
digitalWrite (cara2led, LOW);
digitalWrite (ledrojo, LOW);
digitalWrite (ledverde, HIGH);
while (valorLDR < LDRComp)
{
valorLDR = analogRead(LDR);
}
}

lcd.backlight();
lcd.clear();
lcd.print("Retira la placa");
lcd.setCursor(0, 1);
lcd.print("y revelala ");
delay(10000);

// REiniciamos las variables

caras = 1;
tiempototal = 0;
minuto = minuto / 10000;
segundo = segundo / 1000;
valorLDR = 0;
digitalWrite (ledrojo, LOW);
digitalWrite (ledverde, LOW);

}

}