Free Essay

Eye Blink Sensor

In:

Submitted By suniash
Words 694
Pages 3
#include<reg51F.h> // include P89V51rd2 SFR header file sbit LCD_RS = P1^6; // lcd command word/!data word select (register select) pin sbit LCD_RW = P1^5; // lcd read/!write pin (normally conn to gnd) sbit LCD_E = P1^7; // lcd enable pin sbit ROW4 = P0^7; // row 4 sbit ROW3 = P0^6; // row 3 sbit ROW2 = P0^5; // row 2 sbit ROW1 = P0^4; // row 1 sbit COL4 = P0^3; // col 4 sbit COL3 = P0^2; // col 3 sbit COL2 = P0^1; // col 2 sbit COL1 = P0^0; // col 1 bdata char flag; sbit keyflg = flag^0; // to indicate any key is pressed or not sbit sec_flg = flag^1; // 360 millisecond flag for key scanning

unsigned char data word[16]; // array defined of char type length 16 bytes unsigned char data i, cdelay; unsigned char data cw, dw, key,cursor; unsigned int data delay, sec; unsigned char code enterword[] = "* Enter number *";

void lcd_cw(cw) // lcd command word write { LCD_RS = 0; // commmand word select LCD_E = 1; P2 = cw; LCD_E = 0; for( delay=0; delay<=250; delay++); } void lcd_dw(dw) // lcd data word write { LCD_RS = 1; // data word select LCD_E = 1; P2 = dw; LCD_E = 0; for( delay=0; delay<=250; delay++); } void lcd_init() // lcd initialisation { lcd_cw(0x38); // for( delay=0; delay<=250; delay++); lcd_cw(0xe); // for( delay=0; delay<=250; delay++); lcd_cw(0x6); // for( delay=0; delay<=250; delay++); lcd_cw(0x1); // for( delay=0; delay<=250; delay++); lcd_cw(0x80); // for( delay=0; delay<=250; delay++); } disp_enterword() // { lcd_cw(0xc0); for(i=0; i<16; i++) { dw = enterword[i]; lcd_dw(dw); } } keyscan() // in normal operation execute this loop in every 2 milli seconds {

P0 = 0xff; ROW1 = 0; if( COL1 == 0 ) // D key { keyflg = 1; key = 'D'; } else if( COL2 == 0 ) // E key { keyflg = 1; key = 'E'; } else if( COL3 == 0 ) // F key { keyflg = 1; key = 'F'; } else if( COL4 == 0 ) // 0 key { keyflg = 1; key = '0'; } else { ROW2 = 0; if( COL1 == 0 ) // 9 key { keyflg = 1; key = '9'; } else if( COL2 == 0 ) // A key { keyflg = 1; key = 'A'; } else if( COL3 == 0 ) // B key { keyflg = 1; key = 'B'; } else if( COL4 == 0 ) // C key { keyflg = 1; key = 'C'; } else { P0 = 0xff; ROW3 = 0; if( COL1 == 0 ) // 5 key { keyflg = 1; key = '5'; } else if( COL2 == 0 ) // 6 key { keyflg = 1; key = '6'; } else if( COL3 == 0 ) // 7 key { keyflg = 1; key = '7'; } else if( COL4 == 0 ) // 8 key { keyflg = 1; key = '8'; } else { P0 = 0xff; ROW4 = 0; if( COL1 == 0 ) // 1 key { keyflg = 1; key = '1'; } else if( COL2 == 0 ) // 2 key { keyflg = 1; key = '2'; } else if( COL3 == 0 ) // 3 key { keyflg = 1; key = '3'; } else if( COL4 == 0 ) // 4 key { keyflg = 1; key = '4'; } } } } if( keyflg ) // if any new alphabet is pressed { keyflg = 0; ROW1 = 1; ROW2 = 1; ROW3 = 1; ROW4 = 1; dw = key; lcd_dw(dw); lcd_cw(0x80+cursor); // shift cursor by 1 word[cursor] = key; // store to display that alphabet/muneric to the lcd cursor++; if(cursor==16) // claer all row of lcd if line full { for( cdelay=0; cdelay<16; cdelay++ ) { lcd_cw(0x80+cdelay); lcd_dw(0x20); // clear command for lcd } cursor=0; lcd_cw(0x80); // shift cursor by 1 } lcd_cw(0x80+cursor); // shift cusor by 1 for( cdelay=0; cdelay<100; cdelay++ ); } } void main() { LCD_RW = 0; // set lcd in write mode lcd_init(); // initiallize lcd P0 = 0xff; // set port0 as an input port TMOD = 0x01; // timer0 in mode1 16 bit TH0 = 0xF8; // set higher reg of timer0 with 0xf8 TL0 = 0xCD; // set lower reg of timer0 with 0xcd for generating // 2msec delay at 11.0592 MHZ TR0 = 1; // start timer0 IE = 0x82; // set globle enable & timer0 enable pins disp_enterword(); // displays " Enter word " to lcd lcd_cw(0x80); // call the cursor at location 0x80 i.e. 1st line 1st position cursor = 0; // clear cursor position counter key = 0xff; // set key register while(1) { if( sec_flg) // this flag will set in every 360 milli second { sec_flg = 0; // clear flag keyscan(); // call key scan function } } } void tim0() interrupt 1 // 2mS timer { TH0 = 0xF8; // reload th0 by 0xf8 TL0 = 0xCD; // relaod tl0 by 0ccd if( sec++ >160) { sec = 0; // clear sec register sec_flg = 1; // 360ms flg } }
back.

