Help permies get a

new server by

contributing to the

fundraiser
  • 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:
  • Carla Burke
  • John F Dean
  • Nancy Reading
  • r ranson
  • Jay Angler
  • Pearl Sutton
stewards:
  • Leigh Tate
  • paul wheaton
  • Nicole Alderman
master gardeners:
  • Timothy Norton
  • Christopher Weeks
gardeners:
  • Saana Jalimauchi
  • Jeremy VanGelder
  • Ulla Bisgaard

Raspberry pi temperature data collection

 
pollinator
Posts: 517
Location: Derbyshire, UK
105
cat urban chicken
  • Likes 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am in the UK, so any links to products will be ones I can get hold of. I've tried to not be too specific- everything will also be available elsewhere in the EU/US. A lot of parts can be ordered most cheaply from China if you can wait for the shipping.

You will need:
A pi, I used a pi zero W but any pi will do, old pi a/B and pi zeroes use the least energy- if you're thinking of taking this project off grid.
A micro sd card to fit in said pi, I recommended 16GB or more. No need for anything massive though.
A one wire interface of some kind, I use the sheepwalk electronics ones: https://www.sheepwalkelectronics.co.uk/index.php?cPath=22
The RPI2 v2 for the pi zero, or the RPI3 v2 for larger pi- this provides more transport buses and is suitable for more sensors, or sensors going off in vastly different directions.
DS18B20 temp sensors- either the TO92 ones, or the waterproof version if you need them to be waterproof, some ebay links as examples: https://tinyurl.com/y3xqh4ak or https://tinyurl.com/yyswyz5r
Cat 5 or cat 6 cable, and a kit to fit your own rj45 ends to these is handy as well- you’ll need the rj45s themselves, i recommend the ones with a loading bar, or pass-through connectors- for ease of getting the wires fitted, like these: https://tinyurl.com/y3g6yd9x You’ll also want an rj45 crimping tool.
RJ45 3 way connectors- buy more than you need as they’re all really jippy. The black plastic moulded ones are better than the cream plastic ones, like these: https://tinyurl.com/y2bryeh8 . Or you could go for the sheepwalk electronics 4 way connectors, these are ace- RPI3a port splitter, https://www.sheepwalkelectronics.co.uk/product_info.php?cPath=22&products_id=34


You will need a few things to develop on the pi. If you have a separate PC/laptop and wifi then all you’ll need is a microsd card reader. You will also need a monitor and keyboard with the relevant adapters to connect to the pi.
 
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
Hardware-lets wire up a sensor (a DS18B20)

You need to wire these up (3 wires) using this wiring diagram: https://www.sheepwalkelectronics.co.uk/images/PinoutRJ45.jpg



You want the V+ pin of your sensor to go to the cat5 orange cable, the data pin to blue, and the ground pin to blue white.

Here are some ideas on how to do this:


A TO92 sensor in an rj45 fitting- just get the pins into the right pins on the socket, and use your crimping tool to fit

A TO92 sensor soldered to cat5 cable, and covered in heat sink

A waterproof cylindrical sensor, soldered to cat5 cable and covered in heat shrink

And the one I'd recommend you use, though I can't find an example photo right now.. is to get pass-through rj45 fittings, or those with a loading bar (like these: https://tinyurl.com/y3g6yd9x), this makes it easy to get the 3 wires of the waterproof sensor in the right place- and them crimp the socket on.
 
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
Software- lets set up a pi. This is largely a list of links to official sources- as any instructions I write will go out of date with the next software release!

You want your pi, a power supply and an SD card. As well as a way of getting the software to the SD card, if you haven't purchased a pre-installed one- soa PC/laptop with an sd card reader.

We're looking at installing raspbian lite- this is command line only, and the display will be via a webpage that you can view on your computer/smartphone. If you want a display directly from the pi- hung on your wall or something, you'll probably want Raspbian Full as this has a GUI.

https://www.raspberrypi.org/documentation/installation/noobs.md

TBC
 
Posts: 22
Location: Pittsburgh, PA
8
5
forest garden trees books
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Charli Wilson wrote:I am in the UK, so any links to products will be ones I can get hold of. I've tried to not be too specific- everything will also be available elsewhere in the EU/US. A lot of parts can be ordered most cheaply from China if you can wait for the shipping.

You will need:
A pi, I used a pi zero W but any pi will do, old pi a/B and pi zeroes use the least energy- if you're thinking of taking this project off grid.
A micro sd card to fit in said pi, I recommended 16GB or more. No need for anything massive though.
A one wire interface of some kind, I use the sheepwalk electronics ones: https://www.sheepwalkelectronics.co.uk/index.php?cPath=22
The RPI2 v2 for the pi zero, or the RPI3 v2 for larger pi- this provides more transport buses and is suitable for more sensors, or sensors going off in vastly different directions.
DS18B20 temp sensors- either the TO92 ones, or the waterproof version if you need them to be waterproof, some ebay links as examples: https://tinyurl.com/y3xqh4ak or https://tinyurl.com/yyswyz5r
Cat 5 or cat 6 cable, and a kit to fit your own rj45 ends to these is handy as well- you’ll need the rj45s themselves, i recommend the ones with a loading bar, or pass-through connectors- for ease of getting the wires fitted, like these: https://tinyurl.com/y3g6yd9x You’ll also want an rj45 crimping tool.
RJ45 3 way connectors- buy more than you need as they’re all really jippy. The black plastic moulded ones are better than the cream plastic ones, like these: https://tinyurl.com/y2bryeh8 . Or you could go for the sheepwalk electronics 4 way connectors, these are ace- RPI3a port splitter, https://www.sheepwalkelectronics.co.uk/product_info.php?cPath=22&products_id=34


You will need a few things to develop on the pi. If you have a separate PC/laptop and wifi then all you’ll need is a microsd card reader. You will also need a monitor and keyboard with the relevant adapters to connect to the pi.



Charli,

For a point of reference, what would be your estimate to build the complete setup you've described, setup the programming necessary so that all that would be required is to hook everything together and turn it on, and ship it to the lab? (Assuming you were inclined to do so.)

And if you could, the additional cost of adding half a dozen humidity senors, half a dozen light sensors, or three cameras that can triangulate the space and taken a photo at a given interval (such as every 4 hours during the daylight hours)? And perhaps a price point to include all three options?
 
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
Pi zero W- £10
Sd card - £10 (32GB)
interface- £14 for two buses (if your sensors are all in totally different directions or you want  more than 20 of them, upgrade to a pi3 for £32 for and a 6 bus interface for £33)
Temp sensors- about £2 each for waterproof ones (dependant a bit on lead length, but nothing huge)
Cable- 20m is £12 for outdoor UV protected cable, £5 for a load of rj45 plugs
Connectors- £3 each

Humidity sensors- £30 each
Light sensors- I've never found a 1wire light sensor I'm afraid, so you can have one on the pi itself for £3, but not lots scattered around.

Cameras- you can only have one camera per pi, if you wanted 3 I would recommend a pi zero and camera for each camera setup (which adds to your power load a bit)- then you're looking at £10 for each pi, and £25 per camera.

Total (assuming 20 temp sensors, 6 humidity)
sensor setup: ~£360
cameras: £150

These are all wireless-enabled, but for ease of setup you might want a seperate router. Any old ADSL router will do- we get a new one every year when we switch ISP- so I'd have thought you could get one for free.

You would want to throw in £20 for shipping everything as well perhaps
 
I hired a bunch of ninjas. The fridge is empty, but I can't find them to tell them the mission.
Heat your home with the twigs that naturally fall of the trees in your yard
http://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic