Internal Combustion Engine crude math functions. - Page 1
Forum section: electronics / general

author: firewalker
author_rank: Super Contributor
timestamp: July 19, 2018, 02:52:47 pm
content: I want to implement a really simple OBDII emulator (educational) that will send info like Air/Coolant Temperature, RPM, Throttle Position, Air Flow etc.The thing is I want to send values that are somehow valid. ideally I want only as input a potentiometer that is the accelerator pental.Are there any crude functions for a car engine? E.g. the Amount of air flow in relation to RPMs and Accelerator pental.Alexander.

author: EmmanuelFaure
author_rank: Regular Contributor
timestamp: July 20, 2018, 06:33:39 pm
content: Quote from: firewalker on July 19, 2018, 02:52:47 pmYes, but it's complex matter.At full throttle, the air flow is slightly below displacement * rpm. Look for "Volumetric efficiency". At high rpm (In detail, when the air/fuel mix reachs sonic conditions in the intake manifold) the volumetric efficiency drops.

author: james_s
author_rank: Super Contributor
timestamp: July 20, 2018, 06:46:08 pm
content: Wouldn't it be easier to look at actual OBDII data?Somewhere I have some logs from the Megasquirt injection system I have in one of my cars. It's a MAP based system so it measures the absolute pressure in the intake manifold rather than airflow directly. I don't know offhand how easy it is to extract the raw data from the logs but there must be a lot of it out there.

author: joeqsmith
author_rank: Super Contributor
timestamp: July 20, 2018, 07:33:50 pm
content: Quote from: firewalker on July 19, 2018, 02:52:47 pmInteresting. What do you want to do with it?Could you use a modern ECM and just make some hardware to simulate the engine/vehicle?

author: firewalker
author_rank: Super Contributor
timestamp: July 20, 2018, 08:57:41 pm
content: Quote from: joeqsmith on July 20, 2018, 07:33:50 pmI have done this as a est bench for testing repaired ECUs. But a real ECU floods the bus with all kinds of errors (ABS missing, missfires, body control etc). Good enough to test a real ECU (if boots and reads sensors), but not good as an education thingy.I want a really simple ECU with some "real" variables that students can monitor on the can bus (maybe K-Line too). It will be part of the lesson.Alexander.

author: james_s
author_rank: Super Contributor
timestamp: July 21, 2018, 02:46:40 am
content: Maybe look for an older ECU? The one in my '90 can operate standalone, requiring only signals from the crank sensor, coolant temp sensor and air mass meter. It only has OBDI, but OBDII came out just a few years later and some of those systems were still reasonably simple. The complexity of the newest cars has reached crazy levels, they're bloated with gadgets and toys.

author: firewalker
author_rank: Super Contributor
timestamp: July 21, 2018, 07:58:03 am
content: It seems someone has made something really close to what I want. I sure I can tweak the code to generate more meaningful values than random.Alexander.

author: Mattjd
author_rank: Regular Contributor
timestamp: July 21, 2018, 04:37:07 pm
content: Quote from: EmmanuelFaure on July 20, 2018, 06:33:39 pmso u r saying the system is probably some nonlinear DiffEq?

author: tautech
author_rank: Super Contributor
timestamp: July 22, 2018, 08:31:47 am
content: Quote from: firewalker on July 19, 2018, 02:52:47 pmFirst you need to understand there's a few ways of doing it.Typically most accelerator throttle bodies are still bowden cable operated and there's a TPS connected to the throttle butterfly shaft to indicate therealthrottle position. Then to add complexity there's also real 'fly by wire' accelerators where there's no physical throttle cable connection between the pedal and the throttle body.Airflow is controlled in the throttle bodybutmeasured in two common ways, hot wire or a sprung vane that has it's own positional sensor.First you sort out what you have and then what info you need from it.