Author Topic: What uC to use in Automotive application  (Read 22752 times)

0 Members and 1 Guest are viewing this topic.

Offline RundstedtTopic starter

  • Contributor
  • Posts: 21
  • Country: pl
What uC to use in Automotive application
« on: June 12, 2012, 11:24:16 am »
Hello!
Recently I started my first engineering job and now I stand before difficult (and quite big) decision to make, my objective now is to design and program an ECU for a petrol car (controlling throttle, injectors and ignition). And I have to choose uC family that will run all that. I will program it in C. I'm currently familiar with 8052 and (a  bit less) with avr (8bit).

So can you good people from eevblog forum help me with your advice? And then advice me on good ISP programmer/debugger, and some starter board for educational purposes.

Currently I was thinking about dsPIC family although STM8 or even atmega (models for mobile purposes) came to mind.

Should I focus my search on DSP or uC will do the job?

Since it is my first post here, I'd like to apologise for my bad english.
« Last Edit: June 12, 2012, 11:44:50 am by Rundstedt »
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 27833
  • Country: nl
    • NCT Developments
Re: What uC to use in Automotive application
« Reply #1 on: June 12, 2012, 12:38:59 pm »
I'd go for an ARM based controller. Look for automotive specified parts and make sure you get a copy of the latest MISRA book.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10210
  • Country: nz
Re: What uC to use in Automotive application
« Reply #2 on: June 12, 2012, 12:44:26 pm »
Automotive stuff is a little different to regular electronics.  It's supposed to last the life of the car, which could be 20 years. Unlike consumer electronics which is at most 5 years. You're supposed to design everything to be able to handle double the intended voltage without pushing any component past its rated specs.

You're supposed to have TVS diodes (or other protection) on all external I/O and a main large 24V TVS on the supply input.
As an example, an external 12v on/off signal to a 5v micro input might go something like this.

(might be able to combine the TVS and zener, you can get tiny SO package input protection chips)

Components rated for the full temperature range are a good idea as well.
And watch for grounding issues between high current outputs and low current sensor inputs.

As said above, look for components where the datasheet says "automotive use"
« Last Edit: June 12, 2012, 01:24:17 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline RundstedtTopic starter

  • Contributor
  • Posts: 21
  • Country: pl
Re: What uC to use in Automotive application
« Reply #3 on: June 12, 2012, 01:37:08 pm »
Thank you for replies!

Of course I look only parts qualified for automotive design but still there is so much of it (most uC families have their automotive counterparts).

@nctnico, I think ARM is a bit of overkill, dsPIC30 is way to much for this current design (it was used in some other company products).

Currently I'm leaning towards PIC family cause they have 8bit and 16 bit MCUs and so many different uC in their offer.

And what ICSP for development? PICkit3? Maybe something else?

What Development/Prototype board for educational purposes for it? I found TDGL003, it looks nice, it has CAN controller so would be perfect for learning.

@Psi yes I know that this design should be tough, but thanks for the TIP about TVS diodes

 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 27833
  • Country: nl
    • NCT Developments
Re: What uC to use in Automotive application
« Reply #4 on: June 12, 2012, 02:54:56 pm »
There is no such thing as overkill! There is no cost advantage of using a slower controller.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
Re: What uC to use in Automotive application
« Reply #5 on: June 12, 2012, 03:14:07 pm »
automotive grade Cortex-M3 processors are cheaper than pic's ... and they have way much more horsepower and peripherals.
Like Nctnico said : there is no cost benefit of messing around with an underpowered controller.

And i agree : start by reading MISRA and get a development tool that supports MISRA ( IAR and Keil both do you enable the MISRA option and the compiler will refuse to generate code for anything that is non-compliant. you can even toggle individual MISRA rules on and off. )

btw : MISRA : Motor Industry Software Reliability Association. It is a set of unbreakable rules ( and some guidelines ) to be followed when developing code for automitve and mission critical systems using the C language.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: What uC to use in Automotive application
« Reply #6 on: June 12, 2012, 05:42:44 pm »
Calling the 'Cortex-M3' Overkill is like calling a ferrari that is a ferrari but much cheaper and oddly cheaper then a toyota too fast for racing

Cortex-M3's start from 1-2$ at one off quantities ( And they contain a big amount of RAM compared to PIC32 whether you need or not ! )
« Last Edit: June 12, 2012, 05:52:44 pm by DaveXRQ »
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: What uC to use in Automotive application
« Reply #7 on: June 12, 2012, 06:43:09 pm »
As the other members suggest, go for automotive graded parts (not just the uC). Very important thing is to use adequate protection on power to low voltage circuits (reverse battery protection, protection against tansients, against load dump). You may however use a lot simpler protection on the io lines. A 10nf cap to gnd at the connector (spark gaps often used in older devices), 2k pulldown/pullup resistor and a high value resistor before uC (min 33k to several hundred k ohms) is a common practice (for digital input and freq counting). Modern uCs already have got clamping diodes inside, you just have to make sure that you do not exceed the maximum clamping current. Regarding to AD channels is a different story, as the maximum required impedance for the AD to work correctly may be low for protection. To overcome this problem optional op amps (with the current limiting resistors) can be used.

I have succesfully used the extended temperature version of the dsPic family for such an application (they are cheap and easily obtainable, though they are not the most powerful ones, you can find faster alternatives).

I also suggest you to take a look at different manufacurers site (f.eg freescale, st, bosch semiconductor), because there are a lot of nice and handy asics available in the topic. These may be expensive or not really available in lower quantities, however.
« Last Edit: June 12, 2012, 08:47:32 pm by Baliszoft »
 

Offline snoopy

  • Frequent Contributor
  • **
  • Posts: 771
  • Country: au
    • Analog Precision
Re: What uC to use in Automotive application
« Reply #8 on: June 13, 2012, 03:22:51 am »
Hello!
Recently I started my first engineering job and now I stand before difficult (and quite big) decision to make, my objective now is to design and program an ECU for a petrol car (controlling throttle, injectors and ignition). And I have to choose uC family that will run all that. I will program it in C. I'm currently familiar with 8052 and (a  bit less) with avr (8bit).

So can you good people from eevblog forum help me with your advice? And then advice me on good ISP programmer/debugger, and some starter board for educational purposes.

Currently I was thinking about dsPIC family although STM8 or even atmega (models for mobile purposes) came to mind.

Should I focus my search on DSP or uC will do the job?

Since it is my first post here, I'd like to apologise for my bad english.

When it comes to auto manufacturers you will find that that cost is what determines what parts are used. Every last cent is important to an auto maker. They really are cheap skates although you wouldn't believe it when you have to fix your own car and buy parts from them !!
 

Offline RundstedtTopic starter

  • Contributor
  • Posts: 21
  • Country: pl
Re: What uC to use in Automotive application
« Reply #9 on: June 13, 2012, 07:51:17 am »
When it comes to auto manufacturers you will find that that cost is what determines what parts are used. Every last cent is important to an auto maker. They really are cheap skates although you wouldn't believe it when you have to fix your own car and buy parts from them !!
Well I don't directly work for auto manufacturer, I work for a company that produce LPG and CNG installations. As a start they want me to create ECU for diesel engine. I looked on a demo product by some company from usa (LPG ecu) and they used huge freescale MCU along with Ethernet controller, 4 layer pcb with parts on both sides, and another SoC (that even wasn't graded for automotive design). It was huge, and can't even imagine how much it cost to manufacture.

Calling the 'Cortex-M3' Overkill is like calling a ferrari that is a ferrari but much cheaper and oddly cheaper then a toyota too fast for racing

Cortex-M3's start from 1-2$ at one off quantities ( And they contain a big amount of RAM compared to PIC32 whether you need or not ! )

On digikey I checked Cortex M3 core, and -40C to 125C and it found me 10 products and cheapest one was almost 11$, can you show me maybe  where I can buy Cortex-M3 for automotive for 1-2$

I have succesfully used the extended temperature version of the dsPic family for such an application (they are cheap and easily obtainable, though they are not the most powerful ones, you can find faster alternatives).
Well power is not that big concern to me, cars 20 years ago had 8052 in them, if not for lack of peripherals that kind of power is ok.
I also suggest you to take a look at different manufacurers site (f.eg freescale, st, bosch semiconductor), because there are a lot of nice and handy asics available in the topic. These may be expensive or not really available in lower quantities, however.
Yes, that is quite a problem. For a start I will need low quantity to prototype (this diesel ecu won't be put to production anyway, it is a project for me to learn from and test me in new job)
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8393
Re: What uC to use in Automotive application
« Reply #10 on: June 13, 2012, 08:14:29 am »
I've seen quite a few Motorola (now Freescale) 68xx / 9S12 in ECUs. Earlier ones more commonly used MCS51/52, and there's one that used an 1802 (can't remember exactly). If you're familiar with the 8052 then I'd say that's a good choice. In applications like this, processing power is not the main constraint --- reliability is. A many decades old architecture that's tried and tested is better from this standpoint than the latest superpowerful MCUs.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 27833
  • Country: nl
    • NCT Developments
Re: What uC to use in Automotive application
« Reply #11 on: June 13, 2012, 08:45:37 am »
I've seen quite a few Motorola (now Freescale) 68xx / 9S12 in ECUs. Earlier ones more commonly used MCS51/52, and there's one that used an 1802 (can't remember exactly). If you're familiar with the 8052 then I'd say that's a good choice. In applications like this, processing power is not the main constraint --- reliability is. A many decades old architecture that's tried and tested is better from this standpoint than the latest superpowerful MCUs.
That is like saying sending a letter is more reliable than an e-mail. Its totally wrong. In the old days an ECU didn't do a lot. Nowadays you need the best timing resolution you can get to inject fuel at exactly the right moment (especially for diesel) to meet environmental regulations. More speed is always better.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: What uC to use in Automotive application
« Reply #12 on: June 13, 2012, 11:41:14 am »
I have succesfully used the extended temperature version of the dsPic family for such an application (they are cheap and easily obtainable, though they are not the most powerful ones, you can find faster alternatives).
Well power is not that big concern to me, cars 20 years ago had 8052 in them, if not for lack of peripherals that kind of power is ok.

When i started my (similar) project 3 years ago, i also thought the same :).

More speed is always better.

This is very very true. I suggest you to get the fastest one you can, even if you think you do not need it at all :). The timing (turning on injectors, turning off injectors, charginig ignition coils, discharging ignition coils) eats up at least the 60%-70% processing power of the processor, and you did not even do anything else. The extended temperature version of dspic30fs can be good up to max 20MIPS only (less than the industrial one), which is not a breathtaking performance at all, especially if you are going for C. I was using assembly, so i could do everything i wanted (six cylinders, with a nice resolution of timing), but i could not do that in C for sure at 20MIPS. The RISC architecure also favours asm instead (in my opinion). If i were just going for a 4 cyl diesel (4 injection only), the 20MIPS dspic30f could do a timing resolution of min. ~3 uS even in C (i did 12 channels (6inj+6ign), with 5uS resolution in asm). If you are happy with that, then it may be an alternative. The biggest dspic30f has got enough peripherials and memory to accomplish all this. I know, because i have already done that (and using the ECU at the moment).
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: What uC to use in Automotive application
« Reply #13 on: June 13, 2012, 11:49:48 am »
And what ICSP for development? PICkit3? Maybe something else?

Definitely pickit2 for dspic30f.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10210
  • Country: nz
Re: What uC to use in Automotive application
« Reply #14 on: June 13, 2012, 11:55:22 am »
You might at some point want to calculate a real time automotive map using a complex function.
Having an ARM chip that can do floating point without taking a significant speed hit is very useful.

While you can do floating point on a 8bit chip it really limits how responsive you can make the system.
« Last Edit: June 13, 2012, 11:57:50 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: What uC to use in Automotive application
« Reply #15 on: June 13, 2012, 12:03:46 pm »
You might at some point want to calculate a real time automotive map using a complex function.
Having an ARM chip that can do floating point without taking a significant speed hit is very useful.

While you can do floating point on a 8bit chip it really limits how responsive you can make the system.

Yes, you are right. Lot of fractional multiplications, divisions, etc are needed to calculate (lots of) parameters, the dspic cannot do floating point at all, i have no idea how effective the compiler handles these calculations.
 

Offline RundstedtTopic starter

  • Contributor
  • Posts: 21
  • Country: pl
Re: What uC to use in Automotive application
« Reply #16 on: June 13, 2012, 12:11:11 pm »
And what ICSP for development? PICkit3? Maybe something else?

Definitely pickit2 for dspic30f.
Oh, not PICkit3? I've read that PICkit2 is no longer developed by microchip so it may not support some chips.

I was planning for a first buy TDGL003 (to learn basic programming of pic, it also has CAN bus so I can learn how to use it), and PICkit3 (with development board). But if you say I should rather buy PICkit2 maybe I should.

Well, truth to be told when I started planning whole project (2 days ago) I thought I would use dsPIC30F5015 (it was used on other ECU made for us by outside company), but then my co-workers suggested me that maybe I would use something smaller cause there is no need for that much processing speed. But now you begin to change my mind.
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: What uC to use in Automotive application
« Reply #17 on: June 13, 2012, 12:25:36 pm »
Floating points are undisputedly really useful for timing, something like the STM32F4 has been really excellent for me
There's a reason PICkit2 is suggested for the old parts, it's because it's got something else the pickit3 doesn't and ... ah well
At the same time look at the STM32F4-Discovery (Costs less, much less) and the STM32F4 parts, they aren't much more expensive (Pretty cheap actually) then the dspic30f and if this isn't an one off ST will provide a shitload of dev equipment if you would use their parts

« Last Edit: June 13, 2012, 12:30:50 pm by DaveXRQ »
 

Offline Baliszoft

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: hu
Re: What uC to use in Automotive application
« Reply #18 on: June 13, 2012, 12:46:53 pm »
There was a thread here why the pickit2 was better than the pickit3. Pickit3 will work of course perfectly, however there are some things in which pickit2 was better. If it is not available anymore, that is a pity. I used both, as i got two 30fs on my board :). As for the micro choice, i went for the dspic30f6014 doing the timing and "calculating physics" and also i got a 30f3011 doing some high speed signal processing evaluating the signals of knock sensors (which is of course not needed for diesel), and it is only to please my experimental pleasure, as this task could have been solved with an asic for $5 :).

Here it is (it is a bosch motronic me7.5 pin compatible ecu):
 

Offline RundstedtTopic starter

  • Contributor
  • Posts: 21
  • Country: pl
Re: What uC to use in Automotive application
« Reply #19 on: June 13, 2012, 01:00:17 pm »
i got a 30f3011 doing some high speed signal processing evaluating the signals of knock sensors (which is of course not needed for diesel)

Well that is main reason why as my first project was chosen ECU for non Commonrail diesel, simply cause it is easier, no throttle control, no lambda sensor, only fuel injection, no knock sensors.
 

Offline caroper

  • Regular Contributor
  • *
  • Posts: 193
  • Country: za
    • Take your PIC
Re: What uC to use in Automotive application
« Reply #20 on: June 13, 2012, 03:02:24 pm »
You haven't given any indication of budget but I get the impression that your employer is taking this seriously.
With that in mind I would suggest you go for the ICD3 rather than the PICKit, it is faster and offers far more debug capability. I have several have both models of PICKit and like them both in their respective rolls but when it comes down to trying to finding an I/O problem, Timing issue or Memory leak the ICD3 is the tool to have at hand.


It may be overkill for a hobbyist but still reasonably priced for a company that appreciates having the correct tools for the job.


Cheers
Chris








Offline RundstedtTopic starter

  • Contributor
  • Posts: 21
  • Country: pl
Re: What uC to use in Automotive application
« Reply #21 on: June 14, 2012, 09:06:37 am »
You haven't given any indication of budget but I get the impression that your employer is taking this seriously.
With that in mind I would suggest you go for the ICD3 rather than the PICKit, it is faster and offers far more debug capability. I have several have both models of PICKit and like them both in their respective rolls but when it comes down to trying to finding an I/O problem, Timing issue or Memory leak the ICD3 is the tool to have at hand.


It may be overkill for a hobbyist but still reasonably priced for a company that appreciates having the correct tools for the job.


Cheers
Chris
Unfortunately I already placed order for PICKit 3, but I'm sure that  if after 3 months they decide that they like what work I'm doing they will buy ICD3.

Today my boss was talking something about setting a place for me with some soldering tools, multimeters probably an oscilloscope, so I need to watch Dave video on setting a basic electronic workshop once more.
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: What uC to use in Automotive application
« Reply #22 on: June 14, 2012, 09:53:27 am »
Let me give you a rundown, first, this is a working environment so get REALLY high power irons (stay away from metcal and weller)
Pace/Ersa/JBC is good, Hakko also if you aren't doing lead free. You need two nearly identical ones with different tips

I'll let you decide what multimeter is good for you or what, if so consider a Agilent U1272A or the U1252A

Just a rough one.
 

Offline senso

  • Frequent Contributor
  • **
  • Posts: 951
  • Country: pt
    • My AVR tutorials
Re: What uC to use in Automotive application
« Reply #23 on: June 14, 2012, 03:08:09 pm »
That a look in the MegaSquirt ignition/injection management unit, its sort of open source, so you can acess all the code and the schematics.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8550
  • Country: us
    • SiliconValleyGarage
Re: What uC to use in Automotive application
« Reply #24 on: June 14, 2012, 04:55:47 pm »
Let me give you a rundown, first, this is a working environment so get REALLY high power irons (stay away from metcal and weller)
Pace/Ersa/JBC is good, Hakko also if you aren't doing lead free. You need two nearly identical ones with different tips

I'll let you decide what multimeter is good for you or what, if so consider a Agilent U1272A or the U1252A

Just a rough one.
i would focus on getting a good SCOPE first... if you are doing an ECU you will need to look at signals first and foremost...
since cars have more than 2 cylinders... 4 channel scope ! preferrably an MSO style system so you can watch an spi or i2c or some other digital pattern or debug signals while looking at analog signals simultaneously. get something with a bit of oomph (memory and sampling speed. the mso3000x comes in mind , or go for a 7000 series. laaaarge display )

I would not muck around with handheld multimeters either. They tip over , are always in the way on your working area . Get a bench meter.
Agilent has entry level bench meter ( 4-1/2 (escort design) and 5-1/2 like the 34405 (real agilent design))

And a good power supply. E36xx series or E34xx series.

As for soldering irons.. JBC ( ihad one for 8 years, it was ok , but the tips were easily damaged and the clamping system was crap. when i could afford a weller i switched and never looked back...)
Hakko and Ersa ... don't like those. they just don't feel right.

Get a metcal, one basestation with two irons on it. and different tips.
For precise work get the weller microiron
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf