views:

649

answers:

5

What programming languages are most commonly used on automobile systems? What type of data is collected while it is running? What platform does it use?

I am also interested in the new hybrid/electric automobiles, what languages and platforms do they use?

Thanks!

+3  A: 

OBD-II is an interface for collecting automobile data.

In terms of the programming languages, I think it is likely to overlap with a lot of other embedded environments; C is probably used, RTOSs like VXWorks, and so on. 1394(firewire) is beginning to be used for networking.

There is an interesting looking website called 'Automotive Design Line'

Colin Pickard
Is it about new energy automobiles?
hws
I imagine it would still apply for hybrid vehicles since it used in emissions testing in California for which there is a requirement for a standard interface. For plugin electrics that might not apply, but garages etc are geared up for OBD-II so I wouldn't be surprised if smaller manufacturers especially continue to use it for that reason
Colin Pickard
Thanks very much,your answer is very helpful! What about fuel cell vehicles,hydrogen energy and solar electric vehicle car?
hws
I don't know; I don't think any of these types are available in the mass market yet; I guess when they are marketed, they may well come with OBD-II, just because it is a reasonably standard interface.
Colin Pickard
My professor said these in the United States have been in the pilot phase,I would like to know the platforms they use?
hws
I don't know, sorry. You might be able to find more online - car companies are very secretive but development work like this might be going on at universities, who tend to publish more stuff online
Colin Pickard
+10  A: 

Electronics in the automotive industry are usually based on embedded microcontrollers. As such, the programming languages are usually C, C++, and assembly. In some cases, a higher-level language such as ladder-logic is used to describe the actual control logic.

Modern automobiles have several separate computer systems, each designed to control a specific aspect of the vehicle's operation. There is usually one controller for the engine, one for the transmission, one for the dashboard electronics, one for the ABS braking system, traction control, etc.

Each of these control modules has a set of inputs and outputs. The engine controller, for example, reads many sensors including coolant temperature, engine speed, oxygen intake, throttle position, and so on. And, based on these inputs, it makes decisions about fuelling for the engine. In hybrid vehicles and electric-only vehicles, the engine control system is, of course, entirely different. There is still a controller, but instead of just making decisions about fuelling, it can make decisions about when to engage the electric motors vs the gas engine, how much power to apply to each electric motor, etc.

The various control modules are connected together using an in-vehicle network. There are many different ways of implementing this network, but one of the most common is CAN (Controller Area Network). The network allows individual control modules to send and receive information from other modules at high speed while the vehicle is in operation.

update: Here are some links for further reading:

CAN systems from AA1Car.com
The Hybrid Bible from CarBibles.com
Sensors Make Cars Smarter - an article from Design News

update: Here is a recent article on the subject which may be of interest:

This Car Runs On Code - an article from Discovery.com

e.James
+1 nice comprehensive answer
Colin Pickard
Thanks very much. My English is poor, I need more time to understand you answer. If possible,you can give more answers.Thank you very much.
hws
@Colin Pickard: Thank you. I upvoted yours for mentioning OBD-II and J1394. I had no idea that firewire was coming into use for automotive.
e.James
@hws: I will try to add some links to my answer. Hopefully that will make it easier to understand.
e.James
@eJames I'm no expert! I just spotted it while googling around. There is some blurb about it here: http://www.1394ta.org/industry/Automotive.html but I couldn't say whether anyone is actually using it, it might be all talk :)
Colin Pickard
@Colin Pickard: I work on off-highway vehicles, so I sometimes miss the new developments on the purely on-highway side of things :) The latest development I have heard of is mesh networks, where there are several network connections between modules.
e.James
+4  A: 

The most popular programming language for automotive ECUs (electronic control unit) that implement hard real-time applications in power train or chassis control is by far C. The software is usually implemented on top of automotive-specific operating systems according to OSEK or AUTOSAR.

In devices dedicated to infotainment you might find other languages or even mainstream operating systems.

OBD-II is just a subset of information collected in a typical car because OBD-II is mostly targeting the engine. There are also tons of diagnostic data collected for other applications, e.g. for comfort functions.

CAN is the "classical" popular bus interface but recently standards with more bandwidth (e.g. Flexray) are growing momentum especially for safety-critical software. For some purpose even the classical Ethernet is used.

I'd post some hyperlinks but SO's reputation system does not allow this ...

Uwe Honekamp
+3  A: 

Use of C is so widespread in the auto industry that an industry body has come up with a custom set of standards for it - Misra C.

Misra C, in a safety critical system, is practically a different language from normal C - no function pointers, no memory allocation, pretty much no use of C-specific language features.

Essentially, it is Ada with a C syntax.

soru
A: 

C and Microcontroller are used most in the Automotive field. You must have embedded system knowledge.