PiCAN2 CAN Bus HAT for Raspberry Pi - Getting Access To The 40-pin GPIO Header
In the past, we had received a number of inquiries regarding the PiCAN2's 40-pin GPIO header, which is designed in a way that it prohibits access to unused GPIOs. Besides the power supply, the PiCAN2 board (one CAN port) itself uses only 6 signals, while the remaining signals cannot be accessed when the board is mounted directly onto the Raspberry Pi board.
The PiCAN2 board was designed with cost-savings in mind, which explains the type of 40-pin connector involved. The assumption also was that the PiCAN2 would always have to be on top of the stack of HATs. However, if you are not using further HATs and require access to, for instance, the COM0 port (UART Rx, Tx), you need to rethink your strategy.
There are a few things you can do to gain access to the remaining pins, and they all use this part:
You could use this 40-pin connector in combination with a PCB prototyping board to get access to the COM port, or you use it as an extension and solder wires to the pins you need. Alternatively, you could remove the PiCAN2’s 40-pin connector and replace it with the one referenced above. I have done this in the past (see image above), and if you are careful while soldering, there shouldn’t be any problems.
This solution applies to all PiCAN CAN Bus boards we offer.
For more information on the Raspberry Pi's 40-pin GPIO header, see: