What you learn today
- Start a generator on low charge
- Stop when full
- Show the status
The Mars night is long, and after the last dust storm the solar panels are badly damaged. They deliver nothing any more, the batteries sink. Now the generator has to step in – by itself, in time, and it should report when it runs out of fuel.
The devices
| Device | Name |
|---|---|
| two station batteries | “Akku” |
| solid fuel generator | “Notstrom” |
| LED display | “Ladestand” |
| LED | “Generatorstatus” |
The rules
- Charge: sum of Charge divided by sum of Maximum, on “Ladestand” in Percent mode.
- Start below 25 %, stop from 95 %, keep the state in between.
- Status LED:
| Situation | Colour |
|---|---|
| generator off | green |
| generator running and producing | orange |
| generator should run but has produced nothing for more than 10 ticks | red |
| batteries unreadable | red |
- Batteries unreadable: generator off, display 0, LED red.
Building blocks
You know everything from this week: the sums from the battery lesson, the hysteresis and the fuel counter from the generator lesson, the select cascade from the traffic-light lesson.
move colour Color.Green
select colour running Color.Orange colour
select colour warn Color.Red colour
select colour missing Color.Red colour
Milestones
- Charge in percent from the sums.
- Below 25 % the generator starts.
- From 95 % it stops, in between it keeps its state.
- Status LED: green when idle, orange while running.
- No fuel: red after more than 10 ticks.
- Batteries unreadable: generator off, LED red, display 0.
A backup generator rarely runs. Build in a test run by raising START briefly – then you see in the game whether it really starts before the storm arrives.
Project task
Task
Build the backup generator from the lesson. Devices: station batteries “Akku”, solid fuel generator “Notstrom”, LED display “Ladestand”, LED “Generatorstatus”.
- Charge = sum of Charge / sum of Maximum, Mode Percent.
- Generator on below 25 %, off from 95 %.
- LED: green off, orange running, red after more than 10 ticks without output while running, or without batteries.
- Without batteries: generator off, display 0.
Milestones
- Milestone 1: charge in percent
- Milestone 2: below 25 % the generator starts
- Milestone 3: from 95 % it stops
- Milestone 4: green when idle, orange while running
- Milestone 5: no fuel – red
- Milestone 6: batteries unreadable
Hints
Hint 1
Charge: two lbn … Sum, one div, then snan missing share.
Hint 2
Because share is set to 0 when batteries are missing, the hysteresis needs an extra and with “not missing” – otherwise the generator starts.
Hint 3
Colour: green, then orange while running, red on warning or failure.
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