| Electronics > Projects, Designs, and Technical Stuff |
| Custom CAN-FD PCB - what to watch out for? |
| (1/2) > >> |
| towe96:
I'm designing a PCB which will communicate with a vehicle through CAN-FD at up to 2 Mbit/s. The connection to the vehicle is made though ordinary twisted-paid CAN wire (around 2m) to a Mini Universal MATE-N-LOK connector on the board. From there, it's approximately 15mm of 8 mil trace to the MCP2558FD CAN-FD tranciever, and approx. 6mm of trace to the termination resistors and decoupling capacitors. The Teensy 4.0 I use for controlling this has an integrated CAN controller, but it's only available through SMD pads on the bottom side of the PCB. (https://www.pjrc.com/teensy/pinout.html) Therefore, I soldered a short wire to those pads (~20-30mm) and plan on then soldering the wires to a hole in the PCB near the CAN transceiver (around 12mm of trace for the TX line, 5mm of trace for the RX line). Do I need to consider anything special here? It's my first "high-speed" signal application. Does the length / impedance of the CAN-FD traces on the board (between transceiver / connector) matter? Would the MATE-N-LOK connector be an issue? Is 2m of "external" CAN wire too much for signal quality? For now, the Teensy will only listen to messages on the bus, without receiving anything (using the MCP2558FD's "silent" mode), but I'd like to be able to send data in the future. Is it a reasonable idea to transmit the 2 MBit/s UART (between Teensy / transceiver) through external wires? Other options (pogo pins (low availability), castellated holes (SMD components on the bottom side of the Teensy), SMD headers (different height compared to THT headers)) seemed suboptimal as well. Could I route other signals (in this case, current signals up to around 30 mA) on the other side of the PCB, or must I retain an uninterrupted ground plane there? |
| Dave:
The CAN bus is designed to be incredibly robust and be able to handle large amounts of crap being thrown its way. You'd be surprised how bad things need to get in order for data to be corrupted on the bus. As long as you insure that both ends of the twisted pair are properly terminated, you have nothing to worry about at 2Mbps. |
| towe96:
That sounds great. I'd read about a maximum stub length of around ~0.3 online, which I would clearly surpass. But since I'm only reading data (for now), I guess that won't matter too much - as long as my tranceiver still sees the correct levels. Would it be better to wire it as not-a-stub? I'm connecting the 2m cable (to the PCB) between the original control unit and its original connector (using another original connector and a cannibalized control unit). I was just going to use a T-Junction towards the PCB; meaning around 20 cm increase in bus length to the control unit, and a 2m stub. I could, of course, also bring the entire bus to the connector on my PCB and then back again (no / 10 cm stub, but a 4m increase in bus length to the real control unit. |
| Dave:
I might have misunderstood you. You're saying that the whole 2m twisted pair is going to be unterminated at the end? Yes, that might pose problems with communication. It doesn't have to do with whether you're sending or receiving, but with signals reflecting off the unterminated end and interfering when they get back. If you can't properly terminate the wire you're connecting to the vehicle, it would be better to have your CAN-USB interface right next to that connector and just run a longer USB cable to your computer. |
| towe96:
Sorry for the confusion - with the stub option, I of course planned to terminate the stub at my PCB, with 120 Ohms as outlined in the MCP2558FD's datasheet. Should I use split termination? 60 Ohm + 60 Ohm with 4.7 nF to ground? |
| Navigation |
| Message Index |
| Next page |