Stormworks: Build and Rescue

Stormworks: Build and Rescue

评价数不足
Engine Management Microcontroller + Gearbox 2.0 (DEPRECATED, v4 out!)
   
奖励
收藏
已收藏
取消收藏
Vehicles: Air, Sea, Creative, Land
Microcontrollers: Calculation, Microcontroller
标签: v1.2.28
文件大小
发表于
更新日期
119.146 KB
2020 年 11 月 9 日 下午 1:55
2021 年 9 月 18 日 下午 3:30
41 项改动说明 ( 查看 )

订阅以下载
Engine Management Microcontroller + Gearbox 2.0 (DEPRECATED, v4 out!)

描述
Hi! This little project of mine aims to universally manage as much as possible, while being as flexible as possible, to satisfy as many people as possible!
It independently manages 4 engines, jets included altho not tested fully, also clutches and gearboxes and uses custom PID. Amount of controlled engines could be extended in tandem mode

Clutch code has been wrote by MrNeutron, every time you have a soft start you should thank this guy.

What you *should* have for it is a clutch on the output of each engine, what you do between gearboxes and propulsion is up to you.

clutches engage slowly from 4.1 to "min" (property) rps, which is color coded on the display too. If you set rps below 3, it's red indicating that engines are set to off, if it's 3 or 4 it's orange to indicate idling and at "min rps" it turns green to indicate they are giving power to the output. Between 4 and min color is yellow to indicate that clutches are only partially engaged. This color coding works in both modes of thic MC (which you will get to know down in the description). Red off, orange idle, green is go.

Additionally you have to add in gearboxes. Big plus of this system is very smooth ride, ratios change by small margins, but you will need 6 (minimum 4) gearboxes. You can also add in own gearboxes (uncontrolled) to shift working ranges, if calibration node is connected it will always work, but MC will not be able to use or control external gearboxes with unknown gear ratios.



All the rest is relatively straight forward, each input/output has description.
Only RPS Target output and Custom gearbox output calibration need clarification
RPS Target output is used to output the desired rps from one MC so that you can connect it to another one so they work in tandem, one as "master" and the other as "slave", like SLI, if you change "slave" property then it will only show information on screen allowing you to look at temps and rps without misleading arrows and other controls. For tandem feature to work best all those engines should be on single shaft and single gearbox, it's mainly to extend available engine count, not sure if every other configuration will work well. Feature of gearbox output control is automatically turned off.

Custom gearbox output calibration is for dealing with unpredictable nonsensical "95% efficiency of gearboxes", it has been empirically proven that efficiency doesn't change a lot, sometimes it even proved free power in radical scenarios, but it's not only torque (unpredictably) varying but also RPS so this node is used to accurately adjust for this variable. It could also be connected to linear speed sensor to provide cruise control.



There is a small bunch of editable properties, so here's a list and description of them

Max rps and min rps - you can modify to best suit your needs (efficiency and low rps? power and high rps? both by low min and high max?), engine and gearbox will work inside of these bounds. Hardcoded for 5rps min and 1.5*min for max.

Gear change time - 60 means one second. Set high for low change rate, set low for high change rate. There's no perfect default value so set it to what your vehicle needs.

Change gears by - change gears depending on throttle (will stay in high load scenario) or depending on rps (will change when engine hits max and min rps). Or both, my favourite option. Engine PID still is limited by min and max values

Skip gears in sequential - well, there's 30 gears, those are needed in automatic, but not everyone cares to have such smooth rps and stuff, especially when it needs manual clicking so you can skip certain amount of gears. Oh, also you can change between automatic and sequential on the go! Click on the left box to switch it, red is auto and green is sequential. Sadly there's no way to switch between those withoud display, but there is a saviour in this situation:

default transmission - yeah, you can start in sequential and don't even care about screen. Just enjoy a ride without reminder of how much automatization is going on, you can also set desired outputs via throttle lever, or any other input! Just connect it to the "throttle" input node and if output is above 0 it's going to take power over screen control. Sequential and a throttle lever is surely nice way to ride with a good atmosphere with pid stabilization of rp... wait, one more thing to adjust in here?!

Control on - gearbox output (default) will take such rps setpoints on engine PIDs and will control gearbox in such a way to take your screen or throttle inputs and have just exactly that on your wheels, or propellers, or whatever. All while maintaining throttle/rps bounds. If you desire really high outputs then engine will try to stay in the higher end of allowed rps to give the power needed.
if that option is off then throttle (or screen) will control only engine rps, and thus you will speed up as long as engines have power and your only control of final speed is the power of engines which depend from rps that you've set it up to. That can give even more good atmosphere with no screen driving, I think.
That option can be changed by clicking on the "out" box on screen, red means control on engine output, green means control on gearbox output.

Gearbox margin limits how aggresively gearbox tries to maintain high load low rps, don't set above 1 because at this point margin is non existant. Don't set low or gearbox will be too "afraid" of not having enough power/rps breathing room to try and stay in high load. Also MC anyway has protection from human error. You can set it to 1 or above and it will anyway limit itself from changing gears to unfavorable conditions (eg will not gear up only to gear down because engine has less than minimum rps you've set).

custom gearbox output multiplier - changes the "gearbox output calibration" value by this much, it is used for example if you have linear speed sensor, input 3.6 for control in kph or 1.943... for knots, if you have wheels you can use math to get the circumference of wheel and input just that.

max gear will limit you to just that, you can disregard 6th gearbox to save space and limit yourself to 18 gears, or dump 5th gearbox too and limit yourself to 11 gears, if you dump gearboxes without limitng adjusting this property you're gonna run into trouble. this gearbox can't really run with 3 gearboxes, so you should have at least 4.

slave for tandem MC action.

gearbox setup changes math inside to allow for reverse placement of gearboxes, for high torque low rps situations.

PID - everyone should know that, so ask someone on Stormworks discord if you are're somehow in trouble or contact me directly (steam or on discord - Krolon#0697).

Temp limit - if engines exceed that, they lose power, as simple as that. On 2x2 screen you will see purple color to indicate they've gone too hot.

toggle screen is used only when adjusting PID values and as such usually should be set to "control engines"

yes, I know, there's a lot of microcontroller properties, but it will satisfy all users



The biggest pain with this MC is setting up gearboxes, all nodes are labeled but just for sure I will say here a little bit more.
first gearbox - "reverse" means that it has to point away from engine, 1st ratio 1:1, 2nd ratio 9:5
second gearbox - pointing towards the engine, 1st ratio 1:1, second 6:5
third gearbox - pointing towards the engine, 1st ratio 1:1, second 3:2
aaand so on
If you change gearbox setup you should reverse the direction of gearboxes, so that first points towards the engine and all the rest should point away. You can also add in own gearboxes (uncontrolled) to shift working ranges, if calibration node is connected it will always work.
15 条留言
patatita 2020 年 12 月 8 日 上午 4:44 
krolon, the isn't something wrong, the probleme is....
its dificult to install in a vehicule
Krolon  [作者] 2020 年 12 月 7 日 上午 11:27 
Oi, is something wrong? Didn't play or take a look into the thing so if I left something in a bad state let me know
patatita 2020 年 12 月 6 日 上午 10:36 
:/
Krolon  [作者] 2020 年 11 月 26 日 上午 10:29 
Bug/negative feature. You've got on your ship some circumstances I have not got into while testing the MC myself. Deleted the thing and updated MC, thanks!
Kodrann 2020 年 11 月 25 日 上午 9:24 
Im confused because the engines starts normally with a button and levers for clutch and throttle.

This is the ship:

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2298149454

Thank you for your help
Krolon  [作者] 2020 年 11 月 25 日 上午 3:43 
Nope, that is not the same, engines will not try to start up until target RPS is high enough to be sustainable, it looks more like missing pipe, engine wants to start but can't sustain itself for whatever reason, or maybe guy decided to skip clutch, could help more if I had a look into the craft
esj94 2020 年 11 月 25 日 上午 2:29 
@Krolon thank you verry much then it should be clear. btw. this is a verry nice MC thank you for yor awesom work. @Kodrann you are having the same problem, please see anwwer from Krolon down below.
Kodrann 2020 年 11 月 24 日 下午 9:50 
It looks really nice but i have a problem, it keeps trying to start the engines and engine RPS doesnt go above 0-1 (it flickers). I connected everything like in the workshop example you uploaded. Im still learning the game, maybe im doing something dumb...
Krolon  [作者] 2020 年 11 月 24 日 下午 3:45 
Simple answer: you're feeding it a value between 0 and 1, which would be just normal throttle, but MC accepts "RPS Target" instead and 1 RPS is... outside of working range of diesel engine, multiply the output of your control MC by 10 or 20 and it'll be good, because 10 and 20 rps are very much inside the working range of engines

if you want more tips contact me privately because I've noticed 1 non fatal issue, just misunderstood and not activated feature, can't really check it all through and out because I'm getting lagged to 1/3 of the game speed so I'm only giving answer only to the initial mistake, but while trying to comprehend your vehicle in the editor I noticed you used some of the features as they were intended and that makes me happy
esj94 2020 年 11 月 24 日 下午 1:58