Searching \ for '[PIC]long distance I2C' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/i2cs.htm?key=i2c
Search entire site for: 'long distance I2C'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]long distance I2C'
2007\07\25@125048 by jtroxas

picon face
Are there easy ways to increase the distance range of PIC based I2C, say to
50-100 meters. speed is not nescessary.. will just be transmitting remote
sensor data.



2007\07\25@130225 by Michael Rigby-Jones

picon face

>-----Original Message-----
>From: spam_OUTpiclist-bouncesTakeThisOuTspammit.edu [.....piclist-bouncesKILLspamspam@spam@mit.edu]
>On Behalf Of jtroxas
>Sent: 25 July 2007 17:50
>To: piclistspamKILLspammit.edu
>Subject: [PIC]long distance I2C
>
>
>Are there easy ways to increase the distance range of PIC
>based I2C, say to
>50-100 meters. speed is not nescessary.. will just be
>transmitting remote
>sensor data.


There are buffers available for long distance I2C, with reduced bit rate.  Have a look at http://www.standardics.nxp.com/support/documents/i2c/pdf/an452.pdf

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2007\07\25@130806 by Bob Axtell

face picon face
jtroxas wrote:
> Are there easy ways to increase the distance range of PIC based I2C, say to
> 50-100 meters. speed is not nescessary.. will just be transmitting remote
> sensor data.
>
>
>
>  
The problem with that is that edges are critical to I2C, and after a few
meters, the edges become VERY soft.
RS232/RS485/RS422 would all work much better, RS422 being the best.

--Bob A

2007\07\25@131038 by wouter van ooijen

face picon face
> Are there easy ways to increase the distance range of PIC
> based I2C, say to
> 50-100 meters. speed is not nescessary.. will just be
> transmitting remote
> sensor data.

http://www.nxp.com/pip/P82B715PN.html

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu



2007\07\25@140520 by jtroxas

picon face
Sorry.. I forgot to mention the need to communicate between several
sensor/slaves.. wont it be too complicated to implrment it over rs-xxx...

"Bob Axtell" <.....engineerKILLspamspam.....cotse.net> wrote in message
news:EraseME46A78361.1010503spam_OUTspamTakeThisOuTcotse.net...
{Quote hidden}

> --

2007\07\25@142350 by jtroxas

picon face
thanks..
"jtroxas" <jtroxasspamspam_OUTgmail.com> wrote in message
news:f87v0n$2ia$@spam@1KILLspamspamsea.gmane.org...
> Are there easy ways to increase the distance range of PIC based I2C, say
> to 50-100 meters. speed is not nescessary.. will just be transmitting
> remote sensor data.
>
>
> --

2007\07\25@151214 by David VanHorn

picon face
On 7/25/07, jtroxas <KILLspamjtroxasKILLspamspamgmail.com> wrote:
> Sorry.. I forgot to mention the need to communicate between several
> sensor/slaves.. wont it be too complicated to implrment it over rs-xxx...

You can do ring networks with RS-232.
A talks to B, B talks to C, etc.
Everyone passes packets along unless they are "mine", then I act on
them, and pass results on.
Packets have a "time to live" that everyone decrements as they pass,
when it hits zero we drop the packet.

2007\07\25@152734 by Xiaofan Chen

face picon face
On 7/25/07, jtroxas <RemoveMEjtroxasTakeThisOuTspamgmail.com> wrote:
> Sorry.. I forgot to mention the need to communicate between several
> sensor/slaves.. wont it be too complicated to implrment it over rs-xxx...
>

I2C based sensor networks? Kind of strange. ;-)

You might be able to try CAN (DeviceNet, etc) or Profibus or RS-485
for better performance.

For simpler networks, I think ASi is popular. Omron has come
out a new one called CompoNet which is targeting simple sensors
in the industrial autoamtion market.

2007\07\25@155646 by wouter van ooijen

face picon face
> You can do ring networks with RS-232.
> A talks to B, B talks to C, etc.
> Everyone passes packets along unless they are "mine", then I
> act on them, and pass results on. Packets have a "time to
> live" that everyone decrements as they pass, when it hits
> zero we drop the packet.

I would prefer a 'signal regenerating' chain. A max232 happens to have
twice the number of TX/RX circuits needed for a basic interface!

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu



2007\07\25@161454 by David VanHorn

picon face
> I would prefer a 'signal regenerating' chain. A max232 happens to have
> twice the number of TX/RX circuits needed for a basic interface!

That's what I meant.  B gets the packet from A, and if it's not for
him, and the TTL isn't zero, he decrements the TTL and retransmits it
to C, and so on.  At each point the data goes
232-ttl-processor-ttl-232.  I would be nervous about it in
environments where the local "ground" could be quite different from
each other, and I would refrain from attaching to "earth ground"
except maybe at the master.

2007\07\25@170334 by novakd

picon face
I think I2C has a chance of working if you can control the edge rate
appropriately and maybe filter at each input.

David

2007\07\26@014543 by wouter van ooijen

face picon face
> > I would prefer a 'signal regenerating' chain. A max232
> happens to have
> > twice the number of TX/RX circuits needed for a basic interface!
>
> That's what I meant.  B gets the packet from A, and if it's
> not for him, and the TTL isn't zero, he decrements the TTL
> and retransmits it to C, and so on.  At each point the data
> goes 232-ttl-processor-ttl-232.

But that is not what I meant. I meant RS232 -> MAX232 -> resistor -+->
MAX232 -> RS232. By default the signal is regenerated. When the PIC
wants to transmit it makes it output active, which is connected to the
-+->.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu



2007\07\26@020305 by Zik Saleeba

face picon face
NXP has a range of I2C buffers which give "long distances, in the
range of kilometers, depending on the maximum bus speed".

http://www.standardics.nxp.com/products/i2chubs/

Cheers,
Zik

On 7/26/07, jtroxas <spamBeGonejtroxasspamBeGonespamgmail.com> wrote:
> Are there easy ways to increase the distance range of PIC based I2C, say to
> 50-100 meters. speed is not nescessary.. will just be transmitting remote
> sensor data.
>
>
>
> -

2007\07\26@035250 by Tomas Larsson

flavicon
face
Philips has some great application notes regarding long distance com with
I2C.
Somewhere I've seen a app note where the distance was 1000m or more, cnat
find it now though

With best regards

Tomas Larsson
Sweden
http://www.tlec.se
http://www.ebaman.com

Verus Amicus Est Tamquam Alter Idem

> {Original Message removed}

2007\07\26@095840 by David VanHorn

picon face
> But that is not what I meant. I meant RS232 -> MAX232 -> resistor -+->
> MAX232 -> RS232. By default the signal is regenerated. When the PIC
> wants to transmit it makes it output active, which is connected to the
> -+->.

I see.  Has the advantage that the proc dosen't have to re-transmit
the signal, but also the potential for timing to degrade as it goes
down the chain.  I'm thinking of the possibility that a given Max232
or whatever might not reproduce an input square wave's duty cycle
exactly, and chaining them would amplify that.   But maybe I worry too
much. :)

2007\07\26@115557 by wouter van ooijen

face picon face
> I see.  Has the advantage that the proc dosen't have to
> re-transmit the signal, but also the potential for timing to
> degrade as it goes down the chain.  I'm thinking of the
> possibility that a given Max232 or whatever might not
> reproduce an input square wave's duty cycle
> exactly, and chaining them would amplify that.   But maybe I worry too
> much. :)

Dunno, I have to admit that I never used this with RS232. I did make
this for a customer, using simple HC logic as buffers, which worked well
with chains of 50 (or maybe even 100) nodes, 1 meter between nodes. But
that used 18F819's on internal clock, so it did not use UART-style
protocol but something more timing-robuust.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu



2007\07\26@172039 by Dario Greggio

face picon face
jtroxas wrote:

> Sorry.. I forgot to mention the need to communicate between several
> sensor/slaves.. wont it be too complicated to implrment it over rs-xxx...

I know, but I2C not-differential, simply can't achieve that.

2007\07\26@172813 by Dario Greggio

face picon face
Tomas Larsson wrote:

> Philips has some great application notes regarding long distance com with
> I2C.
> Somewhere I've seen a app note where the distance was 1000m or more, cnat
> find it now though

In theory, slowing speed down to some 1KHz or even less, should do the
job... if you can afford it!

--
Ciao, Dario

2007\07\26@181930 by Tomas Larsson

flavicon
face
Apparantly the ran it at fairly high clockspeed.

The appnote AN444 talks about 300m at 100kbps, AN452 up to some 1800m with
reduced speed.
Both Appnotes is from Philips

AN444: Using the P82B715 I2C extender on long cables.
AN452: One mile long I2C communication using the P82B715.

With best regards

Tomas Larsson
Sweden
http://www.tlec.se
http://www.ebaman.com

