jehamann
Posts: 35
Joined: Sun Jun 16, 2013 11:36 pm
Contact: AOL

raspberry pi ECM for cars?

Thu Nov 14, 2013 2:06 am

Hi, I was wondering if it was possible to make a raspberry pi into a car's electronic control module, I mean an ECM is just a computer and I imagine the computers in cars do not use much ghz processing power.

Nige C
Posts: 48
Joined: Thu Jul 19, 2012 12:22 am
Location: Hadleigh, Suffolk

Re: raspberry pi ECM for cars?

Thu Nov 14, 2013 2:41 am

Woah. This may seem a simple thing with the Pi,s processing power. But commercial ECM's for cars are a hardened technology.
Cars are a noisy environment electrically and mechanically. Also commercial ECM's comply with the CANBUS standard.
Getting an ECM - Engine Control Module wrong could be disastrous and wreck a cars engine. Or worse, cause a crash and loss of life, ie run away engine etc.
Retired power engineer with a lot of real life experience. Life is an adventure again :)

MoosePi
Posts: 112
Joined: Wed Nov 06, 2013 4:42 pm

Re: raspberry pi ECM for cars?

Thu Nov 14, 2013 7:16 am

Pi Forum Search and Google yields answers to many questions

jehamann
Posts: 35
Joined: Sun Jun 16, 2013 11:36 pm
Contact: AOL

Re: raspberry pi ECM for cars?

Thu Nov 14, 2013 10:13 pm

thanks for the info! the reason why I asked this was because I would rather make my own ECM, so I can buy any motor and make the necessary adjustment need to make the engine run right, I dont want to have to pay for abunch of money for a probably expensive ECM to use on one engine. Do you guys know were I could look and find out how to build one from scratch?

User avatar
jasonclark
Posts: 58
Joined: Sun May 13, 2012 3:51 pm
Location: Hertfordshire, UK
Contact: Website

Re: raspberry pi ECM for cars?

Thu Nov 14, 2013 10:45 pm

jehamann wrote:thanks for the info! the reason why I asked this was because I would rather make my own ECM, so I can buy any motor and make the necessary adjustment need to make the engine run right, I dont want to have to pay for abunch of money for a probably expensive ECM to use on one engine. Do you guys know were I could look and find out how to build one from scratch?
I expect you need a real-time system for this. Standard Linux probably won't cut it for good control within the time constraints of engine management.
If you're adjusting the timing of the engine, you'll need to respond to 1000's of events per second. I guess the Pi can do this, but only in bare-bones mode (so no OS).

What processor do existing ECU's use? I expect some form of microcontroller, but the level of processing power may help decide if the Pi is suitable.

dancytron
Posts: 56
Joined: Sun May 06, 2012 11:09 pm

Re: raspberry pi ECM for cars?

Fri Nov 15, 2013 12:42 am

You might be able to do it for an older 1980's or early 90's engine where you are really dealing with just an 0xygen Sensor, Knock Sensor, Vacuum Sensor, a couple of temperature sensors and a few more sensors that just retard the timing and set the fuel to air ratio. Newer engines are much more complicated and have a lot more going on.

Technically, at least in the United States modifying the computer like you describe is an illegal modification of the emissions that makes a vehicle no longer street legal and is subject to a big fine.

But, if you are at the track or offroad or someplace with no rules (or no enforcement) and can get away with using an old engine, you could set it up the old fashioned way with no computer at all.

ECMs are available at reasonable prices at pick and pull junk yards and people on ebay who rebuild them.

fixitsan
Posts: 58
Joined: Sun Sep 29, 2013 4:28 pm

Re: raspberry pi ECM for cars?

Fri Nov 15, 2013 9:59 am

Have you looked at any of the 'Megasquirt' systems ?

They allow you to customise the kit for any engine, and it has a lot of support

Try http://www.megamanual.com/index.html

techpaul
Posts: 1512
Joined: Sat Jul 14, 2012 6:40 pm
Location: Reading, UK
Contact: Website

Re: raspberry pi ECM for cars?

