Вы находитесь на странице: 1из 37


Submitted in the partial fulfilment of ALL INDIA YOUNG ENGINEERS HUMANITARIAN CHALLENGE 2011 By Pethani Kishan V.(Team Leader ID No. 91299581) Gor Mehul K.(ID No. 91903679) Raja Jimit S.(ID No. 91101903) Savsani Vishal N.

Under Supervision of Dr. H. S. Mazumdar Head, R&D Department, DDIT

Department of Electronics and Communication, Dharamsinh Desai Institute of Technology, Nadiad JUNE, 2011

ACKNOWLEDGEMENT We sincerely thank AIYEHum-2011, for providing us the opportunity to develop our skills and platform to exhibit them. It is a privilege to work under the name of IEEE, an organization of international renown. We thank Dr. H. S. Mazumdar for his constant support, guidance and motivation. His lectures consolidated our fundamentals too. We also thank IEEE student branch, DDIT, Nadiad for providing information about AIYEHum, and for their support. We acknowledge the help of the HoD and faculties of EC department, DDIT. Kishan Pethani and Team

i) ii) List of Figures List of Tables 4 5

1. Introduction 1.1. Application 1.2. Mechanism of the end device 1.3. Features of the end device 1.4. Block diagram and explanation 2. Sensing mechanism 2.1. Requirements of sensing apparatus 2.2. The Photodiode 2.3. Calculation for maximum swing for different types of photodiodes 2.4. Sensor arrangement 3. Amplification and conversion mechanism 3.1. Differential Amplification and its limitations 3.2. Emitter follower 3.3. The dynamic reference circuit and limitations 3.4. Usage of instrumentation amplifier in dynamic reference circuit 4. Data transmission and Reception 4.1. Requirements 4.2. The RF module 4.3. Encoder and Decoder 4.4. The whole apparatus and its limitation 4.5. Higher frequency transmission 5. Future Work

6 6 6 6 7 8 8 8 14 17 23 23 25 25 27 29 29 30 31 33 35

1.1 2.1 2.2 2.3 2.4 2.5 Block diagram I-V Characteristics of photodiode [courtesy: dar.ju.edu.jo] Circuit Diagram to obtain I-V characteristics of Photodiode Characteristics of the 3mm photodiode in use Equivalent circuit for the silicon photodiode Relative spectral sensitivity v/s wavelength for PD202B photodiode [Courtesy: Everlight Electronics co. ltd.] 2.6 2.7 2.8 2.9 2.10 2.11 2.12 3.1 3.2 3.3 3.4 3.5 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 Calculation for maximum swing in the photodiode Curve showing change in swing with resistance R1 Four non-linear sensors arrangement Three equilateral sensors arrangement Four linear sensors arrangement Three non linear sensors arrangement Photograph of spectacles equipped with sensors Edge detection with the help of photodiodes Emitter Follower The dynamic reference circuit Final circuit with INA129P used for amplification Circuit Board of the final design Block diagram of RF transmitter using ASK Block diagram of RF receiver using ASK Waveforms of RF transmission and reception obtained practically Transmission timing for HT12E [Courtesy: Holtek semiconductors Inc.] Composition of the Information word [Courtesy: Holtek semiconductors Inc.] Decoder Timing: HT12D [Courtesy: Holtek semiconductors Inc.] Data transmission and reception circuit Circuit board for wireless communication Waveform of transmitted encoded signal and received signal Photograph of spectacles interfaced with circuit board 13 14 16 17 18 20 20 22 23 25 26 27 28 30 30 31 32 32 33 34 35 36 37

7 9 9 12 12

2.1 2.2 2.3 2.4 3.1 Characteristics of Photodiode in enlightened surroundings Characteristics of Photodiode in dark surroundings Truth table for three sensors equilateral arrangement Truth table for three sensors nonlinear arrangement Observation Table of edge detection with two photodiodes 10 11 19 21 24

1. Introduction
Ancient wizards could see visions from far away world. We use Television. They used telepathy to communicate. We use cell phones. They used their enchantment, we use technology. Electronics is magic. And we electronic engineers are wizards. A verse from the great Mahabharata comes to the mind, which literally meant the following: I bow to the ultimate joy giver Madhava, by whose grace the mute can deliver speeches, and the disabled can cross high mountains. The grace of God has brought the human race to the zenith of its civilization. We humans are the most gifted of Almightys creations. We can use our own intellect to make the mute ones well-speaking and the disabled walking, or in the context of the project, even the paralyzed able to control certain devices of routine use.

1.1. Application Electronic Spectacles for Paralyzed Patients is a device which will help the paralyzed patients to control some devices of daily use which work on AC power. This device is applicable to patients whose eye muscles are still fully functional. Paralyzed patients suffering from the likes of quadriplegia and ALS will be able use it to control fans, tube lights etc with mere motion of the iris of the eye.

1.2. Mechanism of the end device The end device will be able to Detect the motion of the iris and translate it into binary values Transmit the binary values wirelessly to control module Receive the values without error, and make decisions according to received data Control the on-off states of the target device as per the received command Perform the above steps irrespective of ambient light conditions or other parameters

1.3. Features of the end device Giving the device the following attributes makes one visualize the target device, and thus helps us to set our targets. User friendliness

Eye fatigue while operating the device as low as possible On-off control of eight devices The whole circuit attached to the spectacles only.

1.4. Block Diagram and Explanation

Figure 1.1: Block diagram

Explanation of the above block diagram is given below: Sensing Mechanism: detects the movement of the eye iris. Amplification and conversion to digital form: amplifies the feeble output of the sensor and converts into binary form. Data Transmission: transmits the data after encoding it. Data Reception: receives and decodes the data. Decision Making: consists of the microcontroller which processes the data and controls the onoff of the relays. Target relay board: consists of 8 relays which control the target devices. Target devices: the devices to be controlled.

2. Sensing mechanism
2.1. Requirements of sensing apparatus

The sensor should be able to detect minute changes in the movement of the iris. It should have minimum or no dependence on ambient light. Sensor placement should not depend upon the size of the iris. It should give maximum states with minimum movement of eye. It should have minimum eye fatigue, and should not harm the eye.

What can we use to sense the movement of the eye? Can we use the lens of a camera which produces the image of the eye and then detect its motion? A digital camera circuit is a possible solution to the sensing problem. It has less dependence on ambient light and can detect minute movements of the eye. But the circuit is expensive to make and is complex for its requirement of rapid transmission of large data. There must be a simpler, cheaper and yet exquisite solution of the problem. What exactly should the sensor detect? What exactly do we mean when we say that the movement of the iris is to be encoded into binary form? We know that the visible portion of the eye has two parts namely white portion (called sclera in medical terminology) and the coloured portion (pertaining to the iris). These white and black parts of the eye have difference in the way they reflect light. The white sclera reflects most of the light falling on it, while the coloured iris will not reflect light with so much intensity. This intensity difference in the reflected light gives us our sensing mechanism. The photodiode is the best sensor that will translate this intensity difference into electric current change. We settled for the low cost photodiode, which, from our experience of line follower robots, had flair to detect easily between black and white. We introduce the photodiode in the next section.

2.2. The Photodiode A photodiode is a semiconductor device which responds to high energy photons. A unique feature of the photodiode is that it can respond to very low amount of light energy. The I-V characteristics of a typical photodiode are as shown in the following figure.

Figure 2.1: I-V Characteristics of photodiode [courtesy: dar.ju.edu.jo]

Figure 2.1 clearly shows why it is preferable to use photodiode in reverse bias. The change in characteristics with respect to change in intensity of light is enhanced in reverse bias. To verify this plot, we used our own photodiode and took current v/s voltage readings in reverse bias. The observation table of the experiment performed is given in the next page. Circuit Diagram:

Figure 2.2: Circuit Diagram to obtain I-V characteristics of Photodiode

Table 2.1: Characteristics of Photodiode in enlightened surroundings

Supply Voltage (in V)

Voltage across photodiode (in V)

Current through photodiode (in A) 0 -1 -1 -1 -1 -1 -2 -2 -2 -2 -3 -3 -3 -3 -3 -4 -4 -4 -4 -5 -5 -5 -6 -6 -6

0.00 1.00 1.50 2.00 2.50 3.00 3.50 4.00 4.50 5.00 5.50 6.00 6.50 7.00 7.50 8.00 8.50 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00

0.41 0.26 0.20 0.13 0.07 0.01 -0.05 -0.09 -0.13 -0.18 -0.24 -0.31 -0.39 -0.48 -0.57 -0.70 -0.83 -0.97 -1.32 -1.71 -2.06 -2.45 -2.84 -3.22 -3.61


Table 2.2: Characteristics of Photodiode in dark surroundings

Supply Voltage (in V)

Voltage across photodiode (in V)

Current through photodiode (in A) 0 0 0 -1 -1 -1 -1 -1 -2 -2 -2 -2 -2 -2 -2 -3 -3 -3 -3 -4 -4 -4 -4 -5 -5

0.00 1.00 1.50 2.00 2.50 3.00 3.50 4.00 4.50 5.00 5.50 6.00 6.50 7.00 7.50 8.00 8.50 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00

0.01 -0.30 -0.46 -0.62 -0.78 -0.93 -1.10 -1.26 -1.41 -1.57 -1.73 -1.89 -2.05 -2.19 -2.35 -2.51 -2.67 -2.83 -3.16 -3.47 -3.80 -4.10 -4.42 -4.76 -5.04


The graph obtained with these readings is shown in the figure below. The graph is plotted in MATLAB.
Characteristics of photodiode 0 -2 -4 -6
Reverse Current (uA)

-8 -10 -12 -14 -16 -18 -20 -6 Dark Light -5 -4 -3 -2 Reverse Voltage (V) -1 0 1

Figure 2.3: Characteristics of the 3mm photodiode in use

The photodiode is modelled as a current source which varies the source current as per the incident light. A model of this kind is shown in the following figure.

Figure 2.4: Equivalent circuit for the silicon photodiode [Courtesy: www.osioptoelectronics.com]


Each component of the equivalent circuit is explained in brief below. Current source: Gives out the current Iph which is generated by the incident light. Diode: Represents the P-N junction. Shunt resistance: Represents the slope of the P-N diode in reverse bias. Should be ideally infinite. Practically measured from 10-1000 M. Higher value of RSH, better the performance of the photodiode. Series Resistance: Represents the diode contact resistance as well as the resistance of the region which is not depleted. Is very low practically and should be ideally zero. Gives the linearity of photodiode at V=0. Junction Capacitance: capacitance of the P-N junction. Limits the frequency response of the photodiode. One more point to be kept in mind is the change in response of the photodiode as per the change in wavelength of the light incident. The graph below is taken from the datasheet, which represents the response v/s wavelength characteristic.

Figure 2.5: Relative spectral sensitivity v/s wavelength for PD202B photodiode [Courtesy: Everlight Electronics co. ltd.]


This figure clearly tells us that the photodiode is very sensitive in the infrared region, while in the visible region, its sensitivity is low. This is true not only for this particular model, but for photodiodes as a whole. This is where ambient light plays its major role in the design. The problems faced due to the ambient light dependence are described in detail in the next chapter.

2.3.Calculation of maximum swing in different types of photodiodes The value of the resistance in series with the photodiode is critical in deciding the maximum swing due to change in light conditions in the photodiode. This resistance, if very high, limits the current flowing through the diode and if too low, loads the photodiode itself. Hence selecting any arbitrary value is not recommended for this resistance. The following calculations were made for this resistance, assuming that the reverse bias characteristic of photodiode is almost linear, so that change in response of photodiode in light and dark can be modelled as change in its resistance.

Figure 2.6: Calculation for maximum swing in the photodiode

R1 = Resistance of the Potentiometer RD = Resistance of the Photodiode R = Change in resistance of Photodiode Vout1 = Initial voltage across the photodiode Vout2 = Final voltage across the photodiode V = Change in voltage across photodiode

It is clear that



We need V to be as high as possible; hence its derivative with respect to R1 should be zero.


