What is the longest practical length the clock and data wires can be for two Unos (R3) to talk to each other? I would probably be using 22 or 26 gauge wires. I ask this to control a feeder machine at the end of my yard with my Arduino in my home.
Also: what is the practical limit of Unos this home made bus can have? I know the stated limit, but does anyone have experience with a practical number?
Thank you very much in advance.
Mmmm, the 'end of my yard' does sound like a long way, especially if you are on a farm
How ever, anything more than a few metres is then going to likely be problematic, as I2C was designed for short distance communications. Maybe if you online search for I2C you will see what I2C stands for. More on board or at most, board to board, being close by or adjacent.
What I think you should look at is using standard async serial communications and using EIA-485 drivers.
Then you can use CAT5 type or other twisted pair cable.
Using async communications means you will use a serial port, and the UNO only has one hardware serial port.
If you are already using this serial port, then you might look at using a library called SoftwareSerial to implement a software serial function that could be used for your connection between the two UNOs. Again, using EIA-485 drivers. You wouldn't want to send TTL that distance and also for other reasons, which are dependent on your local environment, in terms of EMI.
You mention 'home made bus', what home made bus are you referring to, I2C is not home made ?
Paul - VK7KPA
Paul: thanks for the help... I am new to Arduino and all the hardware and programming... I am still learning. Yes, it will be about 50' between the 2 Arduinos. I meant "home made bus" as just two plain wires running from A0 and A1 as well as GND between the Unos.
I am going to look into "EIA-485 drivers" but like I said I am very new to all this. Thanks for the help!
RS485 would be much better for that length but why not go wireless with some nRF24L01's?
SamIAm93: good point. I am concerned about accidental interfearance. with wires this is next to nill in a practical sense unless major EMF or physical modifications. I have read the BlueTooth may not be totally reliable in say snow / rain and other weather related issues at distance. I am just going on what I have read so far.
Interference isn't really an issue unless you're in an extremely heavy 2.4ghz noise environment. The Rf24 library takes care of error checking, resending and acknowledgements so you can be sure that all messages received are complete and error-free.