• Post Reply Bookmark Topic Watch Topic
  • New Topic
permaculture forums growies critters building homesteading energy monies kitchen purity ungarbage community wilderness fiber arts art permaculture artisans regional education skip experiences global resources cider press projects digital market permies.com pie forums private forums all forums
this forum made possible by our volunteer staff, including ...
master stewards:
  • Nancy Reading
  • Carla Burke
  • r ranson
  • John F Dean
  • paul wheaton
  • Pearl Sutton
stewards:
  • Jay Angler
  • Liv Smith
  • Leigh Tate
master gardeners:
  • Christopher Weeks
  • Timothy Norton
gardeners:
  • thomas rubino
  • Jeremy VanGelder
  • Maieshe Ljin

Data collection for greenhouse analysis

 
steward
Posts: 15505
Location: Northern WI (zone 4)
4846
7
hunting trees books food preservation solar woodworking
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm starting to build a greenhouse.  It's going to be passive solar and heated with compost.  My hope is to grow tropical plants in Wisconsin through the winter.  Here's a thread on the design and build.  Since this is a rather unusual project I think it makes sense to collect temperature data of the greenhouse in operation.  

I'm digging for the footings now.  I'll run some direct burial wire under the footing for power to enter the greenhouse and a 1" conduit for a data line or other future needs.  Is 1" enough?  I'm assuming I'd be running phone line or coax through it.  My house wifi won't reach to the greenhouse so if I need internet it's going through this conduit.

Ebo David posted this sensor (waterproof temp probe) as an option to measure temps in and (I presume) under the greenhouse.  

Should I be buying sensors now and burying them under the footing and under the skirt insulation?  Or will we only need data on air temps?  I won't be doing the skirt insulation right now, just the footing.  So I think I can poke sensors under the footing and arrange them under the skirt later this summer if needed.

Thoughts?
 
Posts: 207
Location: Washington DC area (zone 7a)
27
forest garden trees medical herbs building seed greening the desert
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thinking ahead I would put in 3 different conduits (one to sleeve PEX for water), one for a high voltage line, and another for low voltage lines.  None of those three should ever mix, and unless you choose not to have water, 120/240VAC electricity and data lines, I would install  conduits for all of them.  It is not much more money at this stage of the game, and you might regret it later.

I installed 3/4" for my security cameras, and 1" EMT for all the regular data lines except the ones that I had to run flex.  The POE connectors on the end of the camera lines basically fill the space, and I am sure that is all I will ever get.  The 1" lines will fit several data lines, but if you are running cat6, then you can run a hub (as long as there is power).  For my own I will likely install 1-1/2" conduit lines into the greenhouse and if I *ever* run out of space with that then I need to completely rethink everything.  On another job site I think we used 1-1/2" conduit for a 100A 3-phase line they installed for one of the lathes at an old shop I worked in.

Also remember that they make rubber plugs that seal around the wires coming out the conduit.

As for what to install now and later...  I would read what people have found useful and not.  At only a couple of bucks each I would install a couple of extra -- this just off the top of my head, and not thought through:

temp probes at 6", 12", 24" and 48" (which is below my frost line).  I would install these inside and out.  Above ground I would install then at 2", 12", 24" and at the top of the inside of the greenhouse.  The reason I would do this is that I do not know the soil temp or exactly how the foundation insulation will behave.  This will allow me to at least try to analyze it.  If you have it both inside and out you can see the effects of the insulation on the foundation wall, and the effects of the insulation on the interior soil temperatures.

I would also look at installing soil moisture probes in a couple of places, as well as humidity sensors near the ground and up at the top of the greenhouse.

I am also sure that I would want some other things as well, but I would have to look at the best way to measure air flow or other data <https://hackaday.com/tag/anemometer/>;

Hope this helps.

This is just off the top of my head, but to really look into this think through to what types of analysis and control you hope to do and let that drive your minimum configuration.
 
pollinator
Posts: 517
Location: Derbyshire, UK
105
cat urban chicken
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sensors are cheap! And in my opinion the more the merrier! In my (not yet finished) greenhouse I buried sensors in the ground both inside and outside the skirt insulation- hoping to see the difference. I use DS18B20s- the waterproof ones are only a few dollars.
 
Mike Haasl
steward
Posts: 15505
Location: Northern WI (zone 4)
4846
7
hunting trees books food preservation solar woodworking
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, good idea Ebo, I'll put in an extra conduit.  I will have a well in the greenhouse so no need for externally supplied water.  And I'm planning on 60 amps of power getting fed from a nearby barn.

Here's a crude sketch of the footing, cinderblock pony wall and skirt insulation.  I put red sensor dots 6", 12", 24" and 48" down on the inside and outside.  Is that what you guys had in mind?  I'm not in a tremendous rush so we can think about this for a week or two.  I also put some green dots under the skirt which is where I was originally thinking the sensors would go.

Thanks for the sensor model number Charli!  Those look to be a couple bucks on Amazon and 0.9m long.  Ebo's sensors are $1.38 on Alibaba and are 1m long.  I did some digging (I wish Amazon let you sort on things like "cable length") and found a DS1820 3meter long.  Am I correct in assuming that as long as the sensor uses the magic number "DS1820" it has the communication capabilities we're after?

Am I also correct in assuming that we want all the sensor cables to be able to reach to a single point/hub/computer?  Or is there a way to have them meet at a remote hub and then connect several of those regional hubs to the arduino or brains of the operation?

Sorry if my questions are silly sounding, my background is more mechanical than electrical.
Sensors.png
[Thumbnail for Sensors.png]
 
Charli Wilson
pollinator
Posts: 517
Location: Derbyshire, UK
105
cat urban chicken
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So long as it says 'DS18B20' it doesn't matter how long the cables are, and they come in non-waterproof and waterproof packaging- but they're all the same thing- I've even used 5m ones before! I have about 60 of them on my network- inside and out the house.

