8/6/2019 Full_paper_locating a Point in 2 - Copy - Copy
1/12
1
LOCATING A POINT IN 2-D SPACE, A LOW BUDGET TABLET PEN
By :- Bimalendu Shankar
Final B.E. Electronics Instrumentation & Control Engg
University College of Engineering
Rajasthan Technical University, Kota
A B S T R A C T
Often we use costly TABLET PEN for the purpose
of electronic drawing but, many of us is unable to
purchase the one due to its cost, also drawing is a
typical task to be completed using a simplemouse due to its uncomfortable design for
drawing. Moreover it required a steady hand of
artist. Keeping in mind we decided to try out a
low budget alternative to mimic the purpose of
mouse w hi le resembling the pen.
Our design uses Hall Effect sensors and a magnet
to locate any point. Magnet is used as pen which
is moved over a restricted area consisting of Hall
sensors. Signal from Hall sensor is function of
position of magnetic pen, which is then used todetermine the exact position of pen using
B I L I N E A R I N T E R P O L A T I O N . These data can be
feeded to computer using USB and thus a low
cost alternative of the PE N may be manufactured.
I. INTODUCTION
Tablet pen is definitely a need of time in
present electronics era, where everymoment we use electronic gadgets for
various purpose. One of these purpose
include electronic drawing by artist on
computer, Tablet pen one which comes in
use for this purpose. Professional artist can
easily purchase a Tablet pen, but an
armature student artist may find it costlier,
moreover a low price alternative is always
welcomed. This low price alternate design
canbe used for the purpose of some simple
digital geometrical drawings like squares,
rectangles, triangles, and spheres etc, also
some simple drawings.
However the accuracy and sensitivity of
the Pen may be poor than expected but,
this may drive the research at higher levelfor alternate method of designing Human
Interface Devices.
II. HALL EFFECT
Hall sensors are used as magnetic field
sensors, thus they measures any change in
magnetic field with respect to someconstant filed, which in the most of the
cases is earth s magnetic field. The sensors
can be so calibrated that they may avoid
any such undesirable field at the output.
This drive us to think that hall sensors can
be used to mimic the purpose of locating a
point in two dimensional space, using a
Hallbach Magnet array.
The Hall effect was discovered by Dr.Edwin Hall in 1879 while he was adoctoral candidate at Johns HopkinsUniversity in Baltimore. Hall wasattempting to verify the theory of electronflow proposed by Kelvin some 30 yearsearlier. Dr. Hall found when a magnet wasplaced so that its field was perpendicularto one face of a thin rectangle of goldthrough which current was flowing, adifference in potential appeared at the
opposite edges. He found that this voltagewas proportional to the current flowingthrough the conductor, and the flux density
8/6/2019 Full_paper_locating a Point in 2 - Copy - Copy
2/12
2
or magconductwere stime, nof theo
70 ysemicoHall ef
Whenplaced ibe gencurrentknown
Figure 1.field
Figurethe Halsemico
throughoutputdirectiofield idistribudifferen
Figure 2present
Whenpresent,force isdisturb
in a pthe out
etic inductor. Althouccessful aapplicati
etical phy
ars. Widucting mect found it
a current-nto a magerated perand the
as the Hall
Hall Effect
1, illustratel effect. Itducting
which aonnectionsn of curres presenttion is unce is seen
. Hall Effe
perpendias shownexerted othe curre
tential difut. This v
ion perpengh Hall sd well rens outsideics were f
h theterials in ts first appli
carryingetic field,endicularield. Thisffect.
Principle, wi
s the basicshows aaterial (H
current isare perpen
nt. When(Figure
iform andcross the o
t Principle,
ular magin Figurethe curre
t distribut
erence (voltage is the
icular to texperimeeived at tof the realund for ov
adventhe 1950s, tcations.
onductorvoltage w
to both tprinciple
th no magne
principlehin sheetall eleme
passed. Tdicular to tno magnet1), curreno potenti
utput.
magnetic fi
etic field2, a Lorent. This for
ion, resulti
ltage) acroHall volta
etse
mer
ofe
isilleis
tic
ofoft)
ee
icntal
ld
istzeg
sse
(aa
2.
T
wlethcd
Oepao
ksedifie
E
H). The ind the currequation 1
he exact r
e Hall coe
here I isngth,B is te depth oarge, andnsity elect
ne very ifect is thsitive chad negativposite.
III.
SE
hen a currpt in a mamiconductrection peld and cu
fect in sem
= Hall fie
eraction ont is show.
lation is as
fficient is d
the currenhe magneti
the plate,n is theons.
portant fat it diffges movine charges
HALL EF
ICOND
ent carryinnetic fieldr experie
rpendicularrent field,iconductor
ld
the magnen in equati
shown in
efined as
across tc flux dens
e is thecharge the
ature of trentiatesg in one d
moving
ECT IN
CTORS
semicond, the carriece a forto the
this is call.
tic fieldn form
(1)
quation
(2)
(3)
e plateity, diselectron
carrier
he Halletweenirectionin the
uctor iss of thee in aagneticed Hall
(4)
8/6/2019 Full_paper_locating a Point in 2 - Copy - Copy
3/12
3
The simple formula for the Hall coefficientgiven above becomes more complex insemiconductors where the carriers aregenerally both electrons and holes whichmay be present in different concentrations
and have different motilities. For moderatemagnetic fields the Hall coefficient is
(5)
where is the electron concentration,the hole concentration, the electronmobility , the hole mobility and theelectronic charge.
For large applied fields the simplerexpression analogous to that for a singlecarrier type holds.
(6)
IV. QUANTUM HALL EFFECT
In the presence of large magnetic fieldstrength and low temperature, one canobserve the quantum Hall effect, which isthe quantization of the Hall voltage.
As the output of quantum Hall effect isquantized i.e. there is a step change atoutput for step change in field strength,thus better avoidance to unnecessary
nearby field can be obtained.
V. HALL SENSOR S TRANSFER
FUNCTION
As clear from equation 1 and 2 the Hallvoltage output of the sensor is directlyproportional to the field applied, thus the
polarity of output voltage should alsochange with change in direction of the
field applied. This system would requiredplus and minus power supplies, therebyincreasing the complexity of the systemand also questions the sensitivity andstability.
In order to avoid two power supplies, afixed offset or bias is introduced into thedifferential amplifier. The biased valueappears when no field is applied, and iscalled null voltage. When a positivemagnetic field is sensed the voltage atoutput raises above the null voltage, whilein the case of negative filed the voltagedrops below the null voltage but remainpositive and hence avoid the need of minus
power supply, as shown in figure 3.
Figure 3. Transfer function of Hall sensor, usedwith Null voltage concept
Figure 4. Transfer function
Figure 4. shows the analogueapproximation of transfer function.
8/6/2019 Full_paper_locating a Point in 2 - Copy - Copy
4/12
4
VI. MAGNETIC FIELD
As our design uses Hall sensors to locateany desired point in two dimensions, weuse magnet with appropriate field as
primary sensor of the system which sensesthe desired location with respect tostationary Hall sensors.
A magnet produces a vector field, themagnetic field, at all points in the spacearound it. It can be defined by measuringthe force the field exerts on a movingcharged particle, such as an electron. Theforce (F) is equal to the charge (q) timesthe speed of the particle times the
magnitude of the field (B),
Or F = q*v x B (7)
where the direction of F is at right anglesto both v and B as a result of the crossproduct. This defines the magnetic field'sstrength and direction at any point. Thisforce is same which cause theaccumulation of charge carrier across theface of Hall sensor, and hence the Hallvoltage.
The change in field for the permanentmagnet depends on its design. Magneticfield of a few magnets is shown below.
Figure 5. Magnetic field of Spherical Magnet.
Figure 6. Magnetic field of two hemispherical
magnetswith gap between them.
Figure7. Magnetic field of a single Bar magnet.
Figure 8. Magnetic field of Hallbach Magnet.
8/6/2019 Full_paper_locating a Point in 2 - Copy - Copy
5/12
5
Figure
altern
Com
as s
conclEight
alter
more
plane
adva
devic
sensi
VII.
In m
is an
inter
on a
perfo
direc
Figure 1and the ginterpola
9. Magnetic
ting N and S
aring the f
own abov
usion thatMagnets
ating N an
symmetri
. This m
tage of ea
e and he
ivity and li
ILINEA
athematics,
extension
olating fu
regular gr
rm linear i
ion, and th
. The four rereen dot is thte.
field of Eight
ield for var
e we can
field in figadhered
S pole fa
al magnet
y give u
se in calib
ce also i
nearity.
INTERP
bilinear i
flinear int
ctions of t
id. The k
nterpolatio
n in the ot
dots show tpoint at whi
Magnets
ious magn
reach to
ure 9 duetogether
shion gives
ic field in
s an add
ration of t
ncreases t
LATION
nterpolati
rpolation f
wo variabl
y idea is
first in o
her directio
e data pointsh we want to
ts
a
toin
a
a
d
e
e
n
or
es
to
e
n.
L
to
fu
a
fu
Q
Q
Q
an
di
di
T
Ifth(in
oking in f
determin
nctionfat
sumed th
nctionfat
11 = (x1,y1),
12 = (x1,y2),
1 = (x2,y1),
d Q22= (x2,
e first do lirection. Th
here R1=(x
here R2=(x
e proceedrection.
is gives u
we choosee four poin, 1), (1,terpolation
igure 10 su
e the va
the poin
t we kn
our points
y2).
near interpis yields
, y1)
, y2)
by inter
the desire
a coordinats wherefi), andformula si
pose that
lue of u
t P=(x, y
w the v
(
(
(1
(1
lation in t
olating in
estimate o
te system is known ar(1, 1), th
plifies to
e want
nknown
). It is
lue of
)
)
0)
1)
ex-
(12)
(13)
the y-
(14)
ff(x,y).
(15)
n whiche (0, 0),n the
8/6/2019 Full_paper_locating a Point in 2 - Copy - Copy
6/12
6
f(x, y) f(0,0)(1-x)(1-y) +f(1,0)x(1-y)+f(0,1)(1-x)y + f(1,1)xy (16)
Or equivalently, in matrix operations:
(17)
Contrary to what the name suggests, theinterpolation is notlinear.
The result of bilinear interpolation isindependent of the order of interpolation.If we had first performed the linearinterpolation in the y-direction and then inthe x-direction, the resultingapproximation would be the same.
Trilateration and Triangulation may alsobe used but as both of these uses threereference point to determine the location ofany point on a 2-D plane. Since ourvoltage displacement relationship is notlinear, as clear from figure 5 to figure 9,we could not locate the reference point anddetermine the unknown point using thesemethods. Hence these methods areignored.
VIII. DESIGN OF THE TABLET PEN
Basic structure of the design can be splitinto two components, one is mousecomponent which include the drawing pad,magnet and the programmed mousemicrocontroller, while other is USBcomponent which include USBmicrocontroller and port etc which isprogrammed to transfer the data to
computer.
Also as a mouse not just measures therelative position of the mouse and movethe cursor on the screen accordingly butalso senses the relative velocity with whichthe mouse is moved, in our case the
magnet, this data gives us the distancetraversed by the cursor on the screen. Thuswhile programming the mousemicrocontroller these facts should be keptin mind.
One way of programming may include thelook table method, in which the calibrationtable consisting of relative position ofmouse and the position of cursor onscreen, i.e. the direction of cursor
movement, while a second look up tablewould consists of calibration of relativespeed with which the mouse or magnet ismoved over the pad to the distance towhich the cursor is moved over the screen.
Figure 11. Gives the basic block diagramdesign of the pen. The mouse moves andoperates based on the user s actions. Leftclicks and right clicks can open documentsand change properties on files. When theuser moves the mouse, the mouse willmove as well in the same general direction.The direction and displacement of themouse is based on relative motion notabsolute motion. How much the mousemoves depends on how fast the user movesthe mouse. If the user moves the mousefaster, the mouse will move a greaterdistance. Likewise, if the user moves themouse slowly, the mouse will move a
shorter distance.
From above discussion it is clear that themouse part is more complicated than USBpart of the mouse, there we need to, first ofall prepare the two calibration table one fordirection while other for distance. Thecalibration method is explained latter inthis paper.
8/6/2019 Full_paper_locating a Point in 2 - Copy - Copy
7/12
7
Figure 11. Basic block diagram of the Tablet Pen.
IX. DETECTION OF POINT IN 2-D
As clear from above figure 11 that Hall
sensors are used to detect the location of
primary moving element, which is magnet
in our case.
The sensors can be mounted on a Bakelite
board or any other inert plastic board of
sufficient and adequate length and width,
on their edges and then are covered with
some flexible non-magnetic and non-conducting material. This board is also
called as drawing board.
Also the sensors are connected to power
supply which may be derived from battery.
Voltage output of the sensor is required to
be feeded to ADC card before it can be
sent to mouse microcontroller.
The output variation of A1302EU a LinearHall Sensor of Allegro make is
1.3mV/Gauss, which is very small to
directly connect the sensors output to
ADC. Thus a differential amplifier is
required to be used with sufficient gain.
Also as the circuit requires protection from
high frequency noise, we should use a low
pass filter before connecting the output to
ADC.
Figure 12 shows the general idea of the circuit
required to sense the location of any point using
Hall sensors.
A circuit similar to above figure 12 is
required to be made for all the four
sensors. Using this circuit we can read the
data output of ADC to desired register of
the mouse microcontroller.
X. CALIBRATION OF DRAWING
BOARD
The calibration is required in order to
determine the exact location of magnetic
pointer. This mapping of coordinate is one
of the most difficult tasks to do.
Drawing pad
Mouse
Microcontroller
USB
MicrocontrollerUSB
Hall Se nsors Magnet
Computer
ush
uttons
+ve Gnd
Battery for Power
supply
Potential
divider circuit
Diff
Am li
Mouse
MC U
Gn d
Hall sensor
8/6/2019 Full_paper_locating a Point in 2 - Copy - Copy
8/12
8
For the mapping we will use a simple
arrangement where, we will make a virtual
grid pattern, as shown in figure 13 below.
Figure 13. Drawing board, showing the grid pattern
forcalibration.
Now for calibration purpose we will place
our magnetic pen to each of the point of
intersection in the above grid pattern. Now
the output of all the four Hall sensors aftersufficient amplification and A/D
conversion are inputted to the mouse
microcontroller. In the microcontroller the
inputted data undergoes a conversion
according to equation (16), using this
equation we can estimate the value of an
identical Hall sensor placed at that
coordinate. Now this estimated value is
tabulated in a lookup table, against the
known coordinate. We will use the
exponential interpolation method to
estimate the coordinate of any point
between two calibrated points.
To increase the accuracy of determination
of the point we can increase the numbers
of grids.
Also the exponential interpolation brings
out satisfactorily accurate result, as clear
from figure 14 and figure 15.
Figure 14. Exponentially decaying curve, showing
relationship between Vout and Drelative or Total
effective Air Gap.
Figure 15. Showing the relationship between Voutand distance Drelative , when the effective air gap is
constant.
Figure 14. Shows that the output voltage
decays exponentially with increase in
effective air gap. It compels us to think of
the effect of magnetic pen, when it is in the
vicinity of drawing board unintentionally.
To avoid the affect we should determine
the limit of effective output voltage,
named as threshold voltage. Any output
voltage below threshold should be
avoided, and counted as unintentionalencounter of magnet with the sensor.
4
2
3
1
(0, 1)
(0,0)
(1, 1)
(1,0)
8/6/2019 Full_paper_locating a Point in 2 - Copy - Copy
9/12
9
For this we should cover the sensors witha
non magnetic sheet over which the pen
would move. This would maintain a
constant air gap.
Also as clear form figure 15, where the
output voltage also changes with change in
distance D, while remaining the effective
air gap constant. Using this we can
determine a similar threshold for
movement of the pen over the sheet.
XI. DETERMINATION OF
RELATIVE DISPLACEMENT,
DIRECTION OF MOVMENT
Let us suppose that our pen is placed at the
centre of the board, at this moment the
output of all the four sensors would be
same. Now the pen is moved in upward
direction then the output of sensors 3 and 4
would increase, while that of 1 and 2would decrease simultaneously.
Comparison between the change in
outputs of the sensor 1 with 4 and that of 2
with 3 would let to determine the
movement on Y-axis. An increment in
output of sensor 3 and 4 and simultaneous
decrement in output of sensors 1 and 2,
shows the upward movement of pen, while
vice versa show the downward movement.
In similar fashion any movement along X-
axis can be determined by comparing the
change in output of sensors 1 with 2 and
that of 4 with 3.
Let us consider an example as shown in
figure 16, the pen is moved from centre
toward the sensor 4.
Figure 16. An example to illustrate the
determination of direction of movement.
In figure consider that initial position of
the pen be the origin, now the pen moved
towards sensor 4, then
1. Output of sensor 4 will increase.
2. Outputs of all other will decrease.
Now let s compare the change in outputs,
we will reach to following results
1. Comparison in change in output of
4 and 1 shows an upward
movement, so would be result of
comparison between 2 and 3.
2. Comparison in change in output of
4 and 3 shows an movement in left
direction, so would be result of
comparison between 1 and 2.
Now using above comparison resultswe can easily reach to a conclusion
that the pen is moved in IInd quadrant
toward sensor 4, relative to initial
position.
The above gained knowledge
(information) mixed with the
knowledge of calibration and linear
approximation would let us to
determine the final position. Byrepeating this algorithm at high
4
2
3
1
(0, 1)
(0,0)
(1, 1)
(1,0)
8/6/2019 Full_paper_locating a Point in 2 - Copy - Copy
10/12
10
frequency, we would get a smooth
curve, replicating the original move of
the pen.
XII. ESTIMATION OF
MOVEMENT OF CURSOR ON
SCREEN
The distance traversed by the mouse
pointer on screen doesn t depend on
how much the pen is moved over the
board but, depends on how fast the pen
is moved. Thus for an estimation of
how much a mouse moves we need tomeasure or sense the velocity with
which the pen is moved.
The rate of change of output of sensors
would give us an estimation of, how
fast the pen is moving? Now we can
prepare a lookup table from where the
mouse pointer would decide that how
much it should move for given time
differential of change in output. Linear
interpolation can be used to estimate
any value between two tabulated
velocities.
XIII. COST ESTIMATION
Our model uses following components as
detailed in table 1 below
ComponentName
Number Total Price
Magnet 1 4$
Atmel Mega32(Mouse MC)
1 16$
CrystalOscillator
1 1$
Battery (9V) 1 1$
PCB 2 5$
USBcomponent
1 10$
Linear HallSensor
4 16$
Push Buttons 3 1$
Diff Ampl(Maxs4462)
4 4$
OtherExpenses
5$
TOTAL 63$
Table 1. Showing the estimated price of the model
propounded, price of each component is taken from
e-resources and onlinebusiness site.
The cost of digital pen of various makers
varies from 70$ to 160$. Our pen cost is
estimated to be 65$ based on street price of
every component on unit purchasing, so
definitely price estimated would decrease
considerably if purchased in bulk and
special purpose IC s would also serve the
purchase.
So depending upon need of accuracy and
sensitivity of purpose of application, our
Digital Tablet Pen is ready to revolutionize
the market due to its low cost. However it
suffers several drawbacks also which are
discussed next.
XIV. ADVANTAGES OF OUR
MODEL
The main advantages of our model are as
followed:-
1. Low cost of manufacturing.
2. Easy design.3. New field of application of Linear
Hall sensor.
XV. MAJOR DRAWBACKS OF OUR
MODEL
Following are the major drawbacks I
absorbed with the model
8/6/2019 Full_paper_locating a Point in 2 - Copy - Copy
11/12
11
1. Magnet may affect the user with
pacemakers.
2. Magnet may adversely affect the
electronic components working,
such as hard disk data could bepermanently erased if a strong
magnet is put over it.
3. Stray magnetic fields may affect
the working of our model.
4. High sensitivity and resolution is
susceptible.
XVI. CONCLUSION
The model may be proved as a good low
cost alternative against conventional
digital pens. It has a simple design which
is also an added great advantage. It also
suggest us a new dimension to look on
how to exploit the Hall sensors to
advantages. However its resolution and
sensitivity for practical application is yet to
be tested. Also practical implementation ofthe model described may bring several
more difficulties which are not discussed
in this paper.
XVII. REFERENCES
1. Application notes, by
Microcontroller Division
Application Team :USING THE
ST7263 FOR DESIGNING A USB
MOUSE; http://www.st.com
2. Honeywell MICRO SWITCH
Sensing and Control; Hall Effect
Sensors, Chapter 2.
3. Wikipedia, Hall Effect.
4. Wikipedia, Bilinear Interpolation,
Trilateration and Triangulation.
5. A gallery of magnetic fields.htm6. Wikipedia, Magnetic field.
7. Joystick controller employing hall-
effect sensors - US Patent
5160918.htm
8. Magnetic ball joystick- US Patent
5969520.htm9. Datasheet of ATMEL Mega32
microcontroller,
http://www.atmel.com
10.White Paper:Nokia Digital Pen,October 2003,http://www.nokia.com/forbusiness
11.Continuous-Time RatiometricLinear Hall Effect Sensors; AllegroMicroSystems, Inc.www.allegromicro.com
12.Handwriting Tablet, GraphicsTablets, Digital Pens atTigerDirect_com.htm;www.tigerdirect.com
13.Highly sensitive inertial mouseinvention.htm;www.freshpatents.com
14.Hobby Engineering SensorsCategory.htm
15.Wikipedia, Mouse (Computing),
Pointing Stick.16.www.oldmouse.com; The EarliestComputer Mouses ~ o l d m o u s e_c o m ~.htm; Trackballs - ORBITOrbit X-Y Ball Tracker ~ o l d m ou s e _c o m ~.htm
17.Datasheet of Maxs4462.
http://www.freshpatents.com/http://www.tigerdirect.com/http://www.allegromicro.com/http://www.nokia.com/forbusinesshttp://www.atmel.com/http://www.st.com/8/6/2019 Full_paper_locating a Point in 2 - Copy - Copy
12/12
This document was created with Win2PDF available at http://www.win2pdf.com.The unregistered version of Win2PDF is for evaluation or non-commercial use only.
http://www.win2pdf.com/http://www.win2pdf.com/http://www.win2pdf.com/http://www.win2pdf.com/