Pages: [1]   Go Down
 Author Topic: putting sensors into homemade greenhouse - Tips needed  (Read 755 times) 0 Members and 1 Guest are viewing this topic.
Offline
God Member
Karma: 5
Posts: 873
 « on: May 07, 2012, 05:55:41 pm » Bigger Smaller Reset

hi,
my girlfriend has asked me to realize a greenhouse in where she'd like to make grow strange flowers, dunno at all about flowers, and i need a little help about technical questions because the greenhouse is a very humid environment, and i need to put the following sensors:

- CO2 sensor, that has analog out, from 0V to 4V, 0..10Hz band, perfect for the arduino ADC range
- 4 DHT11 humidity and temperature, that has 1wire digital bus

also i will put 4 rele to switch on/off
- the lamp that is used to irradiate flowers with light in particular wave length, it is a 220V 2A load
- the electrical valve of the CO2 tank, which let control the CO2 fix up with the addition of discrete volumes, it is a 48V DC 50mA load
- the two electrical watering, each actuator is 12V 1A load

my problem is how to transport information from the DHT11 and from the CO2 sensor to the arduino board, because the CO2 sensor and all the DHT11 sensor need to be put 1meter far from the box which contain the arduino.

I can't wire it up a cable of 1 meter long from the ADC of the arduino to the CO2 sensor, and i can't wire it up a cable of 1 meter long from the DigitalIO of the arduino to the each DHT11

I think something in the middle must be put: and this is what i am asking here, what do you suggest to put in the middle to solve this problem ?

the irradiating lamp produces a lot of noise, this noise must be filtered on the adc, and i could do it easy, just adding 10 samples and dividing them by 10, the classical formula (sum(i={1..10},x(i) ) ) /10 ... but i am also considering to add a low band (0..10Hz) Operational Amplifier with a gain of 1, putting it between the arduino adc and the cable which links it up to the CO2 sensor (which is 1 meter in distance)

May be this filtering good enough for the CO2 sensor ?

I don't know about what to do for the 1wire bus of DHT11

Code:
-------------
| poweron/off |
|   4 rele    |
-------------
|
|
+----------------+
|                |
|   main board   |
|   arduino328  <---------  i2c RTC & LCD44780 inside
|                |
+----------------+
|
| RS485
|
|                 +------------------+
+-----------------| sensor node CO2  |
|                 |      arduino/pic |
|                 +------------------+
|                 +--------------------+
+-----------------| sensor node DHT11  |
|                 |      arduino/pic   |
|                 +--------------------+
|                 +--------------------+
+-----------------| sensor node DHT11  |
|                 |      arduino/pic   |
|                 +--------------------+
|                 +--------------------+
+-----------------| sensor node DHT11  |
|                 |      arduino/pic   |
|                 +--------------------+
|                 +--------------------+
+-----------------| sensor node DHT11  |
|                 |      arduino/pic   |
|                 +--------------------+

a bit more expensive, in this other draft, i am thinking about using RS485 + a intelligent sensor, i mean putting arduino or pic inside each sensor, and than linking the whole up into RS485 network. RS485 uses a differential bus, so i could use twisted piece of wire, which should be immune from the noise of the irradiating lamp

what do you think ?

 « Last Edit: May 08, 2012, 06:13:05 pm by legacy » Logged

0
Offline
Shannon Member
Karma: 162
Posts: 10523
Arduino rocks
 « Reply #1 on: May 07, 2012, 07:09:28 pm » Bigger Smaller Reset

The analog sensor will probably handle fairly long cable runs if you use shielded cable (coax) for the analog signal.  Microphone cable has two separately shielded cores, so one can supply power and the other take the analog signal back.  Maybe add a capacitor at the receiving end of analog signal to suppress RFI (1nF ceramic ought to be sufficient)

The 1-wire bus is designed for fairly long runs I believe, and here twisted pair makes sense (less capacitance than coax).  A standard cat-5 cable would be a cheap method - use one twisted pair for data/gnd and another for 5V/gnd.  If there are signal problems then a little serial resistance in the data line (say 100 ohms) may help by suppressing reflections and ringing.

Sensors without built-in decoupling should have a 0.1uF ceramic added across the power right next to them.
 Logged

[ I won't respond to messages, use the forum please ]

Illinois, USA
Offline
Full Member
Karma: 0
Posts: 126
 « Reply #2 on: May 07, 2012, 07:14:11 pm » Bigger Smaller Reset

1m is not that long of a distance. I'd be surprised if it is a problem. Do you know something about the environment that we don't?
 Logged

0
Offline
Shannon Member
Karma: 162
Posts: 10523
Arduino rocks
 « Reply #3 on: May 08, 2012, 04:50:46 am » Bigger Smaller Reset

Well the importance of distance depends on the kind of bus/interface - SPI is standard fast logic and would not be expected to run more than a foot, whereas the OneWire bus is specifically designed for lower speeds and longer lines.  The usual practice though, as mentioned above is to use proper differential line-drivers for longer cables (for instance ethernet other CAT5) where the differential signal gives much greater noise-immunity, the lines are balanced transmission lines (reduce attenuation and distortion) with pulse-transformers to allow differing equipment grounds.

RS485 uses large signalling voltages to overcome differing grounds rather than transformers I think, but otherwise is engineered similarly to ethernet over UTP.  The higher voltages mean greater noise-immunity still for operation in factories full of motors and electromagnetic interference.

For a small greenhouse this is all over-kill, but for a large commercial array of greenhouses something like RS485 would likely be standard for the physical layer.
 Logged

[ I won't respond to messages, use the forum please ]

Illinois, USA
Offline
Full Member
Karma: 0
Posts: 126
 « Reply #4 on: May 08, 2012, 10:05:43 am » Bigger Smaller Reset

MarkT, I agree with everything except:
SPI is standard fast logic and would not be expected to run more than a foot

I've used SPI bus'es longer than 1 foot at 4 MHZ with no problems in mass produced automotive applications. We put an RC at the end of the line, but IIRC it was not needed. I would not expect 1m to be a show stopper. If there is a problem, use a slower SCK.
 Logged

 Pages: [1]   Go Up