Similar Documents

Free Essay

Eye Blink Sensor

...EYE BLINK SENSOR & ACCIDENT PREVENTION Abstract: Description: The Objective of this project is to develop a system to keep the vehicle secure and protect it by the occupation of the intruders. Scope: We can’t take care of ours while in running by less conscious. If we done all the vehicles with automated security system that provides high security to driver, also gives alarm. Function: This project involves measure and controls the eye blink using IR sensor. The IR transmitter is used to transmit the infrared rays in our eye. The IR receiver is used to receive the reflected infrared rays of eye. If the eye is closed means the output of IR receiver is high otherwise the IR receiver output is low. This to know the eye is closing or opening position. This output is give to logic circuit to indicate the alarm. This project involves controlling accident due to unconscious through Eye blink. Here one eye blink sensor is fixed in vehicle where if anybody looses conscious and indicate through alarm. CONTENTS 1. Introduction ……....……………….………………………………..……6 2. System Model…….……………………………………………….…….7 2.1 Basic Model of The System …….…..……………………..…….7 2.2 Circuit Diagram …….……………………………………..……...8 2.3 Parts of The System …………………………...………..………..9 2.3.1 IR Sensing Circuit………..…….………..……………….9 2.3.2 Alarm Circuit……..………………………………………11 2.3.3...

Words: 3045 - Pages: 13

Free Essay

Electronics and Communicatio

...Vehicle Accident Prevention Using eye Blink Sensor Abstract: Now a day’s accidents are increasing at a large pace, and various technologies are being introduced to reduce the accidents. In this project we provide means of accident prevention using eye blink wherein the vehicle is stopped immediately and intimated wherever needed. In this project we have two sections. One is transmitter section which is located in the vehicle and another one is Receiver section located in remote place (Police station, near ones, etc). In the transmitter section the eye blink sensor is placed near the eye to sense the blink count and this information is transmitted in the form of pulses and is given to the Microcontroller. The Microcontroller uses this information to compare with the normal eye blink programmed in the chip and if any abnormal situation arises the vehicle is stopped with an alarm indication, this operation is enabled by means of the driver circuit connected to the vehicle motor and the signal is transmitted via RF-transmitter at the frequency of 433.92 MHz. In the Receiver side the transmitted signal is received and the signal is decoded and given to the Microcontroller, which uses this information for displaying the alert message in the LCD as programmed, simultaneously a buzzer alert is given. Block Diagram Transmitter[pic] Receiver [pic] HARDWARE REQUIREMENTS • Microcontroller Unit and Power Supply • LCD...

Words: 1216 - Pages: 5

Premium Essay

Driverless Cars

...traveled congested streets and popular intersections. According to predictions driverless cars could be a reality by 2020. Google is still in the beginning stages of making this project official because there is a lot of barriers that have to get through, but confidently state driverless cars will become available in the near future. Google have at least 10 different prototypes that they use as practice cars. Some examples of these cars are the Toyota Prius and the Lexus SL600h. The basic designs of this project consist of a car with a rotating sensor on the top that spins 360 degrees, to create a 3D map of the cars location. A sensor located on the left rear wheel that tracks the car movements and locates it on the map. There is a video camera on the windshield by the rear mirror that can locate people, bicyclist, traffic lights and obstacles on the road. Front and back radar sensors that will locate distances between an object. A motion sensor which measures and reports on the vehicles velocity, orientation, and gravitational forces, a laser range that uses a laser beam to determine the distance between an object, and also a GPS. Normally you would be able to...

