3

I want to use OpenHAB to make home automations using a Pi to run it and send and receive data from an Arduino, which will be controlling lights, reading sensors, etc.

But to avoid the cost of an Ethernet shield I want to connect the both via I2C. How can I configure the Pi/OpenHAB for this to work?

  • PS: The house in question is just a 100x60cm wooden model, not a real house. So we don't need to worry about problems with long distance wired communications. – Twski Aug 29 '15 at 16:53
2

If you need something like I2C (in terms of typical data rate and ease of use) and want to avoid ethernet some other serial connections come to mind. For home automation, the typical distances in a home and the necessary data rates I'd go for RS-485. It supports quite some distances - up to 4000 feet (it's electrically a differential signal) - and also multiple devices on the same bus. Both the Pi and your Arduino can easily be made to work with RS-485 using their internal UARTS and a simple RS-485-Transceiver (a $2 device). Wiring could be done with essentially any twisted pair cable (UTP, STP, FTP) whatever you have available. For full duplex operation - if necessary - you need two pairs otherwise just one. So if you have some network cable around (even Cat3) that should do fine. The two additional pairs could even be used to power the remote device if it is low powered (otherwise the voltage drop might be a show-stopper).

  • Sorry, I should have specified that the "home automation" is in a wodden model house (100x60 cm approximately), not a real house, so distance is not to worry about. – Twski Aug 29 '15 at 16:51
2

I2C isn't meant for long distance communications - you are better off to use Ethernet, or technology that is fit for the purpose you want to use it. I2C was originally designed for communications between chips on the same board - not long distances around a house.

See wiki and search for distance.

  • Sorry, I should have specified that the "home automation" is in a wodden model house (100x60 cm approximately), not a real house, so distance is not to worry about – Twski Aug 29 '15 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.