Skip to content

guiguitt/canne_avertisseuse

Repository files navigation

Canne-avertisseuse

"La canne_avertisseuse" is an alert system for gravity irrigation. They use LoRa to communicate and detect the presence of water

Hardware

Compenent

* Antenne for 868 MHZ - ~5€ https://bit.ly/2SDVVCL

* GPS Adafruit 745 - 41€ https://bit.ly/2LHuB5R

*accelerometer Adafruit MMA8451 - 9€ https://bit.ly/2Mcii0F

* Females connector 8 and 9 * 2× terminal block connector https://fr.rs-online.com/web/p/products/1814377/

* regulateur DC/DC 4,6-32V ->3,3V https://fr.rs-online.com/web/p/regulateurs-a-decoupage/7553429/

* potentiometer resistance

setting

to start compiling the program and uploading it. By reading the serial port you can get the DEV_ID to configure the device on The Things network.

Commissioning.h

you must enter the keys APP_EUI and APP_KEY to retrieve from the The Things Board application. to allow communication.

APB

#define APP_EUI "123456789ABCDEF"
#define APP_KEY "123456789ABCDEF"

The other parameters can be adjusted to adapt to the condition of use.
The ABP parameters will only be completed in the case of an ABP connection.

canne_avertisseuse.h

#define coef_pont 2

Use a multimeter to measure the voltage between pin A2 and GND and then between the 2 terminals of the battery. the coefficient will be VA2/VBAT.

#define tempo 60000 //en ms
#define nbr_monitoring 60
int compteur = nbr_monitoring;

tempo: time between 2 readings of the accelerometer and water sensors nbr_monitoring: number of monitoring to trigger a heartbeat tempo × nbr_monitoring = heartbeat tempo

Principle of operation

ALERT

  • water alert
  • motion/theft alert
  • battery alert In the case of one of these alerts, a message containing the alert type, battery value and GPS coordinates is sent otherwise only a heartbeat is sent regularly

Sensor

  • Water sensor: it is made up of 2 electrodes if the current manages to pass between the 2 electrodes, the input A6 goes from 0v to ~3.3V. The water is detected
  • Accelerometer: If one of the acceleration values changes sufficiently on one of the axes, it can be deduced that the rod is no longer in its initial position
  • GPS: The GPS gives us the geographical position of the device. A measurement is only taken at the start or when a sensor detects something
  • Voltmeter for the battery: the battery level is regularly monitored to prevent any system failure

APB

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published