The following curve is plotted with the help of this equation in MATLAB. The curve is Resistance R1 v/s change in output voltage.
Dependence of swing in series resistance 0.35
X: 3001 Y: 0.3348

Change in Voltage Vout (in V)








3000 4000 5000 6000 7000 Resistance R1 (in k-ohm)


9000 10000

Figure 2.7: Curve showing change in swing with resistance R1

As seen in the figure, for dark resistance = 2600 k and light resistance 3400 k practically obtained, the value of R1 shows a peak swing at 3001 k, and then it gradually drops down. Thus keeping a mid value resistance in series with a photodiode is beneficial for maximum swing. The swing depends on supply voltage too, which is kept constant at 5V. Higher supply voltages mean higher swing as it is evident from the characteristics curve in figure 2.3. But very high value of supply voltage is not permissible because it will cause breakdown of photodiode in reverse bias. The dark resistances and light resistances of different photodiodes are different, and hence the resistance R1 is to be adjusted for photodiode. An ideal value of R1 should be

slightly higher than the peak swing value, so that the swing does not diminish with change of resistance with temperature or such uncontrollable parameters. 2.4. Sensor arrangement An ideal sensor arrangement is such that it gives maximum number of states with minimum eye fatigue. Here states means clearly different outputs for different positions of the eye. Human iris can move in three directions apart from the normal straight vision, i.e. left, right and upwards. The upward movement gives slightly more fatigue to the eye. Sensors should be arranged in such a way that these could capture at least two or three states. The arrangement should not depend upon variable parameters like the size of the iris or its colour. The following arrangements of sensors were thought of and experiments were performed on the promising arrangements. Four non-linear sensors

A small figure of the four nonlinear sensors arrangement is as shown below.

Figure 2.8: Four non-linear sensors arrangement

The four non-linear sensors arrangement is a crude design, with each photodiode dedicated for giving one state. This arrangement can give four states easily with the iris movement, but the arrangement covers the whole eye. Apart from this, the sensor arrangement depends greatly on the size of the iris because the sensor below will stay in the white part for a smaller iris and in the black part for a larger iris. Hence the initial state becomes uncertain. Thus this arrangement is not a good design and it was not tried for experiments.


Three equilateral sensors

This design has many advantages. It does not depend upon the iris size, gives six states which are very near to each other, and does not cover the whole eye. The arrangement is as shown.

Figure 2.9: Three equilateral sensors arrangement

This arrangement can be very complicated to implement. It needs all the photodiodes to be matching, otherwise there is an existence of a third state called uncertain state any two photodiodes are in the same region of the eye. When in rest, all photodiodes rest in the black of the eye, hence all three give out uncertain states when differentially amplified. Thus this arrangement needs to be translated into ternary codes instead of binary. Though this arrangement gives many more states, but the eye fatigue is high in this arrangement, because the eye has to move to its extreme value so that any one photodiode remains in white. Still, its advantages outnumber its disadvantages, and it was tried for sensing the movement of the eye. The truth table is as on the next page.


Table 2.3: Truth table for three sensors equilateral arrangement



Logic Voltage Vx=VD1-VD2

Logic Voltage Vy=VD2-VD3

Logic Voltage Vz=VD3-VD1






Right Cross

Left Cross *U=Uncertain State

Calculation of logic voltage: 0 : If both sensors are in same region 1 : If sensors are in different regions and difference voltage is +ve U : Uncertain if sensors are in different regions and the difference voltage is -ve


Four linear sensors

To reduce the eye sensor dependence on ambient light, a reference sensor was suggested outside the eye region exposed to ambient light. This sensing technique does not block the vision of the user, but it has a major disadvantage. The ambient light sensing photodiodes as well as other photodiodes need to be in the same light and need to be perfectly matching, so that a little change in the eye movement is detected. Hence this design was not efficient.

Ambient light photodiode

Eye sensing photodiodes

Figure 2.10: Four linear sensors arrangement

Three non linear sensors

In the designs discussed so far, there is a need of a reference photodiode, due to which there arises the need of matching diodes. If we try to eliminate the reference photodiode like in the three equilateral sensors design discussed earlier, we can use any kind of unmatched photodiodes. This leads us to the following three non linear sensor design, which overcomes the limitations of the above designs.