Verus Amicus Est Tamquam Alter Idem

> {Original Message removed}

2007\07\31@115143 by alan smith

picon face
....too complicated.  Depends on your ability to implement it.  For some...yes...others....no.
 
 Look at your system level design.  You have a number of sensors, located near each other...push em to a single PIC and drive out serial.  If they are spread out all over the place, I2C may not be the best choice as others have said.
 
 Personal project or commercial proto?  That makes a difference on how things need to be designed as well

jtroxas <TakeThisOuTjtroxasEraseMEspamspam_OUTgmail.com> wrote:
 Sorry.. I forgot to mention the need to communicate between several
sensor/slaves.. wont it be too complicated to implrment it over rs-xxx...

"Bob Axtell" wrote in message
news:RemoveME46A78361.1010503spamTakeThisOuTcotse.net...
{Quote hidden}

> --


'[PIC]long distance I2C'
2007\08\04@180142 by jtroxas
picon face
Cant find any info on rs232 ring networks on the net..
But I thought of some idea about it..
When you talk about A talks to B and B talks to C.. Is it something like
this..
TXpin of A connected to RXpin of B
TXpin of B connected to RXpin of C
TXpin of C connected to RXpin of A
all Max232Chips sharing the same ground...

A only talks to B and B only talks to C and C to A..

so that when B wants to talk to A.. the data has to be passed like this..
B sends to C, C sends to A...
and A replies to B directly...

is this RS232 ring networking??

"David VanHorn" <microbrixEraseMEspam.....gmail.com> wrote in message
news:EraseME25b178740707251212u82b08c1qc3f875b99e77f475spammail.gmail.com...> > On 7/25/07, jtroxas <RemoveMEjtroxasEraseMEspamEraseMEgmail.com> wrote:
>> Sorry.. I forgot to mention the need to communicate between several
>> sensor/slaves.. wont it be too complicated to implrment it over rs-xxx...
>
> You can do ring networks with RS-232.
> A talks to B, B talks to C, etc.
> Everyone passes packets along unless they are "mine", then I act on
> them, and pass results on.
> Packets have a "time to live" that everyone decrements as they pass,
> when it hits zero we drop the packet.
> --

2007\08\04@203359 by Gerhard Fiedler

picon face
jtroxas wrote:

> Cant find any info on rs232 ring networks on the net..
> But I thought of some idea about it..
> When you talk about A talks to B and B talks to C.. Is it something like
> this..
> TXpin of A connected to RXpin of B
> TXpin of B connected to RXpin of C
> TXpin of C connected to RXpin of A
> all Max232Chips sharing the same ground...
>
> A only talks to B and B only talks to C and C to A..
>
> so that when B wants to talk to A.. the data has to be passed like this..
> B sends to C, C sends to A...
> and A replies to B directly...
>
> is this RS232 ring networking??

Sounds like it; it definitely could work if you can live with the delay
(and with the fact that the whole network is partially down when one node
is down).

But you could also use a RS485 network. All are on the same two wires, the
drivers can handle some ground differences, the only thing different from
RS232 that you need to do is implement some protocol so that everybody
knows when they may send. This is usually not too difficult. Typically a
master polls every slave regularly.

If you like the ring idea better but may have ground problems, you still
can use RS485 drivers with the ring topology.

Gerhard

2007\08\04@205058 by peter green

flavicon
face
Gerhard Fiedler wrote:
{Quote hidden}

IIRC they can handle some but not very much (about 12V or so for the
chip I looked at), If running RS-485 I'd certainly want a ground line
running alongside the data pair (maybe use both cores of a second pair
in a cat5 or similar cable).


2007\08\05@005309 by jtroxas

picon face
I was just wondering.. Can you also use a Max232 as some sort of rs232 range
extender???..
maybe looping the ttl tx/rx pins..
USART -> Max232 -> Max232(extend by another 50ft) -> Max232 -> USART..

loop signals....
RX1 -> rx1-out -> rx2-in -> RX2
TX1 -> tx1-out -> tx2-in -> TX2

"David VanHorn" <RemoveMEmicrobrixspam_OUTspamKILLspamgmail.com> wrote in message
news:RemoveME25b178740707260658g78d91018re70ad805b0a47ba2TakeThisOuTspamspammail.gmail.com...> {Quote hidden}

> --

2007\08\05@024823 by wouter van ooijen

