Espruino in the garden

Posted on
  • I would like some ideas on how to use Espruino for a garden project I want to have several plant sensors to messure the moister levels etc. and warn me when It drops below 20% I also want to export data so i can make graphs.

  • Hi furuskog,

    You could make a simple soil moisture sensor using two wires stuck in the soil and connected to 3.3v and A7, then just measure the voltage at A7 by doing something like..

    var n=0,i=100;
    while (i--) n+=analogRead(A7);
    

    Then you can log the data from your soil meter and any other sensors in a google spreadsheet like this example http://www.espruino.com/Logging+to+Googl­e+Sheets

    You could handle the alerts from google sheets as the there are add-ons which can email you etc

    I made a similar garden thing which has sensors for light intensity, temperature, humidity and soil moisture http://forum.espruino.com/conversations/­302202/

    Hope that helps
    Rob

  • Ahh thank you all. I got some ideas now.

  • The challenge with a DC powered simple sensor such as 2 wires stuck into the ground is that various effects take place that have over time an impact on the measured values... Electrolysis/Electrophoresis/...depositi­on on/deterioration of electrodes. To have a lesser effect, apply power only when measuring and apply alternating polarity (AC). Another variable is calibration, which could be done by just having properly watered and waited half period and then measured... (Im sure there are publications out there about this subject in industrial/agricultural production settings).

  • I have some stuff I've done that isn't documented at the moment:

    Using Puck.js as a soil moisture sensor

    On the nRF52 chips you can turn internal pullup resistors on for analog channels - so you can do pinMode(..., "input_pullup");analogRead(...);pinMode(­...,"input") to get a soil moisture reading.

    You could do the same for some other Espruino board but you'd just have to add an external resistor.

    Controlling a solenoid valve

    I'm just using a cheap 12v solenoid valve from eBay powered from an old 12v battery from a UPS, and then using a P36NF06L to turn it on and off - it's really easy and very low power.

  • Grate, I'm going to try that. I have also bought some cheap esp32 that im thinking of installing espruino on. I'm thinking about having several soil sensors per unit and maybe using solar power.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Espruino in the garden

Posted by Avatar for furuskog @furuskog

Actions