Hey there!

Your chance to introduce yourself and your vehicle
Post Reply
RustyGargoyle
contributor
contributor
Posts: 55
Joined: Sat Dec 03, 2016 2:57 am

Hey there!

Post by RustyGargoyle »

Hi,

Just a newb trying to join a scene.
Wanna get knee deep in it.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Hey there!

Post by kb1gtt »

Welcome along.

Have you found the wiki? If not here's a link http://rusefi.com/wiki/index.php?title=Manual:Hardware_Frankenso_board

I see you have been doing stuff with the simulator, do you have a particular project in mind? Do you have particular goals with the simulator?
Welcome to the friendlier side of internet crazy :)
RustyGargoyle
contributor
contributor
Posts: 55
Joined: Sat Dec 03, 2016 2:57 am

Re: Hey there!

Post by RustyGargoyle »

kb1gtt wrote:Welcome along.

Have you found the wiki? If not here's a link http://rusefi.com/wiki/index.php?title=Manual:Hardware_Frankenso_board

I see you have been doing stuff with the simulator, do you have a particular project in mind? Do you have particular goals with the simulator?
Thanks :)

Yeah I have been playing with the simulator, I want to get as much out of the way before actually playing with any hardware.
Basically learn as much as I can. At the end of the day maybe run a turbo miata with it. :roll:

I know that there is megasquirt and all the commercial ecus but for some reason am pulled in by this project :) .
So much potential.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Hey there!

Post by kb1gtt »

Sounds like a reasonable approach. Turbo Miata sounds like a fun long term goal. The simulator is great for the try it before you buy it kind of thing. You can certainly learn allot about what is is all about and how it all works by doing things with the simulator. The simulator is also handy for test purposes, and allows software development without hardware. Those can be some handy features.

Good to hear from you.
Welcome to the friendlier side of internet crazy :)
RustyGargoyle
contributor
contributor
Posts: 55
Joined: Sat Dec 03, 2016 2:57 am

Re: Hey there!

Post by RustyGargoyle »

kb1gtt wrote:Sounds like a reasonable approach. Turbo Miata sounds like a fun long term goal. The simulator is great for the try it before you buy it kind of thing. You can certainly learn allot about what is is all about and how it all works by doing things with the simulator. The simulator is also handy for test purposes, and allows software development without hardware. Those can be some handy features.

Good to hear from you.

Thanks for the warm welcome.
Am a newb to the whole tuning/ems world.
Besides the rusefi wiki for information on rusefi, what would you suggest for getting general tuning knowledge. I have a general idea of some of the basics but things like Alpha-N and PE tables etc. are way out of my league.
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Hey there!

Post by kb1gtt »

I'm kind of ignorant of a good place for learning how to tune. I guess the mega manual has a bunch of information. But at the end of the day, what we are dealing with is PV = nRT and there are many different algorithms in how to best guess the O2 in the equation. That's what alpha-n vs speed density is all about. It's about guessing the O2, such that you can accurately determine the fuel to inject. The mega manual is specifically tailored to the MS algorithm(s). We are lacking that layer of detail in the wiki at this point. It's kind of detailed in the console, which will show math equations for the algorithm.

I guess at the end of the day, getting your hands on it and doing things is probably the best way to learn what it's all about. If you are trying to keep the $ low, you might consider a brigg's and scrap iron (Briggs and Straton), or some kind of small engine. It's more mechanical work, but would be low cost. Of course if you have a test mule that also helps.
Welcome to the friendlier side of internet crazy :)
RustyGargoyle
contributor
contributor
Posts: 55
Joined: Sat Dec 03, 2016 2:57 am

Re: Hey there!

Post by RustyGargoyle »

kb1gtt wrote:I'm kind of ignorant of a good place for learning how to tune. I guess the mega manual has a bunch of information. But at the end of the day, what we are dealing with is PV = nRT and there are many different algorithms in how to best guess the O2 in the equation. That's what alpha-n vs speed density is all about. It's about guessing the O2, such that you can accurately determine the fuel to inject. The mega manual is specifically tailored to the MS algorithm(s). We are lacking that layer of detail in the wiki at this point. It's kind of detailed in the console, which will show math equations for the algorithm.

