Home
        iSense Security Module User Guide
         Contents
1.                      mirer ET SET SOS 0                   deliver data after set threshold was exceeded  accelerometer    set mode  MODE THRESHOLD         set the threshold to 5 mg  accelerometer    set threshold 5            set this application as the sensor event handler        gt  handle buffer data will be called if      sensor data is available  accelerometer    set handler  this         switch accelerometer  accelerometer    enable             Jf       configure PIR sensor     set this application as the sensor event handler        gt  handle sensor will be called upon    PIR event    pir    set sensor handler  this            Ehe PIR event aurat ion to  2 secs  piri                      alone            ZOOM        switch on the PIR sensor   pir     enable       coalesenses 26132    research to innovate       When the accelerometer changed to the continuous mode  induced by a threshold exceedance  and  filled the first buffer  SecurityModuleDemoApplication  handle buffer data is  called and the collected data is passed     void  SecurityModuleDemoApplication    handle buffer data  BufferData  buf data       os   debug  ACC        send data to iShell  Sampling frequency     is 40 Hz      inter reading spacing is 25 ms  isi    send buffer data buf data  os   id    25           return from continuous mode to threshold mode  accelerometer    set mode MODE THRESHOLD      A debug message                is output  and then the data is sent to iShell      ifdef ISENSE ENABLE 
2.        lt            Copy projects into workspace       If it doesn   t  the typical reason is that there is already    project called     Security ModuleDemoApplication    in Eclipse  i e         you imported the SecurityModuleDemoApplication before or    e you created or imported a project with the same name before     coalesenses 20 32  research to innovate       Be sure not to check             projects into workspace  in the above dialog  Finish the import by clicking  on the    Finish    button     As a result  you will find the    SecurityModuleDemoApplication    project in the    Project Explorer                C C     iSense src isense modules security module   File Edit Refactor Navigate Search Project Run Window    9 0  8     8 9           L   Project Explorer  2    5 iSense  E   isenseDemoApplication     SecurityModuleDemoApplication                      In addition  the    SecurityModuleDemoApplication    will appear in the             Targets  view  Double  click on    all    to build the demo application for all targets     ES      cic    Java     take Tar       Progress    D                              8 125 iSense  89 125 iSenseDemoApplication    15   SecurityModuleDemoApplication  OE settings  H  E bin  65                     2  5139     o    clean IN5139R1         JNS139R   o    IN5139R1     e             8  dean             As    result  the    Console    view displays the compiler output during the build process  After that  it  should look similar to th
3.    Within the if clause  the accelerometer is configured  At first  sensor is set to the threshold mode for  movement detection  When the change in subsequent sensor readings exceeds a threshold  the sensor  will start reading out values and pass them to the data handler  However  static absolute accelerations   such as induced by earth s gravitational field  will be ignored  so that the sensor is exclusively  sensitive to movement or vibration     After that  the threshold for the motion detection is set to 5 mg  This will cause an event to occur event  at the slightest change of sensor values  i e  in case of tiny movements  For generating events e g  on  rough shock  the threshold could be set to 500 or 1000 mg  When an event is generated  the sensor will  automatically change into the continuous mode  and will start collecting sets of sensor readings for all  three axes     When the buffer is full  SecurityModuleDemoApplication  handle buffer  data will  be called because the application is set as the sensors data handler  Finally  the accelerometer is  enabled     Then  the PIR sensor is configured  At first  the application is set as the sensor s event handler   resulting in SecurityModuleDemoApplication  handle sensor being called upon  sensor events  The interrupt suppression interval is set to two seconds  and the sensor is enabled  it  will to ready for surveillance after a stabilization time of four seconds         ff       configure accelerometer                  
4.    iSense Security Module User Guide    coalesenses Coalesenses GmbH     Maria Goeppert Str  1 23562 L  beck Germany www coalesenses com  sales coalesenses com  research to innovate       Document history    Version Date Changes   1 0 18 05 2009 Initial version   1 1 31 10 2009 Corrected paths for the binary files  added section on the application factory   coalesenses 2 32    research to innovate       Contents    Ll  Aboutthis User Guide    eee erect sette eet tete nie ene petet ex ether esee ee tt 4  2     General Description  iet Roles              ea a pese eee da o ln ERE Ee Ye Pa e d aed 5  2 1  Handling and Security Instructions    ener tnn 6  2 25  JAGCEIEFOIHe                                                       6  2 3  Passive infrared  PIR  Sensor                                                                                    7   NE QE                                          amp   3 1   SensorHandler API Description    neci tette e teet pe           T eed en 8  3 1 1  handle          oi          te          tine E Ee Rated eee at reru    9   3 2  JPiSernsor API DescrIiptlOn iecit eere eet tae teri estie turre pee eee Pe dee lae eee ee eee bae HE e 9  3 2 1  Bude                    eed iin be a eee 9  3 2 2                                                               leans 10  3 2 3  MEL                                                   10  3 2 4  set pir sensor Int terval scires tree eere ee ey eee den 10  3 2 5  set sensor  handler sssrinin e e Re Le T ER e
5.   Description     Switches on the PIR sensor  regardless of prior state  if a sensor event handler was set before   To allow the sensor to stabilize after power on  interrupts will not be enabled before an interval  of 4 seconds passed  If no handler was set  the sensor is not enabled     Parameters   none  Returns   true if the sensor was enabled  false otherwise     Required modules     Pir Sensor   define ISENSE ENABLE PIR SENSOR       Available for the targets   JN5139R  JN5139R1    3 2 8  disable    void PirSensor  disable       Description     Switches off the PIR sensor  regardless of prior state   and disables the interrupts for the  controller IO pin the sensor is connected to     Parameters   none    Required modules     Pir Sensor   define ISENSE ENABLE PIR SENSOR       Available for the targets   JN5139R  JN5139R1    3 2 4  set pir sensor int interval    void PirSensor  set pir sensor int interval uintl6 interval       Description   Sets the PIR sensor interrupt suppression interval  see Section 2 3    Parameters     interval interrupt suppression interval in milliseconds    coalesenses 10 32    research to innovate       Required modules     Pir Sensor   define ISENSE ENABLE PIR SENSOR       Available for the targets   JN5139R  JN5139R1    3 2 5  set sensor handler    void PirSensor  set sensor handler  SensorHandler  sh      Description     Sets the object that sh points to as PIR event handler for the PirSensor  Note that the class  of sh must inherit from isen
6.  EO ER e ERE FR eee XR         11   3 3   BufferDataHandler API                                         enne ennemi nnne 11  3 3 1  handle  buffer data                       12   3 4  LisAccelerometer API                                 eere enne nnne 12  3 4 1                  13  3 4 2  uL  p                                      13  3 4 3  ACC                                                14  3 44  Set MOG c I                                   E e ES 14  3 4 5  set treshold                                  15  3 4 6  s  t handler threshold    tereti oud ceti                 15  3 4 7  LAENA seien ee                 iR  16  3 4 8  set  extended  range    eere dte giri tre Peer bee ERREUR      16  3 4 9  II                         M                 16   4  Security Module Demo                                              18  4 1  Obtaining the Security Module Demo Application                      essere 18  4 2  Compiling the Security Module Demo Application                     seen 18  4 2 1  Using Eclpse          a reete ed                 send MET        done 18  4 2 2  Using the Command Line    enne enne enne 21   4 3  Flashing the Security Module Demo Application                        essere 22  4 4  Security Module Demo Application                                                 23   SENEN IU                                  D 31  coalesenses 3 32    research to innovate       1  About this User Guide  In this user guide     e files and folders are represented in the 
7.  sensor events  It is  defined in src isense modules security module pir sensor h in the iSense directory     The LisAccelerometer class in the isense namespace contains all software functionality for  operating the accelerometer sensor  including    e switching it on and off     e configuring the active axes  the sensor operation mode  the threshold interval  the sensor  range  and the frequency divider        setting a data handler and the data buffer fill state threshold for calling the handler     The BufferDataHandler interface class in the isense namespace defines an abstract pure  virtual method that must be implemented by classes that want to receive accelerometer data     The iSense firmware is structured into a large number of software modules that can be  de  activated  separately  The below API description for each function specifies the required modules that must be  activated to use the functions  and names both the web compilation module name as well as the  according code define  An asterisk     indicates that the respective module is activated in the iSense  standard firmware     The API description also indicates the make targets for which the different functions are available     3 1 SensorHandler API Description    The isense  SensorHandler class must be inherited by classes that are to be set at the  PirSensor class as a SensorHandler using the method  PirSensor  set_sensor_handler  SensorHandler  sh      It is defined in src isense modules security_modul
8.  type filter text       General      Archive File  e Breakpoints   Bd Existing Projects into Workspace  G File System  E Preferences              8 6 CVS  S S Mylyn    Team                                           Choose    Existing projects into workspace   and click on  Next         Import    Import Projects  Select a directory to search for existing Eclipse projects            8  Select root directory       select archive file   Projects                             C          projects into workspace            Net      Bh            Click on the    Browse        and select the directory of the Security Module demo application  i e   SecurityModuleDemoApplication in the iApps directory     coalesenses 19 32  research to innovate    Ordner suchen    Select root directory of the projects to import          iapps   amp       CoreModuleDemoApplication  O GatewayModuleDemoApplication   amp       GpsModuleDemoApplication   C3 iSenseDemoApplication    Ez  B SecurityModuleDemoApplication vi      e            Ordner    Security ModuleDemoApplication            After doing do  the    SecurityModuleDemoApplication    project should appear in the projects list of the   Import  dialog     Import Projects    Select a directory to search For existing Eclipse projects              Select root directory    C  Dokumente und EinstellungenibuschmannE         select archive File        Browse                  Projects    v  Security ModuleDemoApplication  C  Dokumente und Einstellungen        
9. 39R  JN5139R1    3 4 2  enable    bool LisAccelerometer  enable       Description     Switches on the accelerometer  regardless of prior state   Note that if no handler was set  the  sensor is not enabled     Parameters   none  Returns     true if the sensor was enabled  false otherwise  no data handler configured  or enable failed  for another reason     Required modules     Accelerometer   define ISENSE ENABLE ACCELEROMTER       coalesenses 13 32    research to innovate       Available for the targets   JN5139R  JN5139R1    3 4 3  disable    void LisAccelerometer  disable       Description    Switches off the accelerometer  regardless of prior state   Parameters    none    Required modules     Accelerometer   define ISENSE ENABLE ACCELEROMTER       Available for the targets   JN5139R  JN5139R1    3 4 4         mode    void LisAccelerometer  set mode  uint8 mode      Description     Configures the sensor operation mode    Parameters   mode operation mode of the sensor  MODE CONTINUOUS continuous mode  MODE THRESHOLD threshold mode for movement detection  MODE FF freefall detection mode  Note     If the sensor is in the movement of freefall detection mode  and an event is detected  the sensor  changes into the continuous mode and starts filling a buffer  When the buffer is full  or the data  set count reached the handler threshold  the handle buffer data of the set  BufferDataHandler is called and the buffer is passed     Required modules     Accelerometer   define ISENSE ENA
10. 6 42 465  PIR     18 56 43 256  ACC   18 56 45 028  ACC                                        Resetted device  Resetted device  Resetted device             Flash done        In addition  the application sends the 16 sensor readings for all three axes following a movement  detection event to the    Curve illustrator  plugin of iShell  if it is activated      coalesenses 29132    research to innovate       iShell  COM18    coalesenses GmbH  File Edit Mode                        t   gt         E seria montor    curve stator   2    Fash Loeder   22  Phos  0     Save      data Save data of view       2 200  2 100  2 000  1 900  1 800  1700  1 800  1 500  1400  1 300  1200  1 100  1 000  900  800  700          500  400  300  200  100    Values  o    EZ   200   300   400   500   800   700   800   900    1 000      1 100    1200    1 300    1 400    1 500    1 000    14 700    1 800    1 900    2 000   2 100    2200                                                                                                                                           102 000 103 000 104 000    105 000    106 000    107 000    108 000    109 000 110000 111000 112000 113000  Time               ID 29009  curve 1     ID 29009  curve 2     ID 29009  curve 3          114 000    115 000    116 000    117 000    118 000    119 000    120 000                am  SecurkyModuleDemaApplcatio bin  50248 bytes  393 blocks  fl path  C  Dokumente und Einstellngen buschmann Eigene Datelen Luebeck coalesenses test2 i
11. Apps SecurtyModuleDemaAppicationibinINS139R SecurtyModuleDemoApplcation bin                 For additional information on iShell and its plugins  please refer to the iShell User Guide  2      coalesenses  research to innovate    30 32       5  References     1  coalesenses Development Environment Setup User Guide  online available at  http   www coalesenses com download UG  development environment  setup v1 9 web pdf     2  coalesenses iShell User Guide  online available at  http   www coalesenses com download UG_ishell_v1 3 pdf     3  coalesenses Writing iSense Applications User Guide  online available       http   www coalesenses com index php page isense applications     4  coalesenses iSense Core Module User Guide  online available at  http   www coalesenses com index php page hardware docs and demos    coalesenses 31 32  research to innovate       coalesenses GmbH  Maria Goeppert Str  1  23562 L  beck  Germany    www coalesenses com  sales 9 coalesenses com    coalesenses 32132  research to innovate    
12. Arial typeface    e code fragments  function names etc  are represented in the Courier New typeface   e GUI elements such as button descriptions etc  are represented in    quotation marks    e titles of other documents are presented in          type     This manual assumes that the reader has successfully installed the iSense development environment   and obtained the iSense standard firmware  For further information on these steps  consult the  Development Environment Setup User Guide  1      In addition  it is assumed that the user is familiar with the use of iShell  For further information on  iShell  consult the iShell User Guide  2      For further information on iSense firmware programming concepts and on application development  it  is recommended to read the Writing iSense Applications User Guide  3      coalesenses 4 32    research to innovate       2  General Description    The iSense Security Sensor Module series features a 3 axis accelerometer  A passive infrared  PIR   sensor can be connected via connector X4  a camera module can be attached to connector X3     The PIR sensor can be used to detect moving objects that feature a temperature different from the  environment  such as humans  in distances of up to 10 meters  The sensor offers a wide range of 110   for comprehensive monitoring  If switched on by driving low the DIO9 TIMO CAP PIR  ON pin of  X1 X2  the PIR sensor generates interrupts on the DIOS TMOGT SI  INT pin of X1 X2 upon object  detection    The 3 
13. BLE ACCELEROMTER       Available for the targets   JN5139R  JN5139R1    coalesenses 14 32    research to innovate       3 4 5      set threshold    void LisAccelerometer  set threshold  uint16 threshold      Description     Configures the acceleration threshold  in mg  that must be exceeded to generate an event in the  movement detection mode or undergone in the freefall detection more respectively  Note that  threshold is not expressed as an absolute value for the movement detection  i e  is a relative  value describing the difference between two subsequent readings of one axis  while it is an  absolute value for the free fall dectection     Parameters     threshold acceleration that  if exceeded undergone  triggers the change to continuous  mode    Required modules     Accelerometer   define ISENSE ENABLE ACCELEROMTER       Available for the targets   JN5139R  JN5139R1    3 4 6  set handler threshold    bool LisAccelerometer  set handler treshhold  uint8 handler threshold       Description     Configures how many data sets the sensor stores in    buffer before it calls  handle buffer  data to pass the collected data sets to the data handler  Note that the new  threshold is not set if threshold data sets would not fit into the buffer     The maximum handler threshold can be calculated is follows   max  threshold   floor  BUFFER DATA BUFFER  SIZE   number of active axes      Parameters     handler threshold  number of data sets the sensor is to store in the buffer before call
14. ISI BUFFERSENDING   i           Send the buffer data to iShell with packet type  isense  Uart  MESSAGE TYPE INT BUFFER                    param buffer data The buffer with the data to be sent to iShell   Nparam id The id of the corresponding device     param interval The time in milliseconds between two values        bool send buffer data  BufferData  buffer data    wapa al                                 he ke Ge      RS                    IShellInterpreter  send buffer data takes the actual buf  data  the ID of the  sending device  returned by Os    id     to display it in iShell  as well as the inter value spacing as  parameters  It then sends the data to UARTO  similar to Os    debug   so if an iSense Gateway  Module is connected to the node  the data can be forwarded to iShell  If the    Curve illustrator  plugin  15 active  it will receive the data and display the according graphs for all axes that are active at the  accelerometer     In SecurityModuleDemoApplication  handle buffer data the accelerometer finally  is set back into the threshold mode  Like this  no further sensor data will be delivered until the next  threshold exceedance  However  if the sensor node is moved continuously  the threshold will be  exceeded again immediately  the sensor will again start collecting sensor data sets  and send them to  iShell  so that the charts in the    Curve illustrator  will continuously display the sensor data     coalesenses 27132    research to innovate       Otherwise  
15. LisAccelerometer  accelerometer_      pointer to the passive infrared  PIR  sensor  Pinoensor  joue p     pointer to the iShell interpreter  IShellInterpreter  isi                  SecurityModuleDemoApplication has three member variables that are initialized in the  constructor  accelerometer  holds the pointer to the LisAccelerometer instance  pir    points to a PirSensor instance  and isi  to an IShellInterpreter instance     SecurityModuleDemoApplication    SecurityModuleDemoApplication Os  amp  os   Application  os    accelerometer  NULL    pir   NULL    isi   NULL                 SecurityModuleDemoApplication overwrites isense  Application  boot     which is called upon the start up of the iSense sensor node     23 32    research to innovate       void  SecurityModuleDemoApplication    boot              output boot notification message  os   debug  Booting Security Module Demo Application  id  x               220610            create LisAccelerometer instance  accelerometer   new LisAccelerometer  0os         create PriSensor2 instance  pir    new PirSensor os         create iShell interpreter instance      needed to send accelerometer readings to iShell   isi   new IShellInterpreter  0os      if   accelerometer    NULL   amp  amp   pir    NULL   amp  amp   isi   NULL    1    P configure accelerometer              set the threshold to 5 mg  accelerometer    set threshold 5                                                                       deliver data after set thresh
16. TER       Available for the targets   JN5139R  JN5139R1    coalesenses 17 32  research to innovate       4  Security Module Demo Application    The Security Module demo application exemplifies how an application can make use of the  PirSensor and the LisAccelerometer         It shows how to    e configure the sensor   e implement the event and data handlers       send accelerometer data to iShell     4 1 Obtaining the Security Module Demo Application    Go to coalesenses web site  click on    Downloads     and then on    iSense Hardware     In the    Security  Module    section  click on the icon at the right in the    Security Module Demo Application    row  and  download SecurityModuleDemoApplication zip     Extract the content of SecurityModuleDemoApplication zip to the iApps directory     4 2 Compiling the Security Module Demo Application  The next step is compiling the Security Module Demo Application     4 2 1  Using Eclipse    If you want to use Eclipse for compiling the Security Module Demo Application  open Eclipse  and  change to the            perspective           89 125 CoreModuleDemoApplication  wes GatewayModuleDemoApplication  89 125 GpsTestApplication   HIS iSense    You        now import the application into Eclipse  Choose    File     gt     Import    from the menu bar to  open the    Import    dialog     coalesenses 18 32    research to innovate     s Import    Select    Create new projects from an archive file or directory        Select an import source  
17. a structure containing the most recent sensor readings    struct BufferData          set                                            10616 buf BUFFER DATA BUFFER SIZE          sec ms Time when the first data set of this buffer was captured     dim Number of active axes of each sensor data set  e g  2 if the x axis  and the z axis are activated      count Number of data sets in the buffer     buf Sensor readings  The readings of one data set are following each  other directloy  the axes are cascaded in the buffer  If e g  the x axis  and the z axis of the sensor are active  buf  0  contains the x value  of the first data set  buf  1  the z value of the first data set   buf  2  the x value of the second data set etc     Required modules   none   Available for the targets   all    3 4  LisAccelerometer API Description    The LisAccelerometer class in the isense namespace contains all software functionality for  operating the accelerometer  including    e switching it on and off       configuring the active axes  the sensor operation mode  the threshold interval  the sensor  range  and the frequency divider        setting a data handler and the data buffer fill state threshold for calling the handler     The LisAccelerometer class collects its readings in two buffers  After the first buffer is filled  it  is passed to the set data handler  while the sensor meanwhile fills the second buffer  Note that the  sensor assumes that the data handler processes the data in the first buffer 
18. axes accelerometer can be configured to cover accelerations of  2g or  6g  In addition to    delivering acceleration values via a digital interface  it can generate interrupts on movement or free  fall     In addition  a camera module that can take color pictures with VGA resolution can be attached via  connector X3  The images are preprocessed  so they can be scaled down to lower resolutions and  compressed according to the JPEG standard  The camera can be activated by driving low the  DIO10 TIMO OUT CAM  ON pin of X1 X2  and is operated via UARTI by using the DIO20 RXDI  and DIO19 TXDI pins of X1 X2                                                                               IEEE  m         1   2  2 2  8     wor  n a                X4   E           gt     T 30 0 1  2 zi  Bottom Top    The above figure shows the bottom and top side of the iSense Security Sensor Module  the below table  lists its features     Symbol Description    X1 X2 System connector for plugging an iSense Core Module or other iSense modules    X3 Serial camera connector  X4 Passive infrared sensor connector  A 3 axes  2g or  6g accelerometer  coalesenses 5 32    research to innovate       2 1  Handling and Security Instructions    Note that all iSense Modules are sensitive to electro static discharge  Appropriate protection measures  have to be taken     If not protected by an appropriate housing  all iSense components must be protected from humidity   mechanical impact  and short circuiting by contact w
19. e  warranty and the declaration of CE conformity regardless of consultation  Coalesenses customers  connecting third party devices do so at their own risk and agree to fully indemnify coalesenses for any  damages or injury resulting from such use     2 2  Accelerometer    The 3 axes accelerometer can be configured to cover accelerations of  20 or  6g via API calls  see  Section 3 4 8      The accelerometer supports three modes of operation that can also be set via API calls  see Section  3 4 4   In addition to delivering a continuous stream of acceleration values via a digital interface   continuous mode   it can generate interrupts on movement  threshold mode  or free fall  free fall  detection mode   For the first two modes  it can be configured which axes  x axis  y axis and or z   axis  are considered  see Section 3 4 9      Z        x  In the continuous mode  the accelerometer delivers a stream of accelerometer readings at a frequency  of up to 40Hz for all three axes  The sensor will generate interrupts  and the controller has to read out    every single data set separately  which it needs to wake up for in case it is sleeping  The data rate can  be reduced by configuring a so called frequency divider  a divider of 2 results in a frequency of 20 Hz        coalesenses 6 32    research to innovate       i e  only every second value is read  a divider of 4 in a frequency of 10 Hz etc    for details refer to  Section 3 4 7  Even though the values are not read  the controlle
20. e output depicted below           E Console 53       C Build  SecurityModuleDemoApplication    make  k all   Building for JENNIC 5139R target  Compiling  Jennic JN513xR  src SecurityModuleDemo  pplication cpp  j    Linking to bin JN5139R SecurityModuleDemo  pplication or32  Copying to or32 bin JN5139R SecurityModuleDemo  pplication or32    8  amp  r  E  r3  745                     text    56988      Done       text  61968      Done    data  i104    data  124    bss  9070    Build finished    bss  9164    Build finished    dec  66162      Building for JENNIC 5139R1 target    Compiling  Jennic JN513xR1  src SecurityModuleDemo  pplication cpp    Linking to bin JN5139Ri SecurityModuleDemo  pplication or32  Copying to or32 bin JN5139Ri SecurityModuleDemo  pplication or32    dec  71256    hex filename  10272 bin JN5139R SecurityModuleDemo  Application or32    hex filename  11658 bin JN5139R1i SecurityModuleDemo  pplication or32                   4 2 2  Using the Command Line    If you want to use the command line tools for building the Security Module Demo Application  open a    console window  change to the SecurityModuleDemoApplication directory in your iApps directory   and type  make      coalesenses  research to innovate    21 32    iSense Security Module User Guide         C  Windows System32 Cmd exe    C  Dokumente und Einstellungen buschmann Eigene Dateien Luebeck coalesenses f irmwares std_f irmware isense_sdk ifpps Secu  it yModuleDemoApplicat ion gt make      Building fo
21. e pir_sensor h in the iSense directory     class SensorHandler  public iSenseObject             virtual void handle sensor     0         coalesenses 8 32    research to innovate       3 1 1    handle sensor    void SensorHandler  handle sensor       Description     Overwrite this method if your class inheriting from SensorHandler should be called upon  PIR sensor events  If your class was set as the PIR sensor event handler before  see Section  3 2 5   it will be called when the sensor detects temperature fluctuations     Parameters   none   Required modules   none   Available for the targets   all    3 2  PirSensor API Description    The PirSensor class in the isense namespace contains all software functionality for operating the  PIR sensor  including    e switching it on and off    e setting the interrupt suppression interval  and   e setting a sensor event handler   The PirSensor class is defined in src isense modules security module pir sensor h in the  iSense directory     3 2 1  Constructor    PirSensor  PirSensor Os  amp os      Description     Initializes the PirSensor class  By default  the interrupt suppression interval is set to 3 5  seconds  The sensor is not switched on until enable is called     Parameters   os Reference to the operating system class Os  Required modules   Pir Sensor   define ISENSE_ENABLE_PIR_SENSOR       Available for the targets   JN5139R  JN5139R1    coalesenses 9 32    research to innovate       3 2 2  enable    bool PirSensor  enable     
22. eds a stabilization time of up to 4 seconds on average  During this time   the interrupt input from the sensor is disabled  Hence  the sensor is dysfunctional during the first 4  seconds after it is switched on     If switched on by driving low the DIO9 TIMO CAP PIR ON pin of X1 X2  the PIR sensor generates  interrupts on the DIOS TMOGT SI INT pin of X1 X2 upon object detection     In the common case  even single object detections induce a sequence of interrupts on the  DIO8 TMOGT S1_INT pin of X1 X2  To avoid multiple event notifications upon detection of a single  detection  the sensor interrupt is disabled for a software configurable time  the so called interrupt  suppression interval  see Section 3 2 4  after the first interrupt edge  and the set sensor event handler is  notified  After the interrupt suppression interval expired  the interrupt is re enabled     coalesenses 7 32    research to innovate       3  API Description    The software functionality for operating all features of the Security Module is split into two classes  that make use of two additional interface classes     The PirSensor class in the isense namespace contains all software functionality for operating the  PIR sensor  including    e switching it on and off   e setting the silence interval  and  e setting a sensor event handler     The SensorHandler interface class in the isense namespace defines an abstract pure virtual  method that must be implemented by classes that want to be notified about PIR
23. ication port  and change to the    Flash Loader  view  Select  the appropriate binary according to the table below     Chip Binary file  JN5139R iApps SecurityModuleDemoApplication bin JN5139R SecurityModuleDemoApplication bin  JN5139R1  iApps SecurityModuleDemoApplication bin JN5139R1 SecurityModuleDemoApplication bin    For details regarding the identification of the chip version  refer to Section 2 4 of the iSense Core  Module User Guide  4   Then flash the binary to the connected iSense sensor node     coalesenses 22132    research to innovate    coalesenses       4 4 Security Module Demo Application functionality    The source file of the Security Module        application is located at  SecurityModuleDemoApplication src SecurityModuleDemoApplication cpp  The class  SecurityModuleApplication is derived from isense  Application  and additionally  inherits from isense  BufferDataHandler andisense  SensorHandler     class SecurityModuleDemoApplication  public Application   public BufferDataHandler   public SensorHandler    public                      SecurityModuleDemoApplication Os  amp os         inherited from application  called upon device boot  void boot             inherited from BufferDataHandler  called when     accelerometer data is available  virtual void handle buffer data  BufferData  buf data          inherited from SensorHandler  called when a     passive infrared sensor event occurs  virtual void handle sensor      private      pointer to the accelerometer  
24. ing the  handler    Returns   true if the new threshold was set  false otherwise    Required modules     Accelerometer   define ISENSE ENABLE ACCELEROMTER       Available for the targets   JN5139R  JN5139R1    coalesenses 15 32    research to innovate    coalesenses       3 4 7  set divider                        lerometenr  5 oec 1618                                  Description     Sets the sensor frequency divider        Parameters   divider frequency divider  Setting 1 results in a frequency of 40Hz  setting 2 means  the sensor reads every second value only  i e  20Hz  and so on  Required modules   Accelerometer   define ISENSE ENABLE ACCELEROMTER    Available for the targets   JN5139R  JN5139R1    3 4 6    set extended range    void LisAccelerometer  set extended range  bool extended       Description   Sets the maximum range of the sensor   Parameters   extended if true  the range is set to 6g  otherwise it is set to 2g    Required modules     Accelerometer   define ISENSE ENABLE ACCELEROMTER       Available for the targets   JN5139R  JN5139R1    3 4 9  set axes    void LisAccelerometer  set axes   bool enable x  bool enable y  bool enable z       Description   Sets the active axes    Parameters   enable x pass true to enable x axis  false otherwise  enable y          true to enable y axis  false otherwise  enable z          true to enable z axis  false otherwise    Required modules     16   32    research to innovate       Accelerometer   define ISENSE ENABLE ACCELEROM
25. ith conductive materials     Note that all cable plugs and headers are designed to be extremely compact  and are not intended for  frequent plugging and unplugging  Never pull the cables to remove the plugs from the corresponding  modules  always pull the plug itself  If required  use an appropriate tool  or the pulling cord if  available   Even though all plugs headers are coded  be sure to pay attention to the proper orientation   Never apply force  Never use cables if their insulation is damaged     Note that iSense modules are not intended for hot plugging   dis  connecting modules from or to other  modules in operation can result in a reset of the Core Module and other undesired effects          delivered components are intended for use in research application  For using these components  within other application domains  consult coalesenses prior to use     Coalesenses products are not intended for use in life support systems  appliances or systems where  malfunction of these products can reasonably be expected to result in personal injury  death or severe  property or environmental damage  Coalesenses customers using or selling these products for use in  such applications do so at their own risk and agree to fully indemnify coalesenses for any damages  resulting from such use     Do not connect components or devices to any iSense component that are not manufactured or  distributed by coalesenses without prior consultation of coalesenses  Note that doing so will void th
26. old was exceeded  accelerometer    set mode MODE THRESHOLD         set this application as the sensor event handler        gt  handle buffer data will be called if      sensor data is available  accelerometer    set handler  this         switch accelerometer  accelerometer    enable             Jf       configure PIR sensor       set this application as the sensor event handler        gt  handle sensor will be called upon    PIR event    pir    set sensor handler  this     sce c Hik evene             o 2 6668   pir   gt        pir sensor int interval  2000         switch on the PIR sensor   pir     enable        else   os   fatal  Could not allocate PIR accelerometer iShell   interpreter                  Within the boot    method  at first a boot notification message is output     You can send character output via the Gateway Module or the radio to the outside world using the  methods Os    debug and         fatal                                                    Logs the given string depending on the log mode to a uart or radio     id       coalesenses 24 32    research to innovate       void debug  const char  format           id          Logs the given string depending on the log mode to a uart or radio   p   void fatal  const char  format              They work similar to the well known sprintf functions in regular C  i e  integer values etc  can be  printed using the 96 notation  For example           o MEE 1021877  os   debug  value of i is  d  hex  x   i  i      will 
27. output   value of i is 128         0  80     The destination of the debug output can be set using  Os  set 109 mode  the corresponding constants can be found in iSense src isense os h                 Sets the log mode to the given value  e g       ISENSE LOG MODE UARTO   ISENSE LOG MODE RADIO   i9   void set log mode  uint8 mode    log mode   mode                         By default  the output destination is set to UARTO  i e  the output is sent to a PC via a connected  iSense Gateway Module     Then  in SecurityModuleDemoApplication  boot    the three objects that represent the  accelerometer  the PIR sensor as well as the IShellInterpreter are allocated  The class    IShellInterpreter provides a suite of methods that can be used to conveniently send or receive  data to from iShell        If all three allocations were successful  the sensors will be configured  otherwise an fatal error  message is output     void  SecurityModuleDemoApplication    boot            E cueatcamlsisNceelteironetctedmstanmce   accelerometer   new LisAccelerometer os          create PriSensor2 instance   pir    new PirSensor os          create iShell interpreter instance       needed to send accelerometer readings to iShell   isi   new IShellInterpreter  0os        coalesenses 25132    research to innovate       if   accelerometer    NULL   amp  amp   pir_   NULL   amp  amp   isi   NULL         ff       configure sensors             else  os   fatal  Could not allocate sensors iShell interpreter    
28. r JENNIC 5139R target      Compiling  lt              JN513xR gt  src Securit yModuleDemofApplication cpp      Linking to bin JN5139R Securit yModuleDemofpplicat ion or32  Copying to or32 bin JN5139R SecurityModuleDemofipplication or32  text data bss ec hex filename  56988 164 9078 66162 16272 bin JN5139R Securit yModuleDemofpplication or32  Build finished    Done             Building for JENNIC 513981 target  Compiling  lt              JNS513xR1 gt  src Securit yModuleDemofApplication cpp  Linking to bin JN5139R1 Securit yModuleDemofApplication or32  Copying to or32 bin JN5139Ri SecurityModuleDemoflpplication or32  text data hex filename    55 dec  61968 124 9164 71256 11658 bin JN5139Ri SecurityModuleDemo  pplication or32  Build finished    C  Dokumente und Einstellungen buschmann Eigene Dateien Luebeck coalesenses f irmwares std_f irmware isense_sdk ifipps Secul  hit yModuleDemofApplication gt              After the build finished  the console output should look similar as shown above     4 3  Flashing the Security Module Demo Application  Connect either  e aniSense Security Module with or without a PIR sensor  e aniSense Core Module and  e aniSense Gateway Module with a USB cable  Or  e aniSense Security Module with or without    PIR sensor  e aniSense Core Module   e aniSense Battery Module and  e aniSense Gateway Module with a serial cable  and plug the USB serial cable to the PC  Be sure that the Core Module is switched on     Start iShell  configure the correct commun
29. r will wakeup nevertheless     If the sensor node lies flat e g  on a table  the typical result will be that the x  and y axis deliver  accelerations close to zero  while the z axis will deliver sensor readings of approximately 1g  due to  the earth s gravitation      In the threshold mode  the sensor generates an interrupt to the controller on the connected Core  Module if the sensor values change by more than a configurable threshold on one of the active axes   see Section 3 4 5   In case the controller was sleeping  it is woken by the generated interrupt  After  the threshold was exceeded on at least one of the axes  the sensor automatically changes into the  continuous mode and delivers a stream of sensor readings until it is set back into the threshold mode     In the free fall mode  the sensor notifies  i e  if applicable wakes  the controller by an interrupt if the  sensor detects it is in free fall  i e  all three axes experience an absolute acceleration below the  configured threshold  The sensor automatically changes to the continuous mode upon freefall  detection     2 3  Passive infrared  PIR  Sensor    The PIR sensor can be used to detect moving objects that feature a temperature different from the  environment  such as humans  in distances of up to 10 meters  The sensor offers a wide range of 110   for comprehensive monitoring     The PIR sensor can be switched on and off via software API calls  see Section 3 2 2 and 3 2 3   After  switching on the sensor  it ne
30. se  SensorHandler  see Section 3 1  and implement the  handle sensor   method  If a different SensorHandler was set before  it will be unset   and the new handler will be set     After the PIR sensor is enabled and an event is detected  sh   handle sensor   will be  called     For unsetting a SensorHandler without setting a new handler  simply pass NULL  The  sensor is disabled upon unsetting the handler     Parameters     sh Pointer to the SensorHandler that should be called upon event detection  To  unset the currently set handler  pass NULL     Required modules     Pir Sensor   define ISENSE ENABLE PIR SENSOR       Available for the targets   JN5139R  JN5139R1    3 3  BufferDataHandler API Description    The isense   BufferDataHandler class must be inherited by classes that are to be set at the  LisAccelerometer class as     BufferDataHandler using      method  PirSensorLisAccelerometer  set handler  BufferDataHandler  bdh      It is defined in src isense data handlers h in the iSense directory     class BufferDataHandler  public iSenseObject             vireca                                                              lower cara     UP    coalesenses 11 32    research to innovate       3 3 1  handle buffer  data    void BufferDataHandler  handle buffer data  BufferData  data       Description        Overwrite this method if your class inheriting from Buf ferDataHandler should be called  when accelerometer data is available     Parameters     data Pointer to a Buf ferDat
31. the curve illustrator will leave    gap between the different sequences of sensor readings     If a PIR sensor event occurs  SecurityModuleDemoApplication  handle sensor is  called  The demo application just outputs a short message here     void  SecurityModuleDemoApplication    handle sensor        os   debug  PIR           The SecurityModuleDemoApplication is instantiated in the application factory  method  It is called by the iSense operating and networking firmware when the devices boots  and  must be implemented for every application  In other words  the application factory method is  the way to let the firmware know which application to instanciate     Application  application factory Os  amp os          create application instance  return new SecurityModuleDemoApplication os           in all  the SecurityModuleDemoApplication configures the PIR sensor and the  accelerometer to issue alarms upon temperature fluctuations and node movements     When the PIR sensor generates an event  the application outputs       PIR    message to the  Serial  Monitor  plugin of iShell  Upon node movement  the application outputs                  coalesenses 28132    research to innovate    2 2 iShell  COM18    coalesenses GmbH DER   File Edt Mode    E           monitor 22   curve tlustrator   Flash Loader    Plugins  0         e    18 56   671  Booting Security Module Demo Application  id 0x7151   18 56 31 219  PIR    18 56 33 933            18 56 34 353  ACC    18 56 36 016  PIR    18 5
32. while the sensor fills the  second one  and vice versa  Hence  after the second buffer is passed to the handler  the sensor again  starts to fill the first buffer  This in particular means that the handler must not read any but the most  recently passed buffer     coalesenses 12 32    research to innovate       The interval in milliseconds between two calls of the handler in the continuous mode        be calculated  as follows     min  handler threshold  floor BUFFER DATA BUFFER SIZE   number of active axes          interval    25ms   frequency divider    The LisAccelerometer class is defined       src isense modules security module   lis accelerometer h in the iSense directory     3 4 1  Constructor    LisAccelerometer  LisAccelerometer Os  amp os      Description     Initializes the LisAccelerometer class  By default  the sensor is set into the continuous  mode  All three axes are activated  the range is set to 2g  and the divider is set to 1  i e  the  sensor operates at a frequency of 40Hz  delivering a set of sensor readings for all axes every 25  milliseconds  The handler threshold  i e  the maximum number of data sets in each buffer  is set  to infinity  i e  as many data sets as fit into the buffer are passed at each call to the set data  handler  The sensor is not switched on until enable is called     Parameters   os Reference to the operating system class Os  Required modules   Accelerometer   define ISENSE ENABLE ACCELEROMTER       Available for the targets   JN51
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
Samsung SGH-D880 manual de utilizador  Manual_Profi_D  Technical Support Document No. 420 4  生活とサービス領域の ロボット化事業について  Phonix GLOVERBS protective glove    "user manual"  CLICK - エコマーク商品総合情報サイト    Manual Bombas Tipo S    Copyright © All rights reserved. 
   Failed to retrieve file