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.
Does this provide some insight:
"Example code for the "Chirp" soil moisture sensor"
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..
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+Google+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
Here's one idea for a soil moisture sensor:
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/...deposition 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:
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.
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.
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem