Office plant monitoring
-
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.
-
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 I totally agree with you. I don't think we thank the people behind MySensors and Domoticz enough. As a matter of fact, MySensors is helping me to have a good night of sleep. I'll post more on that project soon. I watched your presentation and the product you're working on, sounds like something one of my customers could use. I've sent them an email.
-
@Lars65 Something like this should work with up to 4 sensors: https://codebender.cc/sketch:166639
Note: I have not tested this sketch. Feedback is welcome.Connect the power for all sensors to pin 8 (note: if your sensors draw too much power, you might exceed the maximum rating of 40mA, measure how much current your sensors use before you connect too many)
Connect the analog pin for the each of the sensors to A0, A1, A3 and A3 respectively.
-
btw, I had a bug in the code.
for (int sensor = 0; sensor <= NUMBER_OF_SENSORS; sensor++) {needs to be changed to
for (int sensor = 0; sensor < NUMBER_OF_SENSORS; sensor++) {I have updated the sketch, but if you copied the code before I did the change you'll need to update your code for the two for-loops.
-
Could it be possible to use different power pins? So if you have more than one senor you measure in a sequence?
-
I know that I am a pain in the *ss. But I have tried to change this code to accept more than one power pin.
But I don't know how. I know how to mill a PCB, and lot of other stuff, but programming is not my cup of thee.
I really need to try to study how.
Bot for now, is it anybody who could help me? -
@Lars65 Just a question before things get too crazy: Will you be running your node on battery power? If you will be using wall power you can just power all sensors continuously from Vcc and get rid of the code for turning on and off the sensors, and get rid of all the battery reporting code.
-
Hi!
At the moment do I only have three sensors, and I will be using them on the same arduino. Those will be powered by wall power.
But I have ordered some more sensors, and some of them will be battery powered.
Though both me and my wife often forget to water our plants, do I really like this.
I use Domoticz, and it's easy to get a notification when it's time to water.
You have been really helpfull. Tomorrow will I mill a new PCB, to test this code.
:) -
@Lars65 Just a question before things get too crazy: Will you be running your node on battery power? If you will be using wall power you can just power all sensors continuously from Vcc and get rid of the code for turning on and off the sensors, and get rid of all the battery reporting code.
Hi @mfalkvidd and thank you for your nice work and sketch.
I just have one question about the power pin, I saw on datasheet that the adruino pro mini can handle 40mA max per powerpin. I Have four of these soil moisture sensors but cant find how much current they need... they use a LM393, and the datasheet say 0.4mA..
Did you think than i coul plug all of them on the same powerpin or i need to use your second sketch ?
Thanks in advance ! -
-
Hi Guys!
No I haven't made any measurements.{ 4, 0, 1, // This assumes 2 sensors per pin. First two sensors are powered through pin 4, using analog pins 0 and 1
**5, 2, 3, **// Second two sensors get power from pin 5 and are connected to analog pins 2 and 3
6, 4, 5 // Third set of sensors get power from pin 6 and are connected to analog pins 4 and 5
}
So I did change 4,0,1, to 4,0,. What I saw with this was that I use power pin 4, to the analog input A0. So now have I made it so A0, has powerpin 4, A1 has powerpin 5, and A2 has powerpin 6.
