TELKOM NIKA Indonesia n  Journal of  Electrical En gineering   Vol. 16, No. 3, Dece mbe r  2 015, pp. 488  ~ 494   DOI: 10.115 9 1 /telkomni ka. v 16i3.942 1        488     Re cei v ed  Jul y  13, 201 5; Revi sed  No ve m ber 15, 201 5; Acce pted  No vem ber 3 0 ,  2015   Prototy p ing a Dedicated Photovoltaic System  Datalogger      Bena bed Kh adidja* 1 , Bou dghene Sta m bouli Amine 1 Benaba dji Noureddine 2   1 Departme n t of Electronic, Un i v ersit y  of Sci e n c es  and T e chn o lo gies of Oran  (UST O-MB), Algeri a   2 Departme n t of Ph y s ics, LAA R   Lab orator y ( U ST O-MB), Al geri a   * Corresp on din g  author, e-mai l : ben_k ha d@ ya hoo.fr       A b st r a ct   Solar  pow er  is  a ren e w abl e e nergy s e e n  as   one  of  the  pri m ary sourc e s for  electric ity pro d u ction  i n   order to meet our dai ly ne ed s. T he  conversion o perati on i s  sensitive a n d  non-fau l t toler ant that can oc cur   during operation of t he system  that affects  its over all performanc e. We  propos e in this  present paper  a  compact, low  pow er an d lo w - cost datalog ger for t he co ntrol an d the  mo nitori ng  ba sed on  a sur v e y   me asur e of five importa nt ph ysical p a ra met e rs in t he ma n age ment  an d mo nitori ng  of the functi oni ng  of an   electric syste m  based  on sol a r pane ls. Thes e measur es w ill be carri ed o u t at regular i n ter v als, config ura b l e   throug h a PIC1 8F 452 0 microc ontrol l er an d stor ed i n  a lar ge  capac ity me mo ry type SD card.      Ke y w ords :   photov olta ic p ane ls, d a t a l o g g e r , microc ontr o ller  8-b i t, SD card  me mory , micro pow er  LDO   regu lator      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  A datalogge r is a device fo r mea s uri ng  and sto r ing a  large amo u n t  of data.  It is  an all- purp o se pie c e of measu r ement equi p m ent that  finds u s e in an extremely  wide ran g e  o f   appli c ation s . Datalo gge rs  have been  succe ssfully  d eployed in m any sci ent ific and indu stri al  appli c ation s .  Some of th e impo rtant  area s in  whi c h d a talog g e r are  wid e l y  used i n cl u d e   biomedi cal i n stru mentatio n [1], powe r  quality me asu r em ent, automotive  engin eeri ng  [2],  rene wa ble e n e rgy [3], sola r ene rgy [4], Tempe r atu r and Humidity  Analysis [5],  sola r irradi ation   [6], etc .   In this pape r, we de scrib e  in detail the d e sig n  and im plementatio n of a compa c and lo co st auto m ati c   re cording  d e vice  (datal o gger) to   cont rol  and  surve y  mea s ures  of seve ral  m a jor   physi cal pa ra meters in the managem en t and monitori ng of the functionin g  of an electri c  syst em  based on ph otovoltaic pa nels.  It  u s e s  an  8 - bit  mi croco n trolle r (P IC18F4 520 ) whi c h deal   wi th  all  the function s provided in  the device  (mea su ri ng,  monitoring  and re co rdin g). The maj o con s trai nt of t h is  datalo gge r i s  the  auto n o my of  o pera t ion, co nsumi ng a  fun c tion al po we r a s  l o w   as possibl e (nan oWatt  T e ch nolo g y) without  affe cting the a ccura cy of me asu r em ents  and  reliability of recorded data.       2. Hard w a re  Des c ription   The p r ototyp e device  de scrib ed in thi s  pape r is d e signed fo r 12 V photovoltai c  pa nels  system  at a  medium  po wer  (10 0  to 3 00W). It  is  resp on sible fo r pe rforming  automati c  a n d   perio dic m e a s ureme n ts of  five importa nt physi cal p a ram e ters to  be monito re d: the ch argi ng  curre n t of the  energy accu mulator  (12V  battery),  the  discha rge  cu rrent, the cha r ging voltage,  the   external  tem peratu r e  (of the 1 2 V P.V.) and  the   inte rnal  tempe r at ure  (of  the  b a ttery). Th ese   measurement s are a c qui re d peri odi cally  and imm edi ately displ a ye d on a  2x16  cha r a c ters L CD  displ a y, whe r e the first lin e is reserve d  to displ a y the mea s u r e d  value of the  voltage of the   battery ch arg e , the cha r gi ng cu rrent (o r disch a rg e, depe nding  o n  the sig n ) a nd the qu anti t y of  electri c ity (a cquire d o r   con s ume d ),  whil e the  se con d   line is re se rv ed to di spl a y the clo c k, an d, in  turn, the nu mber of the  day, the in ternal  tempe r ature and the external  temperature.  A  rudim entary  but sufficie n t keybo a rd of t h ree p u shbut tons is u s e d  for the initial a d justme nt of the   real time  cl ock (RT C ) of th e device. The  diag ram   i n  t he figu re 1  sh ows the m a in  modul es  of this  Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM NIKA   ISSN:  2302-4 046     Prototypi ng a  Dedi cated P hotovoltaic  S ystem  Datalo gger  (Bena be d Khadidja )   489 device:  an  8-bit micro c ont roller (PIC18F 4520 ), a  2x 1 6  cha r a c ters  LCD di spl a module,  a tin y   keybo a rd  wit h  3 pu sh butto ns, the  circuit r y for fou r  me asu r em ent ch annel s (i ntern a l and  extern a l   temperature,  curre n t and  voltage), the  regul ated  p o we r supply  se ction, an finally the mass  stora ge SD m e mory.           Figure 1. Block di agram of  the prototype  device.       2.1. The 8-bit Microcontro ller (PIC18F4 520)   It is a high-e nd micro c ont rolle r of the Amer ican  so ciety Microch i p, which is  now the   worl d lead er in this cat egory of p r ogra mmabl e  digital com pone nts. It has a  red u c ed    instru ction  se t compute r  (RISC) a r chit ecture , high  spe ed pe rformance and a  large am oun t of  flash me mory ; PICmicro are much bette r than  other  8 - bit micro c ont rolle rs  usi ng t he old  com p l e instru ction  compute r  (CISC) a r chitect u re (eg,  Mot o rola 6 870 5 or Intel 805 1 )  [7]. It can be   powere d  by a voltage fro m  1.8V to 5.5V [8].  Why do we  have  cho s e n  Vdd1  = 5.12 V?  With a  resolution  of 10-bit, the int e rnal A DC  pi cks u p  to 10 24 mea s u r e s ,  and with  sett ing a voltage  of  5.12 V, we  o b tain a  sen s it ivity of 5120/1024  = 5  mV  pr e c i s ely. Th is ste p  of 5  m V  is sufficient  to   measure  the temperature detecte by the LM3 5  se ri es temp eratu r e sen s ors,  whi c h p r ovid e a   step of 1 0  m V  per d egre e  Cel s iu s, a nd an  ac cu racy of 0.5 ° C . Finally, th e PIC18F 452 0 is  clo c ked by  a n  8 M H system internal  clo c k (giv in g  a ½ µ s  p e r instructio n,  except fo r ju mp   instru ction s  t hat req u ire  1 µ s), an d an e x ternal  qu artz of 32768  Hz  to accurately manag e the real  time clo ck a n d  cale nda r (RTCC), with  the intern al 1 6 -bit Time r1  (Figu r e 2 ) . The PIC18F 45 20   con s um es  a curre n t about  3.5 mA in ru n time mode  (at 8 MHz), but this value  drop s d o wn to 9   µA in sleep m ode (PIC h a lted, except for timer1 intern al clo ck at 32 768 Hz).           Figure  2. The  PIC18F4 5 2 0  circuit with i t s two qua rtz  (8 MHz an d 3 2768  Hz)  Evaluation Warning : The document was created with Spire.PDF for Python.
                             ISSN: 23 02-4 046                     TELKOM NI KA  Vol. 16, No. 3, Dece mb er 201 5 :  488 – 494   490 2.2. The 2x1 6  Char acters   LCD  Displa y  Module   The 2x16 ch ara c ters L C D module requ ires a mi nimu m of 10 lines  I/O (input / output) to  con n e c t to the PIC, in 8-b i t mode, or o n ly 6 I/O lines, in 4-bit mode. Thi s  latter meth od  wa therefo r cho s en to mi nimi ze the n u mb er of line s  I/O  (Figu r e 3 ) . T he comma nd  line (EN: pi n  6)   of the LCD  displ a y is dri v en dire ctly by t he outpu t RB3 (pin 3 6 ) of PIC18F 4520, while the   comm and li n e  (RS: pi n 4 )  of the L C D is drive n  by  the RB2 o u t put (pin 3 5 ) [9]. In order to   minimize the global  current  con s umptio n  in sleep  mo d e , we have to  avoid to power pe rman ent ly  the LCD di sp lay. Hence, p i n 2 (Vdd) an d pin 15 (b a c klight) of the LCD displ a y are not direct ly  con n e c ted to   the p r ima r y p o we su pply,  but rather  to  an o u tput  pin  of the PICmicro  (pin  1 3 ). T h e   same id ea ha s been a pplie d for the temperatu r e sen s or  whi c h is  powere d  only  during the time  of analog a c q u isition.           Figure 3. The   2x16 LCD di splay mod u le  4-bit mode       2.3. The Thr ee Bu tto ns  Ke y board  The  keybo a rd ha s three  pushbutton s   driven  with o n ly two I/O (Figure 4 ) ; pu shb u tton s   BP1 and BP 2 are di re ctly con n e c ted  to input  pi ns RB0  and  RB1 (with thei r inte rnal  pul lup   resi sto r s a c tivated, only  durin g the   keyboard polli ng time) an d are used  to increm ent  or   decrem ent  of   the RT CC, whe r ea s pu shbutton  BP3,  indirectly  co nne cted to   RB0 a nd  RB 1   simultan eou sl y, through di ode s D1 an d  D2, is use d  to roll over hour, min u te, second, day,  month a nd ye ar. When th PICmicro i s  p u t in sl eep  m ode, the  LCD modul e is  sh ut off (its  sup p ly  is co ntrolle d throu gh pin  RC7) a nd can  be po wered a gain by pu sh button BP3.            Figure 4. The  three pu sh b u ttons keybo a rd   Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM NIKA   ISSN:  2302-4 046     Prototypi ng a  Dedi cated P hotovoltaic  S ystem  Datalo gger  (Bena be d Khadidja )   491 2.4. The Circ uitr y  for Four Measur e ment Chann e ls   Only four of  the PIC18 F 4520  anal og  i nputs have  been  devot ed to me asure five  importa nt ph ysical  pa ram e ters (Fi gure  5): the  ch arging  cu rre nt  (Ibat po sitive ) for th e e n e r gy  stora ge p a ck (12V batte ry), the disch a rge curr ent (I bat negative ) , the cha r gin g  voltage (Vb a t),  the external t e mpe r ature (T°ext, of the  photovolta i c  panel s) a nd the intern al temperature  (T °int,  of the battery ). The L M 35 CZ an d LM 3 35 tempe r at u r e sen s o r are used, with  a se nsitivity of 10  mV/°C and a n  accuracy of 0.5 °C and 1  °C re spe c ti vely. The temperatu r e ra nge  is -40 °C to 1 10  °C fo r the fi rst sen s o r , an d  -40  ° C  to 1 0 0  ° C  for th seco nd o ne. T hey ca n b e  p o we red  by a  DC  voltage from   4V to 20V [1 0]. The  cha r ging  cu rre nt   (and  di scharge)  of the b a ttery is d one  by  measuri ng a  voltage drop  across a l o resi stan ce  (0 . 1  ohm ) in  series  with the p o sitive termi n al  of the battery to be re ch arge d. The  calcul ati on of  the maximu m power  dissipate d  by that  resi stan ce  de pend on the  maximum  current that  ca n be  source d  by the  sola r pan els i n  u s e,  and the maxi mum cu rrent allowed for u s er  con s u m pt ion. The ch arging voltage t o  be mea s u r ed   is taken from  a conventio nal voltage  di vider, de co up led with  capa citors  C12  an d C1 3 u s e d  to  filter any tran sient voltage  or noise tha t  c ould be in duced thro ug h long lead s from the sol a panel s.           Figure 5.   Circuitry for 4 an alog chan nel     2.5. The Po w e r Supplies    Two po we r sup p lie s have been de si gned: On delivering a  stable 5.12Vd c  for the   microcontroll er, the L C displ a y and  active te mpe r ature sen s o r s,  and one d e livering a  st able  3.0Vdc for th e SD card  m e mory. A s   with any  po rtabl em bedd ed  desi gn,  b o th high co nversi on   efficien cy an d very low st andby po we r dissi pati on  were amo ng  our p r ima r y goals. Th e pri m ary  power  sup p ly unit (Fig ure  6) mu st de al  with  a wi de  input ra nge  (10.5V to 21V ), we  cho o se  a   step-do wn  de dicate d integ r ated ci rcuit: the M C P163 1 1  [11]   characterize with e fficiency u p  t o   96% and  a v e ry low quie s cent  cu rre nt (44 µA ty pical ) .  The  se co n dary po we supply unit  (fig ure   7) i s   ba sed  o n  a  microp o w er L D O  line a reg u lator,   the M C P170 2 cha r a c teri zed  with lo w d r op  out of 1 0 0  m V  @ 40  mA,  and  an  ultra  l o quie s cent   cu rrent  (2 µA  typical ) . The s e t w o i n teg r ated   circuits offe r robu st ope rat i on with inte grated ov e r -current prote c tion, short - ci rcuit prote c tio n high-temperature operation  capab ilities,  and over-temper ature protection feat ures.  The SD  card  memory i s  p e riodi cally a c tivated (each  hour) only to  save mea s u r es, the n  it is completely  shut  off (to save p o we r), he nce the use  of the P chann el  m o sfet T1 d r ive n  with the out put pin RA6 o f   the PICmicro.      Evaluation Warning : The document was created with Spire.PDF for Python.
                             ISSN: 23 02-4 046                     TELKOM NI KA  Vol. 16, No. 3, Dece mb er 201 5 :  488 – 494   492     Figure 6. The  primary po wer su pply unit           Figure 7. The   powe r  su ppl y  for the SD c a rd memory       2.6. The Memor y  SD Card (2 GO)   The m e mo ry  use d  in  this  device  con s ists of  a  SD  c a rd  of 2  GB  for daily   re co rding  of  variou s para m eters acquired peri odi call y. The Table 1 summ ari z e s  the format of the measu r ed   data over on e  year.  The SD memory c a rd is  configured in the FA T16 file s y s t em from Mic r os oft. We us ed  Mikr oC  compi l er (of  Mi kro e l e kt ro nic a wh ich ha s st a n d a rd built in ro utines fo r SD memory. Each  day, a file is  saved under t he name LOG_Nxxx.DAT (xxx is the  n u mber of days, rangi ng from  001 to  365  o r  36 6, if lea p  year), in bi n a ry form at, with a fixed  si ze  of 27  bytes. The  Fig u re  8  details th e in terco nne ction  of the S D  card  me mo ry  with the PI C18F45 20 mi crocontroller.  The   se con dary  re gulated  po wer  su pply d e livering  3.0V dc  wa de si gned  only fo r the  SD ca rd   memory [1 2], that acce pts a rath er  narrow volt ag e m a rgin  (b etwe en 2.7V a nd  3.6V only). T he  SD  card m e mory i s  ve ry se nsitive to   pea k volt ag e  variation s  o n  its  su pply  pins (Vd d  ,  Vss),  hen ce the n eed for the  two de cou p ling ca pa citors C3 0 and  C31  clo s e to the SD. The  inputs/o u tput s of PIC work  with logi c l e vels  (0 V, 5 V ) an d mu st  be ad apted  to SD l ogi c le vels  (0V, 3V), with the resi stive voltage divider (R3 0  to R35 ) . Finally, the red LED is optional a n d   s e rves  only for ac tivity (write/read) c o ntrol of the SD memory  c a rd.          Figure 8. The  memory SD  card (2 G O Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOM NIKA   ISSN:  2302-4 046     Prototypi ng a  Dedi cated P hotovoltaic  S ystem  Datalo gger  (Bena be d Khadidja )   493 Table 1: Re cordin g format  of a package  of  measu r e s  for one day (size = 2 7  bytes)  Nbr b y t e s   Variables   Meanin g     2   2     nDa y   Ye a r   Qda y   RhoMax  Ti ntMax   TextM a x   Qnight   TintMin  TextMi n     Number of  da y s  i n  one  year  = 1,  2, ..., 365 (o 366)   Y e a r  = 00, 01, ... , 99 correspond  t o  2000 to  2099   Quantit y of electr icity  accumulated  in one da Maximum efficiency in one da Max i mum interna l  temperature   Max i mum e x tern al temperatu r e   Quantit y of electr icity  consumed a t  night  Minimum internal temperatu r e   Minimum externa l  temperatur e         3. Results a nd discussio n    Unli ke a noth e r datal ogg er, also b u ilt in  our  la bo ratory, but base d   on the mi crocontrolle PIC16F7 16 [ 13], our p r oto t ype is ba se d  on the mi cro c ontrolle r PIC18F 452 0 which  ha s several  enha ncement s:   1)  It has the  abi lity to accept  a greate r  nu m ber  of inp u t cha nnel s, a nd it is  provided   with an intern al ADC with h i gher a c q u isiti on sp eed a n d  resol u tion.   2)  The extern al  memory is  based on a  hi gh ca pa ci ty SD card  of 2GB for daily  recording of variou s pa ram e ters.   3)  Our  prototyp e uses  a p o w er supply b a se d on  dedi cated I.C. fo r porta ble d e vice (efficien cy  up  to 9 6 %, and  quie s cent  cu rre nt of  44  A typic a l)  whereas in [13], the  regul ated  p o we sup p ly com p ri se s a cl assi c integrated  reg u lator  78L0 5   cha r a c teri ze d  with a quie s cent curre n t of 4 mA!      4. Conclusio n   This  pap er d e scrib e s the  desi gn  and i m pleme n tatio n  of a n  a u to matic  re cordi ng d e vice  (datalo gge r) to measure seve ral i m porta nt  ph ysical  para m eters (inte r nal a nd ex ternal   temperature,  the current  and voltag of the ba tte ry). This  prot otype is  re co mmend ed in  the  manag eme n t and the m o nitoring  of a n  ope ration al  sola r po we r plant ba se d  on ph otovol taic   panel s. The d e sig n  wa s focuse d prin cip a lly with powe r  con s umptio n  in mind, and a spe c ial  care  wa s give wh en  cho o si ng t he  right  com p onent s for thi s  p u rp ose  (st ep-d o wn inte grated  regul a t or   with very l o w q u ie scent  curre n t, micropo wer  L D O  reg u lato r, n ano Watt microcontroller, l o power  sen s o r s, and  a very  small  ratio ru n-time/sta ndb y mode). Th e  modula r   con c eptio n ap plied  in the ha rd ware of thi s  e m bedd ed d e s ign  ha s be e n  also ap plie d in the d e velopme n t of the   dedi cated  firmwa re i n  a  hi gh level  lan g uage,  wh ere  i n terrupts hav e be en  used f o each  sep a rate   task: an alog  acq u isitio n, key board se nsing, LCD disp lay.        Referen ces   [1]  Aking bad e KF , Alimi IA, Oni  T .  Design  of a  Data L o g ger fo r Biome d ica l  Si gna ls.  Internati ona l Jour na l   of Electronics  and El ectrical  Engi neer in g (IJEEE) . 2015; 3( 2): 149-1 52.   [2]  Holl an d E. Formula-SAE Wir e less  Data L o gger.  Jo urn a of Und e rgra du ate Res earch   at Minn esot a   State Univers i ty . 2002: 3.   [3]  Srino n chat J. Improvem ent of a dat a lo gg er s y stem for ren e w a ble  ener g y Asian Jour na l on En er g y   and Env i ro nme n t . 2009; 10( 3): 142-1 48.   [4]  Akposi onu S.  Desig n  a nd F abric ation  of A Lo w - C o st D a ta Lo gg er for Solar En erg y  Parameters .   Journ a l of Ener gy T e chno lo gie s  and Pol i cy . 2012; 2(6): 1 2 -1 7.  [5]  W aghmar e MB, Chatu S.  T e mperatur e an d  Humidit y   An al ysis us in g Dat a  Log ger of D a ta Acquis i tio n   Sy s t e m Inter n ation a l J our nal  of E m er gin g   T e chno logy  a n d  Adv ance d  E ngi neer in g . 20 12; 2( 1): 10 2- 106.   [6]  Beni RA, P e rang in-a ng in H P , Pebri y a n ti  G. Implementa t ion of AT Mega8 Microc ontr o ller for  Dat a   Log ger  of Sol a r Irradiati on.  Int e rnati ona l Jo ur nal  of App l i ed  Mathe m atics  a nd Mo de lin g (I JA2M) . 201 5;  3(1): 1-8.     [7]  Dog an I. D e sig n  of  a microc o n troll e r b a sed   multich ann el te mperatur e d a ta  log ger  dev ice  w i t h  SD  ca r d   storage a nd re al time clock i n terface.  Electro n ics W o rld.  20 09: 26-3 2 .     Evaluation Warning : The document was created with Spire.PDF for Python.
                             ISSN: 23 02-4 046                     TELKOM NI KA  Vol. 16, No. 3, Dece mb er 201 5 :  488 – 494   494 [8]  Sarker S, Cha k rabort y  M, Baner jee A. Lo w   C o st Embe dde d S y st em/Andro i d Bas e d  Smart Hom e   Au to ma ti on  Sy ste m   U s i ng Wi re l e ss  Ne tw orkin g . Int e rnati ona l Jo urna l of El e c tronics a n d   Co mmun icati o n Engi ne erin g . 201 4; 7(2): 175 -186.   [9]  Sethuma d h a va n S. Smart M e tering  an Ho me Auto m a tio n  So lutio n s for  Ne xt  Deca de   Using  Zig b e e   T e chnolog y.   S S RG Internati ona l Jo urn a of Electro n ics  an d C o mmu n icati on E n g i n eeri ng (SS R G - IJECE) . 2015; 2(6): 32-4 2 [10]  Marimuth ul R, Dee pak V, Gow t h a m S,  Ram PV. Remote Heart Ra te Monitoring Sy stem.  Internatio na l   Journ a l of Elec tronics an d Co mmu n ic ati on E ngi neer in g Res earch (IJECER ) . 2013; 1(3): 4 7 -52.   [11]  Daiso n  SS, V i noth KK, Sur e sh  KS. Hi gh  Efficient Mod u le of B oost  Conv erter in  PV Modu le.       Internatio na l Journ a l of Electr ical  a nd Co mp uter Engi ne erin g (IJECE) . 201 2; 2(6): 758-7 8 1 .     [12]  Red d y  BNK,  Venktram N,  Sir ees ha. An  Efficient Data  T r ansmission  b y   usi ng Mo d e rn USB F l as h.      Internatio na l Journ a l of Electr ical  a nd Co mp uter Engi ne erin g (IJECE) . 201 4; 4(5): 730-7 4 0 .                                                                       [13]  Naim H, Hassi ni A, Bena bad j i  N, Falil FZ,   Boua di A. Rea l izat io n of an In expe nsive Em bed de d Mini- Datal ogg er for Measuri ng a n d  Controll in g Ph otovolta ic S y st em.  Journa l of Solar En ergy  Engi neer in g 201 5; 137( 2): 5.       Evaluation Warning : The document was created with Spire.PDF for Python.