Facial recognition + Machine control + Qr, Alfanumeric and object recognition

This is the lastest and biggest project in Labview and vision.

In this project we have:

– Facial recognition: We start in a frontal camera screen and wait for the positive facial confirmation .

recoreco2

– When the facial recognition is satisfactory, you can handle the X,Y coordinates machine and make it move with commands through your voice.

CNC

– Visual recognition of a 2 dimensional code called quick response (QR), also it be able to recognize alfanumeric characters and take some device measures.

Qrletrasmicrochip

 

You can download this project from:

http://www.mediafire.com/download/bs8eqt60efz7z8i/Proyecto+Vision.zip

Object Recogntion with NI Vision builder

In this practice we use another virtual enviroment, this one was specially designed for capture and vision manipulation, NI Vision builder, with this interface we are able to recognize four different objects: A resistor, capacitator, diode and a transistor. With this program we can tell to the user how many of them are into the range sight of the camera.

vision

3

You can download this practize from:

http://www.mediafire.com/download/0a7y7fphpt537f4/Reconocimiento_en_NI_Vision_Aritificial.zip

LaBvieW DataBase Manager

Hi ! I want to show you the power of Labview.

In this example we are going to watch, how labview can use the *.udl link file (files are a data file manager to specify the connection information to a data provider in Windows) we can handle a database.

This is de aspect of the user panel of this practice:

besededatos

4

5

You can download this practice from:

http://www.mediafire.com/download/khwvvdji47vx56d/Bases_de_datos.rar

Charge and Discharge a Capacitator

Hi! I’m back with another practice, this time in Labview, but, what is Labview?

Labview is a powerfull tool, that requires a powerful microcontroller/procesor envoirment, usually a computer.

Labview is so powerfull because it is able to take all resources of windows and use them.

LabVIEW (short for Laboratory Virtual Instrument Engineering Workbench) is a system-design platform and development environment for a visual programming language from National Instruments.

The graphical language is named «G» (not to be confused with G-code). Originally released for the Apple Macintosh in 1986, LabVIEW is commonly used for data acquisition, instrument control, and industrial automation on a variety of platforms including Microsoft Windows, various versions of UNIX, Linux, and Mac OS X. The latest version of LabVIEW is LabVIEW 2013, released in August 2013.

Source & More information: http://en.wikipedia.org/wiki/LabVIEW

In this practice we can measure the volts every microsecond that is charged in the capacitator, using a DaQ, a device used for data adquisition.

6

7

Download project link:

http://www.mediafire.com/download/v2k1brrta55o79g/Carga_de_un_condensador.zip

Study of Spi EEPROM 25AA020A writing and reading with two differents pics

Guess who’s back ?!?!?!?! Ok, right it’s just me. In this practice I’m going to write with one pic and read with the other pic.

We already Spoke about what SPI is.

This is my practice when it was totally mounted.Memoria 25aa020a SPI

I have two programs, one for the writer pic, and other for the reader pic.

The writter pic:

////////////////////////////////////////////////////////////////////////////////////
//   AUTOR: Oscar Alsina Merino                      Fecha Jueves 30/10/2013     ///
////////////////////////////////////////////////////////////////////////////////////
//   PROGRAMA: Estudio memoria eeprom SPI               VERSIÓN:    1.0
//   DISPOSITIVO: PIC 16F84550                          COMPILADOR: CCS vs4.140
//   Entorno IDE: MPLAB IDEv8.89                        SIMULADOR:  Proteus 7.8
//   TARJETA DE APLICACIÓN: Ninguna                     DEBUGGER:  Ninguno
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//*******Estudio del SPI**////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////
// CABECERA ////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
#include <18f4550.h>
#fuses INTHS,MCLR
#use delay(internal=8mhz)
#use SPI(MASTER, CLOCK_HIGH= 1, DI= PIN_D1, DO= PIN_D2, CLK= PIN_D3, MODE= 0, BITS= 8, IDLE= 0)
//#use spi(DI=PIN_D1, DO=PIN_D2, CLK=PIN_D3, BITS=16)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)
#include <LCD_flexible.c>

////////////////////////////////////////////////////////////////////////////////////
// VARIABLES GLOBALES //////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
char mensaje;
int dir = 0;

