The purpose of the project is to monitor a hydroponics system to check that:
There is a LCD screen to display the pH, water level and if the pump is running. In case something is going wrong an email is sent.
We chose the Arduino Yùn because we wanted to be able to send an email if something is going wrong (pump not working, wrong water level or pH value). Of course if you want to use an other board it is possible. In this case you have to adapt the pin numbers : especially the ones used to connect the LCD (look at the pins corresponding to SDA and SCL on your board) and the one used for the water-flow sensor (because it must be a pin that supports software interrupt).
python send_email.py my_smtp_server mail_username mail_password from_email_address to_email_address "test from yun" "Hello!"
#define MAIL_BIN "python /root/scripts/send_email.py" #define SMTP_SERVER "my_smtp_server"; #define SMTP_USERNAME "mail_username"; #define SMTP_PASSWORD "mail_password"; #define SMTP_FROM "from_mail_address"; #define SMTP_TO "to_mail_address"; #define TANK_HEIGHT 35 //50; // in cm #define TANK_SURFACE 1320 // in cm2 #define TANK_MAX_L 45 // in L #define TANK_MIN_L 20 // in L // pH deviation compensate #define PH_OFFSET 0.13 #define PH_MIN 6 #define PH_MAX 8 #define SEND_MAIL true #define DEBUG true // Read water level every (in ms) ... #define WATER_H_FREQ 60000 // Check if the pump is working every... #define PUMP_OK_FREQ 30000 // Read pH value every... #define PH_FREQ 60000 // WATER_FLOW_SENSOR #define WATER_FLOW_PIN 7 #define WATER_FLOW_ITR 4 // Interruption number used // Min nb of pulse of the water wheel in one sec // to consider it is working #define WATER_WHEEL_MIN_PULSE 4 // Ultra sound sensor #define USND_ECHO_PIN 8 #define USND_TRIG_PIN 9 // pH sensor #define PH_PIN A0
If you have questions or comments feel free to contact us.