GPS CAN Adapter
Introduction
What
UART and GPIO 1:1 adapter for https://holybro.com/collections/standard-gps-module/products/m9n-gps GPS to CAN.
Support full pixhawk standards and our common CAN circuit
Basically just copy ESC CAN Adapter schematic but replace the DSHOT connection with a UART connector for the GPS. Layout wise you can make it a bit bigger, but keep all components on the same side so it’s easier to solder.
Why
this is far cheaper than GPS devices that support CAN
allows us to space out the GPS antennas pretty far from each other
an example system is drawn in ESC CAN Adapter for why CAN is an advantage
Competition
Who
EE Reviewer: @Nolan Haines @Nathan Green @Ryan Scomazzon
Architecture & High Level Project Requirements: @Daniel Puratich
Engineer: @Omar El-Sawy
When
unknown.
Where
add links to stuff here please …..
Table of contents:
- 1 Introduction
- 2 Design
- 2.1.1 Members:
- 2.2 Design Overview
- 2.2.1 Goal:
- 2.2.2 Why this project?
- 2.2.3 Why CAN?
- 2.2.4 Deadline:
- 2.3 Block Diagram
- 2.4 Component Choice
- 2.4.1 1. STM32 Unit
- 2.4.2 2. UART JST Connector
- 2.4.3 3. Programming/Flashing JST Connector
- 2.4.4 4. CAN Transceiver
- 2.4.5 5. CAN Bus Connector
- 2.4.6 4. Power Input
- 2.5 Considerations with CAN/UART:
- 2.5.1 CAN:
- 2.6 Mounting Board
- 2.7 Resources:
Design
Â
Â
Â
(PICTURE OF PCB HERE IN THE END, CAT FOR NOW)
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
STM32L431KCU6, STM32L4 Series (https://www.digikey.ca/en/products/detail/stmicroelectronics/STM32L431KCU6/6621817 ) | 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:
10 Female Pin Slots
Has to work with the (M9N or M10N) GPS UART Connection and the primary one comes with 10 pins (https://holybro.com/products/m10-gps?srsltid=AfmBOopdTetTEMH0Xjdp2ZFBCizDOoz29fGs5ZMFO5TMhK5-Mm1J1kId ) (https://holybro.com/products/m9n-gps?srsltid=AfmBOorPXKD21Sc--PaH2gInPK4FlUbQ3PzcRkFwGLW4Bmo67MPXtt9r )
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:
Default for flashing as said here: (STM32 Programming Connector Standard )
Â
4. CAN Transceiver
Best Choice: TJA1051TK/3,118 (https://jlcpcb.com/partdetail/NxpSemicon-TJA1051TK_3118/C124020 )
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:
System Architecture: https://uwarg-docs.atlassian.net/wiki/spaces/ARCHS22/pages/2249981953