-1

I'm currently using an STN2120 on a custom slave PCB that will be plugged into the OBD-2 port of a vehicle. The STN will be interpreting the CAN protocols, and passing engine sensor information to a master PCB via UART. The ATMEGA2560 MCU on the master board will then be monitoring OBD-2 engine sensor values it receives from the STN2120, and the master board will activate digital output circuits based on certain conditions being met based off the CAN sensor data I'm monitoring. I need the MCU on the master board to be able to read the data at the same speed that the CAN bus produces it (ie: up to 500 kbps, I believe).

The person that is designing my boards came to the realization that using the master PCB's ATMEGA MCU to request the data from the STN, and to then receive that data, will likely result in a refresh rate of over 1 second, per sensor data I'm looking to read on the master board. While I don't need absolute instantaneous data from the CAN bus, it needs to refresh at a rate of several times per second for my purposes.

Based off what I'm describing, is there a better way of collecting this data on the master board that will result in a much faster refresh rate when looking at say 15 sensors' data on the CAN BUS? Could some libraries perhaps be loaded on the ATMEGA, that allow it do exactly what the STN2120 does? Sorry for the ignorance here; I'm just a car guy with a concept, and very little microcontroller knowledge.

halfer
  • 19,824
  • 17
  • 99
  • 186
Andrew
  • 33
  • 5
  • we know nothing about your boards nor how the person who is designing stuff for you is implementing things and what those things are. so we cannot help. your post is way too broad. it lacks any useful information about what you're actually trying to speed up. interface speed is not the issue here. – Piglet Dec 20 '20 at 09:24

1 Answers1

0

First off, why do you want to use the STN2120 (which contains support for all kind of OBD2 vehicle protocols) rather than just a simple CAN-Bus interface?

Anyways, with regards to the speed question, the bottleneck is often the speed of the actual ECU you're talking with, rather than the CAN-Bus speed. By directly querying the ECUs (e.g., via UDS commands), you should be able to query identifiers in less than 100ms, so you can probe with 10Hz.

DrMickeyLauer
  • 4,455
  • 3
  • 31
  • 67