Skip to content

MediaLabUniovi/Crotal-CubeCell-Junio-2023

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

english | spanish

Static Badge

CATTLE TRACKER COLLAR: TTN LORA TRACKER TO MONITOR COWS AND CHECK THE EVIDENCE OF WOLF ATTACKS

Powered by

made-in-ArduinoIDE programmed-for-LilyGOLoRa32



Introduction ↩️

With the objective of protecting rangers in case of wolf attacks and proving evidence when notifying the Principality of Asturias authorities, the Vacker Tracker 2023 was designed to monitor cows motion remotely. The device is synchronizable on The Things Network, sending motion and temperature variables from each cow.


In this repo, you will find all the files and teaching guides required to fully understand and even take the creative freedom to improve this project. Folders and files have been given a self-explanatory name to make navigation more intuituve.


Main features ↩️

  • Developed using LilyGO LoRa32 OLED v2.1_1.6 (ESP32 based board with built-in LoRa capabilities that supports solar recharging and battery management)


  • Custom PCB


[!TIP] Consider soldering female pin connectors so the electronic components can simply be plugged in and unplugged if a repair has to be done

  • Custom housing to fit all the elements in the most efficient way (Container + Solar panel holder + USB protector)




    Assembly example:


[!WARNING] Clear colour PETG 3D printing filament is recommended to survive sun radiation and plastic deformations. An O-ring is also a good choice to fix and stabilize the sensor inside of the bell. Four M3 screws are needed to fix the assembly


Component list ↩️

Component Model
Dev Module LilyGO LoRa32 OLED v2.1_1.6
Button Generic press-button
Battery 18650
PCB Custom (file included)
Housing Custom (file included)

Connection list ↩️

LilyGO Button Battery
GPIO25 Crossed-pin -
GND Crossed-pin -
BAT CONN - BAT CONN

Sketched it looks the following way:



Flowchart (Simplified!) ↩️

graph TD;
  A[Turn on] -->|1| B(Wake up if in deep sleep)
  B -->|2| C(Get distance and battery measurement)
  C -->|3| D(Send bytes to TTN)
  D -->|4| E(Time data transmission rate)
  E -->|5| F(Go to deep sleep)
  F -->|6| B
Loading

Code files ↩️

In this section, a brief description on how the code is distributed among files in medialablpwan/lorawaterlevelmonitoring/main/, where the code is available and ready to flash or edit, is given:

  • main.ino
    /*
    Definition of global functions
    Variables to be stored in the RTC memory
    'setup()' and 'loop()' functions
    */
  • sensor.ino
    /*
    Functions and variables needed to make a sensor work
    */
  • ddc.ino
    /*
    Functions and variables for the implementation of the dynamic data transfer rate
    */
  • sleep.ino
    /*
    Functions to activate ESP32's deep sleep mode
    */
  • ttn.ino
    /*
    Functions from LMIC library
    */
  • configuration.h
    /*
    Sensor macros and boolean toggles
    */
  • credentials.h
    /*
    OTAA keys for TTN synchronization
    */
  • lmic_project_config.h
    /*
    LoRa frequency band and radio chip selector
    */

A more in depth analysis is given in the code itself as comments explain what each function does.

[!TIP] The most important files to edit are sensor.ino, where any sensor can be implemented, and configuration.h, where the peripherals' macros are declared

[!CAUTION] Additional code may be needed if implementing I2C I/O. The functions to make them work are in the original project in TTGO-PAXCOUNTER-LoRa32-V2.1-TTN/main/main.ino


Libraries ↩️

[!NOTE] Other libraries, like SPI library, are easily downloadable from Arduino IDE



License ↩️

This project is licensed under the GPL-3.0 license. Contains code from rwanrooy/TTGO-PAXCOUNTER-LoRa32-V2.1-TTN


Contact ↩️

[!IMPORTANT] We will kindly answer doubts and read suggestions: Gmail Badge

More info about our activities: Linkedin Badge

Authors: Daniel Rodríguez Moya, Óscar Gijón, Ramón Rubio and MediaLab_ LPWAN Workgroup :shipit:

About

Cattle tracker to control wolf attacks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published