Gardening Sensor Network Communication

Hi there!

I have a balkony and Ive got some plants that are difficult to satisfy (emm… maybe its me not watering them to often ;)), bonsai trees etc.

What I would like to do is building a sensor node network communicating with one base station (ATMega328) via i2c. Each node would consist of maybe a ATtiny85 or maybe bigger with 2 sensors (soil and light) and one solenoid valve for that particular plant. That way each node could be individually be programmed for the plants needs. Each node decides indivually if the plant needs water. The network can be wired (no need for wireless here, my balkony isnt that big). A plus would be when the base station can transmit the collected data (sensor readings for each plant) to the web. At first, this is not that important.

What I would like to ask is:

  1. Is it possible to communicate via i2c with an ATMega and ATTiny?
  2. If yes how to address different opperating speeds? 16Mhz ATMega <-> 8Mhz ATtiny?
  3. Is it possible to mix the TinyWire library with the Wire library?
  4. Could I just use the TinyWire library on the Mega and the Tiny?
  5. Do I need to write my own software i2c protocol for my needs (because the Tiny does not have hardware i2c)?

If someone could give me a hint how to approach this node network communication it would be great! :slight_smile:

Thanks in advance! :slight_smile:

As the distance is small why wouldn't the single Atmega 328 be able to do everything and avoid the complications of interconnection ?

Nothing needs to happen quickly for monitoring plants.

...R

Thanks Robin2 for your reply!

Yes I thought of a single chip solution too but I decided against it for these reasons:

  • as an example five plants would result in 5 soils sensor pins, 5 light sensor pins and 5 valve pins = 15 Pins (10 analog pins...). I really want the data for esch plant individually. Im running out of pins even with this small amount of plants.

  • posibility to exand the node network to nearly unlimited amount of plants (okay i2c does not support that much but considering my current plant count and balkony its unlimited ;))

  • The base station would have enough pins left for a display and status indicator as well as maybe the option to transmit the data via wireless lan.

  • I would like to learn the i2c protocol with this project :)