That was the original goal but over the years it is appearing in a lot of unexpected places. I2C was designed before Arduino for simple onboard communications to peripheral chips. SPI is the same idea but much faster. Automotive adopted CAN many years ago, it is sound and reliable.
Cool. I only discovered it 1.5 years ago, because I wanted to drive some little DC motors for a kinetic sculpture I am developing. One of my professional backgrounds is in aerospace/industrial control systems, so I was amazed at what was available via Arduino for the home hobbyist, and its amazingly power for what it is. I can see that Arduino also has developed some level of professional industrial systems, to compete with the big boys. My ambitions are fairly limited for now (home use) but because of my engineering background and inventive instincts I tend to want to maybe go beyond what is easily available via Arduino. I cant speak highly enough of it, and I love the IDE systems and ease of coding (I had to learn their rudimentary CPP), as my background in SW is in BASIC and FORTRAN from 30 years ago. Its a ton of fun, and could easily take over your life you if let it!!!!
I came from a somewhat similar background. I remember when processors went past the 1 meg speed, what a day it was then when the 16 bit came out. Now we have 32 bit and 64 bit in the pipes for future.
I have adapted the Nano as my base, I am replacing my smart home with Nanon's and custom boards. I like the Nano form factor as it can be treated like a fancy chip and plugged into the board. There are about 130 relays (24V) wired back to a PC with interface boards. Most of the hardware is finished. It will be a 4 conductor cable with CAN and 24VDC. I expect about 12 nodes when finished. I plan on starting the changeover about November this year.
I2C will be fine over half a meter. Try it. Try 1m.
I have it working over 30m.
There are lots of topics here asking if I2C works over 'long' distances, where long means maybe 1m. I've yet to read anyone saying they tried 1m and it didn't work.
30m requires some effort, 1m should be fine.
Cool, I will try it and see what happens. Thanks!
Good, do come back and tell us what happened.
On a wider note, and perhaps showing a little frustration, these are the kinds of questions that are easily answered by just wiring it up and trying. Electronics is good for that, it's usually easy to try any circuit you can think of, and, if you keep to low (<25V) voltages the worst that happens is you fry some inexpensive components. I found out that I2C works over 30m because no one told me it wouldn't. Well, they did tell me that, but only long after I had it working perfectly.
Cool, I will report back. May be in another two or three weeks.
Steven Lightfoot
Quick update - its not much, but I am using my I2C now at 16 inches cable length, no issue. Its long enough for what I need today, but I am going to extend it further. I appreciated your comments.
I have a Mega setup with two PCA9685 chips at the other end of a ~12 feet wire, running 24/7 without issues. The wire is Cat-6, with CLK and SDA on separate pairs and pull up resistor pairs at both ends of the wire. The PCA9685 chips a Fast-mode+ I2C (4000pF/30mA), and maybe therefore it works.
Leo..
Is I2C not the same as Two-Wire/Three-Wire that Dallas Semiconductor makes so many devices for, that can be pretty remote from a controller in a greenhouse, barn, house or factory?
I don't know, possibly.
I only know one-wire sensors from Dallas, and they can go a long distance. Two-wire Dallas probably means data/ground, with parasitic power, and three-wire for power/data/ground. One example is the DS18B20 temp sensor.
Leo..
I would try without hesitation before posting.
If you cant make it work, as someone said, its not a twisted pair.
But I would try (in case of having a noisy signal) one cable for SDA with a twisted cable connected to ground and other cable for SCL also twisted with his own ground. 4 cables in total.
And then try connecting ground to boths ends, just to one end, or just to the other end.
or twisted with VCC.
Leo..
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.