dbot
Posts: 15
Joined: Sat May 10, 2014 9:06 pm

Plant Friends: A plant monitor system

Sat May 10, 2014 9:26 pm

Hello there,

I've been a long time lurker in these forums reading through all the wonderful projects and tips that the Raspberry Pi community has shared. Now its time for me to share a project I finished not too long ago.

Plant Friends is a soil moisture/temperature/humidity sensor system for indoor plants. All the 'nodes' that are driving the sensors are housed in characters constructed with bamboo plywood. The battery operated nodes (Moteino, an Arduino clone) transfers the data via wirelessly to a base station that is the Raspberry Pi + Moteino. The Pi runs a mySQL database which logs the data and is also responsible sending email/SMS alerts when the soil moisture gets below a set threshold. The Pi is also running a lighttppd webserver to serve data to my Android app (written in Processing).

I started this project as a way to learn programming and electronics but also serve as a portfolio piece. Here is a picture of the finished system:

Image

Image

I did a longer write up of the whole project with more pictures over at my website:

http://dicksonchow.com/plantfriends

I'll be posting all my code onto Github soon.

Comments / critiques welcome. ;)
Last edited by dbot on Sat Jun 14, 2014 4:37 am, edited 1 time in total.

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: Plant Friends: A plant monitor system

Mon May 12, 2014 9:26 am

Nice cases - I especially like the lighting effect on the base station.

The chopped SD card and moving the USB connector are good space saving ideas too :lol:

romoe
Posts: 10
Joined: Mon Feb 25, 2013 4:44 pm

Re: Plant Friends: A plant monitor system

Wed May 14, 2014 7:39 pm

There's so much awesome in this design that I can't even handle it ...

Really nice work!
You should turn one of those guys into a flower pot and add a solar panel. Maybe even possible to add two extra moisture sensor to monitor one extra plant on eahc side

dbot
Posts: 15
Joined: Sat May 10, 2014 9:06 pm

Re: Plant Friends: A plant monitor system

Sun May 18, 2014 10:26 pm

Thanks guys!

I do have an idea for a system that integrates everything into a flower pot but I'm reserving that for my next project. ;)

I've been playing with solar panels and LiPo charging lately and it is definitely doable and yea and each node can totally be expanded to monitor multiple plants.
Last edited by dbot on Tue May 20, 2014 3:59 pm, edited 1 time in total.

kbfirebreather
Posts: 67
Joined: Tue Nov 26, 2013 3:52 pm

Re: Plant Friends: A plant monitor system

Mon May 19, 2014 1:04 pm

Very Very cool. Never knew about the Moteino. You just opened up my world to a bunch of new possibilities. Very much looking forward to the source code!

romoe
Posts: 10
Joined: Mon Feb 25, 2013 4:44 pm

Re: Plant Friends: A plant monitor system

Fri May 23, 2014 5:14 pm

dbot wrote:Thanks guys!

I do have an idea for a system that integrates everything into a flower pot but I'm reserving that for my next project. ;)

I've been playing with solar panels and LiPo charging lately and it is definitely doable and yea and each node can totally be expanded to monitor multiple plants.
Looking forward to the next project :)
Do you have any plans to release the source code? Would love to create my own small moteduino surveillance system in my garden

dbot
Posts: 15
Joined: Sat May 10, 2014 9:06 pm

Re: Plant Friends: A plant monitor system

Sun May 25, 2014 10:19 am

Thanks Romoe. Yes, I'll be posting all my source code soon. I'm in the processing of commenting/cleaning up the code so others will be able to adapt it / learn from it easily. I'm also going to do a how-to write up on setting up a system like Plant Friends, using a Moteino (or Arduino clone) and a Raspberry Pi.

The Moteino is awesome. It is made by Felix over at lhttp://lowpowerlab.com/

romoe
Posts: 10
Joined: Mon Feb 25, 2013 4:44 pm

Re: Plant Friends: A plant monitor system

Mon Jun 16, 2014 5:52 am

dbot wrote:Thanks Romoe. Yes, I'll be posting all my source code soon. I'm in the processing of commenting/cleaning up the code so others will be able to adapt it / learn from it easily. I'm also going to do a how-to write up on setting up a system like Plant Friends, using a Moteino (or Arduino clone) and a Raspberry Pi.

