Site Information

 Loading... Please wait...

Blog

How to Wire NMEA 2000 with the PICAN-M Raspberry Pi HAT and Power It Using the Onboard SMPS

Posted by Wilfried Voss on

PICAN-M - NMEA 0183 & NMEA 2000 HAT For Raspberry Pi With SMPSThe PICAN-M is a marine-grade Raspberry Pi HAT that brings both NMEA 0183 and NMEA 2000 connectivity to your Pi, with the added convenience of an onboard 3 A SMPS (Switch-Mode Power Supply) for powering the Pi itself. This makes it ideal for embedded marine systems using platforms like OpenPlotter or Signal K.

In this post, we'll detail the wiring for both NMEA standards and explain how to take advantage of the SMPS to power your Pi from your boat’s 12 V system.


1. Mounting the Board

  • Power off your Raspberry Pi and align the 40-pin header of the PICAN-M HAT onto the Pi’s GPIO header.

  • Secure it using the included standoffs and screws for a snug installation.


2. Wiring NMEA 2000 (CAN bus)

The NMEA 2000 interface uses a Micro-C connector (J1) carrying CAN bus signals and 12 V power. Here's the pinout:

  • Pin 1: Shield

  • Pin 2: +12 V

  • Pin 3: GND

  • Pin 4: CAN_H

  • Pin 5: CAN_L

Steps:

  1. Use a drop cable from your NMEA 2000 backbone to the PICAN-M’s Micro-C connector.

  2. Ensure the backbone is properly terminated (typically 120 Ω at each end).

    • PICAN-M includes a 120 Ω terminator—to use it, solder a 2-way header at JP1 and insert a jumper.

  3. With the optional SMPS version, this same 12 V input can power both the HAT and your Raspberry Pi (details below).


3. Wiring NMEA 0183 (RS-422)

For legacy or alternate sensor connections:

  • Use the 5-way screw terminal (J3).

  • It appears as /dev/ttyS0 on your Pi.

Typical pin mapping:

Terminal Position Signal
IN – (or GND) Ground or RS-422 negative
IN + RS-422 positive input
OUT – RS-422 negative output
OUT + RS-422 positive output
GND Ground reference (sometimes shared with IN–)

Always match your device’s wiring to these terminals.

See also our post: Testing NMEA 0183 For The PICAN-M - NMEA 0183 & NMEA 2000 HAT For Raspberry Pi...


4. Getting the CAN Interface Going

After wiring NMEA 2000:

  1. Boot up the Pi.

  2. In /boot/config.txt, enable required overlays:

    dtparam=i2c_arm=on dtparam=spi=on dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25 dtoverlay=spi-bcm2835-overlay
  3. Reboot, install CAN utilities, and bring up the interface:

    sudo apt-get install can-utils sudo ip link set can0 up type can bitrate 250000 candump can0

    You should now see NMEA 2000 traffic flowing.


5. Powering via the Onboard SMPS

One of the most useful features of the HAT version with SMPS is built-in power conversion:

  • The 3 A SMPS steps down the incoming 12 V from NMEA 2000 to the 5 V required by the Raspberry Pi and the HAT.

  • This lets your entire system run off the common marine electrical system without needing a separate 5 V adapter.

Note and Caveat:
Some users have reported that powering over the NMEA bus may exceed current specifications for the network, causing potential issues. One workaround is to physically cut the power line to the SMPS and use an external 12 V supply instead.


6. Optional: Qwiic Connector and LED Indicator

  • Qwiic (I²C) port (J4) provides an easy way to connect additional sensors like a BME280—it uses I²C, great for adding environmental data.

  • A status LED tied to GPIO 22 lights up to indicate activity.


7. Summary Table

Interface Connector Function/Details
NMEA 2000 Micro-C J1 CAN bus, power in (12 V), termination via JP1
NMEA 0183 5-way screw J3 RS-422 serial (appears as /dev/ttyS0)
Power (SMPS) From Micro-C 12 V Converts to 5 V to power Pi + HAT (~3 A)
I²C (Qwiic) J4 Connect environmental sensors (e.g., BME280)
LED Indicator GPIO 22 System activity/status light indicator

Conclusion

The PICAN-M with SMPS transforms a Raspberry Pi into a powerful marine data gateway, merging NMEA 0183 and NMEA 2000 connectivity under one platform—with a clean power solution. Proper wiring ensures reliable data flow, while the SMPS simplifies power logistics—just watch your NMEA network load! More information...


Marine Electrical and Electronics BibleMarine Electrical and Electronics Bible: Fully Updated, with New Information on Batteries, Charging Systems, Wiring, Lightning and Corrosion ... GMDSS, GSP, Rada and Much More...

More and more boaters are outfitting their vessels with advanced electronic and electrical devices—but few truly understand the correct installation methods or how to safely troubleshoot when something goes wrong.

This comprehensive handbook is your all-in-one resource for mastering marine electrical and electronic systems. Written as a clear, practical, and highly accessible guide, it walks you step-by-step through selecting, installing, maintaining, and troubleshooting every major onboard system.

In this fully updated edition, you’ll find expert coverage of battery capacity and charging systems, safe and efficient wiring practices, lightning and corrosion protection, as well as in-depth guidance on radar, autopilots, VHF and SSB radios, short-wave communications, GMDSS, GPS, EPIRBs, and much more.

Packed with hundreds of charts, wiring diagrams, and graphs, this book turns complex technology into knowledge you can confidently apply aboard your own boat—keeping you powered, connected, and safe on the water. More information...