Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
  • Women in Engineering

Sign Language Glove with Voice Synthesizer

By Abhijit Pradip Navale

 

 

There are some people who don’t have the ability to speak or they lose it in an accident. They find it difficult to express their thoughts or to convey their message to other people.

Sign Language Glove with Voice Synthesizer

In this project we propose a Sign Language Glove which will assist those people who are suffering for any kind of speech defect to communicate through gestures i.e. with the help of single handed sign language the user will make gestures of alphabets.  The glove will record all the gestures made by the user and then it will translate these gestures into visual form as well as in audio form. 
Sign Language Glove with Voice Synthesizer
This project uses ATMEGA 32 controller to control all the processes and flex sensors along with accelerometer sensors will track the movement of fingers as well as entire palm. A LCD will be used to display the users gesture and a speaker to translate the gesture into audio signal is planned if possible for execution.
 
This project can be further developed to recognize complex like food, water, etc.

Hardware Specification

PROJECT HARDWARE SPECIFICATION
GENERAL SPECIFICATION
For the system to be implemented, requirement of following different modules were considered as the individual blocks for operation.
1. Input sensors for Hand Gesture Recognition.
2. Signal Conditioning for Data Compatibility to next Stage.
3. Microcontroller for Data Process and Action.
4. Display Device for Data and Menu Display.
5. Voice Synthesizer for Text to Audio Conversion.
6. Audio Amplifier for Boosting Audio Level.
7. Speaker for Audio Output.
PROJECT BLOCK DIAGRAM
Sign Language Glove Block Diagram
PROJECT SYSTEM SPECIFICATION
Sr. No.
type of Component
specification
1.
Glove
Hand Glove
2.
Microcontroller
AVR Atmega 16
3.
Flex Sensors
Spectra Symbol 4.5″
4.
LCD
JHD162A
5.
Audio Synthesizer
TTS & SpeakJet
6.
Audio Amplifier
LM 386
7.
Speaker
Deeksha 8 ?
Table. Major Component used
 
SENSOR
Sr. No.
Parameter
specification
1.
Component Make
Spectra Symbol
2.
Flat Resistance
10K?
3.
Bend Resistance
60K? to 110K?
4.
Resistance Tolerance
± 30%
5.
Power
0.5W continuous/ 1W peak
6.
Dimension Length
4.5″
 
microcontroller
 

Fig. AVR Atmega 16
Sr. No.
Parameter
specification
1.
Component Make
Atmel Corporation
2.
Bit Instruction
8 bits
3.
Process Speed
16 MIPS at 16 MHz
4.
ISP Flash Memory
16 Kb
5.
EEPROM
512 bytes
6.
Internal SRAM
1 Kb
7.
Inbuilt ADC
8-channel 10-bit
8.
Communication
Serial USART
9.
Operating Voltage
2.7V – 5.5V
10.
Power Consumption at 1MHz, 3V
Active : 1.1 mA, Idle : 0.35 mA
11.
Package
40-pin PDIP
 
VOICE SYNTHESIZER IC’S
 

Voice Synthesizer ICs

FOR TTS 256
Sr. No.
Parameter
specification
1.
Baud Rate Supported
9600
2.
Operating Voltage
3V – 5.25V
3.
Package
28-pin PDIP
 
FOR SPeakjet
Sr. No.
Parameter
specification
1.
Component Make
Magnevation
2.
Synthesizer
5-channel programmable
3.
Internal Input Buffer
64 byte
4.
Operating Voltage
2V – 5.5V
5.
Supply Current
Idle/Speaking < 25 mA
6.
Package
18-pin PDIP
 
 DISPLAY
Sr. No.
Parameter
specification
1.
Display Construction
16 x 2
2.
Display Type
Positive Transflective
3.
Backlight
LED (5V)
4.
Data Line
8-bit parallel
5.
Operating Voltage
-0.3V –  7V
6.
Supply Current
0.2 mA
7.
Package
Chip On Board
 
AUDIO AMPLIFIER IC
 

Sr. No.
Parameter
specification
1.
Component Make
National Semiconductor
2.
Operating Voltage
4V – 12V or 5V – 18V
3.
Current Drain
4 mA
4.
Voltage Gain
20 – 200
5.
Power Consumption at 6V
24 mW
6.
Package
8-pin MSOP
 

Potential Driver Circuit

Project Description

This project operates in two modes there will be a switch to set the mode of the glove. Following are the two modes:-
(a) Learning mode
(b) Operational mode
·         Learning mode :-
In this mode, Database of the system will be filled automatically when user will make all the gestures one by one. The user is supposed to make gestures of all the alphabets. A LED is used to indicate whether the system is busy or not.
 
When system is made “ON” it will ask for mode selection if learning mode is selected then if the system status LED is “ON” it means the system is free and ready to accept the input. At this instant the user is supposed to make gesture for the alphabets that are being displayed on the LCD. Suppose first alphabet displayed on LCD is ‘A’ then the user will make a gesture for alphabet ‘A’ with his hand, in this process the user will bend his fingers in a specific manner to make the gesture this will make the different flex sensors in different fingers to bend by certain angles which may be same or different from each other depending on the gesture to be made. This will change the resistance of the flex sensors, the resistance will increase if the flex sensors are bent. The value of resistance will increase with the increase in the bent angle. This change in resistance will be converted into voltage change by connecting the flex sensors in a potential divider circuit. So, the analog voltage from each flex sensors will be given to the ADC ports of the Microcontroller. This analog voltage will be converted into digital form by ADC in the Microcontroller. As these flex sensors are present in only the left hand so to complete the database information about the gesture made by right hand is also required because some of the gestures require both left and right hand.
           
Now, in right hand glove we have not used any kind of sensors to convey information about the gesture instead we have used the right hand glove to give specific interrupts to the left glove. It contains a small power source and metallic contacts to give interrupt to the left hand glove which too has metallic contacts. Suppose we have to give a gesture for alphabet ‘A’ then user will make required gesture with his left hand, the sensors on left hand fingers will be scanned and the analog voltage of the sensors will be converted into digital form and will be stored in the memory. This data will not be further used until there is a gesture from right hand also. So, the user has to make gesture with his right hand and since there are no sensors so no data will be processed. But when the user will bring both his hands in contact to make a gesture a small voltage signal will flow from the right hand glove to left hand glove through specific metallic contacts. This signal will act as an interrupt signal to the left hand glove. This interrupt signal will be used by the left glove for further processing of data. The metallic contacts on the glove are positioned in a specific manner. There are multiple metallic plates which  will convey the interrupt information in a different way for different alphabets. When the left hand glove will get an interrupt signal from right hand glove the data processing will start again and the information about which interrupt was used will guide the further processing of data.
 
For some alphabets which require only one hand gesture will be processed immediately when the gesture is made. There will be a time delay of after which if there is no interrupt from the right hand glove the processing of left hand glove will be done provided there is an alphabet corresponding to this gesture. For two handed gestures the system will wait for the processing of the interrupt and then it will process the entire data.
 
·               Operation mode:
In this mode the system will recognize the gestures made by user and it will search for the alphabet in the database, created during the learning mode, to display it on the LCD. Suppose the user has to make a gesture for alphabet ‘F’ then he will make the required gesture using his left hand glove all the sensors will be scanned for the their analog voltage and it will be given to the controller to convert it into equivalent digital signals these values will be stored in internal memory. Now the system will scan whether this system is single handed gesture by looking at the look-up table created during the learning mode. If it is a single handed gesture then it will still wait for some time to give the output because there are some gestures which have same gestures of left hand but the word is specified correctly when right hand gesture is made in contact with left hand to give interrupt.
 
So, if single handed gestures are present the system will look in the look-up table, if entry is found then it will wait for interrupts from right hand glove. But if no interrupt is given within specified time then the system will display the alphabet that was found in the look-up table and if the gesture is two handed then also the system will look in the look-up table, if entry is found then it will wait for interrupts from right hand glove.
 
In this way, the user can create any kind of word and this will be displayed on LCD, special commands will be given for giving space between words, to give enter or ok choice, to erase, etc. So, the user can create any kind of words using this glove.

Circuit Diagram

COMPLETE CIRCUIT DIAGRAM
The complete circuit diagram of the project is shown in the Circuit Diagram Tab. The flex sensors are displayed by variable resistors that are directly connected to an opamp LM324 to give variable voltage output which can be seen on the voltmeter connected at the output of the opamp. The opamp output is directly connected to the Port-A of Atmega16 uC. Four LEDs, to display the status of the sysem, are connected to the uC Port-B. The four LEDs are Power-on LED, Learn mode LED, Work mode LED, System busy LED and Speak busy LED. Four buttons are connected to Port-D of the uC. Three buttons are press buttons and one is push button. The press buttons are Learn mode button, Work mode button, Start gesture button and one push button for alphabet selection. The dataports of LCD are connected to Port-C of uC and control pins are connected to Port-A of uC. The Rxd and Txd terminals of uC are connected to the Txd and Rxd terminals of TTS256 IC. 

 

Project Source Code

 

Project Source Code

###

 

#define F_CPU 16000000UL

 

#define USART_BAUDRATE 9600

#define BAUD_PRESCALE (((F_CPU / (USART_BAUDRATE * 16UL))) - 1)

 

 

#include

#include

#include

 

                                                                                    //LCD

#define dataport PORTC                     //LCD dataport

#define commport PORTA                  //LCD command port

#define rs PINA5                                             //LCD contol ports

#define wr PINA6

#define en PINA7

                                                                                    //LED

#define mdlrn PINB0                          //learn mode

#define mdwrk PINB1                         //work mode

#define busy PINB2                            //busy mode

#define spkbusy PINB3                                   //speak busy mode

                                                                                   

                                                                                    //buttons

#define mslrn PIND4                           //learn

#define mswrk PIND5                         //work

#define strt PIND6                               //start scanning

#define nxt PIND2                                          //next letter

 

int i,z=0;

unsigned char alphabet[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M',

'N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};

unsigned char alphabets[26][10]={"aay/","bee/","see/","dee/","ee/","eff/","jee/",

"ech/","i/","jay/","kay/","ell/","emm/","enn/","oo/","pee/","kyu/","aar/","ess/",

"tee/","you/","we/","double u/","axe/","why/","zed/"};

unsigned char gestures[7][6]={"ok/","you/","food/","I/","go/","bye/","water/"};

int letter=0;

int l,flagcmd=0;

int j,f;

unsigned int Ain,Aout,f1,f2,e1,e2;

char compwrd[10];

int pos[6][3];

int sumpos[5];

int avgpos[5];

int avgdisp[5];

int avgpostest[5];

int mode;

int test[5];

int addr,datwr;

int c,d,e;

int numlcd[10]={48,49,50,51,52,53,54,55,56,57};

char rx[10],dwrd[7]={""};

 

 

int LCDinitialize(void);

int LCDdisplay(unsigned char disp[]);

int LCDcommand(char);

int wrdata(void);

int wrcomm(void);

int numberdisplay(int);

int led_initial(void);

int buttons(void);

int strt_chck();

int EEPROM_read(int );

int searchletter();

 

int main(void)

{         

            DDRA = 0xE0;                                                                        //PORTA dirctn

            DDRB = 0xBF;                                                                        //PORTB dirctn

            DDRC = 0xFF;                        //PORTC dirctn                        

            DDRD = 0x02;                                                                        //PORTD dirctn

 

           

            LCDinitialize();

            LCDcommand(0x01);

            _delay_ms(5);

/*

            LCDdisplay(" Initialising /");

            LCDcommand(0xC0);

            LCDdisplay("    System  /");

            _delay_ms(600);

*/        

                                                                                                                        //Buttons raised to high

            PORTD |= 1 << PIND4;

            PORTD |= 1 << PIND5;          

            PORTD |= 1 << PIND6;          

            PORTD |= 1 << PIND2;

           

            PORTB |= 0b00001111;                                              //All LED off initially

           

 

//for sensor display only

 

/*

                                                ADCinitialize();

                                                while(1)

                                                {

                                                ADCscan();

                                                }

 

*/

 

/*         LCDcommand(0xC0);

            LCDdisplay("  LED Status /");

            _delay_ms(10);

*/

            led_initial();                                         //Initialize LED Blinking

 

            PORTB &= ~(1<

 

            SREG=0x80;                                        //global interrupt enable

            MCUCR=0x00;                                                //low level on pin

            GICR |= 1<

 

 

            usart_init();                                          //Initialize TXN & RXN

            usart_putch(0x0D); // send data back to the PC (HyperTerminal)

            _delay_ms(1000);

            ADCinitialize();

 

// for rxn data from TTS256

/*         for(i=0;i<5;i++)

            {

                        while ((UCSRA & (1 << RXC)) == 0);

                rx[i]=UDR;

           

 

                LCDinitialize();

                        LCDdisplay(rx);

    }

*/

           

            LCDinitialize();

            LCDdisplay("Sign Language/");

            LCDcommand(0xC0);

            LCDdisplay("Glove/");

            _delay_ms(800);

 

 

            speaker(" Sygn/");

            speaker(" language/");

            speaker(" glove/");

            _delay_ms(100);

           

            while(1)

            {

                        buttons();

            }

           

            return 0;

}

 

 

int buttons(void)

{         

            LCDcommand(0x80);

            LCDcommand(0x01);

            LCDdisplay("Select Mode:/");

 

            speaker("Select/");

            speaker("moade/");

 

            _delay_ms(800);

 

            LCDcommand(0xC0);

            LCDdisplay("1.Learn  2.Work/");

           

            speaker(" one/");

            speaker(" Larrn/");

            speaker("moade/");

            speaker("two/");

            speaker("Work/");

            speaker("moade/");

            _delay_ms(100);         

            while(1)

            {

                        PORTD ^= 1 << PIND4;

                        PORTD ^= 1 << PIND5;

                        PORTD ^= 1 << PIND6;

                       

                                   

                        if(bit_is_clear(PIND, 4))

                        {

 

                                                if(bit_is_clear(PIND, 5))

                                                {

                                                            while(1)

                                                            {

                                                            flash();

                       

                                                            }

 

                                                 }

                       

                                    PORTB &= ~(1<

                                    mode=0;

                                    if(flagcmd==1)

                                    {

                                    lrn();

                                    }

                                    else

                                     {

                                    learn();

                                    }

                                    buttons();

                                    PORTB |= (1<

                        }

 

                        else if(bit_is_clear(PIND, 5))

                                    {

                                                           

                                                PORTB &= ~(1<

                                                mode=1;         

                                                work();

                                                           

                                                buttons();

                                                PORTB |= (1<

                                    }

 

                        else if(bit_is_clear(PIND, 6))

                        {

                                                command();

                        }

        

            }

            return 0;          

}

 

int learn(void)

{ 

int dateeprom; 

            mode=0;

            LCDcommand(0x80);

            LCDcommand(0x01);

            LCDdisplay("Learn Mode/");

            speaker("Larrn/");

            speaker("moade/");

            _delay_ms(600);

 

            LCDcommand(0x80);

            LCDcommand(0x01);

            LCDdisplay("Select Alphabet/");

            speaker("Select/");

            speaker("Alphabet/");

            _delay_ms(100);

                       

            e=0;

                                                           

            for(i=0; i<26; i++)

            {

                        LCDcommand(0x80);

                        LCDcommand(0x01);                           //first line

                        LCDdisplay("Do Gesture for/");

                        LCDcommand(0xC0);

                        dataport = alphabet[letter];

                        wrdata();

                        speaker("Doo/");

                        speaker("gesture/");

                        speaker("for/");

 

                        speaker(alphabets[letter]);

                                               

                        letter++;

                        ADCinitialize();

 

            /*         LCDcommand(0x01);

                        LCDcommand(0x80);

                        LCDdisplay("Scan Started/");

                        _delay_ms(10);

 

            */

                        ADCscan();

            /*         LCDinitialize();

                        LCDdisplay("division/");

                        LCDcommand(0xC0);

           

                        for(i=0;i<3;i++)

                        {

                                    numberdisplay(avgpos[i]);

                                    LCDcommand(0x14);

                        }

 

                        _delay_ms(10);

                        LCDcommand(0x01);

                        LCDcommand(0x80);

                        LCDdisplay("Scanning Done/");

                        _delay_ms(10);

 

                        */

 

                        LCDcommand(0x01);

                        LCDcommand(0x80);

                        LCDdisplay("Writing Memory/");

                        _delay_ms(600);

                        LCDcommand(0xC0);

 

                        for(z=0;z<3;z++)

                        {

                                    numberdisplay(avgpos[z]);

                                    LCDcommand(0x14);

                        }

                        _delay_ms(1000);

 

                        int t=0;

 

                        for(d=0;d<6;d=d+2)

                        {

                                    datwr=avgpos[t];

                                    t++;

                                    addr=e+d;

 

                                    if(datwr>=000 && datwr<256 )

                                    {

                                    e1=0;

                                    e2=datwr;

                                    }

 

                                    else if(datwr>=256 && datwr<512 )

                                    {

                                    e1=1;

                                    e2=datwr-256;

                                    }

 

                                    else if(datwr>=512 && datwr<768 )

                                    {

                                    e1=2;

                                    e2=datwr-512;

                                    }

 

                                    else

                                    {

                                    e1=3;

                                    e2=datwr-768;

                                    }

 

                        EEPROM_write(addr,e1);

                                    addr++;

                                    EEPROM_write(addr,e2);

                                   

                                    LCDcommand(0x01);

                                    LCDcommand(0x80);

                                    LCDdisplay("EEPROM Check/");

                                    _delay_ms(10);

                                                                                                           

                                    f2=EEPROM_read(addr);

                                    addr--;

                                    f1=EEPROM_read(addr);

                                   

                        /*         LCDcommand(0x01);

                                    LCDcommand(0x80);

                                    numberdisplay(f1);

                                    LCDcommand(0x14);

                                    numberdisplay(f2);

                                    LCDcommand(0x01);

*/

                                                if(f1 == 0)

                                                {

                                                   f2=f2;

                                                }

 

                                                else if(f1== 1)

                                                {

                                                            f2=f2+256;

                                                }

 

                                                else if(f1 == 2)

                                                {

                                                            f2= f2+512;

                                                }

 

                                                else

                                                {

                                                            f2=f2+768;

                                                }

 

                                    dateeprom=f2;                

 

                                    LCDcommand(0xC0);

                                    numberdisplay(addr);

                                    LCDcommand(0x14);

                                    numberdisplay(dateeprom);

                                    _delay_ms(50);

                        }

           

                        e=e+6;

                        LCDcommand(0x01);

                        LCDcommand(0x80);

        LCDdisplay("Writing Done/");

                        LCDcommand(0x01);

                        LCDcommand(0x80);

                        _delay_ms(500);

           

                       

           

 

                        PORTD ^= 1 << PIND4;

                                                           

                        if(bit_is_clear(PIND, 4))

                        {         

                                    LCDcommand(0x01);

                                    LCDcommand(0x80);

                                    LCDdisplay("Continue Scan/");

                                    _delay_ms(400);

                                    continue;

                        }

                        else

                        {         

                                    return 0;

                        }

 

                        if(i== 25)

                        {

                        return 0;

                        }

            }

            return 0;

}

 

int lrn()

{ 

int dateeprom; 

            mode=0;

            LCDcommand(0x80);

            LCDcommand(0x01);

            LCDdisplay("Learn command/");

            speaker("Larrn/");

            speaker("command/");

            _delay_ms(600);

                       

            e=0;

                                                           

            for(i=0; i<6; i++)

            {

                        LCDcommand(0x80);

                        LCDcommand(0x01);                           //first line

                        LCDdisplay("Do Gesture for/");

                        LCDcommand(0xC0);

                        for(f=0;f<6;f++)

                        {

                        dwrd[f]=gestures[i][f];

                        }

                        LCDdisplay(dwrd);

                        LCDdisplay(dwrd);

                        speaker("Doo/");

                        speaker("gesture/");

                        speaker("for/");

 

                        speaker(dwrd);

 

                        ADCinitialize();

 

            /*         LCDcommand(0x01);

                        LCDcommand(0x80);

                        LCDdisplay("Scan Started/");

                        _delay_ms(10);

 

            */

                        ADCscan();

            /*         LCDinitialize();

                        LCDdisplay("division/");

                        LCDcommand(0xC0);

           

                        for(i=0;i<3;i++)

                        {

                                    numberdisplay(avgpos[i]);

                                    LCDcommand(0x14);

                        }

 

                        _delay_ms(10);

                        LCDcommand(0x01);

                        LCDcommand(0x80);

                        LCDdisplay("Scanning Done/");

                        _delay_ms(10);

 

                        */

 

                        LCDcommand(0x01);

                        LCDcommand(0x80);

                        LCDdisplay("Writing Memory/");

                        _delay_ms(600);

                        LCDcommand(0xC0);

 

                        for(z=0;z<3;z++)

                        {

                                    numberdisplay(avgpos[z]);

                                    LCDcommand(0x14);

                        }

                        _delay_ms(1000);

 

                        int t=0;

                        e=300;

                        for(d=0;d<6;d=d+2)

                        {

                                    datwr=avgpos[t];

                                    t++;

                                    addr=e+d;

 

                                    if(datwr>=000 && datwr<256 )

                                    {

                                    e1=0;

                                    e2=datwr;

                                    }

 

                                    else if(datwr>=256 && datwr<512 )

                                    {

                                    e1=1;

                                    e2=datwr-256;

                                    }

 

                                    else if(datwr>=512 && datwr<768 )

                                    {

                                    e1=2;

                                    e2=datwr-512;

                                    }

 

                                    else

                                    {

                                    e1=3;

                                    e2=datwr-768;

                                    }

 

                        EEPROM_write(addr,e1);

                                    addr++;

                                    EEPROM_write(addr,e2);

                                   

                                    LCDcommand(0x01);

                                    LCDcommand(0x80);

                                    LCDdisplay("EEPROM Check/");

                                    _delay_ms(10);

                                                                                                           

                                    f2=EEPROM_read(addr);

                                    addr--;

                                    f1=EEPROM_read(addr);

                                   

                        /*         LCDcommand(0x01);

                                    LCDcommand(0x80);

                                    numberdisplay(f1);

                                    LCDcommand(0x14);

                                    numberdisplay(f2);

                                    LCDcommand(0x01);

*/

                                                if(f1 == 0)

                                                {

                                                   f2=f2;

                                                }

 

                                                else if(f1== 1)

                                                {

                                                            f2=f2+256;

                                                }

 

                                                else if(f1 == 2)

                                                {

                                                            f2= f2+512;

                                                }

 

                                                else

                                                {

                                                            f2=f2+768;

                                                }

 

                                    dateeprom=f2;                

 

                                    LCDcommand(0xC0);

                                    numberdisplay(addr);

                                    LCDcommand(0x14);

                                    numberdisplay(dateeprom);

                                    _delay_ms(50);

                        }

           

                        e=e+6;

                        LCDcommand(0x01);

                        LCDcommand(0x80);

        LCDdisplay("Writing Done/");

                        LCDcommand(0x01);

                        LCDcommand(0x80);

                        _delay_ms(500);

           

                        PORTD ^= 1 << PIND4;

                                                           

                        if(bit_is_clear(PIND, 4))

                        {         

                                    LCDcommand(0x01);

                                    LCDcommand(0x80);

                                    LCDdisplay("Continue Scan/");

                                    _delay_ms(400);

                                    continue;

                        }

                        else

                        {         

                                    return 0;

                        }

 

                        if(i== 6)

                        {

                        return 0;

                        }

            }

            return 0;

}         

 

int work()

{

            mode=1;         

            LCDcommand(0x80);

            LCDcommand(0x01);

            LCDdisplay("Work Mode/");

           

            speaker("Work/");

            speaker("mode/");

            _delay_ms(600);

 

            LCDcommand(0x80);

            LCDcommand(0x01);

            LCDdisplay("Press Start..../");

 

            speaker("Start/");

            speaker("Gesture/");

            _delay_ms(600);

 

            PORTD ^= 1 << PIND6;

                       

            if(bit_is_clear(PIND, 6))

            {

                        strt_chck();

            }

            else

            {

                        if(bit_is_clear(PIND, 5))

                        {

                                    work();

                        }

                        else

                        {

                                    LCDcommand(0x80);

                                    LCDcommand(0x01);

                                    LCDdisplay("Exiting Workmode/");

                                    _delay_ms(400);

                                    return 0;

                        }

            }

            return 0;

}

 

int strt_chck()

{

            PORTD ^= 1 << strt;                            //Checking button status

            if (bit_is_clear(PIND, 6))         //Check with button pressed

            {         

                        /*LCDcommand(0x01);

                        LCDcommand(0x80);

                        LCDdisplay("Scan Started/");

                        _delay_ms(10);

                        */

                        ADCinitialize();

                        ADCscan();

 

                        LCDcommand(0x01);

                        LCDcommand(0x80);

                        LCDdisplay("Work-Scan Done/");

                        _delay_ms(600);

                       

                        if (flagcmd==1)

                        {

                        srch();

                        }

                        else

                        {                                             

                        searchletter();

                        compwrd[z]='/';

                        }

                                                                        //give end of word to it

                                    LCDcommand(0x01);

                                    LCDcommand(0x80);

                                    LCDdisplay("Word is=");

                                    LCDcommand(0xC0);

                                    LCDdisplay(compwrd);

                                    _delay_ms(1000);

                                                           

                        if(!(bit_is_clear(PIND, 6)))

                        {

                                    LCDcommand(0x01);

                                    LCDcommand(0x80);

                                    LCDdisplay("Exit Scanning/");

                                    _delay_ms(600);

 

                                    LCDcommand(0x01);

                                    LCDcommand(0x80);

                                    LCDdisplay("final Word is=");

                                    LCDcommand(0xC0);

                                    LCDdisplay(compwrd);

                                    _delay_ms(1000);

                                    speaker(compwrd);

                                    word_end();

                                    z=0;                         //for transmitting word to speakjet

                                    while(bit_is_clear(PIND, 5));

                                    work();

                        }

                        else

                        {

                                    strt_chck();

                        }

           

            }

            else

            {

                        strt_chck();

            }

            return 0;

}         

 

int word_end()

{

             PORTB &= ~(1<

             while(!(UCSRA & (1<

             UDR=0x0D;                                                   //command to speak at end

     while(PORTA & (1<

     PORTB |= (1<

 

             return 0;

}         

 

int command()

{

            LCDinitialize();

            LCDdisplay("command mode/");

            _delay_ms(800);

            flagcmd=1;

}

 

 

int ADCinitialize()

{             

            /*         ADCSRA |= 1<< ADEN;

                        ADCSRA |= 1<< ADPS2;

                        ADMUX |= 1<< REFS0;

              //ADCSRA |= 1<< ADIE;

     */

 

             ADCSRA=0x87;

 

              return 0;

}

           

int ADCscan()

{

                        int q;

                        PORTB |= (1<

 

                        LCDinitialize();

                        LCDdisplay("Scanning..../");

 

                        for(q=0;q<10;q++)

                        {

                        flash();

                        }

// for sensor display only

/*

while(1)

{

            _delay_ms(50);

            LCDinitialize();

                        for(i=0;i<3;i++)

       {

 

 

                        ADMUX=0x40+i;

                                    /*         numberdisplay(ADMUX);

                                                LCDcommand(0x01);

                                                LCDcommand(0x80);

 

                                    */

                                    /*         _delay_ms(2);

                                                ADCSRA |= 1<< ADSC;     //start another conversion

                                               

                                                while(ADIF == '0');

                                               

                                                Ain= ADCL;

                                                Aout = ADCH;            //get the sample 

                                               

                                    /*                     numberdisplay(Ain);

                                                LCDcommand(0xC0);

                                                numberdisplay(Aout);    //get the sample

                              

                                       _delay_ms(10);

                                                LCDcommand(0x01);

                                                LCDcommand(0x80);

                                               

            */

/*

                                                if(Aout == 0)

                                                {

                                                   Ain=Ain;

                                                }

 

                                                else if(Aout== 1)

                                                {

                                                            Ain=Ain+256;

                                                }

 

                                                else if(Aout == 2)

                                                {

                                                            Ain= Ain+512;

                                                }

 

                                                else

                                                {

                                                            Ain=Ain+768;

                                                }

           

                LCDcommand(0x14);

                                   

                                               

                                                numberdisplay(Ain);

       }

                                               

}

 

*/    

 

                        for (j=0; j < 6; j++)

                        {

            LCDcommand(0x01);

                                    LCDcommand(0x80);

 

                                    for (i=0;i < 3;i++)

                                    {  

                                                ADMUX=0x40+i;

                                    /*         numberdisplay(ADMUX);

                                                LCDcommand(0x01);

                                                LCDcommand(0x80);

 

                                    */         _delay_ms(2);

                                                ADCSRA |= 1<< ADSC;     //start another conversion

                                               

                                                while(ADIF == '0');

                                               

                                                Ain= ADCL;

                                                Aout = ADCH;            //get the sample 

                                               

                                    /*                     numberdisplay(Ain);

                                                LCDcommand(0xC0);

                                                numberdisplay(Aout);     //get the sample

                              

                                       _delay_ms(10);

                                                LCDcommand(0x01);

                                                LCDcommand(0x80);

                                               

            */

 

                                                if(Aout == 0)

                                                {

                                                   Ain=Ain;

                                                }

 

                                                else if(Aout== 1)

                                                {

                                                            Ain=Ain+256;

                                                }

 

                                                else if(Aout == 2)

                                                {

                                                            Ain= Ain+512;

                                                }

 

                                                else

                                                {

                                                            Ain=Ain+768;

                                                }

 

                                                pos[j][i]=Ain;

                                   

                                    /*        

                                                numberdisplay(i);

                                                numberdisplay(j);

                                                LCDcommand(0xC0);

                                                numberdisplay(Ain);     //get the sample

                              

                                       _delay_ms(10);

                                                LCDcommand(0x01);

                                                LCDcommand(0x80);

*/

 

                                    }

 

                        } 

            /*         LCDcommand(0x01);

                        LCDcommand(0x80);

                        LCDdisplay("pos=/");

                        LCDcommand(0x01);

                        LCDcommand(0x80);

                       

                        for (j=0; j < 6; j++)

                        {

            LCDinitialize();

                                    LCDdisplay("row/");

                                    numberdisplay(j);

                                    LCDcommand(0xC0);       

                                   

                                    for (i=0;i < 3;i++)

                                    {         

                                                numberdisplay(pos[j][i]);

                                                LCDcommand(0x14);

                                    }

           

            _delay_ms(10);

                        }

 

    */

                        LCDcommand(0x01);

                        LCDcommand(0x80);

                        LCDdisplay("Scan Done/");

                        _delay_ms(600);

                       

                        PORTB &= ~(1<

 

                        for (i = 0; i < 3; i++)

        {

                                    sumpos[i] = 0;

        }

                                   

            /*         LCDcommand(0x01);

                        LCDcommand(0x80);

                        LCDdisplay("Creating Sumpos/");

                        _delay_ms(10);

                        LCDcommand(0x01);

                        LCDcommand(0x80);

                        LCDdisplay(sumpos);

                        _delay_ms(10);*/

 

          

        for (i = 1; i < 6; i++)

                        {

                                    sumpos[0] = sumpos[0] + pos[i][0];

                                    sumpos[1] = sumpos[1] + pos[i][1];

                                    sumpos[2] = sumpos[2] + pos[i][2];

        }

            /*         LCDcommand(0x01);

                        LCDcommand(0x80); 

                        LCDdisplay("Sumpos Addition/");

                        _delay_ms(10);

            /*         LCDcommand(0x01);

                        LCDcommand(0x80); 

           

                        for(i=0;i<3;i++)

                        {

                                    numberdisplay(sumpos[i]);

                                    LCDcommand(0x14);

                        }

                        _delay_ms(10);

           

            */

                        LCDcommand(0x01);

                        LCDcommand(0x80);

 

                                    for (i = 0; i < 3; i++)

                                    {

                                                avgpos[i] =((sumpos[i])/5);

                                                _delay_ms(10);

                                    }

                       

 

                       

                       

                                   

                                                for (i = 0; i < 3; i++)

                                    {

                                                avgpostest[i] =((sumpos[i])/5);

                                                _delay_ms(10);

                                    }

                           

                       

                        return 0;

}

 

int searchletter()

{

            unsigned int test;

            int flag=0;

            int count;

            int alphano;

            e=0;

 

            LCDcommand(0x01);

            LCDcommand(0x80);

            LCDdisplay("Searching /");

            LCDcommand(0xC0);

            LCDdisplay("Database /");

            _delay_ms(500);

            alphano=-1;

 

            LCDinitialize();

            LCDdisplay("Work data:/");

            LCDcommand(0xC0);

            for(i=0;i<3;i++)

            {

            numberdisplay(avgpostest[i]);

            LCDcommand(0x14);

 

            }

            _delay_ms(1000);

            LCDcommand(0x01); 

 

            for(c=0;c<7;c++)

            {         

                        alphano++;

                        count = 0;

 

                        int y=0;

 

                        if(flagcmd==1)

                        {

                        e=300;

                        }

                        else

                        {

                        e=0;

                        }

                        for(d=0;d<6;d=d+2)

                        {

                            addr=e+d;

 

 

                                    f1=EEPROM_read(addr);

                                    addr++;

                                    f2=EEPROM_read(addr);

                                   

                        /*         LCDcommand(0x01);

                                    LCDcommand(0x80);

                                    numberdisplay(f1);

                                    LCDcommand(0x14);

                                    numberdisplay(f2);

                                    LCDcommand(0x01);

*/

                                                if(f1 == 0)

                                                {

                                                   f2=f2;

                                                }

 

                                                else if(f1== 1)

                                                {

                                                            f2=f2+256;

                                                }

 

                                                else if(f1 == 2)

                                                {

                                                            f2= f2+512;

                                                }

 

                                                else

                                                {

                                                            f2=f2+768;

                                                }

 

                                    test=f2;

/*

                                    LCDcommand(0x01);

                                    LCDcommand(0x80);

                                    numberdisplay(f2);

                                    LCDcommand(0x01);

 

                                                LCDcommand(0x01);

                                    LCDcommand(0x80);

                                    numberdisplay(avgpostest[y]);

                                    LCDcommand(0x01);

*/

 

                                    if((avgpostest[y] > (test-10)) && (avgpostest[y] < (test+10)) || (avgpostest[y] == (test)))

                                    {

                                                count=1;

                                                flag=1;            

                                    }

                                    else

                                    {

                                                count=0;

                                                d=6;

                                    }

 

                                    y++;

              

                        }

 

                        if(count==1)

                        {

                                   

                                    LCDcommand(0x01);

                                    LCDcommand(0x80);

                                    LCDdisplay("Match Found/");

 

                                    if(flagcmd==1)

                                    {

                                    LCDcommand(0xC0);

                                    LCDdisplay("word is/");

                                    LCDcommand(0x14);

                                    for(f=0;f<6;f++)

                                    {

                                    compwrd[f]=gestures[alphano][f];

                                    }

                                    LCDdisplay(gestures[alphano]);

                                   

                                    _delay_ms(600);

                                    }

                                   

                                    else

                                    {

                                    LCDcommand(0xC0);

                                    LCDdisplay("Alphabet is/");

                                    LCDcommand(0x14);

 

                                    compwrd[z]=alphabet[alphano];

                                    _delay_ms(10);

                                    z++;

                                    dataport=alphabet[alphano];

                                    wrdata();

                                    _delay_ms(600);

                                    }

                        }

 

                        e=e+6;

 

    }

                        if(flag==0)

                        {

                        LCDcommand(0x01);

                                    LCDcommand(0x80);

                                    LCDdisplay("Match not Found/");

                                    _delay_ms(400);

                        }

 

            return 0;

           

}

           

 

ISR(int0_vect)

            {

                        letter++;

           

            }

           

 

void usart_init()

{

UCSRB |= (1 << RXEN) | (1 << TXEN);  

// Turn on the transmission and reception circuitry

UCSRC |= (1 << URSEL) | (1<

// Use 8-bit character sizes

 

UBRRH = (BAUD_PRESCALE >> 8); // Load upper 8-bits of the baud rate value..

// into the high byte of the UBRR register

UBRRL = BAUD_PRESCALE; // Load lower 8-bits of the baud rate value..

// into the low byte of the UBRR register

 

}

 

void speaker(unsigned char data[])

{

             int i;

             PORTB &= ~(1<

             

//          LCDcommand(0x01);

//          LCDcommand(0x80);

//          LCDdisplay("speak busy/");

//          _delay_ms(100);

 

//          while(PINA.4 == '0');

           

             for(i=0;i< sizes(data);i++)

                         {

                                    usart_putch(data[i]);

                 }

                        usart_putch(0x0D); // send data back to the PC (HyperTerminal)

                                    _delay_ms(1000);

                       

           

                // while(PORTA & (1<

                 PORTB |= (1<

}

 

 

int sizes(unsigned char disp[])

{

            for(i=0;i<16;i++)

            {

                        if(disp[i] == '/')

                        {

                                    return (i-1);

                }

            }

}

 

void usart_putch(unsigned char send)

{

while ((UCSRA & (1 << UDRE)) == 0); // Do nothing until UDR is ready..

// for more data to be written to it

UDR = send; // Send the byte

}

 

unsigned int usart_getch()

{

while ((UCSRA & (1 << RXC)) == 0);

// Do nothing until data have been received and is ready to be read from UDR

return(UDR); // return the byte

}

 

void USART_Flush( void )

{

unsigned char dummy;

while ( UCSRA & (1<

}

 

           

int LCDinitialize()

{

 

            dataport = 0x38; //initialize LCD 2 lines, 5x7 matrix

 

            wrcomm(); //Right the command byte to command register

 

            dataport = 0x01; //Clear LCD

 

            wrcomm(); //Right the command byte to command register

 

            dataport = 0x06; //Display on Cursor Blinking

 

            wrcomm();

 

            dataport = 0x0E; //Display on Cursor Blinking

 

            wrcomm(); //Right the command byte to command register

 

            dataport = 0x80; //Cursor at line 1, position 1

 

            wrcomm(); //Right the command byte to command register

 

            //dataport = 0x1C; //Shift Entire Display To Right

 

            //wrcomm(); //Right the command byte to command register

 

 

            return 1;

 

}

 

int LCDcommand(char cmd)

{

            dataport= cmd;

            wrcomm();

}

 

/*Sending Data To LCD Display*/

 

 

int LCDdisplay(unsigned char disp[])

{

            int i,len;

 

            len=size(disp);

            for(i = 0; i < len; i++)

            {

                        dataport = disp[i];

                        wrdata();

            }

            return 1;

 

}

 

/* size of array for display */

int size(unsigned char disp[])

{

            for(i=0;i<16;i++)

            {

                        if(disp[i] == '/')

                        {

                                    return (i);

                }

            }

}

 

/*Righting the command byte to command register*/

 

int wrcomm(void)

{

 

            commport &= ~(1 << rs); //Setting RS = 0, selecting command register

 

            commport &= ~(1 << wr); //Setting RW = 0

 

            commport |= (1 << en); //EN = 1

 

            commport &= ~(1 << en); //EN = 0,high to low pulse on Enable pin

 

            _delay_ms(5); //10ms delay

 

            return 1;

 

}

 

 

/*Righting the Data byte to Data register*/

 

int wrdata(void)

{

 

            commport |= (1 << rs); //Setting RS = 1, selecting data register

 

            commport &= ~(1 << wr); //Setting RW = 0

 

            commport |= (1 << en); //EN = 1

 

            commport &= ~(1 << en); //EN = 0, high to low pulse on Enable pin

 

            _delay_ms(5) ; //10ms delay

 

            return 1;

}

 

 

int numberdisplay(int numb)

{  

    int dtc,dtcm,dtmm,dtm,dtn,dtl,dtv;

            dtv=numb/1000;

 

            dtcm=numb%1000;

            dtc=dtcm/100;

 

            dtmm=dtcm%100;

            dtm=dtmm/10;

 

            dtn=dtmm%10;

                       

            dataport=numlcd[dtv];

            wrdata();

            dataport=numlcd[dtc];

            wrdata();

            dataport=numlcd[dtm];

            wrdata();

            dataport=numlcd[dtn];

            wrdata();

            return 0;

 

}

 

 

void EEPROM_write(int add, int dat)

{

            while(EECR & (1<

 

            EEAR=add;

            EEDR=dat;

            EECR |= (1<

            EECR |= (1<

}

 

 

 

int EEPROM_read(int add)

{

            while(EECR & (1<

 

            EEAR=add;

            EECR |= (1<

 

            return EEDR;

}

 

int led_initial()  //Will be used to display led blink before Mode selection

{

                        //All LEDs ON

                        PORTB &= ~(1<

                        _delay_ms(500);                      // Delay

                        PORTB &= ~(1<

                        _delay_ms(500);                      // Delay

                                    PORTB &= ~(1<

                        _delay_ms(500);                      // Delay

                        PORTB &= ~(1<

                        _delay_ms(500);                      // Delay

           

 

                        _delay_ms(500);                      // Delay

                       

                                                                        //All LEDs OFF

                        PORTB |= (1<

                        PORTB |= (1<

                        PORTB |= (1<

                        PORTB |= (1<

 

            return 0;

}

 

 

int flash()

{

 

            _delay_ms(50);

            LCDinitialize();

 

 

                        for(i=0;i<3;i++)

       {

                                                ADMUX=0x40+i;

                                    //          numberdisplay(ADMUX);

                                    //          LCDcommand(0x01);

                                    //          LCDcommand(0x80);

 

                                   

                                                _delay_ms(2);

                                                ADCSRA |= 1<< ADSC;       //start another conversion

                                               

                                                while(ADIF == '0');

                                               

                                                Ain= ADCL;

                                                Aout = ADCH;              //get the sample 

                                               

                        /*                     numberdisplay(Ain);

                                                LCDcommand(0xC0);

                                                numberdisplay(Aout);           //get the sample

                              

                                       _delay_ms(10);

                                                LCDcommand(0x01);

                                                LCDcommand(0x80);

                        */                    

           

                                                if(Aout == 0)

                                                {

                                                   Ain=Ain;

                                                }

 

                                                else if(Aout== 1)

                                                {

                                                            Ain=Ain+256;

                                                }

 

                                                else if(Aout == 2)

                                                {

                                                            Ain= Ain+512;

                                                }

 

                                                else

                                                {

                                                            Ain=Ain+768;

                                                }

                                                numberdisplay(Ain);

                                                LCDcommand(0x14);

       }                                      

}

###

 

 


Circuit Diagrams

Sign-Language-Glove-Synthesizer


Filed Under: Electronic Projects
Tagged With: microcontroller, voice, voice synthesizer
 

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • Adjustable 0 to 30V 2A DC Power Supply Circuit (Part 1/13)
  • Adjustable +/- 1.25V to +/-22V 1A Power Supply Circuit (Part 2/13)
  • Adjustable 0 to 15V 1A Mini Power Supply (Part 3/13)
  • Constant 12V Power Supply for LED Circuits (Part 4/13)
  • Constant +/-9V DC Symmetrical Power Supply Circuit (Part 5/13)
  • Making a Circuit Breaker (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

“ee

“ee

“ee

“ee

“ee

“ee

Recent Articles

  • STMicroelectronics and MACOM announce successful RF GaN-on-Si prototypes
  • Infineon expands its CoolSiC portfolio
  • STMicroelectronics and AWS collaborate for secure IoT connections
  • Pet feeding system using WhatsApp (protocol bridging with MQTT)
  • STMicroelectronics launches new MDmesh MOSFETs

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd ldr led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics Research robot samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • RFIC LNA cascode base and ground layout problem
  • Unable to launch virtuoso: libvisadev.so error
  • DIY test leads - source for lead ends?
  • P-Channel MOSFET always on
  • Space Vector PWM Help Needed

RSS Electro-Tech-Online.com Discussions

  • Adding Current Limit Feature to a Buck Converter
  • 24v dc relays not de-energising
  • How do I test amplifier speaker output polarity?
  • How to get lots of PCBs made cheap?
  • XOR Gate Circuit From Diodes
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
  • Women in Engineering