CAN BUS protocol using MPC25625 with ARDUINO

Discussion in 'Digital Circuit Design' started by TNiroshan, Jun 6, 2018.

  1. TNiroshan

    Thread Starter New Member

    Jan 30, 2017
    3
    0
    Hi I'm planing to make a prototype to communicate using CAN BUS protocol with MPC25625 CAN controller with Integrated transceiver + arduino. I want to use a 12V CAN line to establish the communication because my two devices which are going to communicate will have nearly 350 meters. Please can someone give me a advice to design this system. Thank you.
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    18,436
    5,671
    Doesn't this help?
    Max.
     
  3. Papabravo

    Expert

    Feb 24, 2006
    12,195
    2,687
    Chose a baudrate of less than the maximum of 1MBps. Choose 125 Kbaud and you will have some cable length margin. Up to 500 meters worst case.
    Make sure the IR drop on the power distribution system does not deliver too low a voltage to the nodes that are far away from the power supply. Use AWG#16 wire for the power pair.
    MAKE ABSOLUTE CERTAIN SURE that the common mode GND difference between any two nodes does not exceed 5VDC
    Use an 82C251 transceiver or better for each node.
     
    TNiroshan likes this.
  4. dendad

    Distinguished Member

    Feb 20, 2016
    2,829
    764
    TNiroshan likes this.
  5. Papabravo

    Expert

    Feb 24, 2006
    12,195
    2,687
    This is not accurate. CAN is quasi differential with respect to a common ground. It is not RS-485!! All of the CAN transceivers must be referenced to a COMMON ground. Even if you have high speed optos on CAN_H & CAN_L you still need the common ground.
     
  6. dendad

    Distinguished Member

    Feb 20, 2016
    2,829
    764
    Have a look at the data sheet. These are in fact isolated CAN transceivers. The devices have internal power supplies to power the isolated side.
    They also have isolated RS485 and RS232 devices.
    The CAN signal is references to "gnd" on each side, it is just that each sides of the device are isolated from each other.
    I have used the RS485 just "plugged in" to an existing board, but with an inverter transistor on the T/R signal. They made it the wrong way up :(
    Other than that, they ]just work. On my boards I make provision for both isolated and "normal" drivers.
     
  7. Papabravo

    Expert

    Feb 24, 2006
    12,195
    2,687
    I was not aware of the isolated transceivers, but I don't think it solves the problem The GND's along a 500 m cable will be at a different potentials. Transmitter A will establish signal levels wrt to the GND at A, while the transceiver at B will establish a receive threshold with respect to the GND at B. How is there not a maximum differential voltage between points A and B?

    The CAN spec itself requires that the data signals be referenced to a common ground. The modules have a pin for GND but the examples don't show it being used. There is a drawing of it being used as a protective ground. These modules would then be useless for nodes that take their power from the network cable; is that correct?
     
    Last edited: Jun 7, 2018
  8. dendad

    Distinguished Member

    Feb 20, 2016
    2,829
    764
    I would go with this..
    CAN-fig4.jpg

    In a lot of data sheets I've seen the gnd left off.
    And years ago, our first RS485 network was wired that way. Well, lots of trouble ensued as it was in a wire mill. BIG motors starting up bounced local gnds all over the place and we had no end of network troubles.
    Running an interconnecting gnd between nodes fixed that. You often see RS485 regarded as a 2 wire network. I would say it is really a 3 wire network.
    I know this above story is RS485, but the same applies to CAN.
    The first diagrams in the data sheet do not include the gnd. That is not a real world application example in my opinion.

    I think if you want to power the units from the network cable, use dedicated power wires.
    And if there is significant voltage difference between ends of the cable, that needs to be resolved.
    Even so, if the end has a couple of volts difference, it probably applies to all the conductors, so the tranceiver at each end will still see the relative same volts.
    Try it and see if these help. They are not expensive.
     
    Last edited: Jun 8, 2018
  9. Papabravo

    Expert

    Feb 24, 2006
    12,195
    2,687
    If you look at archival datasheets for the 82C250 and the 82C251 you can see the dramatic improvement of the 2nd part over the first. The 82C250 would fail pretty miserably at about 600 m with 5V difference between the grounds at the ends. The bus was powered from a +24V supply and we guaranteed at least +11VDC at the opposite end.
     
Loading...