Professional Documents
Culture Documents
This paper delivers a new method to device where a patient sitting on the Wheel
guide and control the wheelchair for disabled Chair assembly looking directly at the camera,
processing is developed to assist mobility. The The camera signals are monitored
eye movement is detected using a camera which by a MATLAB script, which will then guide the
This concept can be used for multiple Microcontroller over the Serial Interface to
applications, but this paper focuses the move in a particular direction. The system is
application to mobile and communication aid cost effective and thus can be used by patients
for handicapped patients suffering from spread over a large economy range.
quadriplegic and paraplegic diseases. The This project is one small step
proposed system involves two stages; first eye forward in the vast avenue of “Human
movement detection and second, sending of Machine Interface” HMI. There are various
control signals to the powered wheelchair. biological signals emitted from the human body
Statistics suggests that there are viz. EEG, EOG, EMG etc. In this project our
11,000 new cases of quadriplegia every year in main focus is on the acquisition and analysis of
United States of America. Great people like EEG waves so that it can be used as an input to
Stephen Hawking and Max Brito have been drive a D.C motor which in turn drives the
Conventional wheelchair
use tends to focus exclusively on manual
use which use which assumes users still
able to use their hands which excludes
those unable to do so. Diseases or
accidents injuring the nervous system
also frequently because people lose their
ability to move their voluntary muscle
. Because voluntary muscle is Figure1. Stephen hacking
The voltage rating of the infrared of the system and needs to be done with great
light is under the permissible levels that can be precision.
used to concentrate in the eyes. The infrared The second alternative that we came
light concentrated through the forehead of the up with was to connect the web camera to the
user will be collimated through the pupil of the RaspberyPi directly which would then process
eye and we can use this collimated light to obtain the snapshots, eliminating the need to have the
a voltage drop across the photodiode which will camera attached to the laptop.
drive the motors But, we found out that the time taken
to understand the new controller board is a lot.
Also, normally these days such users have a
laptop somehow attached to their wheel chair
and thus we decided to rather go ahead with a
microcontroller board that we already
understand.
The alternative design which we
finalized, captures the images using a webcam
that will be attached to the laptop placed on the
wheelchair of the user.
These captured images will be used
So, now we will have a look at the But sometimes, it may be possible that
overall code structure of our algorithm and the only one of the either eye will be detected. In
logic behind the decision making. that case, we will give preference to the eye that
There are two parts in the code is detected currently.
structure. The first part is to detect the eye 5. Error Handling: To avoid detection
movements and the other part is to drive the errors, we incorporated an error handling
motors. The code structure can be explained in mechanism, which specifies a threshold for the
the following steps: height and width of a valid eye, by calibrating it
1. Initialization: Initially we set up the for the user.
serial communication that will be used later for If the detection results give a height
the interface between MATLAB and the and width value lesser or greater than the
controller, the video capture and the program threshold, the value is voided and not considered
variables. for the decision making.
2. Image and Video Processing: We then 6. Motion: Now after detecting the eye
take continuous video frames and sample the movements, we have to come up with a decision
input and save it as the screen shots. Each frame algorithm that will help the controller to drive
is then converted into the black and white the motors accordingly:
frames. For the accurate results, we perform a. Valid Left: The decision to turn left will be
contrast stretching on each frames to make the considered as valid if the eye turns left and stays
dark region darker and bright region brighter. there for a cycle. This action will be detected as
This will enable the detection of the eyes better. a left turn request. After that, the patient will turn
3. Estimation: Now, after working on the right to again look forward. Thus, this signal
each frame we try to detect the eyes. This we do should be considered as void.
by estimating the position of left as well as the b. Valid Right: Similarly, the decision to turn
right eye. Thus, we set the threshold and detect right will be considered as valid if the eye turns
the position of the eyes which can be used for the right and stays there for a cycle. This action will
further processing. be detected as a right turn request. After that, the
4. Detection: Now, in this step we actually patient will turn left to again look forward. Thus,
detect the eye movements. The idea is to this signal should be considered as void.
compare the current position of the eye with the c. Valid Straight: The signal to go straight is
previous position. Thus, the difference in the when a person looks left and right or right and
coordinates will help us to predict the motion in then left. This will be detected as to go straight.
the particular eye. 7. Safety Considerations: Given the
application of the system, we incorporated a
safety mechanism, wherein based on the blink MATLAB 2013 can easily be configured to
detection the wheel chair halts. If the user wants serially transmitting data on the Port mentioned
to halt the wheel chair in case of an emergency, in the code. Initially all the already set up serial
he can blink thrice, causing the wheel chair to ports are disabled.
halt. After which, we need to mention the
8. Serial Communication: Now according current port, by checking the ‘Device Manager’
to the detected command, the MATLAB which indicates the port in use. The baud rate of
application will transmit 0, 1 or 2 for left, right communication is set to 9600. The
and straight respectively to the controller which communication is set to have no flow control and
will drive the motors. parity check is disabled.
3.2. SOFT WARE DESIGN After setting up the serial
There are multiple aspects to the communication to enable the data link between
software design of this project. Since majority of MATLAB and AtMega1284P, we reset the
computational work is done in software, a lot of variables needed in the course of the program to
our time went in software design and testing. their initial valuables.
movement of eyes, algorithm for movement of Processing Toolbox, which we have used
wheelchair and serial transmission of the majorly in this section of the Software Design.
The firmware component deals with camera which is connected via a USB cable to
receiving the serial signal, based on which drive the Computer on which the MATLAB script is
structured into many small sub-parts each of capture adaptors. Identifying the correct device
which is described below – and then using it to stream the video signal is the
next step. A which are fundamentally feature
up serial communication –
The firmware constantly monitoring for left, right and straight direction. The circuit
the serial input. The firmware turns ON the port shown below is fairly safe and used to drive the
pin based on this received signal. After turning motors.
ON the port pin, a small delay is given, giving An optoisolator completely isolates
the chair time to move for a fixed time in the the microcontroller from the motor. The diode
desired direction. placed across the motor shorts out spikes when
As far as the firmware design is the motor is turned off. The resistor grounding
concerned, it is fairly simple. All that is required the base of the phototransistor is set for best fall
is take in the serial input, move in a direction, time, probably around 1Mohm.
give a delay and keep doing this repeatedly. The motor capacitor should start
3.4. HARD WARE DESIGN around 0.1uf. The pinout of the 4N35
The hardware part consists only to optoisolator and BUZ73 are also shown. Note
control the motor. The motor controller circuit is that the bandwidth of the 4N35 is very small, so
given below we use a low PWM frequency, perhaps about
1000 Hz.
Figure8.hardware design
MATLAB script, we then use that to drive the 3.5. Mechanical Design
motors. The MATLAB program does all the For the mechanical part, we worked on
4. TESTING STRATEGY
The debug screen was the most useful
aspect of our testing strategy. The debug screen
showed whenever nothing was detected as a
valid eye by the cascade object detector.
Figure10.drive motor design When a valid eye is seen, the length,
Now, in order to detect the eye height, x and y pixel co-ordinates are displayed
movements, we need to have a web camera in on the debug screen. This is done for every
front of the user. For simplicity, we are attaching snapshot. After taking the difference between
the web camera onto the head mount like helmet two snapshots, a tilt movement is indicated by
that will be used to detect the eye motion. either saying ‘moved right’ or ‘moved left’.
Since, we are not making the actual Now, in order to detect the eye
wheel chair, thus, we have to use an independent movements, we need to have a web camera in
head mount. Otherwise, we can use the web cam front of the user. For simplicity, we are attaching
directly attach to the chair. The photo of the head the web camera onto the head mount like helmet
mount is given below. After taking the difference that will be used to detect the eye motion.
between two snapshots, a tilt movement is Otherwise, we can use the web cam
indicated by either saying ‘moved right’ or directly attach to the chair. The photo of the head
‘moved left’. mount is given below
potential.This is done by measuring the potential The integrated mirror in the contact lens
using electrodes placed on face where human allows measuring reflected light; alternatively,
the integrated coil in the contact lens allows The ADXL335 is a small, thin, low
detecting the coil’s orientation in magnetic field. power, complete 3-axis accelerometer with
The big advantage of this method is high signal conditioned voltage outputs. The product
accuracy and nearly unlimited resolution in time. measures acceleration with a minimum full-scale
Both methods explained so far are range of ±3 g.
obtrusive and are not suited well for interaction It can measure the static acceleration
by gaze. The third and preferred method for eye- of gravity in tilt-sensing applications, as well as
gaze interaction is using videocamera. dynamic acceleration resulting from motion,
5.3 Head Mounted Camera System shock, or vibration.
The most common mechanical setup involves The user selects the bandwidth of the
use of desktop computer with integrated eye accelerometer using the CX, CY, and CZ
tracker camera. The desktop computer is loaded capacitors at the XOUT, YOUT, and ZOUT
with software package for analyzingthe eye gaze pins. Bandwidths can be selected to suit the
data. This setup require head fixation and hence application, with a range of 0.5 Hz to 1600 Hz
restricts the head movements. for the X and Y axes, and a range of 0.5 Hz to
An alternative method uses a head mounted eye 550 Hz for the Z axis.
tracking
6. WORKING
6.1 Input Sensing
The input sensor for the smart wheel chair is an
Accelerometer, Joystick, Ultrasonic Sensor,
speech synthesizer and gyroscope.
6.2.Accelerometer Figure15.blockdiagram 3
end flag = 0;
end display('moved left');
if (j>0) elseif ((right_eye(1,1) - prev_right(1,1))<-50)
for (i=1:1:j) flag = 1;
if(eye(i,1)>300) && (eye(i,1)<600) display('moved right');
left_eye = eye(i,:); else
disp('Left:'); flag = 2;
disp(left_eye); display('stayed');
left_flag=1; end
elseif(eye(i,1)>600) && (eye(i,1)<900) prev_right = right_eye;
right_eye = eye(i,:); elseif(left_flag==1)
disp('Right:');
disp(right_eye); prev_left_flag = 1;
right_flag=1; if((left_eye(1,1) - prev_left(1,1))>50)
end flag = 0;
end display('moved left');
elseif ((left_eye(1,1) - prev_left(1,1))<-50)
%% Movement Detection flag = 1;
if((left_flag==1)&& (prev_left_flag ==1)) display('moved right');
prev_left_flag = 1; else
if((left_eye(1,1) - prev_left(1,1))>50) flag = 2;
flag = 0; display('stayed');
display('moved left'); end
elseif ((left_eye(1,1) - prev_left(1,1))<-50) prev_left = left_eye;
flag = 1; elseif(right_flag==1)
display('moved right'); prev_right_flag = 1;
else if((right_eye(1,1) - prev_right(1,1))>50)
flag = 2; flag = 0;
display('stayed'); display('moved left');
end elseif ((right_eye(1,1) - prev_right(1,1))<-50)
prev_left = left_eye; flag = 1;
elseif((right_flag==1)&&(prev_right_flag==1)) display('moved right');
prev_right_flag = 1; else
if((right_eye(1,1) - prev_right(1,1))>50) flag = 2;
display('stayed'); check_left = 1;
end end
prev_right = right_eye;
end elseif ((prev_flag == 1) && (flag == 2)) % right
if (left_flag == 0) movement
prev_left_flag=0; if ((check_left == 1) || (check_straight_left == 1)
|| (check_left_right))
elseif (right_flag == 0) move = 3;
prev_right_flag=0; display('motor stays');
end check_left = 0;
%% Motor Control Signals check_straight_left = 0;
if ((prev_flag == 0) && (flag == 1)) % straight check_left_right = 0;
movement else
display('motor moved straight'); move = 1;
move = 2; display('motor moved right');
check_straight_right = 1; check_right = 1;
check_left_right = 1; end
elseif ((prev_flag ==1) && (flag == 0)) else % no movement
move = 2; move = 3;
display('motor moved straight'); display('motor stays');
check_straight_left = 1; end
check_right_left = 1; prev_flag = flag;
elseif ((prev_flag == 0) && (flag == 2)) % left %% Serial Transmission
movement fprintf(s,'%1d\n',move);
if ((check_right == 1) || (check_straight_right == disp('done');
1)||(check_right_left)) end
move = 3; hold on;
display('motor stays');
check_right = 0; end
check_straight_right = 0; stop(vid);
check_right_left = 0; flushdata(vid);
else pause(0.04);
move = 0; fclose(s);
display('motor moved left'); delete(s);
Accuracy
The project performs satisfactory with
performance accuracy of around 70-90%. The
results after testing it for 100 to 200 attempts to
move in a random direction were made by both
the project members. The results were tabulated
as shown.
Figure19.right direction
Left Motion
The wheelchair moves in the
forward direction if the both the wheels move in
the anti-clockwise direction. Thus the status of
the output port A1 A2 A3 A4 is ‘0 1 01’.
For the system to be accurate, each
time a system is configured for a person, alter the
height
Obstacle detection using IR sensors. paralysis can use either voice or head movement
as per requirement.
Capable of controlling the wheel chairs
Patients in the Hospitals
motion for disabled people using hand
People suffering from certain paralysis can use
gestures.
either voice or head movement as per
Front wheel povides high muerability. requirement.
Old Age Homes
DISADVANTAGES:
People at old age homes can use this chair as per
They can be cost prohibitive their requirement.
They are significantly heavier than manual • In hospitals for handicapped patients .
wheelchairs • It can be used b elderly and physically
challenged person to move inside the
They are difficult to transport – you may
home with out an difficulty
require a customized vehicle
When the person is just casually glaring 9.Journal of Rehabilitation Research and
incorporate certain sequence for turning ON and Pages 353—360 by Department of Veterans
Also since the criticality of the 10.Wooding, D.S. (2002). Fixation Maps:
application is so high, lot of safety precautions quantifying eye-movement traces.
need to be incorporated. It needs to be made sure In:Proceedings of the Eye Tracking Research &
that the system is not fatal to the health of the Applications Symposium 2002. 31-36.New York,
person. A lot of testing needs to be done before ACM.
making such a product a reality. 11. Salvucci, D.D. &Goldberg, J.H. (2000).
Identifying fixations and saccades in eye-
15. REFERENCES:
tracking protocols. In: Proceedings of the Eye
DEPARTMENT OF ECE, AITS, RAJAMPET Page 21
ELECTRONIC WHEEL CHAIR 2020