SK Pang Electronics PiCAN-M User Manual

SK Pang Electronics PiCAN-M User Manual

Openplotter / signal k
Hide thumbs Also See for PiCAN-M:

Advertisement

Quick Links

Product name
Model number
Manufacturer
PiCAN-M Rev B 3.0
PiCAN-M User Guide
OpenPlotter / Signal K
Installation Guide
September 2023
PiCAN-M with NMEA 0183 and NMEA 2000 Connection
RSP-PICAN-M
SK Pang Electronics Ltd
SK Pang Electronics Ltd Ó 2023
www.skpang.co.uk
1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PiCAN-M and is the answer not in the manual?

Questions and answers

Summary of Contents for SK Pang Electronics PiCAN-M

  • Page 1 PiCAN-M Rev B 3.0 PiCAN-M User Guide OpenPlotter / Signal K Installation Guide September 2023 Product name PiCAN-M with NMEA 0183 and NMEA 2000 Connection Model number RSP-PICAN-M Manufacturer SK Pang Electronics Ltd SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 2: Table Of Contents

    PiCAN-M Rev B 3.0 Contents Table of Contents Introduction ......................1.1. Features ................................3 Hardware Installation ..................... 1.2. NMEA 2000 CAN-BUS Connection ......................4 1.3. NMEA 0183 (RS422) Connection ......................5 1.4. 120W Terminator ............................5 1.5. LED ..................................5 1.6. Switch Mode Power Supply (optional) ....................5 1.7. Qwiic (I2C) Connector J4 ..........................5 Software Installation ....................1.8. Installing CAN Utils ............................9 1.9. Bring Up the Interface ..........................9 Starting OpenPlotter .....................
  • Page 3: Introduction

    PiCAN-M Rev B 3.0 1. Introduction This is a PiCAN-M with NMEA 0183 and NMEA 2000 Connection. The NMEA 0183 (RS422) is via a 5 way screw terminal. The NMEA 2000 is via Micro-C connector. Extra sensors can be connected via the Qwiic (I2C) connector. Optional 3A SMPS. The 12v from the NMEA 2000 network can be use to power the PiCAN-M and the Raspberry Pi. Easy to install SocketCAN driver. Programming can be done in C or Python. 1.1. Features • CAN connection via Micro-C connector • 120Ω terminator ready • SocketCAN driver o appears as can0 to application • NMEA 0183 (RS422) via 5-way screw terminal o appears as ttyS0 to application • LED indicator (GPIO22) • Qwiic (I2C) connector for extra sensors • Optional 3A SMPS. • Compatible with OpenCPN and Signal K SK Pang Electronics Ltd Ó 2023...
  • Page 4: Hardware Installation

    PiCAN-M Rev B 3.0 2. Hardware Installation Before installing the board make sure the Raspberry is switched off. Carefully align the 40way connector on top of the Pi. Use spacer and screw (optional items) to secure the board. 1.2. NMEA 2000 CAN-BUS Connection The CAN-bus connections are made via J1 a 5 pin Micro-C connector. Function Shield +12v GND CAN_H CAN_L SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 5: Nmea 0183 (Rs422) Connection

    PiCAN-M Rev B 3.0 1.3. NMEA 0183 (RS422) Connection The NNEA 0183 (RS422) connection are made via J3 a 5way screw terminal. Function GND IN + IN - OUT - OUT + 1.4. 120 W Terminator There is a 120W resistor fitted to the board. To use the terminator solder a 2way header pin to JP1 then insert a jumper. 1.5. LED There is a red LED fitted to the board. This is connected to GPIO 22. 1.6. Switch Mode Power Supply (optional) This is an optional 5v 3A module that can power the Pi. It has an input voltage range of 7v to 24v. 1.7. Qwiic (I2C) Connector J4 J4 is a Qwiic (I2C) connector. The I2C bus can be use for extra sensors. SK Pang Electronics Ltd Ó 2023...
  • Page 6: Software Installation

    PiCAN-M Rev B 3.0 3. Software Installation If you want a simple installation of OpenPlotter / Signal K then use a pre-configure SD image instead. Download the 2023-08-04-OpenPlotter-v3-Starting-stable-64bit.img from: https://cloud.openmarine.net/s/mxrBi5K7zRj2gDq Download and install Raspberry Pi Imager. https://www.raspberrypi.org/software/ Put a SD card in a reader and start Raspberry Pi Imager. Click Choose OS. Then click Use custom. SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 7 PiCAN-M Rev B 3.0 Select the zip file you have just downloaded and click CHOOSE SD CARD. Select your SD card and click WRITE. Once the SD card write has finished remove it from your PC and insert into the Raspberry Pi and power up. SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 8 PiCAN-M Rev B 3.0 The first boot will take some time. You should then see a screen like this: Start a Terminal and type in: sudo apt-get update sudo apt-get upgrade sudo reboot Next we need to add entries to config.txt Start a new terminal and add the overlays by: sudo nano /boot/config.txt Add these lines to the end of file: enable_uart=1 dtparam=i2c_arm=on dtparam=spi=on dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25 Press CTRL-x to save and exit. SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 9: Installing Can Utils

    PiCAN-M Rev B 3.0 Next we need to configure the UART by starting Raspberry Pi Coniguration: Click Interfaces tab and slide Serial Console: to off Click OK and reboot the Pi. 1.8. Installing CAN Utils Start a new terminal and install the CAN utils by: sudo apt-get install can-utils 1.9. Bring Up the Interface You can now bring the CAN interface up with CAN 2.0B at 250kbps: sudo /sbin/ip link set can0 up type can bitrate 250000 SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 10 PiCAN-M Rev B 3.0 Connect a NMEA 2000 device to the network and start candump. candump can0 You should see something like this: This capture is from a Yacht Devices Digital Thermometer NMEA 2000 YDTC-13N To automatically bring up can0 at boot up we need to edit the interface by typing in: sudo nano /etc/network/interfaces Add these lines to the end of file: SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 11: Starting Openplotter

    PiCAN-M Rev B 3.0 auto can0 iface can0 inet manual pre-up /sbin/ip link set can0 type can bitrate 250000 up /sbin/ifconfig can0 up down /sbin/ifconfig can0 down Press CTRL-x to save then exit. Reboot Pi. 4. Starting OpenPlotter Once the Raspberry Pi has booted up you should see a screen like this: 1.10. Configure GPS NMEA 0183 (RS422) The NMEA 01832 (RS422) is connect to the Pi on UART port. This need to be enable first. Connect a NMEA 0183 GPS device to the 5 way green terminal plug like shown...
  • Page 12 PiCAN-M Rev B 3.0 Select ttyS0 Enter gps as alias Select NMEA 0183 as data Click Apply Wait until the changes has been applied. Then click Connections tab: SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 13 PiCAN-M Rev B 3.0 Select Connections Click Add to Signal K Select Baud Rate Click AUTO. Wait until Signal K sever restart and it should look like this: Now start OpenCPN: SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 14 PiCAN-M Rev B 3.0 Start OpenCPN Click Options Click Connections Click Add Connections Next configure the new connections: Select Serial SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 15 PiCAN-M Rev B 3.0 Select ttyS0 Click Apply This will take you back to the main Options dialogue box: 1. Click check box to bring up debug window 2. This will show the raw gps data received 3. Click check box again to remove debug window 4. Click Apply Sometimes this does not work. If this is the case close OpenCPN go back to the Serial dialogue box: 1. Select ttyS0 2. Click Remove The close the Serial dialogue box and open it again. You should see: SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 16: Configure I2C For Bme280 Sensor

    PiCAN-M Rev B 3.0 Start OpenCPN again, you should then see: 1. GPS lock 2. Click Dashboard 1.11. Configure I2C for BME280 Sensor The Sparkfun BME280 sensor can provide barometric pressure, humidity, and temperature to the Raspberry Pi. Now we need to install driver: SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 17 PiCAN-M Rev B 3.0 1. Click OpenPlotter 2. Click Settings Now install the I2C Sensors: 1. Click Refresh 2. Select I2C Sensors 3. Click Install, then yes. Wait until install is finished. Now start the I2C dialogue box: SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 18 PiCAN-M Rev B 3.0 1. Click Approve. This will bring up Signal K. 1. Type in admin 2. Type in 1234 SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 19 PiCAN-M Rev B 3.0 3. Click Enable On the Signal K webpage: 1. Click and select OpenPlotter I2C. 2. Type in NEVER. 3. Select Read/Write. 4. Click Approve. Now configure the BME280 sensor: 1. Click Add SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 20 PiCAN-M Rev B 3.0 2. Select BME280 3. Select 0x77 4. Click OK Now we need to add the missing temperature reading: 1. Select temperature 2. Click Edit 3. Click Edit Now add the temperature key: 1. Select environment 2. Select inside.temperature 3. Click OK 4. Click OK SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 21 PiCAN-M Rev B 3.0 Now open Signal K Dashboards: Now open Instrument Panel: 1. Select Instrument Panel 2. Click Open SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 22 PiCAN-M Rev B 3.0 In Signal K open Customise Display (spanner symbol) : 1. Click Spanner Now configure the signals: 1. Click Show on grid 2. Click Edit 3. Select unit to suit 4. Click Done. Repeat for all 3 readings 5. Click eye symbol Now you should see all 3 readings on the panel: SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 23: Configure Nema 2000

    PiCAN-M Rev B 3.0 1.12. Configure NEMA 2000 We will a wind speed sensor and a temperature sensor from Yacht Devices Digital Thermometer NMEA 2000 YDTC-13N. 1. Click OpenPlotter 2. Click CAN Bus Now configure CAN bus: SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 24 PiCAN-M Rev B 3.0 1. Click MCP2515 2. Select SPI0 CE0 3. Click Add Connection Wait for Signal K to restart. Check CAN-bus traffic: 1. Select SPI0 CE0 2. Click Check device traffic 3. Check there are CAN-bus traffice If you see CAN-bus traffic that means the board has been configure correctly. Close candump. SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...
  • Page 25 PiCAN-M Rev B 3.0 Open Signal K Instrument Panel and you should see the NMEA 2000 devices. Configure the units as required. SK Pang Electronics Ltd Ó 2023 www.skpang.co.uk...

Table of Contents