The Moteino is awesome. It is made by Felix over at lhttp://lowpowerlab.com/

Sounds great! Plant friends will be a really nice project for people that wanna learn more about databases and wireless communication.

Think I'm gonna try to add a water pump to the set up.
My tomatoe plants have already died :)

dbot
Posts: 15
Joined: Sat May 10, 2014 9:06 pm

Re: Plant Friends: A plant monitor system

Sat Jul 19, 2014 6:40 am

@romoe Sorry to hear about your tomato plants!

Its been awhile since I last posted but I come back with good news!

During the midst of cleaning up my code for release, I ended up re-designing and re-writing everything including the Android app. The Plant Friends system is now expandable, adaptable and easy to build! The system looks completely different now but uses common parts. Of-course it still uses the Raspberry Pi and the Moteino. :)

I also wrote an extensive how-to-tutorial-instructable so beginners can have a stab at building a Plant Friends system of their own. I commented almost every line of code so there is a lot of information on how the system works.




Here is what it looks like:

The Sensor Node

Image


The Base Station

Image


The Plant Friends App

Image




BTW I love adding heatsinks to my Pi! haha. I am very happy with how this turned out. The sensor node runs on 4x AAA batteries and I am able to get a little over 5 months of life out of it by taking a reading every hour and have the sensor node go to 'sleep' the rest of the time. I also added a battery meter too!

Some stuff is still really rough. Mainly the web interface to add sensor nodes into the database. The app looks nice but missing some functionality like scrolling through the list of nodes (lol) and the ability to edit sensor node information. I have other plans for the app like adding sensor nodes to the system and controlling ( an army?) of sensor nodes so i'll be working on that. :)

The main python script that runs on the Raspberry Pi and the sensor node / gateway code all works great.

Oh and all the enclosures are made out of bamboo! All the pieces snap together and doesn't require glue. Now I am going to experiment with finishing the bamboo with oils, staining, painting it etc. :)


The how-to tutorial instructable is here:
http://dicksonchow.com/plantfriends2



My source code is on GitHub:
https://github.com/dicksondickson/PlantFriends



If you like my Plant Friends enclosures, you can buy it from me here:
http://dickson.bigcartel.com/



This is an on going project for me so expect more fun stuff in the future.

Comments, suggestions welcome!

dbot
Posts: 15
Joined: Sat May 10, 2014 9:06 pm

Re: Plant Friends: A plant monitor system

Tue Jul 22, 2014 8:05 pm

Plant Friends made it to the front page of hackaday!

http://hackaday.com/2014/07/22/hey-ther ... e-friends/

User avatar
sav25
Posts: 364
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK
Contact: Website Twitter

Re: Plant Friends: A plant monitor system

Wed Jul 23, 2014 4:28 pm

dbot wrote:I started this project as a way to learn programming and electronics
Meanwhile the rest of us spend a couple of hours getting an LED to light as a way of learning haha! This is an insanely beautiful project - bravo!
Averagemaker.com

dbot
Posts: 15
Joined: Sat May 10, 2014 9:06 pm

Re: Plant Friends: A plant monitor system

Thu Jul 24, 2014 10:28 pm

Thank you for the compliments Sav25!

I too started with a blinking LED and yes, it took me hours!

fruitloaf
Posts: 84
Joined: Sun Feb 05, 2012 11:41 am

Re: Plant Friends: A plant monitor system

Fri Jul 25, 2014 12:23 pm

I love this project but I've got to confess one of the reasons I watched this topic was because of the wonderful characters from your first version. How come you went with the L shape rather than modifying what you had?

dbot
Posts: 15
Joined: Sat May 10, 2014 9:06 pm

Re: Plant Friends: A plant monitor system

Fri Jul 25, 2014 1:25 pm

Thank you fruitloaf!


I haven't abandon the original characters and they are going to make comeback soon. I am happy to report the robot is coming along with massive improvements. No glue will be required and everything snaps together!

But the story on on the change is this; The original Plant Friends was a proof-of-concept project for myself that I originally didn't intend to release it to the world. But quite a few people started asking for the source code/questions about the project so I decided to design a version that is easy to build so beginners can have a chance of making their own Plant Friends. That lead to the birth of Plant Friends MKII, the release of the full source code and the easy to build enclosure design.

