Sie sind auf Seite 1von 5

TOUCHSCREEN CONTROLLED WHEEL CHAIR

ABSTRACT: A wheel chair is a chair, designed to be a


replacement for walking. The device comes in variations
where it is propelled by motors or by the seated occupant
turning the rear wheels by hand. Wheelchairs are used
by people for whom walking is difficult or impossible due
to illness, injury or disability.
Keywords:wheelchair, touchscreen.

I.

INTRODUCTION

Here we describe a microcontroller-based


wheelchair, the speed and direction of which can be
controlled from a touchscreen. The wheelchair
moves by means of a geared motor. Fig. 1 shows
the block diagram of the touchscreen controlled
wheelchair. The system includes a resistive
touchscreen, microcontroller and motor driver.

ATmega16: It is a low power CMOS 8-bit


microcontroller based on the AVR advanced RISC
architecture. The AVR core combines a rich
instruction set with 32 general purpose working
registers. All the 32 registers are directly connected
to the arithmetic logic unit, allowing two
independent registers to be accessed in one single
instruction executed in one single clock cycle. This
architecture is more code efficient.
The ATmega has the following features: 16kB of
in-system programmable Flash program memory,
512 bytes of EEPEOM, 1kB SRAM, 32 general
purpose IO lines, 32 general purpose working
registers, three flexible timers/counters with
comparable modes, internal and external interrupts,
a serial programmable USART, a byte oriented two
wire serial interface, an 8 channel 10 bit ADC, an
SPI serial port, and six software selectable powersaving modes.The microcontroller has an 8 channel
ADC.
II.
1.
2.
III.

The touchscreen: The resistive touchscreen


consists of a flexible top layer made of
polyethylene and a rigid bottom layer made of
glass. Both the layers are coated with a conducting
compound of indium-tin oxide and then spaced
with spacers. When the monitor is operational, an
electric current flows between the two layers.

IMPLEMENTED FEATURES
Direction control of wheelchair.
Speed control of wheelchair.
ELECTRONIC DESIGN

Fig. 2 shows the circuit for the touchscreen control


for wheelchair. It comprises microcontroller
ATMega16(IC1), motor driver L293D(IC2),
regulator 7805(IC3),resistive touchscreen and a few
discrete components.

When a touch is made, the flexible screen pressed


down to touch the bottom layer. A change in
electrical current is hence detected and the
coordinates of the controller and parsed into
readable signals for the operating system to react
accordingly.
The 4-wire resistive touchscreen uses both the layer
to calculate the axes information of the touch.
Touch measurement is a two-step process. The xcoordinate of the touch point is calculated by
creating a voltage gradient on the flexible layer.
The y-coordinate is determined by creating gradient
along the bottom layer.

Port A of the microcontroller is multiplexed with


the 8 channel ADC. Port pins PA0 through PA3 of
microcontroller are interfaced with pins 1 through 4
of touch screen.
When the touchscreen is touched, its resistance
changes depending on the position of the touch.
The touch input is in the form of analogue values of

the voltage relative to the point of touch. This is


processed in the microcontroller.
The ADC converts the analogue values of the
touchscreen into 10 bit digital equivalent form. The
digital data is then processed to find the exact
position of the touch and perform the
corresponding actions like left turn, right turn,
forward movement and reverse movement.
Motor driver L293D is interfaced with the
microcontrollers port B. port pins PB0, PB1, PB2,
PB3 of the microcontrollers control motors m1 and
M1,respectively. Motor drivers are enabled in
pairs.when enable input pins 1 and 9 of IC2 are
high, the associated drivers are enabled and their
output pins 3 and 6 and pin 11 and 14, respectively,
are active and in phase with the inputs. With the
proper data inputs, each pair of drivers forms an Hbridge reversible drive, suitable for motor
applications.
Motors M1 and M2 rotate in forward
direction (clockwise) when port pins PB1 and PB3
are high. Motors M1 and M2 rotate in reverse
direction (anti-clockwise) when port pins PB0 and
PB2 are high.
A 12V DC battery is used to power the circuit.
IC 7805 provides regulated 5V supply to the
circuit. Capacitor C1 bypasses ripple from the
regulated supply. LED1 acts as the power-on
indicator and resistor R1 limits the current through
LED1.

PORTA(0,1,2,3) PIN TO TOUCHSCREEN's(1,2,3,4)


PIN
TOUCHSCREEN PIN NO
MICRO'S PIN(PORTA)
1

ORANGE

RED

BROWN

PA2(38)

BLACK

PA2(37)

PROGRAM:

PA0(40)
PA1(39)

ANOTHER PIN OF TOUCHSCREEN IS GROUND.......


(YELLOW COLOUR WIRE)
(MOTOR DRIVER(L293D) CONNECTION)-TOTAL 16
PIN
MOTORDRIVER PIN NO
2

MICRO'S PIN(PORTB)

PB0(1)

PB1(2)

10

PB2(3)

15

PB4(4)

OTHER CONNECTION OF MOTOR DRIVER


MOTORDRIVER PIN NO

TO

4,5,12,13
1,9,16
8

SOFTWARE
The source program is written in C language and
compiled using AVR studio to generate the Intel
hex code. The generated hex code is programmed
into the chip using a suitable programmer. The code
is well commented and easy to understand.
The device is shipped with CKSEL=0001
and SUT=10. The default clock source setting is
therefore 1MHz internal RC oscillator with longest
startup time. To activate the internal oscillator,
program the fuse bytes of microcontroller as
follows:
Fuse low bytes=D4
Fuse high bytes=99

WIRE COLOUR

GROUND
VCC(+5 V)

SUPPLY VOLTAGE FOR MOTOR(+12 V)