Words: 1457 - Pages: 6

Free Essay

Visual Communication Base

...My camera is Samsung pl20. Some key features are : * Compact body available in four stylish colors: Black, Sliver, Pink, and Tomato Red * 14-megapixel image sensor * 5x optical zoom lens * DIS system helps reduce blur in photos * Smart Auto 2.0 * Records 720p HD video  * Face and Blink detection * Smile Shot and Beauty Shot modes * In-camera Red-eye fix * Built-in Photo Help Guide * Li-ion battery pack Adjusting the exposure manually Depending on the intansity of the ambient light, your photos may be too bright or dark. In these cases, you can adjust the exposure to get a better photo. The color of your photo depends on the type and quality of the light source. If you want the color of your photo to be realistic, select a White Balance setting that is appropriate for the lighting conditions, such as Auto WB, Daylight, Cloudy, or Tungsten. Actually, I love these items and I use it very much because I can set my photo according to air conditions. 1- Auto WB 2- Tungsten 3- Daylight Exposure (Brightness) The amount of light that enters your camera determines the exposure. You can alter the exposure with shutter speed, aperture value, and ISO sensitivity. By altering the exposure, your photos will be darker or lighter. I always use this feature because sometimes because of weather, when I want to...

Words: 420 - Pages: 2

Premium Essay

Neurones - Gcse

...Q1.(a)     Diagram 1 shows the neurones and parts of the body involved in a response to touching a hot object. Diagram 1   A neurone is a nerve cell. Neurones carry impulses around the body. (i)      Draw a ring around the correct answer to complete each sentence.     | Neurone A is a | motor neurone.relay neurone.sensory neurone. |     | At point Y there is a tiny gap between two neurones called | an effector.a receptor.a synapse. | (2) (ii)     The hand touches a hot object. An impulse travels through the nervous system to the muscle (point X). The muscle moves the hand away from the hot object. What does the muscle do to move the hand away from the hot object? Tick () one box.   | contract | |   | relax | |   | stretch | | (1) (iii)    The action described in part (a) (ii) is a reflex action. How can you tell that this action is not a conscious action? Use information from the diagram. ............................................................................................................... ............................................................................................................... (1) (iv)    Reflex actions like this are useful. Explain why. ............................................................................................................... ............................................................................................................... ...........................................................................

Words: 3296 - Pages: 14

Free Essay

Paper

...communication or co-operative tasks in the same context as the physical dynamics. This is essential for three-term interaction, which aims at fusing physical and social interaction at fundamental levels. People naturally express themselves through facial gestures and expressions. Our goal is to build a facial gesture human-computer interface fro use in robot applications. This system does not require special illumination or facial make-up. By using multiple Kalman filters we accurately predict and robustly track facial features. Since we reliably track the face in real-time we are also able to recognize motion gestures of the face. Our system can recognize a large set of gestures (13) ranging from “yes”, ”no” and “may be” to detecting winks, blinks and sleeping. Chapter 1 ROLE OF HUMANOIDS 1. INTRODUCTION.: The field of humanoids robotics, widely recognized as the current challenge for robotics research, is attracting the interest of many research groups worldwide. Important efforts have been devoted to the objective of developing humanoids and impressive results have been produced, from the technological point of view, especially for the problem of biped walking. In Japan, important humanoid projects, started in the last decade, have been carried on by the Waseda University and by Honda Motor Co. The Humanoid Project of the Waseda University, started in 1992, is a joint project of industry, government and academia, aiming at developing...

Words: 3654 - Pages: 15

Premium Essay

Nikon D5000

...DIGITAL CAMERA User's Manual En Where to Find It Find what you’re looking for from: i i i i i The Table of Contents Find items by function or menu name. ➜ 0 vi–xi The Q&A Index ➜ 0 ii–v Know what you want to do but don’t know the function name? Find it from the “question and answer” index. The Index Search by key word. ➜ 0 232–234 Error Messages Troubleshooting ➜ 0 221–223 If a warning is displayed in the viewfinder or monitor, find the solution here. ➜ 0 216–220 Camera behaving unexpectedly? Find the solution here. A For Your Safety Before using the camera for the first time, read the safety instructions in “For Your Safety” (0 xii). Help Use the camera’s on-board help feature for help on menu items and other topics. See page 13 for details. Digitutor “Digitutor”, a series of “watch and learn” manuals in movie form, is available from the following website: http://www.nikondigitutor.com/index_eng.html Q&A Index Table of Contents 0 ii 0 vi 0 1 X Introduction s Basic Photography and Playback x Framing Pictures in the Monitor (Live View) y Recording and Viewing Movies z More on Photography (All Modes) t P, S, A, and M Modes I More on Playback Q Connections o The Playback Menu i The Shooting Menu L Custom Settings g The Setup Menu u The Retouch Menu w Recent Settings / v My Menu n Technical Notes 0 27 0 41 0 49 0 53 0 79 0 115 0 131 0 146 0 148 0 153 0 165 0 174 0 190 0 193 i Q&A Index Find...

Words: 56385 - Pages: 226

Premium Essay

Nikon

...DIGITAL CAMERA User's Manual En Where to Find It Find what you’re looking for from: i i i i i The Table of Contents Find items by function or menu name. ➜ 0 iv–xi The Q&A Index ➜ 0 ii–iii Know what you want to do but don’t know the function name? Find it from the “question and answer” index. The Index Search by key word. ➜ 0 322–325 Error Messages Troubleshooting ➜ 0 305–308 If the camera displays a warning, find the solution here. ➜ 0 299–304 Camera behaving unexpectedly? Find the solution here. A For Your Safety Before using the camera for the first time, read the safety instructions in “For Your Safety” (0 xii–xvii). Help Use the camera’s on-board help feature for help on menu items and other topics. See page 18 for details. Digitutor “Digitutor”, a series of “watch and learn” manuals in movie form, is available from the following website: http://www.nikondigitutor.com/index_eng.html Q&A Index Table of Contents 0 ii 0 iv 0 1 X Introduction s Basic Photography and Playback x Live View y Recording and Viewing Movies # P, S, A, and M Modes $ User Settings: U1 and U2 Modes k Release Mode d Image Recording Options N Focus S ISO Sensitivity Z Exposure/Bracketing r White Balance J Image Enhancement l Flash Photography t Other Shooting Options I More on Playback Q Connections U Menu Guide n Technical Notes 0 35 0 49 0 57 0 67 0 75 0 77 0 85 0 91 0 101 0 105 0 117 0 131 0 143 0 151 0 163 0 179 0 195...

Words: 76513 - Pages: 307

Free Essay

Arduino

...Arduino Cookbook Arduino Cookbook Michael Margolis Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo Arduino Cookbook by Michael Margolis Copyright © 2011 Michael Margolis and Nicholas Weldin. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com. Editors: Simon St. Laurent and Brian Jepson Production Editor: Teresa Elsey Copyeditor: Audrey Doyle Proofreader: Teresa Elsey Indexer: Lucie Haskins Cover Designer: Karen Montgomery Interior Designer: David Futato Illustrator: Robert Romano Printing History: March 2011: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Arduino Cookbook, the image of a toy rabbit, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution...

Words: 90321 - Pages: 362

Free Essay

Haha

...Researchers Building a Computer Chip Based on the Human Brain - U... http://news.boisestate.edu/update/2013/08/14/research-team-building-a-... Skip to Main Content (#main-content) UPDATE Update (http://news.boisestate.edu/update/) Your source for campus news Researchers Building a Computer Chip Based on the Human Brain (http://news.boisestate.edu/update/files/2013/08/Memritor620x320.jpg) Today’s computing chips are incredibly complex and contain billions of nano-scale transistors, allowing for fast, high-performance computers, pocket-sized smartphones that far outpace early desktop computers, and an explosion in handheld tablets. Despite their ability to perform thousands of tasks in the blink of an eye, none of these devices even come close to rivaling the computing capabilities of the human brain. At least not yet. But a Boise State University research team could soon change that. Electrical and computer engineering faculty Elisa Barney Smith, Kris Campbell and Vishal Saxena are joining forces on a project titled “CIF: Small: Realizing Chip-scale Bio-inspired Spiking Neural Networks with Monolithically Integrated Nano-scale Memristors.” (http://news.boisestate.edu/update/files 1 of 3 3/15/2014 12:37 PM Researchers Building a Computer Chip Based on the Human Brain - U... http://news.boisestate.edu/update/2013/08/14/research-team-building-a-... /2013/08/PCB_image.png) Team members are experts in machine learning (artificial intelligence), integrated circuit design and...

Words: 780 - Pages: 4

Premium Essay

Traumatic Head Injury Research Paper

