Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
C4V ECU V3
   
Award
Favorite
Favorited
Unfavorite
Vehicles: Air, Sea, Creative, Land, Mechanical
Microcontrollers: Calculation, Cockpit, Microcontroller
Tags: v1.8.7
File Size
Posted
Updated
45.615 KB
2 May, 2023 @ 8:17am
23 Aug, 2023 @ 2:01pm
2 Change Notes ( view )

Subscribe to download
C4V ECU V3

Description
This the third version of the ECUs I make.

Nodes:

cyl comp : connect this to the engine cylinder composite
throttle : the throttle with two modes, ill explain later
air pressure: a pressure sensor right before the manifold. this is used for supercharging on modular engines
starters : this hooks to the starter of the engine
air / throttle : depending on the engine your using. this either goes to the air manifold or the engines throttle. will do the same thing and doesnt need to switch between engine types
fuel : you hook this to the fuel manifold
start : this is how you start the ECU. i would also hook the button to your coolant and any thing else you have
temp : you hook up the engines temp. if its just a mod engine, you can just use the cyl comp
RPS : the thingy that spins that does speed... its the engine RPS. what else do you expect from me?

settings:

starter type: its what button you use to start it. I might add a hand crank option in the future.
starter disengage: basically, if the engine RPS goes past this point, it will cut the starters
throttle type: ok, this is where the fun begins. if set to 0-1 then 0 is your idle and 1 is your max. if set to number then if you input 5 then the engine will try to get to 5 RPS
idle : this is the RPS the engine will idle at if 0-1 and at 0
setpoint : this is the max RPS the ECU will try to get to when 0-1 and at 1
PID or functions: if function then its just the normal ECU settings and if PID then its the PID settings.
ECU sensitivity : This is how sensitive the ECU is
P : proportional for RPS holder if set to PID
I : integral for RPS holder if set to PID
D : derivative for RPS holder if set to PID
AFR or stoich : if the ECU adjust the AFR or stoich
stoich : 0.2 or 0.5. depending on what you want if set to stoich
AFR : this is how you set the AFR if set to AFR
supercharger : this is if the ECU uses the pressure sensor or not. only need for mod engines
temp node: what node are you getting your temp from
overheating safety : yes i did add this for once, basically it cuts the engine back if the engine goes above a certain temp
overheating RPS : if the engine goes above that temp, this is what the engine cuts back to
overheating engage temp : basically, if the engine goes past this temp it cuts back
overheating disengage temp : basically, if the engine drops past this point you have full throttle again
experimental RPS holder : basically, it was ment so you never had to adjust the ECU sensitivity. didnt work out but i still have it in just in case.
experimental RPS holder sensitivity : try saying that five times fast, its just the sensitivity for that holder.
max set point for bla bla bla : this is basically the max the ECU will go to if its that setting
start RPS disengage : when the RPS hits this point, you can take control
note: its a note

ECU math:

**AFR**
air/fuel

**AFR to Fuel Throttle**
fuelThrottle = 6.88 / desiredAfr * throttle

**AFR to Fuel Throttle (Compatible with Supercharging)**
airPressure is measured through a Pressure Meter placed right before the Air Manifold
fuelThrottle = (6.88 + (0.0625 * airPressure)) / desiredAfr * throttle

**Stoich to AFR**
temperature is taken from the 3rd channel of any cylinder composite data
clampTemp = (clamp(temperature, 0, 100) * 0.01)
afr = ((14 - (desiredStoich * 2)) * (1 - clampTemp)) + ((15 - (desiredStoich * 5)) * clampTemp)

**Stoich (Since there isn't any output from the Cylinder that gives you the current stoich)**
airVolume is taken from the 1st channel of any cylinder composite data
fuelVolume is taken from the 2nd channel of any cylinder composite data
temperature is taken from the 3rd channel of any cylinder composite data
stoich = (0.01 - (airVolume / fuelVolume - 40 / 3) / (temperature + 200 / 3)) * 100 / 3

NOTE:

This ECU is is designed for constant load. so yeah you can run the engine with no load what so ever but it aint my fault that its unstable. Now there is PID settings so you can use those.



I dont know what else to say. Have fun and i dont know. dont die.
1 Comments
Nanosea 2 May, 2023 @ 9:22am 
nice one