The best option with these sensors that I have found is to make a 'one-wire network' with them- which means you can just daisy chain they along, rather than them all having to connect to a central hub (see https://www.maximintegrated.com/en/app-notes/index.mvp/id/148). So long as one end of the wire can connect to a raspberry pi (or probably an arduino)- the whole length can be read. You can interface to a pi yourself or use a usb bus (DS9490R is the most common), and software called 'owfs' (I can give you way more details on that if you wish, when you're ready for it).
 
Mike Haasl
steward
Posts: 15505
Location: Northern WI (zone 4)
4846
7
hunting trees books food preservation solar woodworking
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Charli, that rocks!  The link you have above didn't go anywhere, could you double check it?  That may cover my next question but just in case:

If you can daisy chain the sensors, where do they connect?  I thought just at the end of the cables.  In which case they'd all have to connect at their ends (like an octopus).  Thanks!
 
Charli Wilson
pollinator
Posts: 517
Location: Derbyshire, UK
105
cat urban chicken
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The link was mangled by the emoji!

https://www.maximintegrated.com/en/app-notes/index.mvp/id/148

Am at work right now, but I shall dig out an explanation of my 1-wire network for you tomorrow!
 
Mike Haasl
steward
Posts: 15505
Location: Northern WI (zone 4)
4846
7
hunting trees books food preservation solar woodworking
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Charli!
 
Ebo David
Posts: 207
Location: Washington DC area (zone 7a)
27
forest garden trees medical herbs building seed greening the desert
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check, but I think the DS18B20S may be end-of-life.  I could be wrong, but...  Also, there are plenty of similar devices if I recall correctly.  You should be able to also make hand assembled sensors waterproof <http://www.reuk.co.uk/wordpress/electronics/make-a-waterproof-temperature-probe/  https://www.youtube.com/watch?v=iXbKNJTj6Po   >

We should put together a list of sensors and techniques.
 
Mike Haasl
steward
Posts: 15505
Location: Northern WI (zone 4)
4846
7
hunting trees books food preservation solar woodworking
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry Ebo, but what's end-of-life?  I searched for it on the google but didn't return anything that made sense to me.  I'm assuming it means that it's getting to be obsolete but I couldn't find anything to that effect online.

Handmade waterproof sensors are cool but if I can buy a waterproof one with a 3 meter cable for $3 I'm not going to attempt to make one

Yes, a list of sensors, components, wiring schemes and code would be awesome.
 
Ebo David
Posts: 207
Location: Washington DC area (zone 7a)
27
forest garden trees medical herbs building seed greening the desert
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
end-of-life is when something is discontinued.  I tracked down the relevant info here:

https://www.maximintegrated.com/en/app-notes/index.mvp/id/4377

DS1820 is discontinued, but you now can get DS18B20 and DS18S20.  The link above gives you the specs for all three devices.

 
Mike Haasl
steward
Posts: 15505
Location: Northern WI (zone 4)
4846
7
hunting trees books food preservation solar woodworking
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ebo, sounds like DS18B20 is the one to go with.  That's the type in my link above for 3m cables so it sounds like I lucked out...
 
Ebo David
Posts: 207
Location: Washington DC area (zone 7a)
27
forest garden trees medical herbs building seed greening the desert
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also remember that if you end up building your own you can put them on the wire like pearls on a string, and access them via one set of wires.  See http://arduino-info.wikispaces.com/Brick-Temperature-DS18B20#mult
 
Charli Wilson
pollinator
Posts: 517
Location: Derbyshire, UK
105
cat urban chicken
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some notes on my temp sensor network at home. This is just some musings on how I made my network- it isn't by any means the only way to do it! If its not understandable let me know and I'll try to explain a bit more- I've tried to keep it at a fairly high level but I can go into more detail on things if required.
1-wire is a protocol by Maxim utilising various sensors such as temperature and humidity.

Sensors
- I use DS18B20 temperature sensors in either TO92 form, or waterproof ones that come complete with cables- depending if they are internal of external.
- humidity sensors- http://www.sheepwalkelectronics.co.uk/product_info.php?cPath=23&products_id=55

Some notes on building a network: https://www.maximintegrated.com/en/app-notes/index.mvp/id/148

I use cat5 cable for my network, using this wiring diagram: http://www.sheepwalkelectronics.co.uk/wiring_info.php

I connect them by terminating the cat5 cable as usual with rj45 plugs and using splitters to plug in the sensor, and to continue the wire.
Splitters:
https://www.ebay.co.uk/itm/New-RJ45-Splitter-Adapter-1-to-2-Dual-Female-Ethernet-LAN-Network-Coupler/142737252514?epid=1267289988&hash=item213bcda0a2:g:qFwAAOSw6TRau5xV -  these are super cheap and about 50% of them actually work, they're rather jippy.
https://www.ebay.co.uk/itm/1-to-2-LAN-ethernet-Network-RJ45-Splitter-Extender-Plug-Adapter-Connector-PB/282885519812?_trkparms=aid%3D555019%26algo%3DPL.BANDIT%26ao%3D1%26asc%3D20151005190540%26meid%3D17556a96c7244c7795c530bd0e7954d8%26pid%3D100505%26rk%3D1%26rkt%3D1%26%26itm%3D282885519812&_trksid=p2045573.c100505.m3226 - About 80% of these splitters work, but they cost a lot more.

I also use these splitters from SheepWalk Electronics (UK) for 'hubs' where I have many sensors terminating- just out of laziness: http://www.sheepwalkelectronics.co.uk/product_info.php?cPath=23&products_id=64
I'm sure similar products exist in other countries.

So take your pick according to how patient you are.

If outside then the splitters go inside IP68 junction boxes, with cable glands to keep out moisture. Outside I try and protect the cable- either bury it or encase in old garden hose or similar (else you'll be really annoyed when you accidentally cut through it with a hedge trimmer). Indoors the cblaes tend to be under floorboards or embedded in walls.

Some notes on soldering the sensors: http://oozamaflips.net/index.php?month=6&year=2014

The base unit: I use a raspberry pi. The most common 1 wire interface is a DS9094R usb interface, which I started with. As I added more sensors I started getting conflicts on the network so switched to a multi-bus i2c interface: http://www.sheepwalkelectronics.co.uk/product_info.php?cPath=22&products_id=33

On the pi I use the raspbian OS, and install the owfs software to communicate with the sensors. It has a server interface whereby you can check what sensors can be seen and their values and things.

I run a python script every 10 minutes that records the temp/humidity values to a database. And have a webpage acessible in my house where you can view the current, min and max temps. It also does graphs over various time periods and various other things.
Why do I do this? Why not, I like playing with electronics. I also have a weather station I built, pi CCTV cameras.. why would I not want to monitor temperatures in my house (and garden, and greenhouse, and pond, and chicken coop.. and compost bin...)

Do set up your base unit and a few sensors and check it all works! Then add sensors one at a time. Once you have 30 sensors or so on the same bus you start to get conflicts, not all the sensors play nicely with each other. If your nice network vanishes when you add a certain sensor or splitter- replace that with a different one- the first sensor will likely work elsewhere.
 
Ebo David
Posts: 207
Location: Washington DC area (zone 7a)
27
forest garden trees medical herbs building seed greening the desert
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Charli thank you for that brilliant report.  I will have to go through it in detail, but I like how you suggest testing and some idea of the root cause.  I usually use metal conduit for anything exterior above ground -- precisely because of the trimmer experience you mentioned.  
 
Mike Haasl
steward
Posts: 15505
Location: Northern WI (zone 4)
4846
7
hunting trees books food preservation solar woodworking
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For some reason I was imagining using an Arduino for this project.  But that's based on watching a youtube video.  

I think I want to be able to collect temperature and humidity measurements (not sure about others) every 10 min or so.  I personally would only need to have them write to a memory card or USB and then grab that to download my data whenever I'm curious.  I'm assuming (there I go assuming) that you guys would like to be able to see the data live or something like that.  Which would then entail the conduit and connecting up to the internet directly.

I think my ventilation will be automatic and fans will be on a timer.  But then again, if this "system" was able to turn on fans when it gets too hot, that could be cool.  But not worth "5x the complexity" cool.

Thanks Charli!  I couldn't follow some of the links but my internet has been shaky today.  I'll try again later.

My guess is that I'd want 4 sensors underground outside, 4 underground inside, 4 or so sprinkled around the interior, 2-4 in the compost heater and one for outside air temp.  I'm not sure how many humidity sensors I'd need, 1?  Are there other types of sensors I should think about?
 
Ebo David
Posts: 207
Location: Washington DC area (zone 7a)
27
forest garden trees medical herbs building seed greening the desert
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Mike, There are lots of possibilities for the controller.  Arduino is perfectly acceptable, so is RPi, BeagleBone, UDOO, and many others.  Also, for every platform there are many different versions.  One of the first things that you need to do is figure out how many input and output lines you will need, how much storage, etc.  Then there is an idea of connectivity.

So, starting with the number of lines.  If you connect 4 or more in a group wired together, then you will need at least 4 input lines.  You will also want several output lines I would imagine -- unless you are looking at logging only.  With that, even an Arduino nano would likely handle it.  You would have to look into it more deeply to make sure that it will do everything you need, but it is likely that all of these will work.

For my own work I would also want to have ethernet connectivity -- I  use POE for security and device control.
 
Charli Wilson
pollinator
Posts: 517
Location: Derbyshire, UK
105
cat urban chicken
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ebo David wrote:
So, starting with the number of lines.  If you connect 4 or more in a group wired together, then you will need at least 4 input lines.  You will also want several output lines I would imagine -- unless you are looking at logging only.  



With a maxim 1-wire network you only need 1 line for multiple sensors ('1-wire' is a bit misleading as you actually need 3 wires- power, ground and data). The sensors all have individual addresses and the controller can talk to them individually over one data line.

Other sensors I have worked with that you may or may not be interested in
- wind speed
- wind direction
- barometric pressure
- rain gauge
- water-butt water height
- light level (lumens)
- uv light
- current sensors for production stats on a solar panel

I've not tried to run these on 1-wire though, they are controlled by and plugged into the pi itself.

You can run 1wire networks from an arduino as well: https://playground.arduino.cc/Learning/OneWire
I've always used a raspberry pi because they are made in the UK and only cost me £4! Including the ethernet this is cheaper than I can get an arduino online for.

 
Ebo David
Posts: 207
Location: Washington DC area (zone 7a)
27
forest garden trees medical herbs building seed greening the desert
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry if the name 1-wire was confusing.  Yes, they actually need ground, power, and one for data.  I did not know that the RPi's were made in the UK.  But I prefer them over Arduinos because they are a full running OS if you want it, or you can strip it down to a single program as well.  Much more versatile.
 
Mike Haasl
steward
Posts: 15505
Location: Northern WI (zone 4)
4846
7
hunting trees books food preservation solar woodworking
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Charli, I got some time and was able to read through your post on your system and follow the links.  That's neat that you can just use LAN wires and connectors for all the sensors.  I'm trying to picture how you would run the 1 wire bus to handle a string of 10 temperature sensors.

Would you run LAN cable to the first location and plug it into a splitter.  Then plug your first sensor into one half of the splitter and then use another LAN cable to run to the second location where you use another splitter.  For instance, 10 sensors would require 9 splitters, 9 pieces of LAN cable and 10 sensors with LAN plugs on them?

Or would you use a 5 port splitter like This?  They use power though so I'm not sure if that sounds right.

In my case I'm imagining I could do a star arrangement for some locations.  I'd have a local splitter/hub with 4-8 sensors connecting there before running back to the arduino.  In that case maybe the sensors could all be soldered together to make that connection.  Or connected in another appropriate manner but not a series of plugs and hubs?

Regarding other sensors, I could get interested in light level and UV light.  I also ran across a CO2 detector that would be very interesting if it would work.  I found a bunch of soil moisture sensors but they all appear to be inserted partially in the soil, not buried in 4' of compost like I'd need.  And I just stumbled across this little fellow looking for light sensors.
 
Charli Wilson
pollinator
Posts: 517
Location: Derbyshire, UK
105
cat urban chicken
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mike,

Your description of how I run sensors is spot on! I run a cable, have a splitter- one side goes to a sensor and the other side to another length of cable that goes onwards.. etc. However this isn't the most efficient network and you do have to build it up a bit at a time to check all sensors and splitters play nicely (my longest cable is over 70m, and I have 39 sensors on the same cable.. so not efficient can still give you a lot of options!). Remember that anything outside or in a greenhouse will rust! So you're going to want to put any connections inside waterproof boxes or something.

I've never found internet hubs of switches to work for this- they'll work for actual ethernet traffic but not for 1wire. If I want to connect  a load of sensor sin one location I use one of these: http://www.sheepwalkelectronics.co.uk/product_info.php?cPath=23&products_id=64
Which I realise is a UK product! I would have thought they're found in the US as well, '1 wire hub' or '1 wire splitter' perhaps?

Certainly a star arrangement would make waterproofing easier! You can certainly just solder wires together- again I'd put the soldered connections into a waterproof box of some kind (I use waterproof IP68 junction boxes).

You'd struggle to get the sensors you've linked to to work on 1wire- so you're better off wiring them straight to your arduino (where they can use much more power). You can use any sensors but my favourites are the HTU-21D for humidity (they're like $2!), and the bh1750 light sensor, the ccs811 air quality sensor- this is obviously massively biased by what I can get hold of in the UK! All these sensors use the i2c protocol and you can usually use multiples on the pi/arduino (apart from the HTU21D)- but you can't have as long wire lengths as 1wire.
 
Mike Haasl
steward
Posts: 15505
Location: Northern WI (zone 4)
4846
7
hunting trees books food preservation solar woodworking
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Charli!  That "1 wire splitter" looks exactly like what I was imagining would work.  Knowing I can solder them together myself at least gives me options.  I'm pretty sure I'd have a few stars since often the temp sensors would be in a cluster near each other.

Is the light sensor you use just to tell if it's daytime or does it actually measure light intensity?  Like you'd want for a greenhouse.
 
Charli Wilson
pollinator
Posts: 517
Location: Derbyshire, UK
105
cat urban chicken
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The bh1750 light sensor reports light intensity in lumens or lux, which I quite like. Currently my greenhouse sensor is reporting 10,000lx (shaded by some plants)
 
Can you smell this for me? I think this tiny ad smells like blueberry pie!
GAMCOD 2025: 200 square feet; Zero degrees F or colder; calories cheap and easy
https://permies.com/wiki/270034/GAMCOD-square-feet-degrees-colder
reply
    Bookmark Topic Watch Topic
  • New Topic