Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 3.64 KB

README_eng.md

File metadata and controls

46 lines (30 loc) · 3.64 KB

Movement sensor portable device connected with LoRa to TTN

It is a portable device that sends a signal every time it moves. It uses the free LoRaWAN network that through The Thing Network allows internet access to your datas.

TTN Consola

Why LoRa?

It is easily reached 2km in urban area and more than 10km in rural area. Currently, the land-to-land record is 210 km with an Arduino shield of $ 16 (February 2017) and baloon-to-land of 702 km (August 2017).

LoRa

LoRa is a wireless transmission technology, developed between 2008 and 2013 in France and acquired and patented by the company Semtech, which allows to communicate data over a long distance and with low power consumption (~ 100mW).

The spreading factor is the most important parameter to set in LoRa networks. It specifies the speed/datarate in which the gateway and node communicate.

SF Propagacion

Why TTN?

The Thing Network

The final twist of the screw to this solution of interconnection of devices was made by the network The Thing Network. That has build an open community of gateways and nodes that allows the connectivity of IoT devices without 3G or WiFi and free of charges. Actually we are only need to pay for the copywrite of the LoRa chip of the devices that we buy.

Hands on

I used the microcontroler TTGO LoRa32 V2.0 868 MHz that attached to the movement sensor ADXL345.

ADXL345

The ADXL345 is a small, thin, low power, 3-axis accelerometer with high resolution (13-bit) measurement at up to ±16g. Digital output data is formatted as 16-bit twos complement and is accessible through either a SPI (3- or 4-wire) or I2C digital interface. The ADXL345 is well suited for mobile device applications. It measures the static acceleration of gravity in tilt-sensing applications, as well as dynamic acceleration resulting from motion or shock. Its high resolution (4 mg/LSB) enables measurement of inclination changes less than 1.0°.

Several special sensing functions are provided. Activity and inactivity sensing detect the presence or lack of motion and if the acceleration on any axis exceeds a user-set level. Tap sensing detects single and double taps. Free-fall sensing detects if the device is falling. These functions can be mapped to one of two interrupt output pins. An integrated, patent pending 32-level first in, first out (FIFO) buffer can be used to store data to minimize host processor intervention.

Connection and layout

I used the following connection from the module above to my Wemos Mini

TTGO LoRa32 Connection - Module Connection

  • 3v3 - VCC
  • Gnd - Gnd
  • SDA 21 - SDA
  • SCL 22 - SCL

ESP32 conectividad con ADXL345

The program is based on these libraries: