Stationeers

Stationeers

64 ratings
Gas Harvester V3
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
142.494 KB
Aug 13, 2020 @ 12:53am
Jan 7, 2021 @ 9:02pm
4 Change Notes ( view )

Subscribe to download
Gas Harvester V3

Description
Filtration units use a lot of power to run so it is very helpful to turn them off when not in use. This script will monitor the collection of gasses and manage your filtration unit for you.

d0: storage tank for filtered gas. (Must have a data port or some other means or measuring pressure)
d1: filtration unit to be controlled.
d2: sensor. (can be tank data port, pipe analyser or gas sensor.)
d3: (Optional) Diode slide
d4: (Optional) Diode slide
d5: (Optional) Alarm. (Flashing light or anything that will work with an on command to trigger)

It will check the installed filter and then check the sensor for a matching gas.
If it finds a partial pressure more than 10 Pa then it will activate the unit.
If the storage tank reaches 5 MPa it will shut down
if one of the filters is empty it will activate the alarm.
If both filters are empty it will shut down.
The filter condition will be indicated on the diode slides.

The picture shows the grey filter with the full setup. All of the filters have a parallel connection to the source. My setup uses the large tank as the recycling storage for overflow from the habitat and collection from the furnace to capture all that precious nitrogen. The gasses are automatically filtered and stored ready for reuse. It can be used as a scrubber to look for toxins in a habitat and turn on a filter when they reach a certain level. You are the Engineer, use it however you want.

Example setups:
https://steamcommunity.com/sharedfiles/filedetails/?id=2354102442

27/12/2020 Temperature monitoring added. Maximum and minimum temperature limits are set at the start of the script so easy to find and change to your needs. The filter will only function when the gas in the tank is within the limits you set. If you are harvesting from a furnace the filter will function until the gas in the storage tank goes above 30C (default) then will switch off until the tank cools down. This way you are not trying to use hot gasses in your base. You can change these default settings by altering the max and min temperatures at the start of the code.

8/1/2021 Fixed bug when alarm not attached. Fixed problem of pump not starting when storage tank empty.
28 Comments
Odoiporos Nov 7, 2022 @ 2:28am 
is there any particular reason for tank pressure limit at 5MPa? The tanks, as the pipes can hold up to 60MPa, right?
Stormcrow505 Jun 27, 2022 @ 11:14am 
I had the same issue, the diodes would light up and then nothing would happen. After rearranging the build a little and re-exporting to the IC, it just started working
hellraiser411 Jun 24, 2022 @ 5:06am 
Code isnt working it doesnt turn on the filtration when the proper gas is in the pipe and the diodes are just white ligths
{dont}Ford-Prefect{panic} Sep 20, 2021 @ 7:19am 
i think the also just ran into this same thing and thought id copy the new line out that was just mentioned from axelay

40: l r1 analyser Temperature

where it currently says

40: l r1 tank Temperature

just thought id mention as i enjoy mic's helpful videos for learning coding stuffs in game. not sure if the code needs updating? or if its setup is designed for a different situation. my game is on the moon for reference
Axelay Jun 13, 2021 @ 3:56pm 
It starts at line 40 in my code, but I've added some other mods, so you may see it at 34 or 35 or 36 etc. Look for "MAXTEMPERATURE tank" and change it to "MAXTEMPERATURE analyser"
Erongoth Jun 13, 2021 @ 2:41pm 
Can Someone please line out what line to change to analyser as Axelay suggested. I hate using this mips code system and cannot find what he describes to change to fix this problem.
Axelay Jun 1, 2021 @ 8:26am 
@CowsAreEvil

I really appreciate this. I have a bugfix for you.

I found that the filters were cycling on when waste gas was too hot to ingest, and failing to cycle on when waste gasses were the correct temps.

On or about line 40 there is a section that checks `tank` for pressure, to make sure the filters don't put more gas in their tank than the 'MAXPRESSURE' value.

Then there is a nearly identical check for temperature. But this check is also on 'tank'.

In the code, I have modified the temperature check to use 'analyser' instead of 'tank' so that the temperature of the waste gas pipe is measured, instead of the temperature of the tank.

I believe this is your intent, and if it isn't the intent, it should be, because turning on a filter when the destination is at the proper temperature isn't useful, it's the incoming gas temperature that is important.
thebismark May 22, 2021 @ 2:32pm 
I am having a problem where to turn the filters on I have to first turn the chip off, but when I turn the chip back on it turns the filter off immediately. I am having the same problem with the world you saved and uploaded. Also how to I increase of decrease the target PSI and temp I want in my tanks? I have no idea what I'm doing when it comes to programming.
WoBra May 15, 2021 @ 8:52am 
So it doesn't work properly for me. It does not turn on automatically. I always have to click on the power button until it stays on, which is very annoying.
Grymlok May 9, 2021 @ 2:17pm 
Are the tanks in your video insulated?