////////////////////////////////////////////////////////////////////////////////////
// INTERRUPCION ////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
#INT_EXT
void RB0(void)
{

//setup_spi(spi_master | SPI_L_TO_H |spi_clk_div_16 | SPI_XMIT_L_TO_H );
puts(«Escriba su mensaje para guardar en la memoria»);
output_high(PIN_A0);
while(1)
{
//output_high(PIN_A0);
mensaje=getc();
putc(mensaje);
output_low(PIN_A0);
spi_xfer(0b00000110);
output_high(PIN_A0);
delay_ms(5);
output_low(PIN_A0);
spi_xfer(0b00000010);
spi_xfer(dir);
spi_xfer(mensaje);
output_high(PIN_A0);
dir++;

if(mensaje == 0x0d)
{
puts(«Mensaje guardado»);
output_low(PIN_A0);
spi_xfer(0b00000100);
output_high(PIN_A0);
delay_ms(20);
output_high(PIN_B1);
for(;;){}
//outpud_high(PIN_B0);
}
output_low(PIN_A0);
spi_xfer(0b00000100);
output_high(PIN_A0);
}

}

////////////////////////////////////////////////////////////////////////////////////
// PROGRAMA     ////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
void main(void)
{

enable_interrupts(int_ext);        //activar interrupcion rb4:7
enable_interrupts(GLOBAL);        //activar interrupciones
output_low(PIN_B1);
while(1);

}

and the reader pic:

////////////////////////////////////////////////////////////////////////////////////
//   AUTOR: Oscar Alsina Merino                      Fecha Jueves 30/10/2013     ///
////////////////////////////////////////////////////////////////////////////////////
//   PROGRAMA: Estudio memoria eeprom SPI               VERSIÓN:    1.0
//   DISPOSITIVO: PIC 16F84550                          COMPILADOR: CCS vs4.140
//   Entorno IDE: MPLAB IDEv8.89                        SIMULADOR:  Proteus 7.8
//   TARJETA DE APLICACIÓN: Ninguna                     DEBUGGER:  Ninguno
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//*******Estudio del SPI**////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////
// CABECERA ////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
#include <18f4550.h>
#fuses INTHS,MCLR
#use delay(internal=8mhz)
//#use SPI(MASTER, CLOCK_HIGH= 1, DI= PIN_D1, DO= PIN_D2, CLK= PIN_D3, MODE= 0, BITS= 8, IDLE= 0)
//#use spi(DI=PIN_D1, DO=PIN_D2, CLK=PIN_D3, BITS=16)
//#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)
#include <LCD_flexible.c>

////////////////////////////////////////////////////////////////////////////////////
// VARIABLES GLOBALES //////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
char data1[40];
int dir = 0;
int inc=0;
int cuenta=0;
////////////////////////////////////////////////////////////////////////////////////
// INTERRUPCION ////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
#INT_EXT2
void RB0()
{
output_low(PIN_C5);
setup_spi(spi_master | SPI_L_TO_H |spi_clk_div_16 | SPI_XMIT_L_TO_H );
lcd_init();
output_high(PIN_A0);
delay_ms(5);
while(cuenta <= 40)
{
output_low(PIN_A0);
spi_read(0b00000011);
spi_read(dir);
data1[inc] = spi_read(dir);
output_high(PIN_A0);
inc++;
cuenta++;
dir++;
delay_ms(20);
}
lcd_gotoxy(1,1);
printf(lcd_putc,»%s»,data1);
for(;;){}
}

////////////////////////////////////////////////////////////////////////////////////
// PROGRAMA PRINCIPAL //////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////

void main(void)
{
output_high(PIN_C5);
enable_interrupts(int_ext2);        //activar interrupcion rb4:7
enable_interrupts(GLOBAL);        //activar interrupciones

while(1);

}

Remember that you can download this program from the link below:

http://www.mediafire.com/download/ayaclpelf29l56n/Estudio_memoria_eeprom_SPI.zip

Analogic/Digital Conversor MCP3204 SPI

Welcome to my web site, in this case we are going to resolve a practice in which we are going to use an analogic/digital conversor communicated by SPI.

Talking a little about SPI, I can say about the Serial Peripheral Interface (SPI), that is a comunication protocol, faster than I²C, but it requires more pins to comunicate with several devices, meanwhile , the I²C is slower than SPI, but it can handle all his slaves with the same 4 adress pins.

SPI is a synchronous protocol . The synchronization and data transmition is performed by 4 pins:

SCLK (Clock): Is the synchronization pulse. Each pulse of this clock, reed or send a bit.

MOSI (Master Out Slave IN): Output of the Master and Input of the Slave.

MISO(Master In Slave Out): Input of de Master and Output of the Slave.

SS/SELECT: This pin is dedicated to select slave.

In this practice we are going to calculate the voltage inconmig in the Channel 0 with MCP3204 with a SPI comunication protocol.

This is my practice when it was totally mounted.CAD SPI

This is how my program looks like:

////////////////////////////////////////////////////////////////////////////////////
//   AUTOR: Oscar Alsina Merino                      Fecha Jueves 28/10/2013     ///
////////////////////////////////////////////////////////////////////////////////////
//   PROGRAMA: Estudio del CAD mcp3204 SPI              VERSIÓN:    1.0
//   DISPOSITIVO: PIC 16F84550                          COMPILADOR: CCS vs4.140
//   Entorno IDE: MPLAB IDEv8.89                        SIMULADOR:  Proteus 7.8
//   TARJETA DE APLICACIÓN: Ninguna                     DEBUGGER:  Ninguno
////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
//*******Estudio del CAD mcp3204 SPI**///////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////
// CABECERA ////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
#include <18f4550.h>
#FUSES XT, PUT, BROWNOUT            // BROWNOUT = Sirve para mantener el dispositivo en reset mientras el nivel de entrada sea inferior al deseado
#USE delay(clock=20000000)
#include <mcp3204.c>
#include <LCD_flexible.c>
////////////////////////////////////////////////////////////////////////////////////
// VARIABLES GLOBALES //////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
float lectura;
float voltaje;
////////////////////////////////////////////////////////////////////////////////////
// PROGRAMA ////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
void main(void)
{
lcd_init();
adc_init();
lcd_gotoxy(1,1);
printf(lcd_putc,»MCP3204, canal 0:»);

while(1)
{
lectura = read_analog(0);
//lectura = read_analog_mcp(0, 1);
voltaje = (lectura*5)/4096;
lcd_gotoxy(1,2);
printf(lcd_putc,»Voltaje = %1.2fv»,voltaje);
delay_ms(50);
}

}

You can download this practice from:

http://www.mediafire.com/download/7cghp69w1f5bw07/CAD_SPI_mcp3204_.zip

Research of i2c eeprom memory.

Welcome to my web site, in this project we are going to research and study the i2c eeprom (electronic erasable Programable Read Only Memory ) memory.

To understand how this practice works, you need know a few things about i2c comunication.

I²c  means Inter-Integrated Circuits, is a bus used to comunicate several devices which have this hardware to can use this bus devised by Phillips.

This comunication need three wires, called:

SDA: Data

SCL: Clock Signal

GROUND: Devices in the same card have the same ground potential so you can do not use this bus with near devices, but if you are going to comunicate devices from differents cards you need to get the same ground potential.

Once understood how the bus I²C works, let’s take a look to this exercise.

Here we want to be able to write and to read this memory after we wrote it. We are going to use 24LC256 I²C memmory.

With this program we can write until 32556 characters, but only the fist 30 characters will be displayed in the lcd  using the first and second line of the lcd.

This is how it looks like once developed.

memoria i2c

And this is my program based in CSC.

