TELKOM NIKA Indonesia n  Journal of  Electrical En gineering   Vol. 15, No. 1, July 2015, p p . 191 ~ 19 6   DOI: 10.115 9 1 /telkomni ka. v 15i1.718 7        191     Re cei v ed  No vem ber 2, 20 14; Re vised Janua ry 2 6  20 15; Accepted  February 15,  2015   Simple Method for Non Contact Thickness Gauge using  Ultrasonic Sensor and Android Smartphone       Anif Jamalu ddin*, Fita Listiana, D w i  T e guh Rahard jo, Lita Rah m asari,  De w a nto Har j uno w i bo w o   Ph y s ics Educ a t ion Progr am, Sebe las Maret  Univers i t y , Ind ones ia   Jl. Ir. Sutami 36 A, Surakarta, Indones ia   *Corres p o ndi n g  author, e-ma i l : elha nif@u n s.ac.id       A b st r a ct     T he ai m of this researc h  is to devel op si mple  meth od for  non co ntact thickn ess ga ug e usin g   ultrasonic sens or and andr oid  sm artphone. This system  is c onstruc ted  using ultras onic s e nsor HY-SRF05,   micr ocontr o ll er  AT MEGA328,  bl uetoot mo dul e a n d  an dr oid  smartph o n e . Ultras onic   sensor  trans mits  ultraso n ic pu ls es in the form  of w a ves and reciev es  back the pu lses after  the w a ves are reflected by a n   obj ect. T he ti me  d u ratio n   o f  ultraso n ic  be tw een  tr a n smition  an d r e ce ption  is c a lc ul ated  as  distan c e   betw een s enso r  and s a mpl e . T he metho d  of  for thickness  me asur e m ent  adh ere sa mpl e  on h o ld er i n fron t   of ultras onic  s ensor. T h e T h ickness   meas ure m e n of s a mp le  is c a lcu l ated  bas e o n   distanc beet w e n   sensor  to h o l d er (fixe d  b a rrie r)  a nd s a mpl e  to se ns or. T h z e r o  p o siti on  of  me asure m ent is  dista n ce  o f   sensor t o  h o ld er. T he d a ta  o f  thickness  is  sent  via  bl ueto o th a nd r e ceiv ed by  the  And r oid  ap plic atio n .   Andro i d Ap plic ation us es to  displ a meas ur ement is  d e sig ned b a se  on M I T  App Invento r  for Androi d (AIA)   platfor m . T he me asur e m ent r e sults show  a  fairly hi gh d egr ee of accuracy  is 99.97 8%.      Ke y w ords : AT Mega 328, u l tra s onic se nsor H Y -SRF 05,  blu e t ooth modu le,  Andro i d, App I n ventor         Copy right  ©  2015 In stitu t e o f  Ad van ced  En g i n eerin g and  Scien ce. All  rig h t s reser ve d .       1. Introduc tion  The aim of this re se arch  is to develop non cont act thickne ss gauge u s in g simple  method. It can ap plicate d  on o n  mo bile data  acquisitio n  u s in g and roid  smartph one s.  The  resea r ch is developm e n t from  co mmon a nalo g  into digit a l thickne ss gaug e (cal liper,  micromete r).   In an  anal og  thickne s s g a uge  (callipe r , microm ete r),  the me asure m ent results  sho u ld  con s id er re a d ing erro rs (parall a x) whi c h can be  o ne of the ca use s  of t he inaccu ra cie s  in the  measurement  re sults.  The   difficulty in u s ing  an alog t h ickne s s me asu r em ent  can b e   solved  by  developing a digital measurem ent. But, the digita l t h ickness instrument  still has a weakness,   whe n  it used  to measu r e el astis o b je cts that  the sha p e  are ea sy to chang e wh en  pre s sed.   The non  con t act thickne s s gau ge met hod is p r op o s ed to solve  the problem . On the   resea r ch p r o poses  de sign  usin g ultrasonic  se ns or.  The ultrasoni c sen s o r  is o ne of the  mo st  accurate sen s or  for non conta c di sta n ce mea s u r e m ent [1]. Th e novelty of  our  re sea r ch  is  modifying distance m e a s u r eme n t to thickne ss g aug e. In addition , the result o f  gauge can  be  displ a yed on  mobile ph one The  Ultra s o n i c   sen s o r  tran smits ultra s o n ic  pul se s in  the fo rm  of  wave s a nd  recieve s   back th e pul se s after the  wave refle c ted by obj ect .  Microcontrol l er ATm ega 3 28  with a r dui no  platform i s   chosen  be cau s e it i s   easy  to u s so t hat the  emp hasi s   on effi cien cy a nd  cost  effec t ivenes s  [2]. The Wireless  communic a tion fo r transmi ssion d a ta from microco n trolle r uses  bluetooth  co mmuni cation.  It is chosen  beca u se it is sim p ler th a n  GSM com m unication a nd  requi re le ss p o we r than Wi -Fi. Bluetooth  has wi rele ss techn o logy wi th a short -ra n ge ope rating  at  2.4 GHz, and  relatively ch eape r [2, 3]. The firs step  for desi gn of  non conta c t thickne ss g a uge  method i s  se tting zero po sition a s  dist ance betwee n  ultra s oni sen s o r  and  h o lder.  When  the   obje c t wa s a dhered o n  h o lder i n front  of ultrasoni sen s o r , micro c ontrolle r cal c ulate d  dista n ce   betwe en sen s or a nd sam p le. The thickne s s of obj e c t is dista n ce  betwee n  se nso r -hold e r (zero  positio n) min u s di stan ce b e twee n se nsor-sam ple.   The and roid  sma r tpho ne device s  presented as  a  real time  data  acqui sition  for  bloo d   pre s u r moni toring  [4], ele c tro c a r dio g ra m in  medi cin e  [5] a nd  RF ID read er [6]. The  thickn e s Evaluation Warning : The document was created with Spire.PDF for Python.
                             ISSN: 23 02-4 046                     TELKOM NI KA  Vol. 15, No. 1, July 201 5 :  191 – 196   192 gaug e results a r e di spl a yed on An d r oid Sm artp h one u s in g a ndroi d a pplication. Androi Applicatio n is developed u s ing MIT App   Inventor for Androi d (AIA) platform It relatively eas y  for   some one  wit h  no prog ra mming skill and have m a de no  spe c ial  softwa r e [7]. The pu rpo s e  o f   this  re sea r ch  is to  de sig n  of no cont act thi c kn es s of elas tic objec t. It  i s  applied for m obile  measurement  using a ndroi d sma r tpho ne  for displayin g  data acqui sition.       2. Rese arch  Metho d     The Desi gn  of non conta c t thickne ss  gaug e co nsi s ts of some  hard w a r e (su c h a s   ultrasoni c sensor HY-S RF05,  mi croco n tro lle r ATmega3 28,   bluetooth  module, an droid   sma r tpho ne) and  softwa r e (su c h a s   Arduin o  ID E  and Ap p In ventor). Fi gu re 1  sh ows  the   experim ent  schemati c  o f  wirel e ss t h ickn e s s g a uge  device  ba sed  on  Android  a nd a  microcontroll er.           Figure 1.  Schematic  circui t of wireless t h ickne s s gau ge         Working   Pri n ciple.  The  first step, we  have   to calcul ate zero   po sition as distan ce   measurement  betwe en ultraso n ic  sen s o r  and  hold e r (f ixed barrier).  On the zero  positio n, actu al  distan ce (se n so r-hold e r) is conve r ted  as  ze ro (0 ) on measu r e m ent. Figure  2.a shows  the  experim ent for ze ro po sitio n  setting.                                 a                                          b   Figuire 2  Cal c ulatio n ze ro  positio n;   a. Schem atic of zero po sition  setting, b. Ultraso n ic di stan ce  prin ciple   Sensor-holder   Fixed ba rrier   Zero Position   Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM NIKA   ISSN:  2302-4 046     Title of m anuscript is  sho r t and cle a r, im plies resea r ch results (First Author)  193 The Ultraso n i c sen s o r  det ects o b ject b y  sending ult r asoni c so un d and then "listen"  ech o e s . Figure 2. B shows ultraso n ic di stan ce pri n ci ple. The velo city of ultraso n ic on the ai r is  344.42  m/s  or 0.3 444  m/µs. The tim e  duration  ( t )  bet wee n   t r an smi ssi on  and  re cievin g of  ultrasoni c is calcul ated a s  distan ce (s) b e twee n se nsor and  sam p l e  with followi ng equ ation 1 .     2 t s       2 03444 . 0 t s      29 * 2 t s  (1)     Hard w a re Implementa tio n Ultrasonic  sen s o r  type HY-SRF05 work o n  DC vol t age 5 V,  has a sen s or  angle le ss th an 15 deg ree s , and it can  measured accurately at a  distan ce of 2 cm   to 450 cm [1] .   The sen s o r tran smit  ult r asoni c sou n d   waves  with   freque ncy  betwe en 25 kHz   and 5 0   kHz [8].   Micro c ontrolle r a r d u ino u no i s  a a mi cro c ontrolle r bo ard  ba sed  on  the  ATmega3 28. It ha s 1 4   digital inp u t/output pin s   (of  whi c h  6  can   be u s e d  a s  P W output s),  6  analo g  inputs, a 16  MHz  cerami c re so n a tor, a  USB conne ction, a  power ja ck, a n  ICSP head er,  and a  re set b u tton. It conta i ns eve r ythin g  nee ded to   sup port the  microcontroll er; sim p ly co nne ct  it to a compu t er with a  US B cable o r  po wer it  wi th a  AC-to-DC ad apter o r  batte ry to get start ed  [2].   On this paper, we use d  bluetooth  module  HC-0 6. It can con nect 3.3 to 5VDC po we r supply  and conn ect  TX and RX fo r cont rolin g.  This  re sea r ch  use d  a r dui n o  integ r eted  dev elopm ent environtm ent prog ram   (IDE which   embed ede d o n  ATMEGA 328 (Ard uino ). App Inventor  for and roid is  use d  for and roid appli c atio n   developm ent, that displays  data acqui sition  of thickne ss o n  and roid  smartp hon e.   Embeded  Program.  The Arduin o  integ r ated devel op ment  environ ment (IDE) is a cro s s- platform ap plication  written  in Java,  is derived  fr om  the  IDE  for  the Pro c e ssi n g   prog rammi ng   langu age a n d  the Wi ring  proje c ts. Arduino p r o g ra ms a r written in C  or  C++ la ngua g e  [2].  Figure 3 a. sh ows the flowc hart of embe dedd ed prog ram.      Start D i stance  sensing Thickness calculation =  Distance (Zer o Positio n )- ( t/2*29) Send Data to  android Initi a li ze Start Recieve Data Display Data Port Bluetooth initialize Fi ni sh Fi nis h     a.                                       b     Figure 3. Ard u ino prog ram m ing;  a. Flowchar t em be ded prog ram,   b. Flowch art  to display  thickne ss g a u ge on an droi d  smartp hon e                                                                                                                                                                                                                                                                                                                                               Evaluation Warning : The document was created with Spire.PDF for Python.
                             ISSN: 23 02-4 046                     TELKOM NI KA  Vol. 15, No. 1, July 201 5 :  191 – 196   194 Android Ap plication.  Ap p Inventor fo r Androi d   (AI A  is Develop ed by MIT M edia L ab  for edu catio n  purpo se s. App Inventor is a  S c ratch-ba sed v i sual p r o g ra mming lan g u age.   Furthe rmo r e,  App Inventor is a we b interfac e  devel opment envi r onment. The  prog ram m ing  is   made in a visual rathe r  than a  conven tional   way. The program  can be upl o aded to a smart  phon e dire ctl y  [6]. Figure  3.b sho w a flowchar of displaying  thickn ess g auge o n  and roid  sma r tpho ne.   The  de sign  o f  and roid  ap p lication  with   App  inve ntor con s i s ted of  t w o pa rts (co m pone n t   diagram a nd  block di agra m ). The  com pone nt diag ra m was  used  for de sig n  la yout to displ a y on   android  sma r tphone. A bl ock diag ram  wa s used fo r desig n prog ramming of a ndroi d. AIA has  libra ry for  co mmuni cation  with  accele rometer sen s or, GPS,  Wi Fi and  Bluet ooth [6]. On  this  system, the libra ry of bluetooth  is used for data com m unication. Figure 4 a. an d 4.b sho w  App   Inventor co m pone nt and bl ock diag ram.             Figure 4. The  library of blu e tooth;   a. App inventor lay out displ a y  b. app Inventor block diag ra     3. Result a n d Discus s io   3.1 Thickne s s  Calcula t io     The first  step   for  cal c ulatio n of thi c kne s s i s   ze ro  po si tion set up.  Z e ro  po sition  i s  d e fined   as po sition b e twee n ultra s onic sen s o r  and holde r (F i x ed barri er). In this re sea r ch, the distan ce  betwe en sen s or a nd hol de r is 19.80  cm  but on the di splay instru me nt sho w s 0.0 0  cm. Figu re 5.a  Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM NIKA   ISSN:  2302-4 046     Title of m anuscript is  sho r t and cle a r, im plies resea r ch results (First Author)  195 sho w s the ex perim ental  se t up for  cal c ul ation thic kn e ss  of sample.  The thi c kne s s calculation  of  sampl e  is foll owin g equati on (2     Thickne s s =  s (ze r o po sitio n ) – s (se n sor to object)  Thic kne s s =  s  (ze r o po sit i o n ) -  29 * 2 t    (2)                    Figure 5. Experime n t of  Wirele ss T h ic kn es s Gau g e         Whe n  the r are  obje c t (sample )  in f r o n t of sen s or,  Ultra s o n ic sensor t r an sm its the   wave s to obj ect which is reflect ed by  the obj e c t to the dete c t o r. Micro c ont rolle r calculat ed  thickne s s of  obje c t a s  foll owin g e quati on  (2).  The  t h ickne s s d a ta is tra n smitted by  blueto o th  comm uni cati on into and roi d  sma r tpho n e . The syste m  is de sign e d  for non  con t act mea s ure m ent  and wi rele ss comm uni cati on.     3.2 Experimental Result    The n o n - co nt act thi c kne s s gau ge  wa develop ed u s ing ultrasoni c se nsor. An  android  sma r tpho ne  displ a yed dat a acq u isitio n  of thi ckne ss object by bl uetooth com m unication.  Fig   6sh o ws scre en sh oot of androi d appli c ation for th ickness ga uge.  The blueto o th sele ct butto n is  desi gne d to  ma ke  conne ction  b e twee n bl uet ooth a nd  mi cro c o n troll e r.  Over blu e tooth   con n e c ted, the thickne ss d a ta displ a yed  on android smartph one  wi th real time.  The  wirel e ss  thickne ss  gau ge ha been  tested to  mea s ure thi c kne s s sampl e . Th e re sult   sho w s a slig h t ly different with actual me asu r em ent using stan da rd  micromete r . Figure 7 sho w the comp ari s on of measurement betwe en th is metho d  and a c tual  measurement   Based  on Fig u re 7, the fitting linea r reg r ession to ol was u s e d  for a nalysi s  an a c curacy   of mea s u r em ent. The  accura cy of m e asu r em ent  i s  99.97 8%. T h is m e thod  u s ed  no n-cont act  betwe en o b je ct and  se nsor. It was  comp atible to me a s ure thickn ess on  ela s tic o r  pla s tic  obje c t.   This metho d  wa sim p le  and  ap plica b le to  use a s  m obile  dat a a c qui sition  usi ng  and ro id   sma r tpho ne.   Othe r researche r   use d  ultra s o n ic se nsor f o r inspe c ting  wall  thickness  measurement  [9] and  pip e  wall [10]. I t  use d   conta c t meth od  (contact  betwe en  sampl e   with   sen s o r) for  thickne ss d e t ection. The  novelty  of our re sea r ch is n on-contact thickn ess  measurement  and mobile d a ta acq u isitio n.      Sample (Object)   Evaluation Warning : The document was created with Spire.PDF for Python.
                             ISSN: 23 02-4 046                     TELKOM NI KA  Vol. 15, No. 1, July 201 5 :  191 – 196   196     Figure 6.  Screen shoot  android ap pli c ation for  th ic kn es s  ga ug e        F i g u r e  7   T h e c o mp ar as ion o f  hhickne ss  measurement  by  android vs mi cro m eter      4. Conclusio n   A non conta c t and wirel e ss thickne s s g auge  syst em  has b een succe ssfully crea ted with  the ATmega 328 micro c o n trolle r, HY-SRF05 ul tra s oni c se nsor, a Bluetooth module, a n d   Displaying o n  android  sma r tphone. It is a  wirel e ss  a nd  non-co ntact  measurement . The re sult s of  thickne s s ga uge  with a   wirel e ss  mea s uri ng  ba sed  on An droid  and mi cro c o n trolle r h a ve an   accuracy rate  of 0.99978 o r  99.978%.       Ackn o w l e dg ement  This work wa s partially sup ported by  Se bela s  Maret University’s P N BP 2015 G r ant.        Referen ces   [1]   Meier  R.  Gene ral-Purp ose W i reless Dist anc e Sensor . Mast er T hesis. Z u ri ch : ET H Z u rich. 2014   [2]    Jamal udd in A,  Perda na F . A, Supri y a n to A,  Pur w anto A, Inay ati, Niz am M .   Devel o p m ent  of W i reles s   Battery Monito ring for el ectric  vehicl e . Electrical En gin eeri n g and C o mput er Scienc e (ICEECS), 201 4   Internatio na l C onfere n ce o n  Electric Veh i cle.  Bali. 20 14 : 14 7-15 1   [3]    Peng Y, et al.  Cogn itive F H  Chan ne l Sele ction for Blu e tooth Netw ork T E LKOMNIKA Indon esia n   Journ a l of Elec trical Eng i ne eri ng.  201 3; 11(3) : 1626-1 6 3 1   [4]    Shivar aman I, Pooj a S.  A Non-Invas i ve Bl ood Press u re  Measur e m ent  usin g Andr oid  Smartp ho ne IOSR-JDMS, 2014; 13 (1) 28-3 1   [5]    Jithin K, Nira n ja n D, Biju  B. A Real time  Data Acqu i s ition a nd Mo nitori ng Dev i c e  for Medica l   Appl icatio ns ba sed on A ndro i d  Platform.  Internatio nal J ourn a l of Adva nced  Computer R e s earch . 20 13 ;   3(3):47- 51   [6]    Lia n  L. R e se a r ch on  Ho w   t o  Des i g n  a n   Andro i d-b a se d  RF ID Re ader . T E LKOMNIKA Indo nesi a n   Journ a l of Elec trical Eng i ne eri n g . 201 4; 12 (9 ): 6431-6 4 3 6   [7]    Kim H K, Mod e l J.  Mob ile  A pplic atio n D e si gn T ool for Sm artpho nes: A T u toria l . Internat ional Journal  of Soft Comp uting En gin eer in g (IJSCE) . 201 2; 2: 237-2 4 3   [8]    Kian pish eh A.  Smart Parkin g S y st em (SP S ) Architectur e  Usin g U l tras onic D e tector.   Internatio na Journ a l of Softw are Engin eer i ng an d Its Appl icatio ns . 201 2; 6 (3): 51-58    [9]    Bro w mick S.  Ultrasonic Ins pec tio n  for W a ll T h ickness  Measur ement  at T hermal Po w e r Statio ns.   Internatio na l Journ a l of Eng i n eeri ng Res earc h  and T e ch no l ogy . 201 1; 4(1)  : 89-107   [10]    Nakam o to H,  Kojima  F, Kato  S. Rel i ab ilit Asse ssment fo r T h ickness In spectio n  of P i p e  Wall  usi n g   Proba bil i t y  of D e tection.  E-Jo u r nal of Adva nc ed Mai n ten anc e . 2014; 5 : 22 8-23 7         24 68 1 0 1 2 1 4 2 4 6 8 10 12 14 M easurem ent of Thickness  by  A n d r oid-Wireless  Thickness  M easuring S y st em (cm) A c t u al  Meas ur em en t  o f  T h i c k nes ( c m ) Th D a t a  C o m p a r i s o n   of  Th i c kn es s  b y  Ac t u al  M e a s u r em en t             Vs Andr oi d- W i r e l e s s  T h i c k ness  Measur i n g Sy s t em Evaluation Warning : The document was created with Spire.PDF for Python.