Soil moisture to graph

I did some extensions to my Ardulink MQTT project. My plan was to have a graph of the values of the two analog sensors connected to the Arduino. So this is what I did in general:

  • Deploy the Ardulink sketch to the Arduino
  • Connect your analog sensors to the Arduino
  • Connect the Arduino to a PC
  • On the PC run the Ardulink’s MQTT module. I did by calling “java -jar Mqtt-0.5.1-SNAPSHOT.jar -athms 2000 -ato 0 -a 0 -a 1” to watch analog port 0 and 1
  • Install graphite on a machine
  • Because graphite cannot read mqtt messages you need to install and run mqtt2graphite as well. It subscribes to MQTT and pushes the payload to graphite/carbon. You have to enable UDP in carbon/graphite which is disabled by default!

After that you can open graphite in your browser and configure a view to show the data.

graphite8

This is my example with the two analog sensors, sensor a0 is the soil moisture, a1 is a LDR (measuring the sunlight). As you can see that there were two watering actions (raising a0 values)

Advertisements
This entry was posted in Android, Hardware, Java, Projects and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s