
CanPressure
ieb/CanPressure
NMEA2000 Sensor based on ATTiny3224 for Pressure, Temperature, Humidity

NMEA2000 GNSS device using Neo M8N receiver and attiny3224 MCU.
CanGNSS is an open-source printed circuit board by ieb, from the ieb/CanGNSS repository on GitHub. It is a 2-layer board of 89.2 × 38.3 mm with 22 parts on 34 nets, routed with 179 tracks and 2 vias.
It is built around the ATTINY3224-SSU, MCP2515-I and TJA1050. Its parts include 9 capacitors, 5 ICs, 2 resistors, 2 diodes and 2 connectors. It belongs with the radio and wireless boards and the AVR (ATmega, ATtiny) boards of this library.
A NMEA2000 device to provide rapid position and COG SOG update as well as other GNSS information including satelite data.
Magnetic variation is calculated every 60s from WMN2020 World model coefficients.
Starts up, establishes CAN connectivity then reads UBX messages as they are produced and transfers them directly onto the NMEA200 bus. There is a monitoring UART that runs at 115200 which can be used to see log messages and reboot. Press h to get a menu. The WNM2020 model takes 63ms to calculate which is long enough for a standard 64 byte UART buffer to overflow. This code requires a patched megaTinyCode code base with a 256 byte UART buffer.
ANT
--------------------------------
| A B C D E |
| F |
| G |
| H |
| I |
| j k l m |
--------------------------------A +5v
B 0v
C UDPI
D RX Console
E TX Console
F 12V - CAN
G 0V
H CAN-L
I CAN-H
j 0v
k TX Ublox
l RX Ublox
m 5v Ublox
The MCU can program the device to its standard settings. press h to get the menu on the console. For more advanced settings u-center or pyGPSClient can be used, but first the MCU Uart connected to the Ublox module must be disabled.
Press u to disable the Uart, then without turning the device off, connect to the Ubloc TX and RX pins. The Uart will be re-enabled on reboot or power cycle.
I have found pyGPSClient to be much easier than u-center as Windows tends to grab the comp ports and GPS stream making it almost impossible to connect u-center. (tips welcome). So I use pyGPSClient on a Ubuntu VM running in OSX. First connect with screen to get the console
screen /dev/ttyUSB0 115200pres h to get the menu and u to disconnect the UART. The Ctrl-a + k to exit screen.
Then connect pyGPSClient to the ublox via a serial and reconfigure as required.
The satelite setup blow gives about 1m 3D accuracy without SBAS corrections, and slightly less once the SBAS corrections are received. Should probably write this into code.
CFG-GNSS also set in code
msgVer 0, mumTrkChHw 32 (read only), mumTrkChUse 32, numConfigBlocks 7
gnssId 0 (GPS), res 4, max 16, enable 1, mask 1 eg L1C/A 1,575.42MHz
gnssId 1 (SBAS), res 2, max 4, enable 1, mask 1 eg L1C/A 1,575.42MHz
gnssId 2 (Galileo), res 4, max 8, enable 1, mask 1 eg E1 1,575.42MHz
gnssId 3 (BelDou) disabled 0,0,0,0
gnssId 4 (IMESS) diabled 0,0,0,0
gnssId 5 (QZSS) res 1, max 1, enable 1 mask 1, L1C/A 1,575.42MHz
gnssId 6 (GLonas) res 2, max 5 enable 1, mask 1 L1
CFG-ITMF,ection Jamming det enabled on active antena, all else defaults.
CFG_NAV5 set modes to sea
CFG-SBAS as default enable 1 (ignored), test 0, range 1, diffCorr 1, integrety 0, maxSBAS 3
PRN 120, 123, 127-129, 133, 135-138
Also set in code
CFG_RATE Solution interval 200ms, measurement ratio 5, UTC.
NAV setup all off except
NAV-DOP 6
NAV-POSLLH 1
NAV-PVT 5
NAV-SAT 9
NAV-VELNED 2
The PCM is designed in KiCad (ancient version), and milled on a CNC miller. The attiny3224 is underneath the ublox module, which has a ground plane on the bottom layer.

| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | 10uF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C1, C103, C106, C107 |
| 3 | 100nF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C104, C105, C108 |
| 2 | 22pF | Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolder | C101, C102 |
| 2 | D | Diode_SMD:D_0805_2012Metric_Pad1.15x1.40mm_HandSolder | D1, D2 |
| 1 | 10K | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R101 |
| 1 | 16MHz | Crystal:Crystal_SMD_HC49-SD | X101 |
| 1 | 470R | Resistor_SMD:R_0805_2012Metric_Pad1.20x1.40mm_HandSolder | R102 |
| 1 | ATTINY3224-SS | Package_SO:SO-14_3.9x8.65mm_P1.27mm | IC101 |
| 1 | CAN | Connector_Wire:SolderWire-1.5sqmm_1x04_P6mm_D1.7mm_OD3mm | P103 |
| 1 | Debug | Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_Vertical | P101 |
| 1 | MCP2515 | Package_SO:SOIC-18W_7.5x11.6mm_P1.27mm | U101 |
| 1 | NCP1117ST50T3G | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U103 |
| 1 | Polyfuse_Small | Fuse:Fuse_1812_4532Metric_Pad1.30x3.40mm_HandSolder | F1 |
| 1 | TJA1050 | Package_SO:SO-8_3.9x4.9mm_P1.27mm | U102 |
| 1 | neo-m8n-module-mini | iebSpecials:neo-m8n-module-mini | U1 |
It measures 89.2 × 38.3 mm and has 2 copper layers, 1.6 mm thick.
22 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.
From the ieb/CanGNSS repository on GitHub, at the commit this page was made from: the board is pcb/CanGNSS.kicad_pcb and its schematic pcb/CanGNSS.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask ieb before reusing the design.

ieb/CanPressure
NMEA2000 Sensor based on ATTiny3224 for Pressure, Temperature, Humidity

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

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

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

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…

