Skip to the content
2 layers87.3 × 28.3 mmNMEA2000Shunt, the printed circuit board in 3D

NMEA2000Shunt

ieb/NMEA2000Shunt

NMEA2000 Shunt for measuring current, voltage, temperature based on a INA219.

Size
87.3 × 28.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
26
Nets
26
Pads
100
Tracks, vias
261, 12
Pours
6
Routed
Yes
KiCad
KiCad 4
Created
4 May 2023
Updated
9 Sep 2023

Overview

NMEA2000Shunt is an open-source printed circuit board by ieb, from the ieb/NMEA2000Shunt repository on GitHub. It is a 2-layer board of 87.3 × 28.3 mm with 26 parts on 26 nets, routed with 261 tracks and 12 vias.

It is built around the ATTINY3224-SSU, MCP2515-I and TJA1050. Its parts include 9 capacitors, 5 resistors, 5 ICs, 4 connectors and 1 diode. It belongs with the AVR (ATmega, ATtiny) boards of this library.

Main components

3

README

README.md

Nmea2000 Battery Sensor.

Mk1 used the ADC on an Attiny3224. Fine for voltage but not really accurate enough for low levels of current on a 75mV 100A shunt.

This version is built arround a INA219 which is far easier to use. It speaks CAN to communicate with a NMEA2000 bus.

A BLE version was created, but in the end I felt it was overcomplicated and would need to deep sleep to avoid draining the battery.

A Modbus version was also created, but since it adds annother bus I decided to rebuild as a NMEA2000 device using the SmallNMEA2000 library that was used in the CanPressure sensor and EngineManagement modules. Both have been in service for 2 years with no issues.

megaTinyCore

This code needs megaTiny core 2.6.4 to work as there are some timing bugs that cause it to fail with the default platform IO 2.5.11 version. Upgrading is a pain as it requires installing a custom package. Installs from github fail as the layout of the source repo is wrong and missing files.

The hacky way is to install manually as its not possible to install from a git repo due to a bug in the pio code that parses versions numbers.