Eye detecting photodiodes

Figure 2.11: Three non linear sensors arrangement

This design is an improved variant of the four non-linear sensor arrangements. Unlike the former, this method has no dependence on the size of the iris nor does it cover the whole eye

to block vision. It also gives four states and eye fatigue is lower for the up state as the eye just has to be moved just a little upward so that the photo diode faces the white region. Also, non linear sensor arrangement photodiodes do not require matched photodiodes as each photodiode is independent in detecting the state of the iris. Total four states are obtained in this method with just three photodiodes.

Table 2.4: Truth table for three sensors nonlinear arrangement State Diagram VD1 VD2 V D3





Given below is the photograph of the spectacles equipped with the sensor inside one of the glasses. The first is the side view and the letter is top view of spectacles.


Figure 2.12: Photograph of spectacles equipped with sensors


3. Amplification and conversion mechanism

The little change in voltage given by the sensors is not enough to be transmitted directly. It has to be manipulated and translated into a greater difference which can be easily transmitted. For transmission of data, it is preferred that data is digital, because it is less affected by environmental noise. Hence we must convert the whole data into digital form i.e. the three sensors should generate a three bit coded sequence with 1s and 0s for each position of the eye. The truth tables discussed in section 2.4 are our goal to be reached through amplification and conversion. The truth tables are made for three sensors equilateral arrangement and three sensors non linear arrangement. The following are the methods of amplification suitable for the context.

3.1. Differential amplification and its limitations Two photodiodes, one placed in black and one placed in white give certain difference in voltage in the order of a few hundred mV, which can be amplified until saturation voltage to give a pure 1. A lower difference in terms of tens of volts should be read as zero. This is the principal of differential amplification. Approach and design of a differential amplifier are simple if the difference between the photodiodes is a little pronounced. Circuit Diagram:

Figure 3.1: Edge detection with the help of two photodiodes


An experiment was performed to see the swing of the photodiode when placed at the edge of the eye ball. Here we have selected most matching pair of photodiodes and calibrated the variable resistor so that the bridge can be balanced and voltmeter gives zero reading (for a specific position of sensor on iris as shown in observation table). Table 3.1: Observation Table of edge detection with two photodiodes
State/Diagram Experiment 1: Vd*(in mV) Experiment 2: Vd (in mV)







*V d = Differential Voltage

The readings of above table gives promising results for the amplification since we are getting a significant difference for different states.


3.2. Emitter follower There is a major fault in the above readings, the resistance of the photodiodes is in terms of mega ohm, a resistance of voltmeter which comes in parallel to the photodiodes will result into the meter loading the diodes, and so the resultant swing observed will be less. If the actual swing is to be measured, a buffer must be used between the photodiode and the voltmeter. Such a buffer is not necessary while the use of amplifiers unless the amplifier is loading the photodiode. We use a simple emitter follower circuit as a buffer in this case. The circuit diagram is as shown in figure 3.3. Circuit Diagram:

Figure 3.2 Emitter Follower

By using the above circuit, the swing in the eye white and black regions was measured to be 260 mV. Comparing with table 3.3, we can see that the swing has improved. But in reality, the photodiode gives its actual swing without getting loaded. Now as the swing is improved, it can be used for amplification easily.

3.3. The dynamic reference circuit There are two major limitations of the differential amplification circuit. First is that the photodiode swing in the eyes changes as per the ambient light which is different at different times of the day. Due to this, the resistances R1 needs to be recalibrated for each photodiode every time. This is not a user friendly design as it the paralysis patient will not be able to recalibrate the circuit.

Also, as per differential amplification, a third uncertain state arises and it is hard to decode. Dealing with ternary values is something with which we are not accustomed to, and the ternary values make the circuit complicated. How can the problem of the changing reference value be solved? How can we detect and amplify just the swing of the photodiode and not its reference voltage? We know that we can get the change in input only when we compare the input with the previous value. Now if we hold the previous value in one of the inputs of a differential amplifier and allow the other end to change, we will get just the swing in the output. This is the principle of the dynamic reference circuit. The change in the state of photodiode will change an amplifier input instantly while holding the other input constant, thus creating a dynamic reference to detect the output swing. The dynamic reference circuit for one photodiode is shown in figure 3.4.

