Int ern at i onal  Journ al of Ele ctrical  an d  Co mput er   En gin eeri ng   (IJ E C E)   Vo l.   10 ,  No.   4 ,  A ugus t   2020 ,   pp.  3588 ~ 35 95   IS S N:  20 88 - 8708 ,  DOI: 10 .11 591/ ijece . v 10 i 4 . pp3588 - 35 95           3588       Journ al h om e page :  http: // ij ece.i aesc or e.c om/i nd ex .ph p/IJ ECE   Wate r moni toring  and an alyt i c ba sed Thin gSpeak       Ab b as   Hussie n M ir y ,  Gre gor A le xan der  A ramice   Depa rtmen t  o f  E le c tri c al E ngin eering,   Mus ta nsir i y ah   Univer si t y ,   I raq       Art ic le  In f o     ABSTR A CT   Art ic le  history:   Re cei ved   J ul  15 , 2 019   Re vised  Jan   2 0 ,   20 20   Accepte d  Fe b 2 , 2 020     Disea ses  associ at ed  wi th  bad  wate r  h ave   l arg ely   rep or te d  cas es  annual l y   le ad ing  to  d eaths,  th ere for e  th e  wate r  qu alit y   m onit oring  b ec om e  n ec essar y   t o   provide   safe   wate r .   Tra d it ion al  m onit oring  inc lude s  m anua l  gat her ing  of   sam ple s  from   d iffe ren t  point s  on  the   distri bu t ed  site,  and  then  te sting  in   la bora tor y .   Thi s   proc edur e  has  prove n  tha t  it   i s  ine ffe ctive  be ca use  it   is   la borious,   l ag  tim e  and  la cks  on li ne  resul ts  to   en hanc e  pro ac t ive   response  to  wate r  poll ut ion.   Emerge nce   of  th e  Inte rne t  of  Things   (IoT )  and  st ep  towar ds  the   sm art   li fe   po ses  the   suc ce ss ful  using  of   IoT.  Thi s  pap er  pr ese nts  a  wa te r   qual ity   m onit or i ng  using  IoT  base d  Thi ngSpe ak  pla tform  that  provide s  an aly t ic   tool s  an d  visual i za t ion  u sing  MA TL AB  progra m m ing.   T he  proposed   m odel   is  used  t o  te st  wa te r  sa m ple s  using  sensor  fusion  te chn ique   such  as   TDS  and  Turbi dity ,   and  the n  upl oadi ng  data  online  to  Thi ngSpe a k  pla tform   to  m onit or  and  a naly z e.   Th e  s y st em  noti fie s  aut h orit ie s  when  th er e  are   wat er   qual ity   par ameters   out  of  a  pre de fine d  set  of  norm al   val ues.   A  w arn ing  wil l   be  not ifi ed   to   user  b y   IFTTT pro toc ol .   Ke yw or d s :   Ardu i no   IoT   Plat fr om   ThingS pea k   Water  qual it y   Copyright   ©   202 0   Instit ut e  o f Ad vanc ed   Engi n ee r ing  and  S cienc e .    Al l   rights re serv ed .   Corres pond in g  Aut h or :   Abbas H us sie n M iry ,    Dep a rtm ent o f El ect rical  En gi neer i ng,   Mustansiriy ah   Un i ver sit y,    Ba ghda d,   Ir a q .   Em a il :  abb asm iry 83@uom us ta ns iriy ah. e du.i q       1.   INTROD U CTION   Hu m an  so ci et y  dev el opm ent  had   gr eat   e f fects  on  our  env i ronm ent,  and   e ve ry  effor t  has  be en   seekin g  to  im pr ove  it s  prese r vation.  E nv i ronm ent  qu al it y  m on it or ing   is  on e  of  these  i m po rtant  effo r ts  that  hav e  al l ow e d  t he  m on it or in g  of   dif fer e nt  physi cal   par am et ers  to  li m it   t he  m or e  pro gress  of  en vir on m ental  degra dation.  C ollec ti ng   e nvir on m ental   data  m anu al ly   as  a  tradit ion al   m on it or i ng   m et ho d  is  ineff ect ive ,  since  of   weak   a bili ty   of   wa rn i ng   i n  so m e  env ir onm enta l  sp eci al   cases  su ch  a s  (polluti on).   A  pe rio d  ag o,   dig it al   inf or m at ion   re corder s  we re  presente d  to  e nhance  acc urac y  of   surr oundi ng   e nviro nm ent  m on it or in g,   but  eve n   this  is  sti ll   la cked  as  on li ne   data  analy sis  [ 1 ] .  I n  t he  la st  ye ars,   e nergy   ge ner at e d  f r om   e nv iro nm entall y  fr ie ndly , rene w able, clea n  a nd eff ic ie nt  sourc es b ec om es o ne  of the  im po rtant en gin e erin g researc h  a rea s .   On e  of   t he  im portant  e nv ir onm ental   m on ito ri ng   iss ues  to   be  m on it or ed  is  water  diseas es,  w hich  ar e   beco m ing   the  m ai n  chall enge  to  ou r  healt h.   The re fore,  to  guara ntee  be st  water  qu al it y  is  crit ic a l  t o  kee p    a  sta ble  li fe  f or  al l.  W at e r  qu a li ty   is  disti ng ui sh e d  f r om   it s  a ppr opriat eness   to  a  giv e n  a ppli cat ion   based  on  it s   bio lo gical ,  c he m ic al   pr operti es.  Water  qual it y  m on it or in g  inclu des  t he  detect ion  of  c har act erist ic   a nd  their   com par ison   wi th  sp eci fic  sta nd a r ds   an d  pr edef i ned   value s.  W at er  acce ptabili ty   is  us ually   determ in ed  by   ob ey in g  t he  in te nd e d  us e  c rite ria.  F or  m or e  accur acy   an d  reli able  a naly sis,  it   is  i m po r ta nt  to  c ollec t  m or e  sam ples  fo r  be tt er  m on it or i ng  Ma nu al   te c hn i qu e   intr oduces   gr eat   c om plexity   and   it   is  co ns ide red  inef fi ci ent   com par ing t o r eal - ti m e  m on ito ri ng to get  qu i ck war ning i n order  to  e nsure  f ast   water  poll ution res ponse   [1 ] .   On li ne  m on it ori ng  poses  c hal le ng es  for  per s on   w ho   ha ve  m anu al ly   get  the  wate r  qual it y  par am et ers  thr ough  sam pli ng   a nd  te sti ng   at   the  te sti ng   c enter.  IoT,  w hi ch  is  a  co nn ec te d  intel li gen t  dev ic e  that  se nse s,   interp rets  an d  interact s  with  t he  en vir on m en t  becau se  of   th e  com bin at ion   of   the  In te rn et   and   the  i nteg r at ed   sens or   syst em .   In   the  twenty - first  centu ry,  the  higher  c omm un ic at ion   and   stron g  crit erion s  the  ( I oT).   In   thi s  Evaluation Warning : The document was created with Spire.PDF for Python.
In t J  Elec  &  C om p  En g     IS S N:  20 88 - 8708       Water  monitori ng an d analyt ic  base d  T hing Speak   ( Ab bas  H us sie n Mi ry )   3589   netw ork,   daily   op e rati on  of  obj ect s  beco m es  par t  of   t he   netw ork  du e  to  the  co nnect ivit y  and   c ompu ti ng  capab il it ie s,  w hich  i nclu de  th e  dig it al   opera ti on   of   t he  tra ns cei ve r  a nd   m ic ro co ntro ll e r.   T he  netw ork   m od el   cov e rs  high  sta bili ty   and   al lo ws  for  un i fied   colla borati on  be tween  dif fer e nt  de vice  ty pes   su c h  as  survei ll ance   ca m eras,  e nv ir on m ental   sens or s   an d  ap plica ti on s  i n  var i ous  m edical   fiel ds .  Be ca us e   of  this   goal ,  i nt ern e t   obj ect s  ha ve  de velo ped   e xtra   desig n  in  m any  sit es  su ch  as  “po ll utio n  m onit or in g  sys te m s ”  and   “ water  qual ity   m anag em ent  syst e m s . ”   It  inc lud es  m any  ch eap  se nsors   in   the  s urrou nd,   tho se   s upport   the  public  vi a  ne w  qu al it y  m on it or in g  se rv ic es  a nd  fee dback   re port  wit hout  a ny  bur de n  at   a nytim e  and   a ny wh e re.  Also  it   can  be   consi der e d  as  exp li ci t ly   adv a nce  as  a  qu al i ty   of   hu m an  li fe   [2 ] .  S.  Ge et ha  and   S .  G ou t ham i   [3 ] ,  presen t   a  sim pler  so lut ion   t o  water  qual it y  m on it or i ng  in  pip e s  ba s ed  on  I oT.  T he   de velo ped  m od el   wa s  use d  to  te st   water  sam ples  then   uploa d  t his  data  onli ne   to  be  a naly zed.  T heir   sy st e m   pr ovides   a  warnin g  al a r m   fo r   the  rem ote  co ntr ol  us e r,  w he n  the re  a re  qual it y  of   wate r  par am et ers  de viati on  f ro m   a  prede fine d  s et   of  sta nd a rd  val ue s.  T he  data  t ha t  is  sent  f rom   this  syst e m   was  up l oa ded  in  the  cl oud  "Ub i do ts"   t hat  offers   a  platfo rm   fo r  us er  t o  capt ur e   data  an d  co nv ert  it   to  us ef ul  inf or m at ion .  M.  Param eswar i  an d  M.  Mos es  [2 ] ,   us e  a qu a  ca re  Io T  t o  m on it or  the  qu al it y  of  water .  T he  inf or m at ion   col le ct ed  from   the  sens or   syst e m   was   log ic al ly   i m ple m ented  acr oss  the  netw ork .   They  de velo pe d  t hi s  syst em   basi ng  on   an   em bed de d  sy stem ,   log ic al   address   and   com m un ic at ion   ap plica ti on   f ro m   In te r net  obj ect s.  P.   Bok in gk it o  and   O.   Lla ntos b  [4 ] ,   wer e  devel ope d  a  real - ti m e  s yst e m   to  m on i tor  wate r  te m p eratur e  on  a  m ob il e  that  is  capab le   of   reducin g  dep e ndence   on  the  c ontro l  sit e  wo r kfor ce  t o  re du ce  costs  a n d  evaluate  fish  fa rm ing   syst e m .   The  im ple m en ta ti on   of   t he  syst e m   le d  to  m on it or   the  w at er  tem per at ure  fro m   the  m ai n  co ntro l  un i t  on li ne.   It  al so   pro vid e s  the  syst e m   a nd   disp la ys  inf or m at ion   that  inclu des  sta ti cal ly   value  resu lt s.  Chen  a nd  H an  [ 5],   at   the  Brist ol  port,  they   us e d  dif fer e nt  pa r a m et er  to  m on it or   water  qu al it y ,  wh ic h  has   su ccessf ully   pro ved   the  feasibil it y,  gathe r  water  qual it y  data  on li ne  an d  disp la y  on   the  I nter net .  They  us ed  a nothe r  m et ho d  that   is  base d  on  im age  processi ng  f or   water  qual it y  m on it or in g.  Stat ic al ly   m o dels  an d  m achine  le arn i ng  use d  t o  decide  t he  qua li ty   par a m et ers  of   water  f or   i nput  im age  vid eo .  K .  Sa ravanan   et .   al ,  [ 6] ,  pro pose  ( SC ADA)  syst e m   wh ic h  integ rates  wit h  ( I oT)  to  m on i tor   water   qu al it y  in  real  ti m e.   It  was   ai m   to  identify   wate r   po ll utio n,   le a ka ge  in  the  pip e li ne,   as  well   as   autom at ic   m e asur em ent  of   pa ram et ers  su ch   as  flow,  te m p eratur e   and col or sens or s  in o nline  w it h  Atm ega 36 8  a nd GSM  M odule.  The  syst e m  w as im ple m ented  at   Tir unel veli.   The  ai m   of   this  pap e r  is  to  pro po s e  an  ef fecti ve  onli ne  wate r  m on it or in g  syst e m   in  real - ti m e  that  can  help  healt h  m on it ors  t o  im p rove  the   m on it or in g  op e rati on.  I n  ge ner al ,  the  syst em   pro vid es  i nform at ion  includi ng  nor m al ,  m axi m u m ,  m ini m u m   and   ave ra ge  sta ti sti cal   values  f or  dif fere nt  water  cha racteri sti cs,  al s o  com par es  bet w een  diff e re nt  sit es  an d  di ff e re nt  days  f or   sa m e  ci ty ,  resu lt s  obta ine d  f rom   colle c te d  se ns or  t hat  pro vid e  decisi on   s upport  to   help  an d  gu ide  people  in   the  ci ty  to  avo i d  wate r  us a ge  for  dri nk i ng.   Fu rt her,  the   sy stem   can  dis pl ay   the  wate r  c har act erist ic s  t hat  are   co ntin uous ly   m on it ore d  on li ne   di rectl y  on   sm art p hone.       2.   INTER NET  OF THI NGS ( I o T)   Io T  is  a  m od e rn   com m un ic at ion   m od el   in  the  near   f utur e  in  wh ic h  da il y  li fe  ob j ect s   wh ic h  a re   pro vid e d  with   m ic ro con tr ollers,  di gital   com m un ic at ion   transm it te rs  and  recei ver s ,   are  co ntr olled  via   appr opriat e  protoc ols  m aking   a  kind  of  co m m un ic at ion   ne twork  with  each  oth e r  an d  with  us e rs,   a nd  that  is   go i ng  to  m ake  it   as  an  i ntegr a l  par t  of  th e  I nt ern et .  T he  I oT   co ncep t  ai m s  to  m ake  the  I nt ern et   m or e  fa m ou s.  Fu rt her m or e,  by   m aking   easy   interact ion   wi th  a  wide  ra nge  of   dev ic es  s uch   a s,  hom e  app li cat io n,   C CTV,   su r veill ance  se ns ors,  e ngines ,   m on it or s ,  ve hi cl es,  et c.   [7,   8] .   The  I oT  m od el   is  tr uly  app li cable  i n  di ff e ren t   areas  ( ho m e,  industrial   aut om at ion ,  m edic al   assist ance,  m ob il e  healt h  care,  el de rly   assist ance,  sm art  power   m anag em ent,  intel li gen t  networks,  cars  a nd   m or e)  [ 9].   At  pr ese nt,  this  concept  is  increasin gly  bein g  exp la ine d  as  th e  env ir o nm ent  of   interc onnect ed  pe op le   with   obj ect s,  not  only   M2M,  the  Io T  is  ab ou t  hum an  and m achine c omm un ic at ion   base d  c omm on  servic es .   This  ty pe  of  ne twork  c onsist s  of   sm art  devi ces,  sta nd - al one  de vices  tha t  are  able  to  m on it or   thei r   su r rou nd i ngs  or  interact   w it h  them .  Moreo ve r,   "sm art"  te r m   m eans  that  these  obj ect s  are  c apab le   of   ob ta i ni ng   data  from   the  su r rou nd i ng   e nvir on m ent,  then  process  them   and   com m un ic at e  (sh are )  the m   with  oth er  obj ect s ,  and   i nteract  ind e pe nd e ntly   with  the  e nv ir on m ent  that  reli es  on   data   that  exp l oits  em bed ded   el ect ronic s ,   so ft war e  se ns ors,  an d  act uat or s ,  an d  com m un ic at ion   capab il it ie s.  In   a no t her   w ords ,   these  s m art  obj ect s,   that are d ist ri bute d  in t he  surr oundin g  en vir onm ent an d  inte gr at e d  into  different c on te xts, c an  great ly  i m pro ve  peo ple inte racti on   with t heir  e nv i ronm ent, crea ti ng  a pp li cat ion s  a nd servic es in a ny  par t   [ 10, 1 1].   Du e  t o  the  wi des pr ea d  of  I oT ,  m any  platfor m s  hav e  bee n  dev el op e d  to  li nk   hete roge ne ous  obj ect s   ov e r  the  In te rnet . th e pro vid e r  o f Io T  so l utio ns  for   dif fer e nt  s m art thing s  from   m any  m anu fact ur e rs  is di ff ic ult  du e   to  t he  la c k  of   sta ndar ds  su c h  as   com m un ic at ion   pr oto c ols  a nd  in te rconn ect io n.  Ther e f or e,   it   ha s  bee n  pro po se d  a   ne w  dev el opm ent  m od el   that  de pends   on  t he   cl oud  us e r  i nt erf ace.   The re  are  m any  platf or m s   de vel op e d  for   the  business  com m un it ie s  s uch   as  Xively ,  w hich  al lo w   com pan ie s  to   ta ke  ad van ta ge  of    Evaluation Warning : The document was created with Spire.PDF for Python.
                           IS S N :   2088 - 8708   In t J  Elec  &  C om p  En g,   V ol.  10 , No .  4 ,  A ugus t   2020   :   35 88   -   3595   3590   the  In te r net  f eat ur es  to  sec ur el y  co nn ect   their  product s  with  their  us ers ,  m anag e  their  data  im pr ov e     the  sat isfact io n  of   pa rtners  a nd  cust om ers,   and  m ake  new  source   of  revenu e .  Ma ny  ot her   sourc es,  s uch  a s   ThingS pea k,   a ll ow   us e r  to   m anag e  data  i n  dif fer e nt  for m at s  and   sh ar e  their  data  from   diff eren t  so urces     [12,   13] .  It  is  an  op e n - sour ce  data  platform   based   on   cl oud  te ch no l ogy  .I t  al lows   onli ne  data  gat her i ng,   MATLAB   an al ysi s  and   act ivati on   us i ng   an  op e n  API.   W it h  a ppli cat ion s  a nd  ext ensio ns ,   m on it or in g,   MATLAB   vis ualiz at ion ,  store   data,  a nd  inte gr at e  t he  use r  data  with   a  va r ie ty   of   thir d  pa rty   platfo rm s,  inclu de   le ading   IoT  pl at fo rm s  su ch  a s  (Arduin o, i oB rid ge,   T wili o,   Twitt er,  T hing HTTP  a nd  MATL AB).   Sensor  data  are  gathe re d  in   each  cha nn el   con ta ini ng   8  fi el ds   that  can  hold  di ff e ren t  ty pe  of  data,  on e   sta tus  fiel d  an d  thre e   sit e  fiel ds .  Vari ou s  a ppli cat ion s  s uc h  as  Ti m eC on trol  (pe rfor m   act ion s  autom at ic ally  at   pr eset   ti m es   us in g    the  Thi ngSp ea k  ap plica ti on),  Tw eet Co ntr ol  (list ening   t o  T witt erv er se  an d  real - ti m e  inter act ion),  Re act   (r eact s   wh e n  c ha nn el   data is c om patib le  w it h s om e  conditi ons), Ta lkBac k  Re act io n  m easur es,  [1 4].        3.   METHO DOL OGY   The  water  qu al it y  pr oble m   ca n  be  analy ze d  in  real  ti m e  mainly   us in g  data  analy sis  te ch niques  s uc h  as  MATL AB  in  Thi ngSp e ak  platfo rm .  To  analy ze  diff e re nt   water  qual it y  par am et ers,   the   data  is  con ti nu ou sly   colle ct ed  us in g  sensors  that  c onnected  t o  Ardu i no,  a nd  the n  uploa d  them   to  the  ThingS peak   for  m on it or i ng  and   a naly sis  pu r poses.  T hing Sp ea k  co ntinuou sly   rea ds   the   up loa de d  data   and   pe rfor m   a   custom able  st at ist ic s   by  us i ng   M A TLAB  c od e  s uch   cal c ulate s  aver a ge,   m ini m u m   and   m axim u m   value  for  ente red   data,   com par ison   be tween  diff e re nt  ci ti es  or   betw een  di ff e ren t  ti m e  fo r  sam e  city,  et c.  the  res ult  art  can  be   vi ewe d  with  diff e re nt for m  su ch  b a r  c har t,  h ist og ram , cag e , etc.     The  ste ps   of ou r  m et ho d  is  sum m arized as:     Re ad  the  w at e r  quali ty  v al ues on li ne  usi ng, T urbid it y an d T DS  se nsor     Up l oad  the  dat a to T hingS pea k plat form     An al yz e the  str ea m  d at a colle ct ed  usi ng  different c odes  of  MATLAB     Finall y display  the  resu lt s  of the a naly sis i n Thin gSpea k  M ATL AB        4.   SY STE M AR TCHITE CT U RE LA YER S   Desig n  the  la ye red   str uctu re o f  a  gl obal   network,  w hich  in cl ud es h et er ogeneous n et w orks,   is  a  m ajor   chall enge  m iss ion   t hat  re quir es  the  i den ti fic at ion   a nd  ef fec ti ven ess  of  a  si m il ar  gr ou p  functi on  an d  el e m ents  of   netw orks   as   a  cl ass.  T he  pro posed   I oT  w at er   m on it or in g  syst em   layers  fr am ework   c on sist s  of  f our  la ye rs,   It  is  the  Pe rce ption  la ye r  ( D evices  a nd   sen so r   in  ph ysi cal   w or ld ),   t he  N et work   la ye r   ( Ether net  s hield  a nd  router ),   the   S erv ic e  Ma nage m ent  la ye r  ( Ma ng e  t he  c ol le ct ed  inf or m at ion ) ,  an d  t he   A pp li cat ion  la ye r    (U se r  i nterf ace ).  Eac h  la ye r  bel ow  is  d esc rib ed  as:     4.1.    Perce pt io n l ayer   This  la ye r  c onta ins  of  s ome   cl os el y  inte gr at e d  se nsors   that  are   inte gr at e d  with  t he  ph ysi cal   env i ronm ent.  Sensor  m odules  are  com pact  dev ic es  us e d  f or   physi cal   m on it ori ng   c ondi ti on   or  chem i stry  of     the  sens or   obje ct   in  real  tim e  [15],  The  prim ary  resp onsi bili ty   of   the  la ye r  is  to  gathe r  inf or m at ion   about     the  water  qual it y,  and   the  de vices.  T he  la ye r  is  al so   res pons i ble  for  da ta   transfo rm a ti on   an d  tra nsport  of     the  awar e  d at a   to  the  Network   la ye r,   al so   colle ct   and   dis ti ng uis h  inf orm at ion   captur e d  in  a  cost - ef f ect ive  m ann er  [16 ] .  Di ff ere nt se nsors  are use d  in  s uc h:   Turbidity   Se nsor:  T he  tu r bid i ty   can  be  def i ne d  as  reducin g  the  tra ns pa re nc y  of   t he  wate r   cause d  by   the  pr e sence   of  an  unres olv e d  su s pe nded  s ub sta nce.  T he  or i gin   of  m olecules  f ound  in  water  can  be  m inerals   or  org anic.   H oweve r,  tu rb i dity   is  not  a   direc t  m easur e  of  s us pe nde d  par ti cl es  in  water,   bu t   it   is  a  m easur e   of  the  eff ect   of   sc at te ring   of   the  li gh t.  T his  sen so r  m easur es  t he  am ou nt  of  li gh t  dif f us ed  by   su sp e nded  s ol ids  in   water.  As  the  a m ou nt  of   s uspen de d  s olids  increase s  in  wa te r,   the  water  t urbidity   le vel  increase s.  T he  un it   of   tur bid it y i s N T U  ( Ne p he lom e tric  Turb i dity  U nits)  [1 7,   18] .   TDS   Se nsor:  TDS   (To ta l  Di s so lve d  S olids )  refe rs  to  t he  nu m ber   of   m illi gr am s  of   so l ub le   s olids  in   on e   wate r  li te r.  I n  gen e ral,  t he   high   val ue  of  the  T DS   ref e rs   to  t he  m or e  s ol ub le   s olids   we re  in   the   water ,   an d  the  water  was  le ss  cl ean.  Hen ce,  the  TD S  value  can  be  use d  as  a  m eas ur e  o f  water  cl eanli ness.   T DS  pen   is  widely   us e d  for  m easur ing   th e  value  of  TD S,  but  it   is  un able  to  trans fer   data  to  the  co nt ro l  syst e m   fo r   real  tim e  m on it or ing   to  co nduct  s om e  water  qu a li ty   analy s is.  The  TD S  sens or  kit  is  hig hly  accurate  an d  ca n  sen d  data  to  the  co ntr ol  syst e m .  It  com patible   with  A rduin o,  plu g  a nd   pla y,  easy   to  us e.  TDS   un it   is  pp m     (p a rts  per  m il lio n)  [17].         Evaluation Warning : The document was created with Spire.PDF for Python.
