Office plant monitoring
-
Hello,
I'm on the same project personally...I using 2 battery... this part should work between 3.3 V and 5V...
finally with 2XAA we only have 3V, and the max value for me is 750 not 1023... did you get 1023 when into the water?
I use a gold plated sensor, and the plug will be into a seal to avoid corrosion and water to go in.
I use a sensbender where I connected on A3 the pin use for the soil moisture sensor.
Could you confirm that change the polarity help to avoid corrosion ???
thanks@doblanch said:
I'm on the same project personally...I using 2 battery... this part should work between 3.3 V and 5V...
finally with 2XAA we only have 3V, and the max value for me is 750 not 1023... did you get 1023 when into the water?If you have the XD-28 sensor, I think air is about 1023 (so minimal connection). If you put it in water it will be much lower, 300 to 400. 100% water isn't realistic of course and because of that, I get my first reading with the sensor in the air and the second one I initiate with a button press when it's planted and the spot is fully watered.
The button press is just a way to get the different readings for different soil. It does actually read the sensor 200 times and takes a median of that and set the "0" point after that.
I'm trying to measure the centibar which is (apparently, I did not know this a week ago) the right way to measure the soil. Of course, soil temperature has something to do with it also. I'm working on that at the moment.
-
I'm already at 2.73Volts on my two AAA batteries. Is the last sketch a batteries killer ? With a 10 hours sleeping ??
-
I work as development team lead at a software company. We do server and network monitoring. Yesterday we hosted a customer event, and I presented my houseplant monitoring project based on MySensors and Domoticz. The presentation was a hit, and it has been decided that we'll use MySensors to monitor all plants at the office.
There is not that much to tell from a technical perspective. I hooked up everything according to the MySensor build page and created a simple sketch.
Thanks to everyone from the MySensors community for a great library, clear instructions and great suggestions for projects. And thanks for making me look like a hero :-D Let's continue conquering the world.
@mfalkvidd Great project. Had few questions...Is it OK to provide 6V to Arduio Mini ? Can you show /explain how you have provided power supply to Mini and Moisture Controller ? In the set up you have , how long does the battery last ?
Thanks
-
@mfalkvidd Great project. Had few questions...Is it OK to provide 6V to Arduio Mini ? Can you show /explain how you have provided power supply to Mini and Moisture Controller ? In the set up you have , how long does the battery last ?
Thanks
6V is OK if you connect power on the "raw" pin. 6V is NOT OK if you connect power to the Vcc pin.
I use 2xAA batteries. - on the battery holder is connected to GND on the Arduino and + on the battery holder to Vcc. Power led and voltage regulator have been removed.
My sensors report every two hours and I expect to get 1-2 years battery life.
-
Just built this sensor and it is working great. However I am seeing different results with every run. It seems as if the value is always higher with one polarity than with the other one. Is this normal?

-
Just built this sensor and it is working great. However I am seeing different results with every run. It seems as if the value is always higher with one polarity than with the other one. Is this normal?

@Jan-Gatzke yes I'm seeing that as well. The built-in pullup resistors are not 100% accurate, which yields slightly different result when polarity is reversed.
The easiest way is probably to let the Arduino report a rolling average of the last 2 readings instead of reporting the latest reading.


-
@mfalkvidd I was looking to your sketch and could not quite understand this piece of line
result = 1125300L / result; // Calculate Vcc (in mV); 1125300 = 1.110231000
How will this above line change if I use 4 AA battery ?.
Thanks in advance
-
If you use 4xAA and wire power to Vcc you will break the nrf and the mcu. They are not rated for that high voltage.
If you wire power to Raw you can not use readVcc, you'll have to use a voltage divider to one of the pins.
Is there a reason you want to use 4xAA?
-
If you use 4xAA and wire power to Vcc you will break the nrf and the mcu. They are not rated for that high voltage.
If you wire power to Raw you can not use readVcc, you'll have to use a voltage divider to one of the pins.
Is there a reason you want to use 4xAA?
@mfalkvidd Yes I am connecting to RAW input. My 4 battery holder for some reason does not work with 2 or 3 batteries so connecting 6V to RAW.
"...you'll have to use a voltage divider to one of the pins..." Can you elaborate this part ? Can you share a link which wherein Arduino Pro Mini is powered through RAW input and battery percentage is calculated. I very new to hardware but loving the mysensors projects. Kindly bear with my stupid questions.
Appreciate your patience..
-
@mfalkvidd Yes I am connecting to RAW input. My 4 battery holder for some reason does not work with 2 or 3 batteries so connecting 6V to RAW.
"...you'll have to use a voltage divider to one of the pins..." Can you elaborate this part ? Can you share a link which wherein Arduino Pro Mini is powered through RAW input and battery percentage is calculated. I very new to hardware but loving the mysensors projects. Kindly bear with my stupid questions.
Appreciate your patience..
-
That's correct. The Arduino cannot measure voltages above it's Vcc level.
Great that you found information on voltage dividers.
Powering on Raw will keep the voltage regulator active all the time, so you might get worse batttery life than when using 2xAA on Vcc. Therefore I suggest you order a 2xAA battery holder for later use. In the meanwhile, you can make your 4xAA holder work by putting two wires instead of batteries in the unused slots.
If you still want to use 4 batteries, http://www.mysensors.org/build/battery#measuring-and-reporting-battery-level has more details and code to use for battery measurement.
-
Just built this sensor and it is working great. However I am seeing different results with every run. It seems as if the value is always higher with one polarity than with the other one. Is this normal?

@Jan-Gatzke I have updated my skech on codebender to report rolling average. I have not tested it yet though.
The change is available at https://github.com/mfalkvidd/arduino-plantmoisture/commit/5e98c5e625075d62ae27956ab8dc3ea9dec4a29e -
@Jan-Gatzke I have updated my skech on codebender to report rolling average. I have not tested it yet though.
The change is available at https://github.com/mfalkvidd/arduino-plantmoisture/commit/5e98c5e625075d62ae27956ab8dc3ea9dec4a29e@mfalkvidd At the moment I am testing a modified version of the sketch which always does two readings. I don't think this will have a big impact on the battery life because most power is consumend by the nrf and not by the sensor. Or am I wrong? The pullups are rated at 10k Ohm. The sensors resistance will be about the same in average. So we talk about 20k at 3V which is 0.15 mA. The nrf uses abot 15 mA when sending.
-
Hi.
I have been trying to connect two sensors to the same arduino nano using this code and i have add sensor 1 pin to A0 and GND, and sensor 2 pin A1 and GND.
But i only get the reads from sensor 1 sensor 2 doesn't appear...
Can anyone help me with this on how to get more than one moisture sensor working.Thanks.
-
Hi.
I have been trying to connect two sensors to the same arduino nano using this code and i have add sensor 1 pin to A0 and GND, and sensor 2 pin A1 and GND.
But i only get the reads from sensor 1 sensor 2 doesn't appear...
Can anyone help me with this on how to get more than one moisture sensor working.Thanks.
@mrc-core there have been quite a few revisions of the sketch. The latest version (which can be found at github) only support one sensor, which is connected to A0 and A1 in the default configuration. Both pins are required to enable alternating the direction of the current when measuring, to try to minimize corrosion.
Adding support for up to three sensors is technically possible (using A0-A5), but would make the code harder to read and since I have no use for multiple sensor I haven't spent the time required to program and test a sketch with multiple sensors.
