LoRaWAN People Counter

Revision 1.0 July 2020

Description

This ultralow powered people counter can be used to count people or animals passing by the sensor. It uses a sensor that detects heat (Infrared light) of the moving object. The sensor has about a 4-5M detection beam and needs no reflector or hardware on the other side. It can be used in both indoor and outside environments.

Data is collected and transmitted in near real-time via a LoRaWAN network to an application server. For each set interval period (Recommend 10, 15, 30 Minutes), the sensor reports the total number of people that has passed allowing operators to gain usage data based on time and or day. The days of having to return to site to collect data have also gone.

Specifications

LoRa BandDefault AU915 or US915 (Firmware Change)
Transmission PowerUp to 20dBm (100mW)
Compatible NetworksTTN or custom
Temperature range-20C to +50C
Ingress ProtectionIP64 (Do not jet water into sensor)
Sensor Distance 4 to 5 metres max.
Beam Angle< 40 deg
Directional detectionNo
Transmission rate10 min+
Battery TypeER14505 3.6V 2600mAh Lithium Thionyl Chloride
Estimated Battery Life *Note1 
10min TX Intervals (250 events per day)Appox. 5 Years
30min TX Intervals (250 events per day)Appox. 8 Years
  
Internal Temperature SensorDS18B20 (Optional)

Note 1. Based on 25 Deg C, SF8BW125 and 20dBm TX power

Device Placement

  • If placed outside the sensor must face away from the sun. Do not point sensor up. Sensor must be horizonal or pointed down at a very small angle.
  • The detector should be mounted to a post or wall at waist height.  4 mounting holes are provided when the top lid of the enclosure is open. Attaching to metal posts or metal buildings will affect transmission range.
  • Do not open device in wet or high humidity environments. If the enclosure has to be open in high humidity environment >50%, place a small desiccant bag inside before sealing up.
Monitoring Parks and Reserve use.

Restricted Access path monitoring

Basic data portal

Data Format

All values are stored as unsigned integers in big-endian format

  • Battery level in mV (2 Bytes)  4100 = 4.100V
  • Temperature (If Installed) in Deg C divide by 100 (2 Bytes Signed!), so 2100 would be 21.00Deg
  • People Count Last interval only (2 Bytes)
  • People Count Total since battery installed or device reset – Overflows @ 16,777,216 counts (3 Bytes)

TTN Decoder Function

If using The Things Network, a decoder option can be added to decode the values to human readable values at the TTN server.

function Decoder(bytes, port) {

  // Decode an uplink message from a buffer

  if (port == 2)

{

    var battery = (bytes[0]<<8 | bytes[1]);

    // Temperature can be signed!!

    var temperature;

    if (bytes[2] & 0x80)    // Check sign bit

        temperature = (32768-((bytes[2]&0x7F)<<8 | bytes[3]))*-1;

    else temperature = (bytes[2]<<8 | bytes[3]);

    var people_int = (bytes[4]<<8 | bytes[5]);

    var people_tot = (bytes[6]<<16 | bytes[7]<<8 | bytes[8]);

    }

  return {

    battery: battery/1000,

    temperature: temperature/100,

    people_int: people_int,

    people_tot: people_tot

  }

}

Command Set

AT+<CMD>?        : Help on <CMD>

AT+<CMD>         : Run <CMD>

AT+<CMD>=<value> : Set the value

AT+<CMD>=?       : Get the value

ATZ: Trig a reset of the MCU

AT+FDR: Reset Parameters to Factory Default, Keys Reserve

AT+DEUI: Get or Set the Device EUI

AT+DADDR: Get or Set the Device Address

AT+APPKEY: Get or Set the Application Key

AT+NWKSKEY: Get or Set the Network Session Key

AT+APPSKEY: Get or Set the Application Session Key

AT+APPEUI: Get or Set the Application EUI

AT+ADR: Get or Set the Adaptive Data Rate setting. (0: off, 1: on)

AT+TXP: Get or Set the Transmit Power (0-5, MAX:0, MIN:5, according to LoRaWAN Spec)

AT+DR: Get or Set the Data Rate. (0-7 corresponding to DR_X)

AT+DCS: Get or Set the ETSI Duty Cycle setting – 0=disable, 1=enable – Only for testing

AT+PNM: Get or Set the public network mode. (0: off, 1: on)

AT+RX2FQ: Get or Set the Rx2 window frequency

AT+RX2DR: Get or Set the Rx2 window data rate (0-7 corresponding to DR_X)

AT+RX1DL: Get or Set the delay between the end of the Tx and the Rx Window 1 in ms

AT+RX2DL: Get or Set the delay between the end of the Tx and the Rx Window 2 in ms

AT+JN1DL: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 1 in ms

AT+JN2DL: Get or Set the Join Accept Delay between the end of the Tx and the Join Rx Window 2 in ms

AT+NJM: Get or Set the Network Join Mode. (0: ABP, 1: OTAA)

AT+NWKID: Get or Set the Network ID

AT+FCU: Get or Set the Frame Counter Uplink

AT+FCD: Get or Set the Frame Counter Downlink

AT+CLASS: Get or Set the Device Class

AT+JOIN: Join network

AT+NJS: Get the join status

AT+SENDB: Send hexadecimal data along with the application port

AT+SEND: Send text data along with the application port

AT+RECVB: Print last received data in binary format (with hexadecimal values)

AT+RECV: Print last received data in raw format

AT+VER: Get current image version and Frequency Band

AT+CFM: Get or Set the confirmation mode (0-1)

AT+CFS: Get confirmation status of the last AT+SEND (0-1)

AT+SNR: Get the SNR of the last received packet

AT+RSSI: Get the RSSI of the last received packet

AT+TDC: Get or set the application data transmission interval in ms

AT+DTIME: Get or set the sensor deadtime in ms

AT+PORT: Get or set the application port

AT+CHS: Get or Set Frequency (Unit: Hz) for Single Channel Mode

AT+CHE: Get or Set eight channels mode,Only for US915,AU915,CN470