The robot, bunny and dinosaur in the original version were extremely hard to build. Even though the bamboo was all laser cut, the variance in thickness between different batches of wood made prototyping a chore. Tons of wood glue were used! The final versions that you see on my website were on their 12th revision. :p


As for the "L" shape (or "7", "<", ">") of the second version; The form followed the parts that I chose. I wanted to use part easily accessible hence my choice to go with a 3cm x 7cm perf board and the battery holder. The perf board have just enough room for all the parts without going SMD and provides a comfortable amount of space to solder through hole parts. I built a cardboard prototype of the "L" shape design and it was more interesting than a cube. I added optional "hooks" to the enclosure so the whole sensor node could hang on the rim of a plant pot and I thought that was kind of neat. The individual pieces of the new enclosure design snaps together and no glue is required. :)


I'll be working on the dinosaur next then the bunny. I actually sketched out an owl, mouse, cat and other characters a long time ago but they only exist in my pile of sketches right now.

fruitloaf
Posts: 84
Joined: Sun Feb 05, 2012 11:41 am

Re: Plant Friends: A plant monitor system

Fri Jul 25, 2014 1:40 pm

Well I'm impressed generally and would be really interested in the character designs. I'd been making my own monitoring system with the aim of it both being a code CV and also taking an electronics project from idea through to eventually making my own PCBs (I'm an electronics novice). So far I'm about the level you are at but without the cool enclosures as I'm not a member of my local hackspace which has a laser cutter.

My eventual aim is to have the option of running a submersible pump when it gets too dry as well as integrating a few more household sensors - I currently have another RPi running my central heating/water times.

Here's a screenshot of my system - sadly lacking the design flare you have but hey I'm a coder not a designer :D It uses arduinos + nRF24L01 modules rather than moteduinos.
screenshot.png
screenshot.png (58.55 KiB) Viewed 8290 times

dbot
Posts: 15
Joined: Sat May 10, 2014 9:06 pm

Re: Plant Friends: A plant monitor system

Fri Jul 25, 2014 2:09 pm

@fruitloaf

Thats pretty awesome! Have you consider putting your project on http://hackaday.io/ ?
Better yet, enter it into the space contest too! http://hackaday.io/prize

You can get your laser cutting done at Ponoko:
https://www.ponoko.com/


If you need enclosures for your project, you can use my Plant Friends MK II enclosures. You can buy either the pre-cut sheets or just the templates where you laser cut yourself:
http://www.ponoko.com/showroom/dicksonchow


OR if you don't feel like paying me, you can grab my templates on my GitHub:
https://github.com/dicksondickson/PlantFriends


My enclosure designs are free for private non-commercial use so, adapt, remix it and make it your own. :)

fruitloaf
Posts: 84
Joined: Sun Feb 05, 2012 11:41 am

Re: Plant Friends: A plant monitor system

Fri Jul 25, 2014 2:59 pm

I've seen some of the competition on the hack-a-day site and there's no way I'm going to win but I'll probably stick it on hackaday.io when I'm finished, the code is already up on github.

My original plan was to get a friend who has access to the local makespace to let me in so I can play with some case designs - as I'm sure you know it takes a while to get all the sizes just right so I didn't want to send it off to a fab until I'd at least tested my plans. I haven't started the case designs yet but I don't think the pcbs would fit your MK2 cases very well instead I was drawing a little inspiration from your MK1 RPi enclosure and was thinking of 5x5x5cm cubes (since most cheap PCB fabs do 5x5 as their smallest size). That would also allow me enough space for my batteries which are scavenged LiPo cells from a laptop - they're a bit fatter and longer than AAs but would fit nicely in my design.

If you're interested I'll post you an update once a few of the parts have arrived in the next couple of weeks or I can give you a link to the github - I'm not sure of how much use it would be to you as its a bit heavy weight for a RPi as its written in PHP using doctrine and the Zend Framework more as a than as a great example of something to use on a Pi.

dbot
Posts: 15
Joined: Sat May 10, 2014 9:06 pm

Re: Plant Friends: A plant monitor system

Fri Jul 25, 2014 3:05 pm

I love looking at new projects! Definitely stick it on hackaday.io!

I submitted mine to the contest and I know I am NOT going to win but I am hoping to get at least a t-shirt! :lol:

