Go Down

Topic: aux cable and i2c (Read 391 times) previous topic - next topic

LandonW

hey guys quick question, I was thinking about using a stereo aux cable (1/8"  3 channel) for power and data transmission. Ground would not be needed in the cable because I was planning on using chassis ground.   

5vdc on one channel, SCL on another, and SDA on the last.  any recommendations on what channel should be used for what.

avr_fred

To quote the urban dictionary, fugetaboutit. Not gonna work, either.

Ground, SCL and SDA over a foot or so might work but don't expect any distance out of I2C, it wasn't designed for it. How far do you need? Stronger pull-ups help but there's a limit.

LandonW

I wasn't planning on going any further than 3 feet

terryking228

Hi,
Regular 0.1 inch spacing cables are easy to find/use. Like this:



and that plugs right into some common devices, like LCD displays



and the 4-pin I2C connector on some Arduino derivatives (lower right here)

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

LandonW

cool thank you, but is it in one cable? would I have to use heat shrink to keep it in one bundle? I was partially looking for ease of installation with the aux

Wawa

I always use Cat-5 or Cat-6 ethernet cable for I2C.
Should do 5meters distance if you do it right.

One pair for SCL/GND, one pair for SDA/GND, two pairs left for power/ground.
Don't rely on chassis ground.
Leo..

LandonW

do you have a link for the female part of the Ethernet? something inexpensive but decent quality

Wawa

do you have a link for the female part of the Ethernet? something inexpensive but decent quality
Just cut a piece of ethernet cable to the length you need, and solder both ends to whatever you're making.
Using RJ-45 sockets and a standard 1meter ethernet cable might be confusing.
Google "RJ-45" if you want to go that road.
Leo..

avr_fred

You can use pre-made cables to test, confirm pairs by checking colors of insulation in the end of the connectors if you can. Then add:

https://www.sparkfun.com/products/716
And
https://www.sparkfun.com/products/643

Use 0.100 header pins to DuPont wires for test, solder as per Wawa's instructions for permanent installation.

LandonW

Just cut a piece of ethernet cable to the length you need, and solder both ends to whatever you're making.
Using RJ-45 sockets and a standard 1meter ethernet cable might be confusing.
Google "RJ-45" if you want to go that road.
Leo..
I would rather not straight solder that because it limits me in mounting different parts of my project as far as fishing wire through holes in a fire wall or things of that nature.

I imagine USB would be a good option too, however, not as many options as the Ethernet with the two extra wires.

allanhurst

If you want to send fast signals any distance you need balanced transmission line stuff - eg RS422.

But for 3 feet you might get away with it, so long as the data rate is slow.

I2C is for what it says - inter-IC comms  on a board.

Allan

LandonW

For this particular project the i2c is for masterWrite. Just using it for a 7 segment display.

I think I've read somewhere that i2c can go up to 45 feet with 100+ sensors/displays on the same bus...

avr_fred

Quote
think I've read somewhere that i2c can go up to 45 feet with 100+ sensors/displays on the same bus...
You think? And I can find a website that says man never landed on the moon...

Educate yourself, its free!  https://www.i2c-bus.org/specification/

I2C is unsuited for automotive communication beyond a few feet at best. There is a limit to what you can do when using a screwdriver in place of a pry bar or chisel.


MarkT

hey guys quick question, I was thinking about using a stereo aux cable (1/8"  3 channel) for power and data transmission.
I have no idea what cable you mean.  Audio cables are usually mono or stereo (2 channel).  What is 1/8"?
the cable? the connector? (never heard of that as an audio connector size, 2.5mm, 3.5mm, 1/4" yes, but not 1/8").

For power transmission the key thing is how much copper is in the cable, ie what is its resistance and
max safe current handling - this would never be a consideration in an audio cable anyway.

If your cable only has +5V and signals, it cannot transmit power, since you need +5V and GND for that.

Most audio connectors short out their connections during plug insertion and withdrawal, making them
completely unsuitable for any power transmission in the first place.

[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

LandonW

@MarkT.  3.5mm cable and connection. And by 3 channel I meant there are three sections on the tips.  I'm curious to why a chassis ground won't work? The master is hooked to chassis ground which in turn is hooked to batt negative (12vdc)

@avr_fred I will look over that info asap thank you for your response. However, a quick google search of "i2c distance" says 100meters along with what I've read in more than one Arduino book. I'm sure that's in a perfect world but like I said I'm only going 3feet for this project. That's about 1% of the "perfect world" situation of upto 100m.   Also I'm all for people landing on the moon and believe it happened but if you weren't there then you really can't say 100% that it happened.

Again guys I'm here to learn, thank you for all the help. I have almost no background in electronics, just a good imagination and a relative understanding on how most things work.

Go Up