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