"La canne_avertisseuse" is an alert system for gravity irrigation. They use LoRa to communicate and detect the presence of water
- Arduino MKR WAN 1300 - 28€(25/07/2019) https://bit.ly/2GuevrS
- 2× Female connector 14 in line -3,41€ https://fr.rs-online.com/web/p/fiches-femelles-pour-ci/7679347/
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.
you must enter the keys APP_EUI and APP_KEY to retrieve from the The Things Board application. to allow communication.
#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.
#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
- 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
- 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