Figure 3.3: The dynamic reference circuit

Limitations of this circuit: At first glance the dynamic reference circuit appears to be flawless and sophisticated, but it is not the ultimate design. It still has flaws. When practically implemented, it was found that only the most sensitive photodiodes gave a reliable output in day time, and at night when the ambient light was low, all photodiodes failed. This was due to the offset voltage of the LM324N IC. Input offset voltage was measured to be 40 mV. This offset many a times was more than the photodiode was able to provide. Hence it was necessary to reduce this offset voltage so that the IC becomes more sensitive to the swing. An offset compensation network was a good solution, but it had to be calibrated again with the help of potentiometer, and a

little change in the calibrated value would mean offset intervention again. To make the design more robust, an IC with very low offset is required. Such an IC is the instrumentation amplifier INA129P, which is used to overcome this limitation.

3.4. Use of instrumentation amplifier in dynamic reference circuit With a very low offset voltage and high input impedance, the INA129P is a very reliable amplifier. But there is a disadvantage of the IC. First, it is a dual supply device, hence voltage needs to be converted to positive and negative. Hence it was given dual supplies first of all with the help of voltage converter TC7660. The experiment was successful with reliable output. An experiment was also made using the INA129P on single supply, and it worked well. The equation of gain is as follows: =1+ 49.5

In the following circuit diagram, the gain resistance pins 1 and 8 of the IC are shorted for very high gain, as we are not using feedback gain to amplify, but the internal amplifier gain. The IC is given a single supply, and the voltages in output vary from 0 to 2.5 V, enough to glow the output LED fully.

Figure 3.4: Final circuit with INA129P used for amplification As for now, this is the most reliable circuit to be found for amplification and hence it is finalized.

Figure 3.5: Circuit Board of the final design

The above is the photograph of circuit board for the sensors. It includes sensor input, three LEDs to display the state of iris position, digital output pins of state, variable resistors to adjust delay time. We have made experiments on different peoples eyes and gained the digital output successfully. We had also interfaced this circuit with the RF transmitter and had obtained the state of sensors at significant distance through wireless transmission. The RF module is discussed in following chapter.


4. Data transmission and Reception

After digital data has been made from the iris movement, this data needs to be transmitted without any error to a distant place, preferably near to the switchboards already installed in the room wirelessly. Wireless transmission is preferred to wired transmission here to avoid a jumble of wires spreading across the room. A point to be noted is that it is more economic to use wires if the switchboard is nearby. But wires may become inconvenient for the user in most cases.

4.1. Requirements The following are the main requirements of data transmission and reception. The transmission and reception should be essentially error free. Any disturbance of the same frequency must not hinder. It should have high distance range. Multiple samples of the eye per second should be sent. Size of the transmitter circuit should be so small that it can be implemented in spectacles itself.

There are two main methods used for household wireless transmission: Infrared transmission, which is used in TV remote controls and other house hold remotes, and RF transmission, which uses 433.92 MHz/315 MHz frequency to modulate the data signal. Infrared transmission is economic and easier to implement but has many disadvantages. It has low distance range and it does not function if there is any obstruction between the transmitter and receiver. And infrared transmission cannot be made very powerful, because it is harmful to the eye in the long run. Again, infrared works better when it directly reaches the receiver without any reflection. RF transmission on the other hand eliminates most of the disadvantages of IR. But the biggest disadvantage of RF is that it is not easy to implement directly. It requires good knowledge of antenna matching, oscillator designing and filters. We have used the RF module predesigned for this purpose available in market for wireless transmission. The RF module is explained in the next section.