////////////////////////////////////////////////////////////////////////////////////
//   AUTOR: Oscar Alsina Merino                      Fecha Jueves 21/10/2013     ///
////////////////////////////////////////////////////////////////////////////////////
//   PROGRAMA: Estudio memoria eeprom                   VERSIÓN:    1.0
//   DISPOSITIVO: PIC 16F84550                          COMPILADOR: CCS vs4.140
//   Entorno IDE: MPLAB IDEv8.89                        SIMULADOR:  Proteus 7.8
//   TARJETA DE APLICACIÓN: Ninguna                     DEBUGGER:  Ninguno
////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
//*******Estudio del i2c**///////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////
// CABECERA ////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
#include <18f4550.h>
#fuses INTHS,MCLR
#use delay(internal=8mhz)
#use I2C(master, sda=PIN_B0, scl=PIN_B1)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)//restart_wd
#include <LCD_flexible.c>
////////////////////////////////////////////////////////////////////////////////////
// VARIABLES GLOBALES //////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
int dir_high =0;
int dir_low =0;
char recib;
int32 cuenta=0;
int32 cuenta2=2;
char data1[40];
char data2[40];
int incremento=0;
int incremento2=0;
int x=1;
////////////////////////////////////////////////////////////////////////////////////
// PROGRAMA ////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
void main(void)
{
lcd_init();
puts(«Escribe los caracteres a transmitir»);
puts(«Para finalizar y leer pulse ENTER…\n»);

while(1)
{
recib=getc();    // Espero a recibir un caracter por RS232
putc(recib);
i2c_start();
i2c_write(0xa0);
i2c_write(0x0);
i2c_write(dir_low);
i2c_write(recib);
dir_low++;        //incrementa el byte de direccion bajo
cuenta++;        //incrementa una cuenta para conocer las veces que se teclea
if(recib == 0x0d) // Si … Getc Guarda un enter …..
{
dir_low=0;
i2c_start();
i2c_write(0xa0); // byte de control de la memoria en la lectura
i2c_write(0x0);    // byte de mayor peso, como no va a pasar de 256bits lo dejo en 0
i2c_write(dir_low);    // byte de menor peso
i2c_start();
i2c_write(0xa1);

while(cuenta2 <= cuenta )
{
if(incremento <= 15)
{
data1[incremento] = i2c_read(); // Guarda la informacion que lee del i2c en un array de 1 dimension
incremento++; //Se incrementa la posicion del array en uno
}
else
{
data2[incremento2]= i2c_read();
incremento2++;
}
//incremento++; //Se incrementa la posicion del array en uno
cuenta2++; // Se compara las veces tecleadas con las veces que lee

}
i2c_stop();
lcd_gotoxy(1,1);
printf(lcd_putc,»%s»,data1); // se exportan los datos de la memoria al lcd atraves del pic por protocolo i2c
lcd_gotoxy(1,2);
printf(lcd_putc,»%s»,data2); // se exportan los datos de la memoria al lcd atraves del pic por protocolo i2c
for(;;){} // Una vez que se acaba de leer, el programa finaliza

}

i2c_stop();

}    // FIN DE PROGRAMA
//————————————————-
}

You can download this project in the next link:

http://www.mediafire.com/download/u0vnqmxdf4ufvgo/Estudio_de_memoria_eeprom_i2c.zip

Exercise with PCF 8591 an Analogic/Digital Conversor.

Welcome to BURNDACHIP, it’s all about electronic world. This is a web site dedicated to the exercises that we going to facing in this course.  I’am Oscar Alsina Merino,a student in the 2nd course of «Desarrollo de productos electronicos» of the electronic degree.

In this first practice we can watch how this a/d conversor works. This device is PCF 8591.

This is how would remain the practice once developed.Isis PCF 8591

And this is the program, based in CSC Compiler lenguage (based in C), charged in the picc ( 18F4550).

////////////////////////////////////////////////////////////////////////////////////
//   AUTOR: Oscar Alsina Merino                      Fecha Jueves 28/10/2013     ///
////////////////////////////////////////////////////////////////////////////////////
//   PROGRAMA: Estudio del CAD mcp3204 SPI              VERSIÓN:    1.0
//   DISPOSITIVO: PIC 16F84550                          COMPILADOR: CCS vs4.140
//   Entorno IDE: MPLAB IDEv8.89                        SIMULADOR:  Proteus 7.8
//   TARJETA DE APLICACIÓN: Ninguna                     DEBUGGER:  Ninguno
////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
//*******Estudio del CAD mcp3204 SPI**///////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////
// CABECERA ////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
#include <18f4550.h>
#FUSES XT, PUT, BROWNOUT            // BROWNOUT = Sirve para mantener el dispositivo en reset mientras el nivel de entrada sea inferior al deseado
#USE delay(clock=20000000)
#include <mcp3204.c>
#include <LCD_flexible.c>
////////////////////////////////////////////////////////////////////////////////////
// VARIABLES GLOBALES //////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
float lectura;
float voltaje;
////////////////////////////////////////////////////////////////////////////////////
// PROGRAMA ////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
void main(void)
{
lcd_init();
adc_init();
lcd_gotoxy(1,1);
printf(lcd_putc,»MCP3204, canal 0:»);

while(1)
{
lectura = read_analog(0);
//lectura = read_analog_mcp(0, 1);
voltaje = (lectura*5)/4096;
lcd_gotoxy(1,2);
printf(lcd_putc,»Voltaje = %1.2fv»,voltaje);
delay_ms(50);
}

}

You can download this practice from:

http://www.mediafire.com/download/62dj15ztd224068/Ejercicio_con_PFC8591.zip