OK, so I know there's a LOT of mentions about arduino ECUs and most of them seem to go no where, but I think this question is different enough to deserve a new topic.
Short story is that I have a working, tested Arduino Mega based ECU firmware and test level hardware. It is a 'proper' engine management system in the sense that is uses true 3D/2D maps, has acceleration, warm up enrichment, fuel & ignition control etc. In short its not a 'dumb' system that simply tweaks duty cycles with a pot or anything. It has run a couple of engines and has proved to be quite reliable and capable. The project can be found at GitHub - noisymime/speeduino: Speeduino - Arduino based engine management for anyone who is interested.
To date the focus has been primarily around software development. It was not clear in the beginning whether the CPU was up to the task, but after about 12 months of on/off development I am satisfied that it is more capable. The focus now needs to move to hardware development and I am trying to get myself up to speed on what is needed to make something that will work reliably in an automotive environment. The initial board design/run was suitable for testing in a relatively controlled environment, but was never intended for use in a real world scenario.
So, the real question I suppose is, what do I need to watch out for? Obviously any +12v power sources will be dirty etc, but assuming I regulate that appropriately, most of the sensors will run from 5V source/ground on the board. What I'm more concerned about is external noise affecting things such as the crank signal. The unit itself will be mounted in the cabin rather than under the bonnet, but obviously a lot of the in/out signals will be going there. If anyone can provide any guidance around the sorts of issues I need to watch out for, I would love to hear your thoughts.
You need to be very serious about protection if you want your circuitry to last, and that includes protection against such occasional insults as battery polarity reversal (e.g. improperly connected jump starts), 125 V "load dump" transients caused by the alternator when battery connections become corroded and fail, and much higher voltage spikes from the ignition system.
That's some interesting reading in that doco. I had been looking at something like the MAX16127 for the 12V supply, but those little polyzen devices mentioned might come in handy as well.
A multi-function protection IC would be a nice thing if I can get one that covers everything, but doing individual circuits for things is also an option.
I suggest the processor should be in a shielded enclosure. Any digital signals (especially low voltage signals such as crank position sensors) should be carried by shielded wires grounded to the enclosure. Any analog wires (i.e. power supply, analog sensor inputs) coming into the enclosure should be filtered to eliminate noise. The power supply should have overvoltage protection and be tolerant of low input voltages. A buck/boost converter would be a good way to achieve that. You'll need to pay attention to mechanical protection of the board and cables, as well as protecting them against moisture and condensation.
Thanks Peter, there's some useful info there. I like the sound if the buck/boost regulator and there's some good looking automotive ones out there by the looks. Will look into combining one of these with some form of high voltage spike protection.
Shielded wiring for the CAS is a given, but what sort of filtering do you mean for the analog inputs? Do you just mean some capacitance filtering or something more serious?
The cases I'll start looking around for once the dimensions of the board are a little more finalised.
Standard AVR chips are not designed for the official automotive temperature range. Same goes for many other components. Notably the crystal/resonator. These (and the AVR) are generally rated to around 85 degrees C max, whereas Automotive grade components are rated to about 140 degrees C. Capacitors are also quite sensitive to temperature.