face picon face
> Cant find any info on rs232 ring networks on the net..
> But I thought of some idea about it..
> When you talk about A talks to B and B talks to C.. Is it

That's a (token) ring network. All token ring theory applies. Token
rings were one of the standards before CSMA conquerered the world.

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu



2007\08\05@082119 by Carl Denk

flavicon
face
Why not just go RS-485?? There are relatively inexpensive converters
between RS-232 and RS-485. see:
http://www.bb-elec.com/productcat.asp?topLevelid=2. The RS-485 allows
many nodes.

jtroxas wrote:
{Quote hidden}

>> --

2007\08\05@110923 by jtroxas

picon face
I dont know and have no experience with RS-485..
Are there low cost PIC's with hardware RS-485.. or will I have to use PIC
USART and then some RS232 to 485 converter.. I have no Idea.. gues I have to
do alot of reading first.. And have no Idea where to start.. if I go 485 it
will be my first time.. and the success rate will be a little blurr.. At
first I thought I2c.. but now somebody gave me an idea on rs232 network.. so
I'm probably going the rs232 way.. at the moment rs-232 seems to meet the
requirements.. 50ft between devices and with a few devices will stretch it
to 100 meters.. I was just wondering if I could stretch it further than 50ft
between some of the devices if the need arises.. It will be used on a green
house with several sensors scattered for monitoring...
If I go with the signal regeneration thing(I dont really understand what he
means with the MAX232->Resistor-+>Max232 but It gave me an Idea of using the
2nd set of rx\tx pin on max232 to relay the signal to other devices and
operate PIC USART in unidirectional mode transmit/receive once at a time and
some loopbacking of ttl tx/rx signals and using some protection diodes and
resistor series in the loopback's ) instead of the ring network then there
be no signal delay or so I hope.... though it will no longer be a ring
network cause the devices will be connected in a single raw of 5 wire cable
including the ground wire.. where only one wire will signal at a time each
way of the node...

"Carl Denk" <cdenkSTOPspamspamspam_OUTalltel.net> wrote in message
news:spamBeGone46B5C182.6090709STOPspamspamEraseMEalltel.net...
{Quote hidden}

2007\08\05@124140 by Carl Denk

flavicon
face
For RS-232 one commonly uses a Maxim MAX232, for RS-485 that becomes a
Maxim MAX485. As for programming, data collisions must be avoided (2
transmits at the same time), which can be handles in many ways,
including one unit is the only master (sends requests, and waits for
reply), passing a token, where the holder of the token is the temporary
master.

And yes, you could use several RS-232 on one PIC, each needs it's own
set of pins, and if sticking to the lower pin count PICs, the have a
maximum of one UART built in, others must be bit banged (a software
timing hassle).

jtroxas wrote:
{Quote hidden}

2007\08\05@170506 by peter green

flavicon
face
Carl Denk wrote:
> Why not just go RS-485?? There are relatively inexpensive converters
> between RS-232 and RS-485. see:
> http://www.bb-elec.com/productcat.asp?topLevelid=2. The RS-485 allows
> many nodes.
>
> jtroxas wrote:
>  
Also consider RS-422, it requires two pairs and is only point to point
but you can use it to extend RS-232 without making any software or
hardware changes to the nodes. RS-485 requires the nodes to understand
the nature of a BUS network and requires the nodes to provide a transmit
enable line (RS-232 to RS-485 converters usually use one of the
handshake lines as a transmit control).

I think in many cases the same controller chips can be used for RS-422
and RS-485 and its just a matter of how you wire them.

2007\08\05@183345 by David VanHorn

picon face
On 8/5/07, jtroxas <TakeThisOuTjtroxasKILLspamspamspamgmail.com> wrote:
> I was just wondering.. Can you also use a Max232 as some sort of rs232 range
> extender???..
> maybe looping the ttl tx/rx pins..
> USART -> Max232 -> Max232(extend by another 50ft) -> Max232 -> USART..

It would reconstruct the levels, but it wouldn't know anything about
timing, and any induced glitches would also be passed on.  Basically
it's an answer for high capacitance cable.

2007\08\05@183520 by David VanHorn

picon face
> so that when B wants to talk to A.. the data has to be passed like this..
> B sends to C, C sends to A...
> and A replies to B directly...
>
> is this RS232 ring networking??

Yes.

Others have asked why not use 485 or 422, but sometimes what you have
is 232 devices, and converting them to 485/422 isn't possible or
practical, but recabling and putting new firmware in is.

More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...