4.2. The RF module The 433.92 MHz/315 MHz RF module is manufactured by many electronic companies. The transmitter and receiver are very small size (18mm x 18 mm transmitter and 36mm x 12 mm receiver module) and hence can be easily installed in transmitter as well as receiver side. The RF module has a bit rate of 4kbps, hence at its best, it can easily transmit a signal of 2kHz without distortion. RF transmitter transmits a power of 10 mW, and receiver has a sensitivity of -95dBm, so at this much low transmitted power it has a range of 60 to 80 m. Working: The RF module implements ASK technique to transmit digital data. On the transmitter side, it has only an oscillator with a SAW band pass filter, having very low bandwidth. The incoming data signal biases an NPN transistor, which in turn switches on and off the oscillator as per the received data. Hence, a transmission of 1 means frequency transmission of 433.92 MHz or 315 MHz, and a 0 means no frequency transmission. The block diagram is shown in figure 4.1.

Figure 4.1: Block diagram of RF transmitter using ASK

On the receiver side, things are a little complicated. A superheterodyne receiver IC is used here, which detects the 315 MHz frequency and gives the output in digital form. The local oscillator of the IC is stabilized with a SAW resonator at 316.8 MHz. The block diagram of the receiver is as shown below.

Figure 4.2: Block diagram of RF receiver using ASK




Figure 4.3: Waveforms of RF transmission and reception obtained practically (a) at 2.5 kHz (b) at 300 Hz

As we increase the frequency of transmitted pulses the response at receiver side is becoming more and more distorted. The RF module had worked up to 4.5 kHz effectively but after that it transmits the code with much more attenuation and distortion. But our encoded signal pulses have maximum 2.2 kHz frequency because of which the transmission is done successfully. 4.3. Encoder and decoder The RF module requires data serially and it also gives back the data serially. Hence it requires some assembly which converts the three or four bits of data acquired from the conversion mechanism to a sequence of serial data. As per our requirement, it is also necessary that this data should not be corrupted by any intervention of the same frequency. This means that we also must have some pre-sequence of at least three bits which is predefined, and this sequence should be checked at the decoder side to validate the data. All this can be taken care of by a microcontroller of any sort. Even a primitive version like 8051 can do this work. But it is possible that the receiver side microcontroller may remain busy in decoding and recognizing the data. Something as primitive as the 8051 will increase the size of the circuit at the transmitter side. A 40 pin microcontroller is not required for decoding the data. There are many encoder-decoder pairs available in the market which serve the purpose. The HT12E and HT12D manufactured by Holtek semiconductors are one of those. The idea of using HT12E-HT12D as encoder-decoder pair arises from looking at common RF module circuits used for remote-controlled robots.

HT12E and HT12D are commercially called 212 encoder-decoder pairs because HT12E converts a sequence of 12 bits (8 address and 4 data bits) to serial data encoded in 25 bits and decoder HT12D decodes the sequence to give 12 parallel data bits on its pin outs. The transmission is very secure, as the decoder checks the address sequence thrice before outputting it at the pins. Hence any change in the address due to noise of the same frequency discards the data, assuming it to be invalid.

HT12E: The working of HT12E in encoding the data bits is as shown in the figures below.

Figure 4.4: Transmission timing for HT12E [Courtesy: Holtek semiconductors Inc.]

Figure 4.5: Composition of the Information word [Courtesy: Holtek semiconductors Inc.]

Figure 4.3 shows the activity of data output pin of the encoder DOUT with respect to the transmission enable pin TE. If TE is kept low, then words are constantly transmitted by the encoder. If TE is kept momentarily low, then four words are transmitted by the encoder. Figure 4.4 shows the information word of the HT12E. It has a 12 bit pilot period. And 1/3 bit synchronization period, during which no actual information is transmitted, then follows the 8 bit address code and 4 bit data code. Each word may thus transmit one state of the eye. The high bit 1 is encoded as a high pulse for a single oscillator period, while the low bit 0 is encoded as a high pulse for two oscillator periods.


A remarkable feature of the HT12E is that it has an inbuilt oscillator whose frequency can be decided by an outside resistor (ROSC) connected to the oscillator pins OSC1 and OSC2. The data transmission rate changes according to the change in ROSC. The typical value of ROSC of encoder is 1 to 1.1 M. The oscillator frequency has a meagre dependence on the supply voltage too. HT12D:

Figure 4.6: Decoder Timing: HT12D [Courtesy: Holtek semiconductors Inc.]

