1
\$\begingroup\$

I have a CAN SYSTEM with a M12 5pin male plug that acts as a sensor processor. It runs on 12 volt. I am trying to feed this system with a Raspberry Pi B system using this CAN BUS board: http://bit.ly/1ZGsf2E.

I have found that the M12 having this pinout:

enter image description here

The Raspberry has a DB9 connector with I think this pin-out:

enter image description here

If I measure the voltage on the m12 plug using pin 3 as a ground I get 2.5V on in 4 and 0.05 volt on pin 5 and 9 volt on pin 2.

I am wondering if I am doing the right thing to connect the the DB9 connector the CAN_H and CAN_L together, the CAN_GRND and the Pin9 from the DB9 (CAN_V+) with Pin 2 CAN_V+ on the M12. I am asking myself if I will run into problems because the Pi runs on 5V and the CAN Processor on 12V. Also if the two are actually compatible since I have many more available pins on the DB9 side.

\$\endgroup\$

2 Answers 2

4
\$\begingroup\$

To expand on Marko's answer, you should connect the CAN_GND, CAN_H, and CAN_L signals on your DE-9 connector to the matching inputs on the M12 connector. If you don't have galvanic isolation on the CAN bus shield, you can also safely connect the GND pin on the DE-9 connector to CAN_GND without breaking anything if you wish.

You should not connect the CAN_V+ signals to each other, since the CAN bus shield documentation does not make it clear if it can accept power on the CAN_V+ pin, especially not at 9V.

The CAN bus only depends on the bus lines (CAN_H and CAN_L) and the grounds (CAN_GND) being connected -- the nodes do not need to share a common power power rail. You may want to measure the voltage on the DB9 CAN_V+ pin to determine if it provides its own 5V rail for its transceiver, or if it needs 5V to be supplied externally.

\$\endgroup\$
0
\$\begingroup\$

CAN_H goes to CAN_H, CAN_L goes to CAN_L, CAN_GND goes to CAN_GND.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.