Reliable and easy to use serial bus (car application)

What serial communication bus would you use in an automotive embedded system if you had your main selection criteria:

  • Electrically reliable
  • Slow speed (32 kb / s)
  • Simple program
  • Easy interface with microcontrollers

It will not transmit much data, but it will need to be periodically transmitted at high speed (100 - 500 Hz). I find that RS-232 is simply not reliable enough if you have noise on your landline. CAN-bus seems interesting, but I have no experience with it.

We are currently interested in the combination of AVR AT90CAN128 microcontrollers.

+4
source share
5 answers

You have already chosen AT90CAN128, whose excellent function compared to other AVR processors is CAN bus support. In fact, there is no better choice than CAN for an automotive application with data transfer and noise immunity requirements. If you go to the car client with anything but CAN, you will end up spending all your time defending the decision not to use it.

With that said, for noise immunity in a hostile environment such as a car, you will need a bus that uses differential signaling. This excludes i2c or SPI, which is unsuccessful because they meet your other requirements. RS-485 will work as @Andrew Edgecombe points out.

If you are not building a commercial product, but instead building something for your own use to put in the engine compartment, you can probably get by using USB. USB will simplify interaction with a laptop in the cabin, and although it is not designed for high-noise environments, it is differentially signaled at a fairly high voltage.

+9
source

For all the reliability, you cannot go through CANbus (but then it looked like your choice of processor?)

Depending on what you want to interact with, it can be very simple - the basic protocol is pretty simple. But if you want to talk with other unprivileged devices, you will have to implement higher protocols (e.g. CANopen).

But if CANbus is not suitable, I would recommend RS485 or RS422 (depending on your topology). If all you are trying to achieve is point-to-point, then it is identical to RS232. (You will have to put your own protocol level on top if you are trying to support multipoint messages, though.)

+3
source

Two other great options besides CAN are LIN and FlexRay. LIN is a simpler and slower interface, while FlexRay is more robust and designed for safety-critical systems such as real-time brake management.

For a good overview diagram of how the various tire choices are interconnected, see slide .

+1
source

I always suggest that CAN be the best in automotive communications.

  • It has a differential line that can withstand, even if there is an electrical failure when transmitting data on a physical level.
  • it can provide reliable speed, it supports 500KBad speed in most automotive software applications.
  • Interaction is also easy if you know the CAN controller of the mailbox and the structure of the register.
+1
source

As others have said, CAN is standard, reliable, more reliable with low speed, etc.

And even support in the Linux kernel for it from version 2.6.15, if you ever need a large system.

0
source

Source: https://habr.com/ru/post/1277257/


All Articles