...the line of scrimmage in the blink of an eye. He runs across the middle of the field, and sees the ball zipping towards him. The ball enters his hands for a split second, but defenseless, he is hit by an opposing defender, resulting in the receiver lying flat on his back. The game clock is stopped, and the medical staff sprints to his aid. The defender runs back to his sideline, ecstatic that he made a big hit. The fifteen yard penalty and five thousand dollar fine are absolutely worth it to him for this ego-boosting hit, since his annual contract is...

Words: 1958 - Pages: 8

Free Essay

Samsung

...usage tips to avoid dangerous situations and ensure peak performance of your camera. Warning—situations that could cause injury to yourself or others Do not disassemble or attempt to repair your camera. This may result in electric shock or damage to the camera. Do not use your camera near flammable or explosive gases and liquids. This may cause a fire or explosion. Do not insert flammable materials into the camera or store these materials near the camera. This may cause a fire or electric shock. Do not handle your camera with wet hands. This may result in electric shock. Prevent damage to subjects’ eyesight. Do not use the flash in close proximity (closer than 1 m/3 ft) to people or animals. If you use the flash too close to your subject’s eyes, this can cause temporary or permanent eyesight damage. Keep your camera away from small children and pets. Keep your camera and all accessories out of the reach of small children and animals. Small parts may cause choking or serious injury if swallowed. Moving parts and accessories may present physical dangers as well. Do not expose the camera to direct sunlight or high temperatures for an extended period of time. Prolonged exposure to sunlight or extreme temperatures can cause permanent damage to your camera’s internal components. Avoid covering the camera with blankets or clothes. The camera may overheat, which may distort the camera or cause a fire. If liquid or foreign objects enter your camera, immediately disconnect the power source...

Words: 21963 - Pages: 88

Free Essay

Ausdrinks

...and usage tips to avoid dangerous situations and ensure peak performance of your camera. Warning—situations that could cause injury to yourself or others Do not disassemble or attempt to repair your camera. This may result in electric shock or damage to the camera. Do not use your camera near flammable or explosive gases and liquids. This may cause a fire or explosion. Do not insert flammable materials into the camera or store these materials near the camera. This may cause a fire or electric shock. Do not handle your camera with wet hands. This may result in electric shock. Prevent damage to subjects’ eyesight. Do not use the flash in close proximity (closer than 1 m/3 ft) to people or animals. If you use the flash too close to your subject’s eyes, this can cause temporary or permanent eyesight damage. Keep your camera away from small children and pets. Keep your camera and all accessories out of the reach of small children and animals. Small parts may cause choking or serious injury if swallowed. Moving parts and accessories may present physical dangers as well. Do not expose the camera to direct sunlight or high temperatures for an extended period of time. Prolonged exposure to sunlight or extreme temperatures can cause permanent damage to your camera’s internal components. Avoid covering the camera or charger with blankets or clothes. The camera may overheat, which may distort the camera or cause a fire. If liquid or foreign objects enter your camera, immediately disconnect all power...

Words: 24211 - Pages: 97

Free Essay

I(Robot) Think Therfore I Am

...consistently since the beginning of time, of course, isn’t comforting when considering that should we succumb to this ill fate it will be because of our own doing. However, the proven ability of our race being capable of recognizing, analyzing, correcting and improving upon our mistakes is exactly what has gotten us this far. From wars to medicine, from politics to parenting, sometimes we fail but eventually… we always succeed; so I wouldn’t be so quick to count us out of the game just yet. AI: The Beginning The word computer, in a nutshell, “refers to an object that can accept some input and produce some output” (Tyson & Crawford 1998-2012) and due to an installed microprocessor, computers are able to compute calculations in the blink of an eye. But is the act of storing and memorizing specific “known” information and already processed formulas truly worthy of the title of “Intelligence” or is intellect actually a lot more? Will the computer’s...

Words: 2284 - Pages: 10

Free Essay

Understanding Application User Frustrations

...mobile. Hence, we need to develop nomenclature of frustrating experiences, describe methods to identify user experiences as natural ones or due to poor system design and find ways to solve them. Computers and mobiles have beneficial impacts but also cause much unintentional dissatisfaction among the users because of many reasons, exasperation of losing unsaved work in case of a crash, complicated error messages, hack and phishing attacks via unknown apps which many inexperienced or newbies use and struggle to save their own privacy and passwords. These problems get aggravated when users haste and use apps without prior heed to tutorials, instructions or proper training. Apart from this, several applications, like accupedo, that use motion sensors, etc. to identify distances...

Words: 1473 - Pages: 6