3,6

LEFT MOTOR

11,14

RIGHT MOTOR

*/
#include<avr/io.h>

//header file

#include<util/delay.h> //header fil


voidDrive_Motor(unsigned char LEFT,unsigned char
RGHT)//For MOTOR
{
if(RGHT==0)//if right == 0 then right
motor will stop
{
PORTB&=~_BV(1);

/* CONNECTION DETAIL
PORTB&=~_BV(0);
(RESISTIVE TOUCHSCREEN CONNECTION)
}
TOUCHSCREEN TOTAL PIN-5

if(RGHT==1)//if right == 1 then right


motor will go forward
{

unsigned char read_adc_channel(unsigned char


channel)//for channel selection
{

PORTB&=~_BV(1);

ADMUX=(1<<REFS0)|(1<<ADLAR)|channel;

PORTB|=_BV(0);

_delay_ms(10);

return(ADCH);

if(RGHT==2)//if right == 2 then right


motor will go backward

}
int main()// Main function

{
{ DDRB=0x0f;//for motor PB -(0,1,2,3) connected
to motor driver

PORTB|=_BV(1);
PORTB&=~_BV(0);
}

adc_init();//adcinitilized
unsigned char x,y;//for storing value of x & y coordinate

if(LEFT==0)//if left == 0 then left motor


will stop

while(1)
{

{ _delay_ms(20);

PORTB&=~_BV(2);

DDRA=0x05;//00000101

PORTB&=~_BV(3);

PORTA=0x01;//00000001for x init

x=read_adc_channel(3);

if(LEFT==1)//if left == 1 then left motor


will go forward

_delay_ms(20);
_delay_ms(20);

{
DDRA=0x0a;//00001010
PORTB&=~_BV(2);
PORTA=0x08;//00001000//for y init
PORTB|=_BV(3);
y=read_adc_channel(2);
}
_delay_ms(20);
if(LEFT==2)//if left == 2 then right motor
will go backward

if(x>57 && x<140 && y>150)//forward


{

{
PORTB|=_BV(2);

Drive_Motor(1,1);

PORTB&=~_BV(3);

}
else if(x>57 && x<140 && y<60)//backward

}
voidadc_init(void)

//PORTB=0b00001001;

//for adcinitilization

Drive_Motor(2,2); //PORTB=0b00000110;

ADCSRA=(1<<ADEN)|(1<<ADSC)|(1<<ADATE)|
(1<<ADPS2);

else if(x<70 && y>80 && y<130)//left

SFIOR=0x00;
}

{
Drive_Motor(2,1); //PORTB=0b00000101;

}
else if(x>150 && y>80 && y<130)//right
{
Drive_Motor(1,2); //PORTB=0b00001010;
}

Soldering iron
Soldering wire
Zero PCB board
Cutter, striper, plier etc
Connecting wires
Bug-strip and connectors
Discrete components
ICs

else//stop
{
Drive_Motor(0,0); //PORTB=0b00000000;
}
}
}

IV.

IMPLEMENTATION:

The above circuit has been implemented on Printed


Circuit Board(PCB) by following the steps listed
below:

Step 4: Testing the circuit:


Before supplying power to the circuit, it was tested
if the connections are proper and no erroneous
shorts were present in the circuit. Continuity was
checked using the DMM.

STEPS FOR IMPLEMENTATION


Step 1: Preparing the circuit diagram
Considering the requirements of the project suitable
ICs were selected. Functionality of these ICs was
studied with the help of datasheets. Interconnection
of the peripherals like touch screen, l293d etc with
the microcontroller was done with the help of
datasheets.
Step 2: Writing software:
Keeping in mind the working of the project an
algorithm for the project was developed. After a
full proof algorithm, we initiated writing the code
in C language. The code was tested for using the
development board. After many cycles of trial and
error we were successful in developing a fully
functional program for our project.
Step 3: Mounting the circuit:
The circuit is mounted on the zero PCB board. The
tools required for mounting the circuit are:

Once the connections are proper, power supply was


fed to the circuit to check if proper 5V and 12V are
supplied to the respective pins of microcontroller
and l293d. Once this was done the ICs can be
inserted in the socket and the touchscreen and
motors can be interfaced. Now the circuit is ready
to serve the purpose.
Now various functions of the project like forward,
reverse, left and right movement of the chair, speed
control etc were tested for and verified.

V.

RESULTS

The circuit is working in accordance with the


theory and the desired direction and speed control
functions of the wheelchair are fully functional.
CONCLUSION
The project was successfully implemented on the
printed circuit giving the desired and the expected
results.
Advancements in the project: The batteries used in
the project can be replaced with the rechargeable
batteries and the user can be notified regarding the
low battery so that he can charge them in advance.
The resistive touchscreen can be replaced with the
capacitive touchscreen.

ACKNOWLEDGEMENTS
We hereby take this opportunity to acknowledge all
the help, guidance and support that we have
received during the making of our project. We
would like to thank our project guide and
inchargeMr.PavanBorra and Mr.Beral C. (Lecturer,
Electronics Department) for providing us with the
guidance, encouragement, advice and the vision
that helped us complete this project. We would like
to thank our classmates for helping and supporting
us through this project. And finally we would like
to express gratitude towards all the lab assistants
for their patience and co-operation throughout this
project.

REFERENCES
APPLICATIONS
Wheelchairs are used by people for whom walking is
difficult or impossible due to illness, injury or disability.
Touchscreen provides easy and independent navigation to
the user while the primitive means available requires the
user to move the chair with their arms or with the help of
others.

1.
2.
3.

www.electronicsforu.com
www.circuitstoday.com
www.atmel.com

Das könnte Ihnen auch gefallen