About Solar panel auto tracker with fine-tuning
From Steam WorkshopSolar Tracker with auto fine-tuning Points every solar panel on the data network at the sun, and keeps learning a small correction so your panels stay close to 100% efficiency even when the sensor…
Solar Tracker with auto fine-tuning
Points every solar panel on the data network at the sun, and keeps learning a small correction so your panels stay close to 100% efficiency even when the sensor and panels are not perfectly lined up.
Setup
- d0 - Daylight Sensor
- d1 - any one of your solar panels (optional - without it the script just tracks the sun, no fine-tuning)
- Put the chip in an IC Housing on the same data network as the sensor and the panels.
- Works with all panel types: Solar Panel, Dual, Heavy, Heavy Dual and all 1x5 versions.
Settings
Everything you might want to change is at the top of the script:
- SensorPort / PanelPort - which way the ports of the sensor and the panels face (0, 90, 180 or 270). If your panels point the wrong way, change PanelPort in steps of 90.
- Probe, Step, Settle, Pause, MaxTune, Noise - fine-tuning settings, the defaults work fine.
All panels must face the same way (same port direction), because they all get the same angles.
Status codes
The script writes its status to the IC Housing's Setting (look at the housing, or read it with a console / another chip): [table] [tr][th]Code[/th][th]Meaning[/th][/tr] [tr][td]0[/td][td]OK - tracking and fine-tuning[/td][/tr] [tr][td]1[/td][td]No Daylight Sensor on d0[/td][/tr] [tr][td]2[/td][td]No solar panel on d1 - tracking only, no fine-tuning[/td][/tr] [tr][td]3[/td][td]Night, or the reference panel is in shadow[/td][/tr] [tr][td]4[/td][td]Panels are at their tilt limit (15° / 165°) - vertical fine-tuning paused[/td][/tr] [/table]
How the fine-tuning works
Only the panel on d1 is used for testing - all other panels stay on the best known angle. The test panel is pushed 1° to one side and the other in the order + - - +, and its efficiency (Ratio) is read after each move. The sun keeps moving during the test, but with this order its effect cancels out, so only the side that is really better counts. The correction then moves 0.25° that way. Horizontal and vertical take turns. The vertical test is skipped when the panels are at their tilt limit (15° / 165°), e.g. at sunrise and sunset.
Made with Lua for IC10
This script was written in Lua and compiled to IC10 with Lua for IC10:
- Steam Workshop mod: Lua for IC10 - write Lua right in the in-game IC editor
- Online playground: luaic.vercel.app
The IC10 in this script is the compiler's output, lightly edited by hand: comments, aliases, defines and labels were added so it is easier to read and set up. It works the same as the compiled code.
Lua source:
-- Solar panel auto tracker with fine-tuning
-- d0: Daylight Sensor, d1: reference solar panel (optional)
-- Fine-tune: d1 is pushed ±PROBE in the order + - - +, so the sun's
-- movement cancels out and only the better side counts.
-- Status code in the housing's Setting: 0 OK, 1 no sensor,
-- 2 no panel on d1, 3 night/shadow, 4 panels at tilt limit
local sensor = d0 --[[@as StructureDaylightSensor]]
local ref = d1 --[[@as StructureSolarPanel]]
local SENSOR_PORT = 180
local PANEL_PORT = 180
local PROBE = 1
local STEP = 0.25
local SETTLE = 4 -- ticks per test position
local PAUSE = 10 -- ticks between tests
local MAX_TUNE = 10
local NOISE = 0.002
local MIN_V = 15 -- panel tilt limits
local MAX_V = 165
local SOLAR = hash("StructureSolarPanel")
local SOLAR_DUAL = hash("StructureSolarPanelDual")
local HEAVY = hash("StructureSolarPanelReinforced")
local HEAVY_DUAL = hash("StructureSolarPanelDualReinforced")
local LONG = hash("StructureSolarPanel1x5")
local LONG_SINGLE = hash("StructureSolarPanel1x5Single")
local LONG_HEAVY = hash("StructureSolarPanel1x5Reinforced")
local LONG_HEAVY_SINGLE = hash("StructureSolarPanel1x5ReinforcedSingle")
local function aim(h, v)
batch.write(SOLAR, "Horizontal", h)
batch.write(SOLAR, "Vertical", v)
batch.write(SOLAR_DUAL, "Horizontal", h)
batch.write(SOLAR_DUAL, "Vertical", v)
batch.write(HEAVY, "Horizontal", h)
batch.write(HEAVY, "Vertical", v)
batch.write(HEAVY_DUAL, "Horizontal", h)
batch.write(HEAVY_DUAL, "Vertical", v)
batch.write(LONG, "Horizontal", h)
batch.write(LONG, "Vertical", v)
batch.write(LONG_SINGLE, "Horizontal", h)
batch.write(LONG_SINGLE, "Vertical", v)
batch.write(LONG_HEAVY, "Horizontal", h)
batch.write(LONG_HEAVY, "Vertical", v)
batch.write(LONG_HEAVY_SINGLE, "Horizontal", h)
batch.write(LONG_HEAVY_SINGLE, "Vertical", v)
end
local hTune = 0
local vTune = 0
local axis = 0 -- 0 = horizontal, 1 = vertical
local phase = 0 -- 0 = waiting, 1..4 = test positions + - - +
local wait = PAUSE
local r1 = 0
local r2 = 0
local r3 = 0
while true do
db.Setting = 1
if sensor.exists then
local h = (sensor.Horizontal + PANEL_PORT - SENSOR_PORT - 90 + hTune + 720) % 360
local v = 90 - sensor.Vertical + vTune
aim(h, v)
db.Setting = 2
if ref.exists then
local ratio = ref.Ratio
local atLimit = v - PROBE < MIN_V or v + PROBE > MAX_V
if ratio > 0 then
db.Setting = select(atLimit, 4, 0)
else
db.Setting = 3
end
-- test only in daylight and when the panel can tilt both ways
local ok = ratio > 0 and (axis == 0 or not atLimit)
if not ok then
phase = 0
wait = PAUSE
else
if phase > 0 then
local off = select(phase == 1 or phase == 4, PROBE, -PROBE)
if axis == 0 then
ref.Horizontal = (h + off + 360) % 360
else
ref.Vertical = v + off
end
endHighlights
From source dataFootprint
Rated a light load on a server.
Last update
Its author last shipped an update 8d ago.
Solar panel auto tracker with fine-tuning on Nxeon
From our catalogue- One-click install
- Not available. One-click install isn't available for this game's mods yet. Download it and upload it to your server in Files.
- Server load
- light
- Smallest plan we suggest
- Stationeers — 4 GB (4 GB RAM). This follows our own load rating above, not a benchmark.
- Latest build
- 2026-11-22, released 2026-11-22
Game versions by loader
| Loader | Game versions | Newest |
|---|---|---|
| Workshop |
From 1 recorded build of Solar panel auto tracker with fine-tuning.
Run Solar panel auto tracker with fine-tuning on a Stationeers server
Deploy a server above, then upload the file in Files.
What kind of mod it is
From the catalogQuality of life & UI
Small conveniences, tweaks and interface improvements players notice straight away.
Compatibility
- Game
- Stationeers
Verified at the source
- ✓Steam WorkshopOfficial listing, checked 2026-11-29Open ↗
- ✓AuthorSus, as published on Steam Workshop
- ✓LicenseNot published by the sourceFree
