Could a RaspberryPi3 replace a car ECU?

...

Other urls found in this thread:

en.wikipedia.org/wiki/Door_control_unit
megasquirt.info/
twitter.com/NSFWRedditVideo

I wouldn't trust it for something so critical due to no ECC.

>control ignition timing
>raspberry pi
>engine starts fucking up
>kill 5 people
>"oh boyo better flash a new raspberry pi when i get home"
>breaks stop working, but replaced break warning lights with lcd picture frame of my waifu
>kill 50 people driving through school district
>finaly get home, kill grandma
>flashing new raspberry pi for to get my car working again
>start up car again
>wont start
>corrupt sd card

en.wikipedia.org/wiki/Door_control_unit
would be a nice job for the RPi.

still an ECU. most people think there's only one ECU and it only takes care of the engine while in reality there are dozens.

ECUs are all about reliable timing, they need to be able to take in information from loads of sensors and fire the fuel injectors accordingly. A linux computer will not provide such reliable timing, even an arduino wouldn't be consistent enough.

Most ECUs use FPGAs to do their thing. learn VHDL and Verilog

>Could a RaspberryPi3 replace OP's brain?
yes

no, you'd need something like this: megasquirt.info/

>megasquirt

Blue board.

squirts are a lie, it's just piss

A NE555 could replace OP's brain and it would be more reliable.

You need a real time OS for these kinds of tasks

possibly with a very good custom hard realtime kernel and more direct cpu connectivity. All current kernels have far too much variability.

>> startup car
>> wait for PI to boot up
>> press the ignition
>> winds up for a bit, fails to start
>> SSH in make sure everything is working properly
>>sudo startengine.sh
>> engine winds up again, still fails to start
>> sudo startengine.sh
>> engine putters and wheezes making a huge cloud of black smoke as it starts
>> now on my way
>> engine knocks every 5 minutes as CPU load brings GPIO to a halt
>> decide to turn up the speed
>>accelerates like a super car
>> but chugs gas like a tank
>> rolling coal so hard it's like the smoke monster from lost is chasing you.
>> engine just dies
>> quickly use wheel mounted keyboard to SSH in
>KERNEL PANIC
>> unplug PI's usb cable
>>plug it back in while still barreling down the road
>>try to start it up
>> no dice
>> SSH in at 2000 WPM
>> narrowly avoid hitting pedestrian
>> SD card corrupt!
>> Go over railing and die

ITT: Everyone things a car has only one ECU and it is only there for critical work

/thread

you can add a clock to an arduino

No. You need something more powerful for that.

>they don't know about megasquirt.
Megasquirt is an aftermarket standalone ECU (Engine Control Unit) designed to completely replace a car's normal ECU. You may need more computers besides this though to get everything to play nice since a lot of modern cars use CAN-BUS setups with separated BCMs and TCMs. If everything doesn't communicate together nicely, the car will not run.

Buy an old car that doesn't have any of that foolishness. Too many laws for diy on a new cars and too expensive if it brakes. If it must be high tech and new let it be all be electric. If it runs on gas then manual everything and carburetors. The average repair bill on a new car will buy you a pretty nice set of tools that will last for life.

EFI is better than carburation in literally every single way.

Its still just basic calculations user. I get what you are saying but im just not sure..
You dont need accurate calculations for every engine cycle. Just some averages.

Car engine MCUs aren't anything special, something like the high end Ti C2000 delfinos would easily run an entire car.

You need a lot of hardware on chip, highend PWM, advanced ADC options etc.

technically yes... could easily do open loop emulation of a very basic timing / throttle / fuel injector pulse width modulation curve - thats what the first basic microcontroller ecu were ....

but now most cars are qnx and a real time os controlling breaks and stability and security

how far do you wnt to go is the question ?

the i/o config will kill you...

and also prob be better off with just a carburateur and spark system jamal

give it back jamal....

cars should not have computers. they have vulnerabilities and backdoors.

It's not just basic calculations user. Do you know how a car engine works? That computer is organizing and orchestrating thousands of explosions every minute. There's a LOT that goes into it, especially when you bring the sensors into it.
You need the cam timing sensors to tell the ECU when the valves are opening and the crank position sensor tells it where the pistons are, then there;s managing the fuel delivery system. It isn't just "oh let's just spray a bunch of fuel". systems since the 90s have been able to only spray fuel at opening valves. Then it uses sensors in the exhaust, which measures the oxygen content of the exhaust. Based on that it can adjust the cam timing and fuel curves for efficiency and power.
ANd that's BEFORE getting into more advanced shit like Fiat's Multi-Air system, forced induction like superchargers and turbos, or even automatic transmissions. That computers has a LOT to do. A decent high end laptop could probably handle it

I've actually done this.
It controls the door locks (locks automatically when driving) because before that was done with shitty vacuum pipes that failed after 3 decades, so I got motors instead and control them with a Pi.
It also controls the windows and the sunroof from a neat DIY panel in my middle console.

So it is definitely a ECU.

This, Sup Forums shows blatant ignorance again.

Vacuum tubes are great, take it back

Yeah... thats the issue. I dont drive a new Fiat but an old E30 BMW. And my car knowhow is from the 80s.

> now most cars are qnx and a real time os
This. Get an RTOS on it and we'll talk.

>That computers has a LOT to do. A decent high end laptop could probably handle it
They aren't that powerful many are still fairly basic 32bit RISC cores they leverage custom hardware for specific tasks. The top of the range Ti C2000 is an easy example since documentation is public, though it's not specifically an ECU MCU. The fastest one has 2 32bit CPUs with FPUs, the FPUs include custom silicon to do certain math functions directly in hardware, while there's another two FPU units that operate on their own without CPU access. Then there's dedicated hardware for processing signals from sensors rather than having the CPU do it and many other hardware sections with specific tasks.

>most people think there is only one ECU and it only takes care of the engine
ecu = engine control unit
the acronym you are looking for is MCU, which means microcontroller unit.

raspberry pis are dumb and bloated as sin for any hardware projects, especially when you're not even using wifi or video in any reasonable way.
honestly there is an emerging market for high-clocked microcontrollers with mmus, but nobody realizes it because broadcom's dick isn't wet enough yet.

Nowadays, new cars have computers just for the A/C or even the turn signals (controlled by the BCM.

To illustrate my point about a million differeint communicating computers in a car, lets look at something simple.
Old cars connected a cable from the throttle body to the gas pedal.
New cars have no physical connection between the gas pedal and the throttle body.
The pedal is connected to a sensor. The sensor then tells the BCM how much you pressed the pedal. The BCM communicates over the CAN-BUS to the ECU that iti would like the throttle opened by such and such amount. The ECU them sends a signal to a small electric motors attached to the throttle body to open the throttle by that amount.
It all happens so fast though that there's virtually no noticeable lag, and in many cases, this system is faster than the mechanical cable.

jesus christ. That sounds needlessly complicated.

>the system is faster than the speed of sound
i doubt this severely, especially since the action of the throttle in a mechanical throttle can still be measured by the ECU, just not controlled. (although if you know about the mechanical dampers used in tiny little fuckboy cars, you could make a case for the ECU being more accurate at damping)
it's also quite well-known that if you don't want any lag (this isn't referring to computation lag, but to the lag of the servo controlling the butterfly valve and/or the damping the ECU might apply) with drive-by-wire, you must abstain from any of the ""features"" they can provide you with.

it is

this is the most massively bloated thing i have ever even considered believing, and i hate you.
>DIY PANEL
i'm sure that looks great.