greenhouse data logger

Hello,

my knowlege on arduino is very basic, but I want to build a data logger for a greenhouse. It is supposed to measure temperature/humidity (multiple sensors), air pressure, light intensity and store the data on an SD Card. Also all measured values are shown on an LCD.
Here are the parts I want to use:

Arduino Uno board + power supply
DS3231 real time clock module
LCD 1602 display
SD Card module + SD Card
2 x DHT11 temperature/humidity sensor
5 x DS18B20 temperature sensor
4,7 kOhm resistor for DS18B20
BMP280 air pressure sensor
TSL2561 light intensity sensor
Bread bord
Jumper wires

So, if I put all five DS18B20 sensors in one pin, everything should fit in the Arduino Uno, is that correct? Does this look ok so far? Just want to make sure, before I buy the parts. Your input is much appreciated!

Are you using a datalogging shield or individual RTC and SD card modules? The shield typically includes write protect and card detect I/O points that the smaller 6 pin SD card modules do not.

To check, write a list of pins and what is connected where

0: Serial Monitor TX 1: Serial Monitor RX 2: 3: DS18B20 4: DHT11 #1 5: DHT11 #2 6: 7: 8: 9: 10: SD chipSelect 11: SPI_MOSI 12: SPI_MISO 13: SPI_SCK

A0: A1: A2: A3: A4: I2C SCL A5: I2C SDA

BMP280, TSL2561 on I2C

I would suggest an I2C backpack for the LCD. Why not, you are already including the wire library for other sensors.

Dead easy to fit that all on an Uno.

DS3231 real time clock module LCD 1602 display BMP280 air pressure sensor TSL2561 light intensity sensor

That's two pins (the I2C bus). Of course you'd have an LCD with I2C backpack. Saves heaps of wiring and trouble. Also consider a 2004 display, so at least you have a fighting chance to display half the values at a time.

SD Card module + SD Card

4 more pins (the SPI bus)

2 x DHT11 temperature/humidity sensor

2 pins, you need one for each.

5 x DS18B20 temperature sensor

And that's one more as indeed they're designed to sit on the same OneWire bus.

That's a grand total of 9 pins. No problem for an Uno.

Before you try to attach everything at once and try to program it all at once. STOP!

Attach one item at a time. Try the example sketch. Then make a sketch that fits our end project for that one device. Then move on to the next. Before you have everything working at once, you should have eight sketches; one for each Arduino (LED Blink and serial.print for debugging), DS3231 real time clock module, LCD 1602 display, SD Card module + SD Card, 2 x DHT11 temperature/humidity sensor, 5 x DS18B20 temperature sensor, BMP280 air pressure sensor, TSL2561 light intensity sensor.

I think the 1602 is a pretty poor choice with all that stuff, and a cheapo OLED would be a far better bet. You can get a 128 x 128 under $10 and it can share the I2C bus with the RTC.

You should also see the breadboard as just a temporary lashup, and get serious about making up a shield to go on Uno.

You might also consider adding a Bluetooth module. They cost about $5, need make no extra demand on Uno resources, and offer a convenient way to get the data.

I have used the 5110 Nokia drivers. you can get 6 lines of information on one and they are pretty low power. SPI bus. still works with the UNO

Thanks so far! I just realized I can't use an LCD Display anyway, as I have to put all the parts outside of the greenhouse, as it has a pond inside and with the humidity the electronics wouldn't last long. The LCD can't cope with very low temperatures (-25°C), but the other parts I checked are fine, except the SD Card module. Does anyone know what's the minimal operating temperature there? Couldn't find it.

So, is there another way of displaying the values at low temperature or do I have to plug in my Laptop to see the values?

That sounds seriously cold, I imagine that you have better things to do than go out in it to read data, and I have already mentioned using bluetooth. The OLED I have is good for -40C anyway, and they are probably all the same.

You should be able to make up a sealed box with a window, and keep it inside.

I find the phone more convenient than the laptop.

Put the display in your home. Or you really want to go out at -25C just to go look at your display?

If you use BME280 instead of BMP280, that will measure temperature, humidity and pressure, so you won’t need the DHT11, which is pretty rubbish anyway.

The environment will cause the sensors to fail after a few seasons. You can put most of the electronics in an air-tight box, but the sensors will need to be outside that and will be vunerable. So I suggest you place them in a separate, ventilated box and mount them so they can be easily and quickly replaced with spares. As i2c bus signals don’t travel far, the second box should be less than 1m way from the main box.

I guess my description was not really accurate. So this is the situation: The greenhouse is over 400m away from the next building and only has acces to electricity. The greenhouse itself is very humid inside and the temperature flactuates much more than outside. That's why I think the electronics will last longer in a weather proof box outside of the greenhouse. Everything must remain functional for about two years.

I need a display to check every now and then if the values are still plausible, but if it's easier to see the real time values on my phone via Bluetooth, I would go with that. What would you suggest?

Bluetooth has a range of only about 10m, so you will need to be very close, in which case you might as well go and read a display.

Is there a WiFi signal at the greenhouse that you can connect to? If there is, you can send the readings to a web server and that means you can see them on your phone from anywhere in the world.

phytopia: I guess my description was not really accurate. .

You're not wrong about that but, since power is available and assuming it is power from your place, you might look into powerline networking.

Failing that, there are other long-range local wireless systems, but they require another Arduino in the house.

Be aware that, with the stuff you originally proposed, adding any longer-range communications probably means you need a Mega. This is because you are likely to run of of memory with a Uno, so you might as well get a Mega to start with.