In t J  Elec  &  C om p  En g     IS S N:  20 88 - 8708       Water  monitori ng an d analyt ic  base d  T hing Speak   ( Ab bas  H us sie n Mi ry )   3591   4.2.    Net w or k l ay er   The  netw ork  l ay er  transf e rs  the  data  betwee n  the  de vice  and   the  m any  layers  to  achieve   the  sh arin g  of   data  res our ces,  inclu ding  data  pac ket  r outi ng   an d  syst e m   top ol og y.  This  la ye r  cl as sifie s  an d  ag gr egates    the sig nal  data  gathe red an d  t r ansf e rs  it  to  the   ser ver s  [1 5].     4.3.   Service m ana gemen t  la yer   This  is  the   m i nd  of  I oT   w hi ch  is  respo ns i ble  f or  sto rin g  the  in form at i on  f ro m   bo tt om   la ye rs  and,   process   it   wit h  a naly zi ng  ,a nd  m aking   de ci sion s   base d  on  ou r  a naly sis.  It  c onside r s  as  a n  i nform at ion   m anag em ent  c enter   w he re  pr ocessin g  a nd   a naly sis  te chnolog ie s  a nd   t he  exp e rt  syst em   are  key  ope rati on a l   com po ne nts [1 2].     4.4.   Ap pli ca tio n la yer   This  la ye r  re presents  the  sm a rt  app li cat io ns .   The  m ai n  fu nc ti on   of  this  la ye r  is  prov i ding  intel li gent   serv ic es  to  e nd  us ers  s uch   as  inf or m at ion   visu al iz at ion   an d  s m art  no ti ficat ion   base d  on  intel li gen t  an d  nette r   analy sis  of   in f or m at ion   proc essed  by  the  s erv ic e  la ye r.   T hingS peak   pro vid e  m or e  appl ic at ion   in  this  la ye r  su c h  A naly ti cs ( a naly sis an d visuali zat ion )   and A ct io n (T hi ng T weet ,   Re a ct  an d T hingHT TP).       5.   SY STE M  I M PLE MENT A TION   Im ple m entation   of  our  m et ho d  ca n  be  div i ded   i nto   tw o  m ai n  par ts:   ha rdwar e  im plem entat ion   an d  so ft war e .  The   hard war e  in cl ud e  m ic ro con t ro ll er,  t urb idit y  and   T D S  sens ors,  a nd   Ether net  sh ie ld .   The  m ic ro co nt ro ll er  p ro ces se s  the  data  ca ptured   by  t he   tur bid it y  an d  TD S  se nsor  then  sen ds   t he   data  ThingS pea k  Pl at fo rm   us in g  t he  Ethe r net  shi el d.   A rduin o  Uno  is  us e d  a s  m ic ro co ntr ol le r.   Fig ure  1,   sh ow     the  ha rdwa re  c om po ne nt  of  t he  our  syst em .   Ba sic al ly ,  the  hard war e  was  pro g ram m ed  by  us in g  A r du i no  I DE   so ft war e  ,  w riti ng   the  co de  a nd   up l oad i ng   i t  to  the  Ar dui no   bo a r d.   I n  so ft war e  pa rt  the  colle ct ed  da ta   are  ob ta ine d  f ro m   the  hardw a re  pa rt  are  up l oad e d  in  database  on  li ne  throu gh   Thing peak   platfo rm .  It  can  up loa d  the  data  t o  the   cl oud   from   any  dev ic e  t hat  s upports  t he  I nt ern et .  I n  our  work  the  ne w  channel  is  c rea te d  in  ThingS pea k plat fo rm  as sho w n  in  Fig ure  2.                 Figure  1. Im ple m entat ion   of  t he pr opos e d sy stem   Evaluation Warning : The document was created with Spire.PDF for Python.
                           IS S N :   2088 - 8708   In t J  Elec  &  C om p  En g,   V ol.  10 , No .  4 ,  A ugus t   2020   :   35 88   -   3595   3592       Fig ure  2.   Thi ngS peak cha nne l of p rop os e d  s yst e m       6.   RESU LT S   The  res ult  of  our  wor k  is  t he  ou t pu t  c ur ve  that  ge ner a te d  by  Thi ngSp ea k  for  the   pur pose  of   m on it or ing.  Di ff e ren t  c urve  a re  use d  t o  m on it or   t he  water   co nd it io n  s uc h  T DS   a nd  tu r bid it y  for  dif f eren t  places an d d if f eren t  days fo r on e  p la ce t o  co m par ison . T he r e are ca ge  m eter s is  us ed  to v ie w  the c urre nt w at er   par am et er v al ue . F ig ure  3,  s hows  the  TDS  f or d if fer e nt  pla ces.             Figure  3. TD S  m on it or ing  f or  diff e re nt p la ce s       Now  a  ThingS peak   visu al iz at ion   ap plica ti on  is  create d  wit h  MATL AB  cod i ng   to  com pa re  the  TD S   and   tu rb i dity   between   the  pla ces  fo r  sam e  day,  as  sh own  in  Fig ur e  4 .  Th e  TDS   an d  tur bid it y  com par ison   for   sam e  place  wi th  dif fer e nt  da ys  is  per f or m ed,   as  s how n  i n  Fig ure  5.   T o  anal yz e  the  water  qu al it y  a  new  visu al iz at ion   is   create d  that  use   the  m ean  value  f or   T DS   a nd   t urbidity   of  la st  five  sens ors  val ue  an d  de ci des   the  water  is   dr ink a ble  or  no w.   Fig ure   6,   s hows   this  visua li zat ion .  T hingVie w  is   a  sm art  ph on e   a pp l ic at ion  us es  a  gr a ph ic al   form at   to  see  sens or   data   store d  in  Thi ngSp ea k.  It  le ts  you  see  T hin gSpea k  c ha nnel s  in     an  easy   way  by   entering   t he   channel  I D.   Fig ure   7,  sho ws  this  ap plica ti on   in  ou r  w ork. All  the  cu rv es  a re   consi der e d  as  m on it or ing, to m ake th e syst em  w ork  as sm a rt,   al ert syst e m  d iffe ren t ap plica ti on   is us ed . I n  this   work  it   re qu ire d  to   react  to   th e  TDS  val ue  of  the  water ,  s o  we  will   sen d  an  em ai l  wh en   the  value  is  great er   than  30 0  ppm .   To  do  so ,  we   need   T hingS pe ak  ser vices,  Thing HTTP  a nd   T hingS pea k  Re act ,  al so   IF TTT   Applet .  IF T TT   is  a  W eb  ser vi ce  that  al lows   you  to  create   sm a ll   app li cat i on s  th at   work   in  respo ns e  to  oth e r  act ion s.  It  can  us e  the  IF T TT  Webh ooks   se r vice  to  create   Web   requests  to  trig ger   an  act ion   su c h  SMS ,   e m ail   m essage,  et c.  The  inc om ing   act ion   is  an  H TTP  re qu e st  to  the  web   se rver ,  an d  the  outg oi ng   act io n  is  an   e - m a il   m essage.  At f ir st IFTTT  ap plet i s cr eat ed  as s how n  in Fig ure  8 ,  to   act ivate  t he  eve nt o n  I F TTT Th in gHT TP is  us e d  with  URL  o f IFTT T appl et . W e no w  ne ed  an  a ppli cat ion  t hat interact s w it h ou r  rea di ng  se nsor valu e and  runs  the  Thi ngHTTP  a pp li cat ion .  T his  can  be  done  in  T hin gSpea k  us i ng  the  Re act   app li cat ion   as  sh own  i n  Figure  9.  T he   syst e m   can  be  i m pr oved  usi ng   s war m   op t i m iz ation   te ch inques  as  in  [ 19,  20 ] ,   f uzzy   log ic  con t ro l as  in [ 21] , Arti f ic al   I nt el lgent as i n [22 ,  23 ]   an d usin g wirele ss se snor  n et wok  as  [24,  25 ] .   Evaluation Warning : The document was created with Spire.PDF for Python.
In t J  Elec  &  C om p  En g     IS S N:  20 88 - 8708       Water  monitori ng an d analyt ic  base d  T hing Speak   ( Ab bas  H us sie n Mi ry )   3593         Figure  4 .  TD S  and T urbidity   com par ison f or d if fer e nt  places             Figure  5. TD S  and T urbidity   com par ison f or d if fer e nt  days           Figure  6.  W at e r  sta te  d eci si on             Figure  7.  Thi ngvie w  a pp li cat ion   Evaluation Warning : The document was created with Spire.PDF for Python.
                           IS S N :   2088 - 8708   In t J  Elec  &  C om p  En g,   V ol.  10 , No .  4 ,  A ugus t   2020   :   35 88   -   3595   3594       Fig ure  8. IFTT T apple t             Figure  9. Thi ngH TTP a nd Re act  ap plica ti on s sett ing       7.   CONCL US I O NS     The  pap e r  ai m s  to  i m pr ove  a n  intel li gen t  m on it ori ng  syst e m   of   water  qu al it y  fo r  dif fere nt  places.   The  pro pose d  syst e m   was  su ccess fu ll y  im ple m ented  in  ha rdwar e  a nd   program m ed  us i ng   T hingS peak   platfo rm .  The  syst e m   can  be  m on it or ed  t hro ugh  PC  an d  s m art  phone  a ppli cat ion   with  a  sm art  al ert  t hro ugh  ThingS pea k  ac ti on   a pp li cat io n  an d  IF TT T.  I t  prov i des  qu ic k  an d  easy   m on it or i ng   of  tu r bid it y  an d  T D S  le vel   to  e ns ure  cl ea n  water   is  m a intai ned  co ntinuo us ly .  T hingS peak  has  prov i ded   a  su it a ble  env ir onm e nt  f or   analy zi ng   a nd  com par ing  the   sens or  data  a s  obser ve d  in   gr a phic s  an d  s m art  al erts.   Ba sed  on  the  sp e ci fie d  values ,  the  rea ct   app li cat ion  inf or m s  the  use r  th rou gh   em ai l  m essage.  Accor ding  to  t he  ob ta ine d  re su lt s,    the  pr opos e d  s yst e m   can  be  c on si ders   as  su i ta ble  water   qu al it y  m on it or in g  syst em .  It  can  be  us e d  this   syst e m   to anothe r  a ppli cat ion  in  h eal t hcar e  and a nother  syst em s .   Evaluation Warning : The document was created with Spire.PDF for Python.
In t J  Elec  &  C om p  En g     IS S N:  20 88 - 8708       Water  monitori ng an d analyt ic  base d  T hing Speak   ( Ab bas  H us sie n Mi ry )   3595   ACKN OWLE DGE MENTS   The   aut hors  w ou l d  li ke  to  th ank   M us ta ns iri ya h  Un i ver sit y   ( w ww . uom us ta ns iri ya h. e du.i q )  Ba gh dad  – I raq f or it s suppo rt in  t he pre sent  work.       REFERE NCE S   [1]   M.  Pule,  A.  Y ah y a   and   J.  Chum a   , "W ire l ess  Sensor  Networks :  A  Surve y   on  Monit oring  W at er   Qua li t y , "   Journal   of   Appl ie d   R ese arc h  and  Techno log y,   v o l.   15,   no.   6 ,   pp .  562 - 570 ,   20 17.   [2]   M.  Para m eswari   and  M.   B.   Mose s,   " Online   Mea surem ent   of  W at er  Quali t y   and  R epor ti ng  S y st em  using  Pro m ine nt   Rule   Controller   base d  on  Aqua  Care - Io T , "   Design  Aut omation  for  Embe d ded  Syste ms ,   v ol.   22 ,   no .   1 - 2 ,     pp.   25 - 44 ,   2018 .   [3]   S.  Gee th a  and  S.  Gouthami,   "I nte rne t  of  Th ing s  Ena ble d  R eal  Ti m e  W at er  Qu al ity   Mon it oring   S y stem, "   Smar t  Wate r Int ernati o nal  Journal   for  q ua - Smar t  ICT fo r Wat er ,   vol.  2 ,   no.   1 ,   pp .  1 - 19 ,   2017.   [4]   P.  Bokingki to  a nd  O.  Ll an tos,   "D esign  and  Im ple m ent at ion  of  Rea l - Ti m e  Mobile - base d  W at er  T empera t ure   Monitori ng  S y s t em , "   Proce d ia  C omputer  Scienc e ,   v ol .   124 ,  pp .  69 8 - 705,   2017 .   [5]   Y.  Chen  and  D.   Han,   "W a te r  Q ual ity   Moni tori n g  in  Sm art   C ity:  A  Pilot   Project, "   Autom at ion  i n  Construct ion ,    v ol.   89 ,  pp .   307 - 316,   2018 .   [6]   K.  Sara v ana n,   E .   Anus u y a ,   R .   Ku m ar  and  L .   Son ,   "Rea l - T ime  W ater  Qual ity   Moni t oring  using I n te r net   of   Thi ngs  in  SC AD A , "  Env ironmental   Mon itor ing  and  Assess ment ,   vo l.  190 ,   n o.   556 ,   pp .  1 - 16 ,   2018.   [7]   A.  Za ne ll a ,   N.  B ui,   A.  Cast el l ani ,   L. Vange li sta  an d  M.Z orz i ,   "Internet  of  Thi ngs  fo r  Sm art   Cit ie s,"   IEE E  Int erne t  of   Things   Journal ,   v ol.   1,   no .   1 ,   pp .  22 - 32,   2014 .   [8]   N. S.  Kum ar,   Ma ll ikha r juna   R. K,   M.  Kothuru   an d  Y.N.  Rao,   "M ult i - Dim ensional   Para m et ric   As s essm ent   with  IoT   in  Acqua i n ta n ce  of  Digital  Pip e li ne ,"   Inte rnat io nal  Journal  o f  El e ct rica l  and  Computer  Enginee ring  ( IJE CE ) ,     v ol.   9 ,   n o .   6 ,   pp .   4649 - 4656 ,  201 9.   [9]   A.H.  Ali,  A.H.  Du his,  N.A.L.  A lz urfi  and  M. J.   Mnati ,   "S m art   Monitori ng  S y st em  for  Press ure   Regul at o r  base d  on   I o T , "   In te rnatio nal  Journal   of   Elec tri cal   and   Co mputer  Engi n ee r ing  ( IJE CE) ,   v ol .   9 ,   n o .   5 ,   pp .   34 50 - 3456,   2019 .   [10]   V.  Paci ello,   M.   Carr at u ,   F,  Abate   and  C .   Li gu ori,   " A  Low  Cost  Sm art   Pow e r  Mete r  for  IoT , "   Me asur eme nt ,     v ol.   136 ,   pp ,  59 - 66,   2019 .   [11]   K.  Luecha phont har a  and   A . Vij a y a la kshm i  , "I o T   base d  Appli c ati on  for  Monitoring  El e ct ri ci t y   P ower  Consum pti on  in  Hom e  Appli anc es, "   Int ernat ional   Journal  of  El ectric a l  and  Computer  Engi nee ring  ( IJE CE ) ,   vol .   9,   n o.   6,     pp.   4988 - 4992 ,   2019.   [12]   D.  Mea na ,   C.   Gonz,   B .   Pel a y o  a nd  J.  Manue l ,  "I oFC li m e:   The  f uzzy   Lo g ic   and  the   Int ern e t  of  T hings  to  Co ntro l   Indoor  Te m per at ure   R ega rd in g  the   Outdoor   Am bie nt  Condit ions, "   Fu ture   Gene ration  C omputer  Syste m s ,     v ol.   76 ,   pp .  275 - 284,   2017 .   [13]   M.  Sw ai n ,   et  al . ,   "A  Re li ab le   A pproa c h  to  Cust om iz ing  L inux  Kerne l  using   Cu stom   Buil d  Tool - Chai n  fo r   ARM   Archi tect ure   an d  Applicati on   t o  Agri cul tu re , "   Inte rnational   Jo urnal  of  E lectri cal   and  Compu te r  Engi n ee ring   ( IJE CE) ,   v ol. 9,  n o.   6 ,   pp .   4920 - 4928,   2019 .   [14]   P. P.  Ra y ,   " A  Sur ve y   of  Io T  C loud  P la tforms , "   Fut ure  Computing  and  Infor matic s  Journal ,   v ol.   1,   no .   1 - 2 ,    pp .  35 - 46 ,   2016 .   [15]   S.   Du,   et  al.,   IIoT - Based  In te lligent  Contro l  and  Man agem ent   S y stem  f or  Motorc y cle  Endura nc e  T est , ”     IEE E   Acess ,   v o l.   6 ,  pp .   30567 - 30 576,   2018 .   [16]   O.  Kaiwa rt al ,   et  al . ,   " In te rne t  o f  Vehic l es:  Mot iva ti on ,   L a y er ed   Archi tectur e,   N et work  Model,   Chal le ng es,   an d  Future  As pec ts , "   IEEE Ace ss ,   v ol .   4 ,  pp .   5356 - 53 73 ,   2016 .   [17]   M.  Hass an ,   " R eal  T ime  W at er   Qu al ity   Monitor ing   Boat , "   Proc ee d i ngs ,   v ol.   2,   pp .  1 - 5,   2018 .   [18]   S.  N.  Ibra him,  et  al. ,   "W eb  base d   W at er  Turb idi t y  Monitori ng  and   Autom at ed  Filt r at ion  S y s te m :  Io T  Applicati on   in   W at er  Man agem ent , "   Int ernational  Journal  o f   El e ct ri cal   and   Computer  Eng ine ering   ( IJE CE) ,   v ol.   8 ,   n o .   4,     pp.   2503 - 2511 ,   2018.   [19]   A.H.   Mir y ,   A.H.   Mar y ,   and  M.H .   Mir y   , "Im provi ng  of  Maximu m  Pow er  Point  Tr ac king  for  Photovolt aic  S y stems   Based  on  Sw arm  Optimiza ti on  Te chn ique s,"  IOP  Confe renc e  Se ries:  Mate rials  Sci en ce   and  Eng ine ering ,   v ol.   19,   pp .  1 - 10 ,   2019 .   [20]   A.H.   Mir y ,   A.H .   Mar y ,   and  M.H.   Mir y ,   "M ixed  Robust  Contro ll er  wi th  Optimi ze d  W ei gh te d  S el e ct ion  fo r  a  D C   Servo  Motor , "  Proce ed ings  of  the   Int ernati ona l  Confe renc e  o n  Information  and  Comm unic ati on  Technol og y ,    ACM  Int ernati o nal  Conf ere nce  Proce ed ing  S eri es ,   pp .   178 - 183 ,   2019.   [21]   A.H.   Mar y ,   Tolga y   Kar a,   and  A.H.   Mir y ,   "Inverse  kine m atics  soluti on  for  rob oti c  m ani pul at or s  base d  on  fuz z y   logi c  and  PD   cont rol , "  Al - Sa diq  Inte rnation al  Confe renc e  on  Mult idi sc ipl i nary  in  IT  and  Comm unic ation  Techni ques  S cie nce   and   App li ca t ions ,   IE EE,   pp .  1 - 6,   2016 .   [22]   A.H.   Mir y ,   " Fa ce   de te c ti on  ba sed  on  m ult i  fa ci a l  feature   usi ng  fuz z y   logic , "  Al - Mansour   Journal ,   v ol.   21 ,     pp.   15 - 30 ,   2014 .   [23]   A.H.   Mir y ,   " Mo del ing  and  Contr ol  of  Torso  Com pass  Gait   Bip ed  Robot  with  AI  C ontrol ler ,"   Iraq  J .   El ectric al   and   El e ct ronic   Engi n ee ring ,   vol .   13 ,   n o.   1 ,   pp .   32 - 37 ,   2017.   [24]   V.  Redd y   and   P.   Ga y at hr i,   " Inte g rat ion  of  int ern et  of  thi ngs  with  wire le ss   sensor  net work , "  Inte rn ati onal  Journal  of   El e ct rica l  and   C omputer  Engi n e ering   ( IJE CE) ,   v ol.   9 ,   no .   1 ,   pp .   4 39 - 444,   2019 .   [25]     M.I.   Younis  and  T. F.  Hus sein,  " Design  and  Im ple m ent at ion  of  a  Contact l ess  Sm art   Hous e  Network  S y ste m , "  Inte rnational   Jo urnal  of El e ct ri c al  and  Comput er  Engi n ee ring   ( IJE CE) ,   vol .   8 ,   no .   6,   pp.   4663 - 467 2,   2018 .   Evaluation Warning : The document was created with Spire.PDF for Python.