Skip to content

Automotive

Speaking CAN: Write Buffer Overflow

In the first post of the Speaking CAN series, we learned how the terminal sends a read-parameter request to the ECU and how the ECU sends a response with the value of the parameter back to the terminal. This works fine, as long as the terminal does not send too many requests too fast.

We set the size txqueuelen of the write or TX buffer to 10, which is the default for many Yocto-based Linux systems. If the terminal writes, say, 50 requests to the CAN bus without any pause, we’ll see several error messages No buffer space available in the log window of the terminal. The terminal caused an overflow of the write buffer in the CAN controller.

If we have a request-and-response scenario, the terminal can wait for the response, before it sends the next request. If the response does not arrive within a certain time, the terminal flags an error.

Avoiding a write buffer overflow becomes more difficult, if the terminal sends out messages without expecting a response or if the terminal expects a response only every, say, 200 messages (e.g., an acknowledgement how many messages the ECU has received). The solution is to configure the CAN controller of the terminal to receive its own messages.

Read More »Speaking CAN: Write Buffer Overflow

Speaking CAN: Request and Response

Controller Area Networks (CANs, for short) are used for the communication between electronic control units (ECUs) in cars, trucks, tractors, harvesters, construction machines, packaging lines and e-bikes. Qt provides the Qt CAN Bus API as part of its QtSerialBus module. Qt CAN Bus provides a clean and simple API to connect to a CAN bus, to send and receive CAN frames over the CAN bus.

When we build an HMI application to control a machine, we need a lot more functionality than the Qt CAN Bus API should offer. The HMI application must not send CAN frames too fast to avoid buffer overflows in the CAN controller. When the HMI application receives, say, more than 200 CAN frames per second and tries to display the changes, it will freeze. The HMI application must be able to recover from CAN bus errors. We do not want to write the code for serialising and deserialising thousands of CAN messages manually, but want to generate this code automatically.

I’ll show solutions to these problems in a loose series of blog posts called Speaking CAN. In this first post, I’ll explain how an HMI application running on a display computer retrieves the value of a parameter from an ECU. The terminal sends a request to the ECU over CAN and receives a response from the ECU over CAN.

Read More »Speaking CAN: Request and Response

High-Speed-Data (HSD) Connectors in Heavy-Duty Vehicles

In a recent blog post, I suggested to replace multiple display computers in a driver cabin by one computer in a silver box with multiple displays. I didn’t specify which connectors and cables to use between computer and displays. I found the answer at Electronica 2018 last week: High-Speed-Data or HSD connectors. You can use HSD connectors for LVDS (including Display Port), APIX, CAN, USB 2.0, USB 3.0, Ethernet and Firewire.
Read More »High-Speed-Data (HSD) Connectors in Heavy-Duty Vehicles

What’s Wrong with Multiple Display Computers in Driver Cabins?

Three cabins with 2-4 display computers each.

Figure 1. Top left: Claas cabin with three terminals. Top right: Agco cabin with two terminals. Bottom: Continental concept cabin with four terminals.

The top row shows the status quo. Two or three display computers (a.k.a. terminals) are normal. Even four display computers are not unusual. The bottom row shows the cabin of the future with four display computers. The display computers at the left and right beam show the videos from the wing mirror cameras. The display computer in the middle is the instrument cluster. The small display computer on the right-hand side shows additional information. It would be bigger in a harvester.

Let us assume for simplicity that the cabin is equipped with two display computers, which have identical hardware and nearly identical software – except for the main application. When sourced from low-volume, high-customisation electronics manufacturing services (LVHC-EMS), the two display computers, the telematics unit and a switch will cost roughly 2750 Euros for 200 machines.

We will bring down the costs to 2350 Euros, if we replace the two display computers by one computer with two displays. The computer doesn’t have a display and the displays don’t have a computer inside. The telematics unit is folded into an M.2 or PCIe card, which is plugged into a slot of the computer.

We will reduce the costs by another 200 Euros to 2150 Euros, if we source the components from a value-added reseller (VAR) instead of an LVHC-EMS. VARs buy standard components from high-volume low-customisation EMSs (HVLC-EMS). They charge lower prices because of the higher volumes, but they allow only minimal customisations.

For 200 machines, the solution with one computer and two displays saves us 80,000 Euros and 120,000 Euros per year, respectively, when sourced from an LVHC-EMS and from a VAR. We save even more, if we replace more display computers by one computer with displays and if the display computers are more expensive like ISOBUS terminals. We do not only save costs on hardware but also on software, because we consolidate multiple diverse systems into one system.

A clever change of the system architecture leads to sizeable cost savings. It also leads to a system that can easily be extended in many directions – a competitive advantage.

Read More »What’s Wrong with Multiple Display Computers in Driver Cabins?