I guess at the end of the day, getting your hands on it and doing things is probably the best way to learn what it's all about. If you are trying to keep the $ low, you might consider a brigg's and scrap iron (Briggs and Straton), or some kind of small engine. It's more mechanical work, but would be low cost. Of course if you have a test mule that also helps.
:lol:
EFI lawn mower.
Ill take a closer look at the mega manual
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: Hey there!

Post by stefanst »

There's two main things the ECU controls: spark and fuel.

Both are controlled based on a 2-D table that has RPM as the x-axis and engine-load (EL) as the y-axis.
We get RPM from cam and/or crank sensors. Engine load can be measured in several different ways:

1. Mass Airflow (MAF)
We install an airflow meter in line somewhere before the intake manifold. This gives an output based on the actual mass of air flowing through it. This makes it very easy to calculate the required amount of fuel, since for a combustion engine the mass of fuel needed is the mass of air divided by the desired air-to-fuel ratio (AFR).

2. Manifold air pressure (MAP)
This one's a bit trickier. We calculate the mass of air based on the pressure in the intake manifold multiplied by the volumetric efficiency (VE) of the engine. The Volumetric efficiency is how effectively the engine sucks in air.
If the VE is 100%, the mass of air in the cylinder is proportional to the cylinder volume multiplied by the pressure, divided by the absolute temperature. The ECU has a 2-D table for VE depending on MAP and RPM. So the theoretical mass of air is multiplied by the VE in that table. The resulting value is then divided by the desired AFR (also stored in a 2-D RPM/Engine-Load table) to calculate the required mass of fuel.

3. Alpha-N
AFAIK this is pretty much only used in some ancient race-car systems or for cars with very aggressive cams that don't really build much of a vacuum at idle. We estimate the mass of air based on the throttle-angle.

The desired AFR is also stored in a 2-D table based on engine load and RPM. You usually want stoichiometric (14.7 air-to-fuel-ration for gasoline) or even slightly leaner (up to 16 or so) for cruise. For maximum power (100% throttle) you want a richer mixture, usually between 11.5 to 12.5 in order to make sure to burn every molecule of air in the combustion chamber. Richer mixture can also help in avoiding knock.

Spark tuning is easy to understand: There's a 2-D table that defines the spark advance based on engine load (EL), usually MAP or MAF and RPM. Spark advance is pretty much determined by two factors: torque and knock. The exception is idle- we don't really need much torque there. The goal is to achieve maximum torque for every cell in the RPM/EL table while avoiding knock. The only real way to tune spark is by dyno-tuning. You can get pretty close by using Virtual Dyno though.

And now you know everything you need to know to successfully tune an engine. (OK- there may be a bit more....)
RustyGargoyle
contributor
contributor
Posts: 55
Joined: Sat Dec 03, 2016 2:57 am

Re: Hey there!

Post by RustyGargoyle »

stefanst wrote:There's two main things the ECU controls: spark and fuel.

Both are controlled based on a 2-D table that has RPM as the x-axis and engine-load (EL) as the y-axis.
We get RPM from cam and/or crank sensors. Engine load can be measured in several different ways:

1. Mass Airflow (MAF)
We install an airflow meter in line somewhere before the intake manifold. This gives an output based on the actual mass of air flowing through it. This makes it very easy to calculate the required amount of fuel, since for a combustion engine the mass of fuel needed is the mass of air divided by the desired air-to-fuel ratio (AFR).

2. Manifold air pressure (MAP)
This one's a bit trickier. We calculate the mass of air based on the pressure in the intake manifold multiplied by the volumetric efficiency (VE) of the engine. The Volumetric efficiency is how effectively the engine sucks in air.
If the VE is 100%, the mass of air in the cylinder is proportional to the cylinder volume multiplied by the pressure, divided by the absolute temperature. The ECU has a 2-D table for VE depending on MAP and RPM. So the theoretical mass of air is multiplied by the VE in that table. The resulting value is then divided by the desired AFR (also stored in a 2-D RPM/Engine-Load table) to calculate the required mass of fuel.

3. Alpha-N
AFAIK this is pretty much only used in some ancient race-car systems or for cars with very aggressive cams that don't really build much of a vacuum at idle. We estimate the mass of air based on the throttle-angle.

The desired AFR is also stored in a 2-D table based on engine load and RPM. You usually want stoichiometric (14.7 air-to-fuel-ration for gasoline) or even slightly leaner (up to 16 or so) for cruise. For maximum power (100% throttle) you want a richer mixture, usually between 11.5 to 12.5 in order to make sure to burn every molecule of air in the combustion chamber. Richer mixture can also help in avoiding knock.

Spark tuning is easy to understand: There's a 2-D table that defines the spark advance based on engine load (EL), usually MAP or MAF and RPM. Spark advance is pretty much determined by two factors: torque and knock. The exception is idle- we don't really need much torque there. The goal is to achieve maximum torque for every cell in the RPM/EL table while avoiding knock. The only real way to tune spark is by dyno-tuning. You can get pretty close by using Virtual Dyno though.

And now you know everything you need to know to successfully tune an engine. (OK- there may be a bit more....)
wow, Thanks for all the information :)
I really appreciate you taking time out to sum it up for me.

I have some questions thou,

With MAF how does the ECU determine the density of the air? wouldn't it change with altitude resulting in more or less mass of air? or is that not really a thing.

when tuning MAP based systems, what your actually modifying is the VE in each cell?, in an effort to meet the target AFR?

And with ALPHA-N, How is load calculated?. for example wouldn't full throttle down hill be less load than full throttle up hill?

Also is rusEFI usable for daily driving or is it just experimental?
Or does it depend on the motor its hooked up to?

Basically what are the current limitations?

I dont see anyone doing turbo LS with it :lol:

Seems like its ready to go, but I don't see a whole lot of people using rusefi, Why do you think it hasn't taken off yet?
stefanst
contributor
contributor
Posts: 703
Joined: Wed Feb 17, 2016 12:24 am
Location: USA 08530

Re: Hey there!

Post by stefanst »

RustyGargoyle wrote:wow, Thanks for all the information :)
I really appreciate you taking time out to sum it up for me.

I have some questions thou,

With MAF how does the ECU determine the density of the air? wouldn't it change with altitude resulting in more or less mass of air? or is that not really a thing.

when tuning MAP based systems, what your actually modifying is the VE in each cell?, in an effort to meet the target AFR?

And with ALPHA-N, How is load calculated?. for example wouldn't full throttle down hill be less load than full throttle up hill?

Also is rusEFI usable for daily driving or is it just experimental?
Or does it depend on the motor its hooked up to?

Basically what are the current limitations?

I dont see anyone doing turbo LS with it :lol:

Seems like its ready to go, but I don't see a whole lot of people using rusefi, Why do you think it hasn't taken off yet?
MAF: There are different styles of MAFs. The simplest is just a spring loaded flapper with a potentiometer attached. That's pretty crude, but will get you in the ballpark. Then there are heated wire anemometers. They use an electrically heated wire and measure how much it is cooled down by the airflow. I believe there's another one, but I can't recall how that works. The hot-wire system needs to be compensated for air temperature. I believe some do that internally but some need the ECU to do the compensation.

MAP: Your assumption is correct

Alpha-N: It's pretty arcane stuff and I never really read up on it. But essentially you use throttle position to estimate airflow. Engine load is determined by throttle position and RPM, not by the situation of the car. If you're rolling down a hill with the throttle wide-open, you'll just accelerate. If you're going up the hill with the throttle wide open you'll accelerate less. But in both cases the torque the engine is producing is the same. Don't use alpha-N if you're not building a really strange engine.

Most aftermarket ECUs use MAP afaik. if you're planning on turbo-ing your Miata, use MAP- your stock MAF sensor can't accurately measure the added airflow from the turbo. MAP is safe easy and makes good power.

Usability: With the latest changes it should be pretty stable, but I'm not aware of anybody using it for a DD just yet. But there's tomiata who seems to be getting there and the yellow Lemons Festiva has completed several races on rusefi without failure.

An LS is actually a fairly simple engine. Turbocharging doesn't really add any requirements for the ECU. So a turbo-LS is not much harder than a stock Miata, as strange as that may sound. You just need a few more coil and injector drivers.
RustyGargoyle
contributor
contributor
Posts: 55
Joined: Sat Dec 03, 2016 2:57 am

Re: Hey there!

Post by RustyGargoyle »

Yeah the only reason i bring up ALPHA-N is because when people run ITBs that seems like the only option they have.
And when ITB's and fuel injection seems to be some sort of black magic, the information in my eyes that is, seems to be spread thin on the topic.

And yeah I guess your right an LS and Miata shouldn't be that far off.

With that said, how will someone adapt rusEFI to there particular application.
If someone had a V8 with VVT. How would they setup rusEFI for that?

I dont think it can all be done in tunerstudio :P

Would the firmware need to be modified to support new engines/firing orders etc.?
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Hey there!

Post by kb1gtt »

RustyGargoyle wrote:EFI lawn mower.
Do you have a lawn this time of year? Were I'm at we have late fall right now. So a snow blower might be better suited :) http://jaredharvey.com/Files/projects/Engine_control/snow_blower/snow_blower.htm

About MAF vs MAP, OEM's like MAF because they can adapt one ECU or one validated program to a variety of engines. However the MAF is a intake restriction, so not friendly for power driven applications. Also the MAF has a tolerance, as the air flow velocity goes up, you start to get turbulent flow instead of laminar flow. When this start to happen your measurement tolerance goes to pot. To get laminar flow on a high power V8 your going to need an intake that's more like 12 inch diameter. Not practical for really any applications. Also a sensor that is that large would have trouble measuring low flow's, so not good at idle. Often an OEM will use MAF for low RPM, and MAP for high RPM, with a table that blends the 2 equations as the RPM goes up. The MAF is good for emissions controlled applications, and your not likely to see it in power applications.

Also lets not forget there are other algorithms that aren't MAF, Alpha-N or Speed Density. Those three are made popular mostly because MS has then detailed in the mega manual. There are also algo's that use TPS directly as your load, AKA look at your TPS signal, and draw a correlation to the injector pulse width. You'll find that 100% injector pulse is when you are 100% TPS. After this initial assumption, then you get modifications for things like RPM, temperature, etc. The algo is basically TPS + compensation + compensation +compensation. This algo is handy for CPU limited CPU's because you do a quick math to get your initial fuel pulse, then later on you have a addition or subtraction of the various compensations factors. If you miss the compensation modifications, you generally run rich, which is handy for safe operation. As well you tend to hit this situation when at high RPM. Again you typically want it rich. On a good note, these algo's are not currently done in rusEFI.

I believe V8 VVT is possible. I would need to draw a schematic to make sure, but I believe it can be done. However VVT is a young feature and currently is probably not 100% developed. However it's probably really close. This is currently being tuned for the first time on some Miata's. Oh also lets not forget the thing that this is not for emissions controlled vehicles. AKA it does not play nice with cat's. Cat's need an oscillation between rich and lean. This does not currently oscillate from lean to rich, so it would cause all sorts of problems with cat's.

Tuner Studio allows you to create and use different fields. It probably can all be done with TS, but needs the TS config file and the firmware to back it.

Why is it not used more as DD's and such? I would think time is a big issue, as well it's not PNP for most applications. This is a reasonably young project and we don't push it commercially. So less people know about it. When people learn about it, they still have significant wiring before they have something working. So it's currently mostly for the more hard core people. It's all getting better, but it takes time.
Welcome to the friendlier side of internet crazy :)
RustyGargoyle
contributor
contributor
Posts: 55
Joined: Sat Dec 03, 2016 2:57 am

Re: Hey there!

Post by RustyGargoyle »

Am in the NE USA so yeah its pretty cold, Just thinking how would one source an injector small enough for a lawn mower or similar 2 stroke engines.

On a side note what processor is this firmware written for?
I think the STM32 discovery board comes in different flavors am not too sure its just a long string of characters slapped together imo.

So if someone gets a Frankenso board, Do i need to fab up separate boards for injector drivers and coil drivers etc etc.

Also how do you setup the MCU for a particular engine?

set engine_type X command?

And if so how does this effect pinout?
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Hey there!

Post by kb1gtt »

The rusEFI firmware used an OS known as ChibiOS, and hides behind the Hardware Abstraction Layer (HAL) offered by ChibiOS. ChibiOS works for several different chips, so it would be reasonably easy to port to other chips, as long as they are part of the supported chips under ChibiOS. Currently rusEFI is configured for the STM32F4. The Discovery STM32F4 board only comes with that chip. However you can get things like the STM32F429 discovery board which uses a different chip.

There are hard coded engine configurations, which simplifies the setup by setting default values. However you can set the crank decoder manually, as well as pretty much every other parameter, so you can technically do many different configurations, even if one hasn't been done yet. As well if you get the proper data to @russian, he can generate a wheel decoder if one doesn't already exist. About pin out, again mostly configurable.

Sorry not very user friendly, but very flexible.

Frankenso drives injectors directly, but the ignition is done via external igniters. The ignition drivers either 5V or 12V which allows it to work with almost all igniters. If you don't already one one, I would suggest considering the J701.
Welcome to the friendlier side of internet crazy :)
RustyGargoyle
contributor
contributor
Posts: 55
Joined: Sat Dec 03, 2016 2:57 am

Re: Hey there!

Post by RustyGargoyle »

kb1gtt wrote:The rusEFI firmware used an OS known as ChibiOS, and hides behind the Hardware Abstraction Layer (HAL) offered by ChibiOS. ChibiOS works for several different chips, so it would be reasonably easy to port to other chips, as long as they are part of the supported chips under ChibiOS. Currently rusEFI is configured for the STM32F4. The Discovery STM32F4 board only comes with that chip. However you can get things like the STM32F429 discovery board which uses a different chip.

There are hard coded engine configurations, which simplifies the setup by setting default values. However you can set the crank decoder manually, as well as pretty much every other parameter, so you can technically do many different configurations, even if one hasn't been done yet. As well if you get the proper data to @russian, he can generate a wheel decoder if one doesn't already exist. About pin out, again mostly configurable.

Sorry not very user friendly, but very flexible.

Frankenso drives injectors directly, but the ignition is done via external igniters. The ignition drivers either 5V or 12V which allows it to work with almost all igniters. If you don't already one one, I would suggest considering the J701.
So to run something like a coil pack will require external circuitry?

Also the STM32F4 seems to be a general family of processors.
http://www.st.com/en/microcontrollers/stm32f4-series.html?querycriteria=productId=SS1577

So anyone of these can be flashed with the latest bin?


edit:
Ohh so this is the board you are talking about?

http://www.st.com/en/evaluation-tools/stm32f4discovery.html
User avatar
kb1gtt
contributor
contributor
Posts: 3758
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Hey there!

Post by kb1gtt »

The F407 is one in the F4 series. Yes that's the brain board. It cost about $20 as noted here
https://octopart.com/stm32f407g-disc1-stmicroelectronics-66937240
Welcome to the friendlier side of internet crazy :)
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Hey there!

Post by AndreyB »

If only there was a way to take this great content and push it into the wiki... Just imagine having this great knowledge nicely structured.

Pretty please!
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
RustyGargoyle
contributor
contributor
Posts: 55
Joined: Sat Dec 03, 2016 2:57 am

Re: Hey there!

Post by RustyGargoyle »

kb1gtt wrote:The F407 is one in the F4 series. Yes that's the brain board. It cost about $20 as noted here
https://octopart.com/stm32f407g-disc1-stmicroelectronics-66937240
Thanks, gonna pick one up soon.


russian wrote:If only there was a way to take this great content and push it into the wiki... Just imagine having this great knowledge nicely structured.

Pretty please!

Would be nice :D
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Hey there!

Post by AndreyB »

Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Post Reply