text
	cd ~/src
	git clone https://github.com/SpenceKonde/megaTinyCore.git
	cd megaTinyCore
	git co -b 2.6.4
	mkdir ~/.platformio/packages/framework-arduino-megaavr-megatinycore@2.6.4
	cd ~/.platformio/packages/framework-arduino-megaavr-megatinycore@2.6.4
	cat << EOF > .piopm
	{"type": "tool", "name": "framework-arduino-megaavr-megatinycore", "version": "2.6.4", "spec": {"owner": "platformio", "id": 11448, "name": "framework-arduino-megaavr-megatinycore", "requirements": null, "uri": null}}
	EOF
	cat << EOF > package.json
	{
	  "name": "framework-arduino-megaavr-megatinycore",
	  "version": "2.6.4",
	  "description": "Arduino Wiring-based Framework for Microchip tinyAVR 0-series and 1-series chips (megaTinyCore)",
	  "keywords": [
	    "framework",
	    "arduino",
	    "microchip",
	    "tinyAVR"
	  ],
	  "repository": {
	    "type": "git",
	    "url": "https://github.com/ieb/megaTinyCore"
	  }

Oled display

There is a i2c header but at this time the oled display was removed as it served minimal purpose and consumes more current.

LED status

normal operation is on for 250ms, off for 6s. Error states are indetified by a number of 250ms flashes followed by on for 3s off for 3s.

Key

  • ^ == short flash
  • -3s- == 3s on for 3s
  • 3s off for 3s.
  • Cycle repeats after 6s
flashescondition
^normal
^^ -3s-INA219 chip failure
^^^ -s3-Can bus not connected or failing to respond
^^^^^ -s3-Both Can and INA219 failing

ToDo

  • Basic implementation, with CAN.
  • Average current and voltage over time period, eg 30s
  • Test CAN using a CandelLite adapter.
  • Calibrate NTC sensors.
  • Add 1.3 inch Oled display
  • Implement current monitoring with auto scaling for different ranges using features of the INA219 Limited benefit see p21 Table 7
  • design and make box

Parts

26
QtyValueFootprintReferences
4100nFCapacitors_SMD:C_0805C104, C105, C107, C201
410KResistors_SMD:R_0805_HandSolderingR101, R103, R104, R105
310uFCapacitors_SMD:C_0805C103, C106, C206
222pFResistors_SMD:R_0603_HandSolderingC101, C102
1270RResistors_SMD:R_0805_HandSolderingR102
18MHzCrystals:Resonator-2pin_w10.0mm_h5.0mmX101
1ATTINY3224-SSHousings_SOIC:SOIC-14_3.9x8.7mm_Pitch1.27mmIC101
1BatteryConnect:bornier3K101
1CANConnect:bornier4P103
1INA219-moduleDivers:INA219ModuleU104
1LEDLEDs:LED_0805D101
1MCP2515Housings_SOIC:SOIC-18W_7.5x11.6mm_Pitch1.27mmU101
1NCP1117ST50T3GTO_SOT_Packages_SMD:SOT-223-3Lead_TabPin2U103
1OLEDPin_Headers:Pin_Header_Straight_1x04P105
1ProgPin_Headers:Pin_Header_Straight_1x05P102
1TJA1050Housings_SOIC:SOIC-8_3.9x4.9mm_Pitch1.27mmU102
1Temp1Pin_Headers:Pin_Header_Straight_1x02P101

Similar boards

  • 2 layers89.2 × 38.3 mmCanGNSS, the printed circuit board in 3D

    CanGNSS

    ieb/CanGNSS

    NMEA2000 GNSS device using Neo M8N receiver and attiny3224 MCU.

    22 parts
  • 2 layers66.4 × 28.1 mmCanPressure, the printed circuit board in 3D

    CanPressure

    ieb/CanPressure

    NMEA2000 Sensor based on ATTiny3224 for Pressure, Temperature, Humidity

    18 parts
  • 2 layers150 × 100 mmEngineManagementSimpleWithMosfets, the printed circuit board in 3D

    EngineManagementSimpleWithMosfets

    ieb/EngineManagement

    Replacement engine electronics for a Volvo Penta D2-40 and other MDI based engines.

    151 parts1
  • 2 layers56.7 × 25.4 mmBatteryMonitorATTiny3224, the printed circuit board in 3D

    BatteryMonitorATTiny3224

    ieb/BatterySensor

    A Modbus RTU Battery Current and Voltage sensor board based Attiny3224, MAX485, MAX9918 chips.

    24 parts1
  • 2 layers21.1 × 19.6 mmSoic14-bb, the printed circuit board in 3D

    Soic14-bb

    jaco-pixeldump/attiny-soic-14-barebone-breakout-board

    A compact, breadboard-friendly breakout adapter PCB for 14-pin SOIC Microchip ATtiny microcontrollers (such as ATtiny3224, ATtiny1624, ATtiny824, ATtiny424, as well as 1-series and 0-series parts like ATtiny1614…

    5 parts1MIT
  • 2 layers79 × 80 mmDiy esc, the printed circuit board in 3D

    Diy esc

    Siddharth2308/esc

    79 parts1
  • 2 layers93 × 93 mmAMN TopPcb, the printed circuit board in 3D

    AMN TopPcb

    hschack/ANM_TOP_PCB

    31 parts

Questions

How big is the NMEA2000Shunt PCB?

It measures 87.3 × 28.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the NMEA2000Shunt use?

26 parts, built around the ATTINY3224-SSU, MCP2515-I and TJA1050. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the NMEA2000Shunt KiCad files?

From the ieb/NMEA2000Shunt repository on GitHub, at the commit this page was made from: the board is pcb/NMEA2000Shunt.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the NMEA2000Shunt design in my own project?

Its repository states no licence, so its author keeps all rights: ask ieb before reusing the design.