at2oo1
Posts: 28
Joined: Sun Jul 13, 2014 1:10 pm
Contact: Website

Re: Plant Friends: A plant monitor system

Sat Jul 26, 2014 11:32 am

The design of this wooden plant friends is sooooo nice! I love it!
Do you ship outside the us? I want a rabbit and a robot :)
Meine Projekte auf http://raspberry.tips/

dbot
Posts: 15
Joined: Sat May 10, 2014 9:06 pm

Re: Plant Friends: A plant monitor system

Sun Jul 27, 2014 9:57 am

Thanks atoo1. The bunny and robot is still not quite ready yet. It will be available soon. :)

tangent
Posts: 2
Joined: Mon Aug 04, 2014 2:05 am

Re: Plant Friends: A plant monitor system

Mon Aug 04, 2014 2:39 am

Hello everyone!

For some* reason of all the countless sensor projects I had seen on hack-a-day, this one in particular finally got me off my lazy behind and give it a shot.

So I went ahead and assembled one sensor and the gateway... using RFM69HWs. Here are some interesting notes:

1. Failing to set radio.setHighPower() on the RFM69HW will fail to active the amp, resulting in shockingly low (~2m) range.

2. The conversion from RFM12 to RFM69 was otherwise very simple thanks to the lowpowerlabs forums. This topic https://lowpowerlab.com/forum/index.php?topic=263.0 in particular was quite helpful. I could clean up my modifications and post them if desired.

3. I may have shot myself in the foot by going with the RFM69HW over the RFM69W. From what I can see, the FTDI programer that I have must be outputting more current than my battery pack. It appears that the DHT11 is not getting sufficient current while operating under battery power. Tomorrow I will take a look at the circuit to see if I can get more power to it? Something tells me that the battery life won't be great either. Not the end of the world, as I had actually planned to run the sensor off of a salvaged cell-phone charger; but I think I need 1.5mA, and that only outputs 1mA.

I might just have to order a RFM69W for battery use (I plan to put one outdoors). Currently everything is on a breadboard, but I will convert to perfboard once I get a dual-moisture probe setup functional.

*ok, so I came for the dino-sensor, and stayed for the easy to follow guide. Nice work so far!

dbot
Posts: 15
Joined: Sat May 10, 2014 9:06 pm

Re: Plant Friends: A plant monitor system

Tue Aug 05, 2014 4:17 am

@ tangent, glad to hear the guide is useful. ;)

Yes please do post the modified code! I have some new Moteinos with the RFM69HW but haven't had the time to test them out.

What kind of battery pack are you using?

tangent
Posts: 2
Joined: Mon Aug 04, 2014 2:05 am

Re: Plant Friends: A plant monitor system

Tue Aug 05, 2014 4:35 am

I'm using a simple 4x AA pack.. Actually, turns out it works fine! As does the salvaged cell charger. Not sure what my odd errors were before, after re-wiring the breadboard it works fine! Still not sure how/why it actually worked with the FTDI programmer powering it. Bizarre.

Aaaanyhows! Here is a modified sensor_node_test and gateway sketch. Lacking any android device, I can't test the mobile app. My current plan is to throw the data collected by the base station at my Icinga (Nagios clone) system, but that is really not a sane approach for most.
Attachments
plantfiends_RFM69HW.zip
RFM69HW version of plantfiriends
(4.68 KiB) Downloaded 129 times

dbot
Posts: 15
Joined: Sat May 10, 2014 9:06 pm

Re: Plant Friends: A plant monitor system

Tue Aug 05, 2014 6:47 pm

@tangent

Thank you for the code! Going to play with the new Moteinos this weekend and your code will come in handy.

I too have problems with my breadboards. The connections on the breadboard gets loose over time and just gets in the way of fun time. :)

As for the mobile app, I wrote it in Processing so you can run it in normal-desktop-java mode right inside Processing to test out. I didn't use any external libraries so it should run with a bare Processing install.

HobbyBob
Posts: 5
Joined: Wed Jul 23, 2014 11:44 pm

Re: Plant Friends: A plant monitor system

Tue Aug 05, 2014 7:06 pm

Hi! Just wanted to say well done, these guys are super awesome and I agree, adding everything into one flower pot would be amazing too! Have ever thought of submitting your project to competitions etc? I think it might be worth it :)

Return to “Automation, sensing and robotics”