The decoder works with respect to the encoder as shown in figure 4.5. When TE is made low in the encoder and the data is sent, the decoder receives the data, checks the address thrice, and then latches the data at its pin outs. The data remains latched until new data is received, or until the power supply is removed. The decoder validates the data by setting VT pin high. VT pin remains high for

clocks. If the transmitter transmits continuously by

keeping TE low constantly, then the decoder checks the address first time and sets VT high then it doesnt check the address until the transmission stops. The dependence of the decoders oscillator frequency on the supply voltage is high, and hence it needs a well regulated power supply. Its oscillator frequency should be 50 times higher than that of the encoder as mentioned in the datasheet. Hence ROSC values are low at the decoder side. For 1.1 M in encoder side, decoder ROSC is kept 51 k. The resistances can be changed for transmission and reception at a different rate. 4.4. The whole apparatus Joining the jigsaw puzzle, we get a complete picture of the data transmission and reception circuit. A figure showing the circuit is given below.


Figure 4.7: Data transmission and reception circuit

Figure 4.8: Circuit board for wireless communication

As per the datasheet, ROSC for encoder is kept 1.1 M and for decoder it is kept 51 k, which gives the oscillator frequencies 3 kHz and 150 kHz respectively.


Figure 4.9: Waveform of transmitted encoded signal and received signal

The above is the waveform obtained at DOUT(encoded signal) pin. Channel 1(rectangular pulses of 4.85 V amplitude) is the transmitted encoded signal obtained practically. Channel 2(triangular pulses of 2.8 V amplitude) is the received signal sent via RF module. The pulses are of 1.1 kHz and the whole frame has frequency of 46 Hz. Now our goal is to increase the bit-rate of the encoded signal so that maximum samples can be sent efficiently. 4.5. Higher frequency transmission The above circuit meets all the requirements for transmission except one. The number of samples transmitted per second is hardly one or two, i.e. frequency transmitted by the module is too low. The only way this frequency can be changed is by changing the oscillator frequency at the transmitter and receiver side. If the transmitter and the receiver frequency increase, then the bandwidth of transmission also increases. This leads to transmission of higher samples per second. From the graphs of oscillator frequency v/s supply voltage given in both the datasheets, it is seen that as the value of ROSC decreases, the frequency of oscillation increases. Hence keeping supply voltage constant, such a value of ROSC should be chosen that the oscillator frequency increases keeping the relation ROSC (Decoder) = 50*ROSC (Encoder). The highest value at 5 V in decoder is 27 k. The corresponding value on encoder side is 470 k. These values were tested and the data transmitted was found valid. Also, at this oscillator frequency, the transmitted sample rate was found to be 12 samples per second, which is enough for processing.


Figure 4.10: Photograph of spectacles interfaced with circuit board

As shown in the photograph above , the spectacles, equipped with sensors, is interfaced with the circuit board. This circuit would transmit the digital data of the state of the eye-ball. We have successfully received the data at significant distance (with some delay). The experiments were done on different peoples eyes and at different time. We had gained all states successfully. We had also notices the effect of ambient light during the experiment. At day time, due to the presence of infrared light, the sensors were working perfectly. But in dark room or at night time, because of the fact that photodiode does not give response in less ambient light and gives very less swing of voltage, the output voltage was varying. So we need to do pre-fogging with light. These experiments are being carried out. But the goal is not far because main part of the device has been completed.


5. Future Work
There is still a defect in the hardware of the project, that it is dependent on the ambient light. A way still needs to be found to reduce the dependence on ambient light. Trials are being made to artificially light the photodiode sensors with the help of visible light or infrared LEDs so that the device can also work in scarcity of light. Attempts are also being made to make the output of the device more reliable. It is expected that by next month, the device will actually be able to control devices reliably. The project is now going ahead in two directions. First, as already described, is the on-off control of hardware directly with the help of relays. The second direction is to make a graphical user interface using C# language and .Net programming platform, and with the help of computer, drive relays for control of devices. The latter is very user friendly device, as the user can easily see what device he has selected. Again, the interfacing with computers will open many new options for the user. The GUI is our ultimate goal for the device.