Stationeers

Stationeers

Not enough ratings
Automatic Generator Control, Percentage & Battery Wattage Display
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
195.333 KB
26 Oct @ 3:28pm
1 Change Note ( view )

Subscribe to download
Automatic Generator Control, Percentage & Battery Wattage Display

Description
This script automatically manages a generator based on station battery charge levels.

Automatic On/Off Control:
The generator turns on when total battery charge falls below a threshold percentage you define in the code, and it turns off once charge rises above a separate, user-defined percentage.

Optional Upgrades & Add-Ons:

Status Light (Optional): A lamp (such as a flashing light) that switches on whenever the generator is running.

Active Vent (Optional): A vent set to Intake mode. This allows you to automatically remove gases from the generator’s room while it is running. To use this safely, place the generator inside a sealed space.

LED Display (Optional): A display showing the current battery percentage remaining.

Advanced Monitoring (Optional):
Add two cable analyzers (one on the input side and one on the output side of your battery bank). With three small LEDs named exactly:

"Stored" → Displays total wattage stored in batteries.

"Input" → Shows the amount of power currently being generated.

"Output" → Shows the demand drawn by your network.

Implementation Steps

Set Battery Thresholds:

Edit the script constants to define the “on” percentage (generator starts) and the “off” percentage (generator stops).

Wire Devices:

Connect the generator to the IC10 chip pins defined in your code.

(Optional) Connect a status light and/or vent if you want additional indicators or gas handling.

(Optional) Connect an LED display to show battery charge.

(Optional)– Cable Analyzers:

Install two analyzers on either side of your battery system.

Label three SMALL LEDs as "Stored", "Input", and "Output". The script will map the analyzer readings to these displays.