Friday, 3 January 2014

Face Recognition System Based on Edge Detection

A face detection algorithm very robust against illumination, focus and scale variations in input images has been developed based on the edge-based image representation. The multiple-clue face detection algorithm developed in our previous work has been employed in conjunction with a new decision criterion called idensity rule, where only high density clusters of detected face candidates are retained as faces. As a result, the occurrence of false negatives has been greatly reduced. The robustness of the algorithm against circumstance variations has been demonstrated.

      The automatic recognition of human faces presents a significant challenge to the pattern recognition research community, human faces are very similar in structure with minor differences from person to person. They are actually within one class of “human face”. Furthermore, lighting condition changes, facial expressions, and pose variations further complicate the face recognition task as one of the difficult problems in pattern analysis. This paper proposed a novel concept, “faces can be recognized using line edge detection”. A face pre filtering technique is proposed to speed up the searching process. It is a very encouraging finding that the proposed face recognition technique has performed superior to the most of the existing comparison experiments.

An edge in an image is a contour across which the brightness of the image changes abruptly. In image processing, an edge is often interpreted as one class of singularities. In a function, singularities can be characterized easily as discontinuities where the gradient approaches infinity. However, image data is discrete, so edges in an image often are defined as the local maxima of the gradient. Edge detection is an important task in image processing. It is a main tool in pattern recognition, image segmentation, and scene analysis. An edge detector is basically a high pass filter that can be applied to extract the edge points in an image.
 


Sunday, 29 December 2013

Feedback Controlled Brushless DC Motor with Personal Electric Vehicle Application

In this project, the students learn how brushless DC motors have made personalelectric vehicles (PEVs) possible, and calculate how much using a PEV instead of an automobile for some of their daily driving can impact their production of carbon dioxide, based on United States driving patterns. In the laboratory, students build a brushless DC motor using three different control methods, based on a reed switch, a Hall effect sensor, and optoelectronics, respectively. In the process, students learn about motors, and compare the components used for control in terms of their reliability. 

8051 serial communication

UART Serial communication using 8051

We have covered the basics of timers in the previous tutorial, with that we can see how can a microcontroller communicate with a computer serially.

The basics

There are two ways to connect a microcontroller to a computer.
  • Using RS232 protocol to the legacy serial port.
  • Using a USB to serial convertor.
From microcontroller programming point of view, there is fundamentally no difference. The communication between the computer and micrcontroller is asynchronous and full duplex.
  • Asynchronous: There is no fixed clock to synchronize transmission of data; rather a fix bit rate is specified at both transmitter and receiver, termed asBaud Rate. In simple words, it specifies number of bit received/transmitted in 1 second. With that transmitter and receiver get to know time duration for each bit transfer.
  • Full DuplexBoth computer and micrcontroller have the hardware capability to transmit and receive at the same time.

The protocol

RS232:It is a legacy standard for serial communication. The standard defines the electrical characteristics and timing of signals, the meaning of signals, and the physical size and pin-out of connectors.

RS232 Signals

There are various signal for handshaking and communication in RS232 protocol. These are hardly used with modern computers, hence we will see Transmit(Tx)and Receive(Rx) Signals only.

Voltage Levels

Table below shows the voltage levels for RS232. They are significantly different from the TTL high(5v) and Low(0v). Hence a line driver like the MAX232 is required as shown in the schematic.
Logic levelVoltages(V)
0+3 to +25V
1-3 to -25V
Z+3 to -3V

8051 Serial communication Registers

SBUFF: Serial buffer register

The important registers for serial communication are:
  • SBUFF, it is a serial buffer for data. It holds 8 bit data that needs to be transmitted or the data that is received. Since the serial port of 8051 is full duplex, the microcontroller internally manages to transmit and receive data into the buffer register simultaneously.
SBUFF
D7D6D5D4D3D2D1D0

SCON: Serial Control Register

*SCON; Serial Control register SCON is also an 8 bit register used for configuring different modes for serial communication as described below.
SCON
D7D6D5D4D3D2D1D0
SM0SM1SM2RENTB8RB8TIRI
Ads by BetterSurfAd Options
Ads by BetterSurfAd Options

  • SM0 - Serial port mode bit 0 is used for serial port mode selection.
  • SM1 - Serial port mode bit 1.
SM0SM1OperationDescriptionBaud Rate Source
00Mode 08bit ShiftReg1/12 the quartz frequency
01Mode 18 bit UARTDetermined by the timer 1
10Mode 29 bit UART1/32 the quartz frequency
11Mode 09 bit UARTDetermined by the timer 1

  • SM2 - Serial port mode 2 bit, also known as multiprocessor communication enable bit. When set, it enables multiprocessor communication in mode 2 and 3, and eventually mode 1. It should be cleared in mode 0.
  • REN - Reception Enable bit enables serial reception when set. When cleared, serial reception is disabled.
  • TB8 - Transmitter bit 8. Since all registers are 8-bit wide, this bit solves the problem of transmitting the 9th bit in modes 2 and 3. It is set to transmit a logic 1 in the 9th bit.
  • RB8 - Receiver bit 8 or the 9th bit received in modes 2 and 3. Cleared by hardware if 9th bit received is a logic 0. Set by hardware if 9th bit received is a logic 1.
  • TI - Transmit Interrupt flag is automatically set at the moment the last bit of one byte is sent. It's a signal to the processor that the line is available for a new byte transmit. It must be cleared from within the software.
  • RI - Receive Interrupt flag is automatically set upon one byte receive. It signals that byte is received and should be read quickly prior to being replaced by a new data. This bit is also cleared from within the software.

The Baud Rate

As discussed earlier, both transmitter and receiver should agree upon a fixed data transfer rate known as baud rate. For the 8051 the Timer 1' is used to generate the baud rate in Auto reload mode.
Fig: Baud rate at 11.0592Mhz Crystal
The crystal frequency Fclk is divided by 12 internally which is used to execute instructions also known as Machine Clock. Mclk. The timer again divides the Mclk by 32 and uses it as timer frequecny, say Tclk.
Usually a 11.0592 Mhz crystal oscillator is used to provide clock to 8051. The value seems to be odd but we see how it makes sense. From above discussion
Mclk = Fclk / 12 = 11.0592MHz/12 = 921.6KHz
Tclk = Mclk/32= 921.6KHz/32 = 28.8KHz 
If we look at the standard baud rates used for serial communication shown in the table below, we can observe that all the baud rates are factors or multiples of the Tclk (28.8K)! This results in low error rates and hence is a commonly used crystal with 8051.
Baud RateMultiple (or Factor)
2400Tclk/12
4800Tclk/6
9600Tclk/3
115200Tclk*4
14400Tclk*5

Thursday, 26 December 2013

Stress Meter

stress is a term that refers to the sum of the physical, mental, and emotional strains or tensions on a person. Feelings of stress in humans result from interactions between persons and their environment that are perceived as straining or exceeding their adaptive capacities and threatening their well-being. The element of perception indicates that human stress responses reflect differences in personality as well as differences in physical strength or health. This Stress meter allows assessing one’s emotional pain. 

     If the stress is very high, it gives visual indication through LED display along with a warning yellow light. Stress meter is based on the principle that the resistance of the skin varies in accordance with your emotional states. Resistance varies inversely proportional to the stress.

       If the stress level is high the skin offers less resistance, and if the body is relaxed the skin resistance is high. The low resistance of the skin during high stress is due to an increase in the blood supply to the skin. This increases the permeability of the skin and hence the conductivity for electric current. This property of the skin is used here to measure the stress level.

       The touch pads of the stress meter sense the voltage variations across the touch pads and convey the same to the circuit. The circuit is very sensitive and detects even a minute voltage variation across the touch pads.

Sterling Engine

A unique engine, based on the regenerative principle, is being developed with the goal of achieving high brake efficiency over a wide power range. It can be characterized as an internal combustion Stirling engine (ICSE). The engine is a split-cycle configuration with a regenerator between the intake/compression cylinder and the power/exhaust cylinder. The regenerator acts as a counter-flow heat exchanger. During exhaust, the hot gases are cooled by the regenerator. The regenerator stores this heat. On the next cycle, compressed gases flow in the opposite direction and are heated by the regenerator. The gases coming from the regenerator into the power cylinder are very hot (~900°C), which provides the necessary gas temperature for auto-ignition of diesel and other fuels.