Selection of the right Ethernet Shield AND Library

Hello,

currently I'm playing around on a home-automation project.

I tried to let do a nano the following jobs:

  • Read one DHT22 Sensor
  • Read three DS18B20 Sensors
  • Read analog Sensor
  • Check incomming UDP messages
  • Send sensor values via UDP
  • Send debug messages via Serial
  • Let a watchdog run

Currently I have chosen the EtherCard Library with an ENC28J60.

The good Message: It works fine as long as i do not use the EtherCard Library AND the OneWire Libary at the same time. (Each one works fine, as long as I do not use both). If both are in use the system will freeze during the loop(), watchdog does not init a rebeoot. My only explanation is that I'm overloading the system (CPU or RAM).

I do not use TCP or DHCP since this protocols/services are not hardware implemented within the ENC28J60.

I currently see following options to solve the problem (Not sure if it is possible to get each of them to work);

  1. Find a Library for ENC28J60 which can implement UDP Server and Client and which uses less resources (is there any)?
  2. Use the W5100 with the default Ethernet library instead of ENC28J60 (does the lib use less resources)?
  3. Use an AtTiny85 for the 1-Wire sensors and send the values via some kind of serial communication to the nano
  4. Use analog temperature sensors, not use 1-wire lib (easiest way, but not prefered, because the sensors have to be adjusted manually)
  5. Not use the EtherCard Library on nano. Send values serial to a second nano which sends via EtherCard Lib to UDP (Serial > Ethernet/UDP Gatway)

Which approach would you suggest? Thanks for your feedback!

Look at this site, onewire and EtherCard library able to work together, you need to watch out on your RAM usage.