Forums

CAN1 to CAN2 interfacing olimex LPC2129

Started by zied130187 January 4, 2011
hello,

i want to interface the port CAN1(DB9) to port CAN2(DB9) in my kit olimex P2129.

thank you to give the number of pins to connect

An Engineer's Guide to the LPC2100 Series

Hi,

you have to connect pins 2 and 7, but note that you will probably have to terminate the connections on each end with 120Ohm resistors (if I remember correctly) - or in this case as I see in the schematics for this board you just put on the JP1 and JP2 jumpers and the connection should be terminated.

Re, Uros

--- In l..., "zied130187" wrote:
>
> hello,
>
> i want to interface the port CAN1(DB9) to port CAN2(DB9) in my kit olimex P2129.
>
> thank you to give the number of pins to connect
>

hi,

i must to connect pin 2 to pin 2 and pin 7 to pin 7, ok.

i need to connect pin 3 to pin 3 for CAN ground ?
and i have 2 resistors JP1 for R1 CAN1 and JP2 for R2 CAN2, i need to let one resistor ?

thank you for your helpfullness

On Tue, 2011-01-04 at 10:24 +0000, zied130187 wrote:
> hi,
>
> i must to connect pin 2 to pin 2 and pin 7 to pin 7, ok.

Yes, connect can-high to can-high and can-low to can-low.
> i need to connect pin 3 to pin 3 for CAN ground ?

Looking at the schematic and the pictures on the Olimex
website shows me that R16 and R19 are optional and not
populated on the pcb. Is that the same for your pcb ?
So connecting pin3 to pin3 is useless. And the drivers
are on the same pcb and +5V power supply rail anyway.
> and i have 2 resistors JP1 for R1 CAN1 and JP2 for R2 CAN2,
> i need to let one resistor ?

Look at the CAN specification which you can find with
Google on the internet. The bus needs to be terminated at
both ends with 120 Ohm resistors. Just like Uros wrote.

roelof

hi roelof !

in my kit i found the place of R16 and R19

but the resistors is not welded !!

please give me a solution ! i must connect ground CAN1 to ground CAN2

or what i need to do ?

Hi Zied,

On Tue, 2011-01-04 at 14:17 +0000, zied130187 wrote:
> in my kit i found the place of R16 and R19
> but the resistors is not welded !!

Just like the picture on the Olimex website ;-)
> please give me a solution !

Already did that.
> i must connect ground CAN1
> to ground CAN2 or what i need to do ?

Assuming you are still trying to connect CAN1 and CAN2
together which are on the same PCB, you do not need to
connect can1-pin3 to can2-pin3.
Anyway, like I wrote before, it is useless because the
CAN drivers use the same power supply rail.

roelof

> Assuming you are still trying to connect CAN1 and CAN2
> together which are on the same PCB, you do not need to
> connect can1-pin3 to can2-pin3.
> Anyway, like I wrote before, it is useless because the
> CAN drivers use the same power supply rail.
>
> roelof
>

hello roelof,

i don't understand why it is useless to connect CAN1 ground to CAN2 ground and all in the ground of kit.

because when i test the connection between pin 3 of port CAN and ground i found the pin 3 is not connected to ground.

On Tue, 2011-01-04 at 14:49 +0000, zied130187 wrote:
> hello roelof,
>
> i don't understand why it is useless to connect CAN1
> ground to CAN2 ground and all in the ground of kit.
>
> because when i test the connection between pin 3 of
> port CAN and ground i found the pin 3 is not connected
> to ground.

Zied,

Ok, don't be offended : what education did you have to
not be able to read a schematic ?
(I know it is an Olimex drawn schematic which could be
done MUCH better !)
You confirmed that two resistors are not populated on
your PCB. And that is also why there is no continuity
between pin3 and ground or the other pin3.

The schematic shows you that pin3 of either CAN connector
needs a link to ground for it to be functional.
The schematic also tels you that R16 and R19 are optional
that's what "opt" stands for.

There is no direct need to connect the two pin's 3 together
because the drivers, which connect to the subd9 connectors,
are on the same PCB and on the same power supply rail.
Therefore they share the same ground !

If you have a closer look at the PCB you will see that R16
and R19 connect to the ground polygon which is gnd in the
schematic. Check the polygon if you will for continuity to
ground.

If you have two SEPARATE boards with a, say 10 meter, cable
connecting CAN1 to CAN1 and those boards are on there OWN
power supplies and nothing else is connected to these boards
that could connect the grounds together THEN you will need
to connect can1-pin3 of the first board to can1-pin3 of the
second board. With the appropriate 0 Ohm resistor (R19) installed.

roelof

--- In l..., "zied130187" wrote:
> > Assuming you are still trying to connect CAN1 and CAN2
> > together which are on the same PCB, you do not need to
> > connect can1-pin3 to can2-pin3.
> > Anyway, like I wrote before, it is useless because the
> > CAN drivers use the same power supply rail.
> >
> > roelof
> > hello roelof,
>
> i don't understand why it is useless to connect CAN1 ground to CAN2 ground and all in the ground of kit.
>
> because when i test the connection between pin 3 of port CAN and ground i found the pin 3 is not connected to ground.
>

The CAN bus is of a differential configuration and the ground connection is not required. In fact, I see no reason to make any connection to pin 3.

If you decide to connect pin 3, you have to install the resistor and, for that, you have to decide on a value. If you had two boards and you wanted to create ground loops (and you don't), you would use a low value resistor. If you just wanted to connect the pins anyway, a high value would be as useless as anything else.

JP1 and JP2 should be installed such that the bus is terminated on each end. In any event, regardless of the number of nodes, there needs to be a terminating resistor on each end of the bus and none in the middle.

The driver chip is designed to drive a minimum 45 ohm bus and this includes the 60 ohms of parallel termination resistors. The remaining bus load allotment is assumed to be the input impedance of the various transceivers along the bus.

Notice that the Olimex pinout on the DB9 connectors makes no accomodation for grounding the cable shields. Then again, it is common to use unshielded cable so grounding isn't required.

Richard