Fri Nov 15, 2013 11:31 am

Most ECMs have all sorts of peripherals and often TPU (Timing Pattern Units) to produce accurate timed 16 bit wide and larger sets of pulses to drive things and a myriad of peripherals to receive signals from these days a myriad of sensors they need at high speed.

Slower speed sensors are sometimes communicated via CANbus, this is a difficult field to be safe in noting that Toyota have recently lost court cases in USA and are dealing with lots of money problems for this.

They use their own Real Time (hard real time) operating systems or schedulers. This is normally a task undertaken by a design team where some of the design team deal with non-electronics or software but know the mechanics and engine dynamics.

Off road usage and tinkering would be OK for YOU taking all the risks.

Be aware in any country you would need to check whether this is legal, and any recertification of vehicle would be required. Most insurance companies would void the vehicle insurance for on road use as this is a custom modification.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/

colinh
Posts: 95
Joined: Tue Dec 03, 2013 11:59 pm
Location: Munich

Re: raspberry pi ECM for cars?

Tue Dec 10, 2013 7:54 am

And there was me thinking he needed electronic countermeasures for his car ... :shock:

black85vette
Posts: 2
Joined: Tue Dec 10, 2013 2:35 pm

Re: raspberry pi ECM for cars?

Tue Dec 10, 2013 3:22 pm

I don't think the Pi is a good choice for ECM. Not enough inputs and not the right kind. You also need drivers able to activate the fuel injectors. There is a lot of engineering behind an ECM. It is a long learning curve to be able to setup an engine properly with a commercial unit much less having to design all the hardware and software on your own. To do it properly requires some investment in test/monitoring equipment and access to a dynamometer. I have also heard the the Megasquirt system is pretty good. I am running an Accel DFI ECM on my Corvette and the learning curve to just make adjustments to it is pretty significant.

If you want to talk to some folks that know their stuff stop by thirdgen.org forums. That is where a lot of Camaro gearheads hangout and discuss all aspects of engines and fuel management. I have learned a lot from them.

AJB2K3
Posts: 215
Joined: Sun Aug 11, 2013 3:25 pm

Re: raspberry pi ECM for cars?

Wed Dec 11, 2013 8:54 pm

Someone built an ecu for his car using an arduino but he had the oridginal ecu to check that what he thought he was doing was indeed what he was supposed to be doing.
Back in the old days, we were smarter then the technology.
Nowadays technology makes us look like villages fools in front of the children!

davidpetersonharvey
Posts: 3
Joined: Fri Mar 25, 2016 12:59 am

Re: raspberry pi ECM for cars?

Fri Jul 07, 2017 1:16 am

Whatever happened with this?

I'm reading people saying the board is too slow to handle this and other people saying that someone actually did it with an Arduino. The peripherals aren't that different on the two boards and the Raspberry Pi is certainly the more powerful of the two, especially the newer model 3. I'm thinking you would have to start with a scaled-down Lenox package like damn small Linux or Arch Linux

maybe you can even start with the Linux kernel

It sounds like a lot of work to me


jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24942
Joined: Sat Jul 30, 2011 7:41 pm

Re: raspberry pi ECM for cars?

Fri Jul 07, 2017 8:46 am

Best thread necro of the week. 4 years or thereabouts.

Not sure the PI3 is suitable as Linux is not a RTOS that can handle to requirements.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

User avatar
Mortimer
Posts: 924
Joined: Sun Jun 10, 2012 3:57 pm

Re: raspberry pi ECM for cars?

Fri Jul 07, 2017 9:05 am

davidpetersonharvey wrote:In fact, check out this link.

http://hackaday.com/2015/01/28/raspberr ... on-engine/
Interesting, but not quite what is being talked about here. In Adam's PhD project, the Pi is not directly controlling the engine, there isan ECU there. This topic seems to be about whether or not the Pi could take on the role of the ECU, and in my opinion the answer is "maybe, for a small simple engine, like a single cylinder motorcycle or lawnmower engine."
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

Return to “Advanced users”