Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
PID is difficult to understand even if i explain you exactly how it works. Basically it's all math. It compares 2 values, and outputs a decimal that's modified by 3 factors:
P = How far the current value is from desired value
I = Measures the delta of the current value in relation to P to adjust value positively or negatively according to time
D = Counteracts P based on vicinity of P to desired value. Can prevent P from reaching desired value.
At any rate, for a hybrid system all you need is a switchbox, a junction, equals and a less than.
- Switchbox disables clutch from main engines on full battery
- Junction diverts throttle control to electric motors, setting engine throttle to 0
- Equals sets a toggleable latch (such as SR latch) for the above
- Less than toggles the latch off when battery is below desired value
The latent torque in the system should be enough to kickstart the engines without hitting the engine starter.
Hello Rasputin,
Im sorry to bother you again on the subject. Im having alot of trouble.. this is what i came up with and doe not work..ive might have understood your suggestion wrong.
Im also tryin to add a second condition on where ( IF my sub is Below 0Meters AND batteries are EQUAL to 100% the diesel engine should shut down, clutch disabled and throttle diverted to eletric engines) in a perfect world...haha
I'm still learning microcontroller programming too so I won't be of much help, but I think I noticed at least two things for starters:
- it looks like your depth condition will only be true if your submarine reaches 100 m;
- the controller lacks a throttle input to feed via a junction to either the diesel engine or the electric motors, in a similar fashion to what you have setup to cut off one or the others.
So you can create a throttle control input on your microcontroller and link it to the junction input. The way you set it up, if your battery charge is 100% the junction is ON and will output your throttle control value from the top connection (and you'd want that to be your electric motor) and 0 from the bottom connection (so that would be your diesel engine). If your battery is below 50% charge, the junction is OFF and will output 0 from the top connection (cut the motor) and your throttle to the bottom connection (giving you control to the diesel).
But that means that if you are underwater and your battery charge falls under 50%, you will actually lose control of your ship, so to prevent that you'd have to link your depth detection logic to the engine switching logic to make sure that doesn't happen. It becomes a bit more complex and goes a bit out of my depth.
Usually things are less complex than you think they are :)
The engine starting button is likely a requirement in a boat which is why i included it, but it's definitely not with wheels. Wheels can kickstart the engine just fine.
Thank you also @Rashtek for giving advice. Cheers mate!
You don't necessarily need the same setup of gears, but it's just an example.