stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. IC10 academy
  3. Day 190

Day 190 of 365 · Pro · Month 7: Power and energy

Battery strategy

When a battery may pay for comfort and when it stays reserved for the night. Plus the values of PowerMode and the station battery's charge levels.

Lesson 16 min Week 28

What you learn today

  • Charge and discharge thresholds
  • PowerMode and charge levels
  • Reserve for the night

At noon lights, heating and workshop run, the batteries are full. At two in the morning life support fails because comfort drained the battery. A battery strategy prevents exactly that.

Charge and discharge thresholds

The battery is a buffer, not a power plant. A strategy defines how far it may be discharged and from when it has to be charged again:

ThresholdMeaning
discharge thresholdbelow it unimportant loads leave the grid
reconnect thresholdonly above it may they come back – with a gap, i.e. hysteresis
charge thresholdbelow it the generator starts

Reserve for the night

During the day the sun refills the battery. Comfort may happily pull it down to 30 % then. At night nothing comes in – enough for life support until morning has to remain. So the threshold depends on the daylight:

select reserve light DAY_RESERVE NIGHT_RESERVE
sge tmp level reserve
and comfort comfort tmp

The daylight sensor delivers Activate for that. If it is missing, the chip assumes night – sgtz turns NaN into 0.

PowerMode and charge levels

Two different numbers are called “Mode” in the game:

DeviceMode means
Station batterycharge level: 0 Empty, 1 Critical, 2 VeryLow (from 10 %), 3 Low (from 25 %), 4 Medium (from 50 %), 5 High (from 75 %), 6 Full
Area power controlPowerMode.: 0 Idle, 1 Discharged, 2 Discharging, 3 Charging, 4 Charged

You write the values of PowerMode. as a namespace, such as define DISCHARGING PowerMode.Discharging. They describe what the battery in the device is doing right now – charging, discharging, full. The battery's charge level only says how full it is.

Warning

Do not mix the two up: a station battery with Mode 4 is half full, an APC with Mode 4 reports “Charged”, i.e. full. For thresholds use Ratio (0 to 1) anyway – it is more precise than any level.

Tip

With several batteries, Mode with Minimum shows the weakest. For the charge of the whole bank Ratio with Average is right.

Exercise

Task

The battery bank “Akku” supplies the comfort lights “Komfort”. The daylight sensor “Sonne” delivers Activate.

  • Comfort off below the reserve: 30 % during the day, 60 % at night (or without sensor)
  • Back on only 10 percentage points above the reserve
  • Display “Akku”: charge in percent, display “Stufe”: lowest charge level (Mode with Minimum)
  • Batteries gone: comfort off, both displays −1

Hints

Hint 1

Reserve: select reserve light DAY_RESERVE NIGHT_RESERVE.

Hint 2

Hysteresis with sge: first and with the reserve, then or with reserve + GAP, finally and with ok.

Hint 3

Displays with select … ok … -1.

Quiz

4 questions. You pass from 60 % – the server does the grading.

Complete the day

  • Passed the simulator exercise
  • Passed the quiz with at least 60 %

Without an account progress is saved in this browser only.

Report a mistake in this lesson

Please sign in to report. Sign in

Esc
↑ ↓ selectEnter open/ opens search anywhere