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

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

Project: solar tracker

The base's solar tracker: panels follow the sun, park towards the sunrise at night, and two displays report output and efficiency.

Project 30 min Week 27

What you learn today

  • Track panels
  • Park at night
  • Show output

This week took you from sin and cos via atan2 and the daylight sensor to whole solar fields. The project is the chip that will then run for years in the control cabinet: a solar tracker with display.

The plant

DevicePrefabName
Daylight sensor (oriented like the panels)StructureDaylightSensor“Sonne”
Solar panelsStructureSolarPanel“Solar”
LED display outputStructureConsoleLED5“Leistung”
LED display efficiencyStructureConsoleLED5“Wirkung”
Flashing lightStructureFlashingLight“Solarwarnung”

The rules

  • Day: take Horizontal from the sensor, Vertical = 90 − sensor value, limited to 15 … 165.
  • Night (Activate 0): parking position 90° / 60°.
  • Output: sum of Charge of all panels “Solar”.
  • Efficiency: average Ratio in percent.
  • Sensor gone: panels stay put, warning on – the displays keep running.
  • Panels gone: output 0, efficiency −1, warning on.

So the displays keep running without a sensor, the chip does not jump back to the start on NaN but only over the tracking:

bnan h display    # without sensor: turn nothing, but display

Milestones

  1. Tracking with conversion and limits
  2. Park at night
  3. Show output and efficiency
  4. Sensor gone: stay put, warning, display keeps running
  5. Panels gone: output 0, efficiency −1, warning
Tip

Sum over no panels gives 0, Average on the other hand NaN. That is exactly why the output shows 0 when panels are missing, and the efficiency needs a NaN guard.

Project task

Task

Build the solar tracker following the rules above. defines, aliases and reading the sensor are already there.

Milestones

  1. Milestone 1: tracking with limits
  2. Milestone 2: park at night
  3. Milestone 3: output and efficiency
  4. Milestone 4: sensor fails
  5. Milestone 5: panels removed

Hints

Hint 1

Tracking and parking as in lesson 186, but with bnan h display and the label display: after it.

Hint 2

Output with lbn … Charge Sum, efficiency with lbn … Ratio Average times 100.

Hint 3

If the panels are missing, the efficiency is NaN: snan, “or” it into the warning, set it to −1 with select.

Quiz

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

Complete the day

  • Passed all milestones of the project
  • 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