GPS CAN Adapter

Introduction

Design

 

 

 

(PICTURE OF PCB HERE IN THE END, CAT FOR NOW)

image-20240514-011742.png

Members:

  • @Omar El-Sawy

Design Overview

The GPS CAN Adapter is as named, an adapter built for the GPS Sensor (MD9 https://holybro.com/collections/standard-gps-module/products/m9n-gps or MD10 https://holybro.com/collections/standard-gps-module/products/m10-gps ), 1 Primary, 1 Second. It involves converting UART to CAN with JST on both Ends, and vice versa using an STM32 chip in the middle as the translator. The UART sends/receives information at a rate of 115200 bits/s, which is processing by an STM32 chip, and then finally converted to CAN FD which transfers at a rough frequency of 15MBits/s.

Goal:

Create <$20 boards adapter to avoid buying more expensive GPS Sensors with CAN Support.

 

Why this project?

  • We want to space GPS antennas out for better reception so we want to add CAN support to facilitate this. Also, better busability.

  • Some GPS antennas support CAN but more expensive, doing this should be cheaper

 

Why CAN?

  • CAN works better in noisier environments

  • Higher Speed Communication

  • Less noise and more signal integrity over long distances

 

Deadline:

  • Ideally designed by the end of S24, bringup F24.

Block Diagram

 

Component Choice

1. STM32 Unit

Requirements:

  • UART: 115,200 bits per second => 14,400 bytes per second,

  • CAN: 1,000,000 bits per second => 125,000 bytes per second

  • UART to CAN Performance:

    • Each byte is a UART interrupt, Interrupt Service Routine roughly takes 50 CPU Cycles

    • Each byte, Parsed/Converted might take 100 CPU Cycles

    • Each Byte Sent here might take 50 CPU Cycles

    • Total: Roughly 200 CPU Cycles

  • UART to CAN Performance:

    • Each byte is a CAN interrupt, Interrupt Service Routine roughly takes 50 CPU Cycles

    • Each byte, Parsed/Converted might take 100 CPU Cycles

    • Each Byte Sent here might take 50 CPU Cycles

    • Total: Roughly 200 CPU Cycles

  • STM32 Performance Requirement:

    • Total CPU cycles per second = 400 cycles/byte * 14,400 bytes (5.76 million cycles/second)

    • 5.76 MHz is the requirement but for safety lets multiply it by a 4x factor

    • 23.04 MHz Performance Requirement

  • STM32 Port Requirement:

    • 1 CAN 2.0 Port Group

    • 1 UART TX and RX Pin

  • STM32 Power Requirement:

    • As little power draw as possible

STM32G431C6T6, STM32G4 Series

STM32H503RBT6, STM32H5 Series

STM32G431C6T6, STM32G4 Series

STM32H503RBT6, STM32H5 Series

Power: Ultra Low Power

Power: Normal Power Draw

Power: Normal Power Draw

Enough Performance

Higher Performance than neccesary

Higher Performance than neccesary

Has peripherals that we need

Has peripherals that we need

Has peripherals that we need

Overall: Best Choice

Overall: Overkill

Overall: Overkill

 

2. UART JST Connector

Best Choice: GHR-10V-S (https://www.digikey.ca/en/products/detail/jst-sales-america-inc/GHR-10V-S/807822?s=N4IgTCBcDaIOIAkBKBaAjABgGooMogF0BfIA )

Requirements:

Pros:

  • According to specs and recommendations of GPS connector GHS 1.25mm 10 pin male on their gps sensor

 

3. Programming/Flashing JST Connector

Best Choice: BM06B-GHS-TBT (https://www.digikey.ca/en/products/detail/jst-sales-america-inc/BM06B-GHS-TBT/807804 )

Requirements:

  • Ports (in order):

    • 3V3

    • NRST

    • SWO

    • SWDIO

    • SWCLK

    • 3 GNDS

Pros:

 

4. CAN Transceiver

Best Choice: TJA1051TK/3,118 (TJA1051TK/3,118 | NXP Semicon | CAN Transceivers | JLCPCB )

Pros:

  • recommended by pixhawk spec and used in our common CAN circuit.

Cons:

  • Expensive

 

5. CAN Bus Connector

Best Choice:

Pros:

  • Standard used by the team

 

4. Power Input

Best Choice: XT90

Pros:

  • Standard used by the team for power supply

 

Considerations with CAN/UART:

CAN:

  •  

UART:

  •  

Mounting Board

 

Resources: