Actions

User

Difference between revisions of "RA2lover/Sandbox/Grow light automation"

From Unofficial Stationeers Wiki

< User:RA2lover/Sandbox
(add sunset-sensing ic10 timer variant)
 
(11 intermediate revisions by the same user not shown)
Line 11: Line 11:
 
<br>Proper grow light use can maximize light efficiency.
 
<br>Proper grow light use can maximize light efficiency.
  
===Maximizing Light Efficiency=== <!--Objects.Items.PlantRecord::UpdateRecord-->
+
===Light Efficiency=== <!--Objects.Items.PlantRecord::UpdateRecord-->
Factors which affect light efficiency include a multiplicative debuff of 1/1+Light Stress, and a multiplicative buff which is applied if both light and darkness requirements are fully met.
+
Factors which affect light efficiency include a multiplicative debuff of 1/1+Light Stress, and a multiplicative buff which is only applied if the plant has exceeded its light per day requirements and is not darkness deficient.
  
 +
====Light Stress====
 
Light Stress increases by 1% every time a plant transitions from light to darkness or vice-versa. The amount of times this happens should be minimized if possible.
 
Light Stress increases by 1% every time a plant transitions from light to darkness or vice-versa. The amount of times this happens should be minimized if possible.
A plant counts as being in light if it receives at least 1% of earth's average solar irradiance (1367 W/m²). Grow lights within distance of a plant count as an additional 80% solar irradiance regardless of how close they are to it. Multiple grow lights illuminating the same plant don't stack.
+
 
 +
If a plant is deficient in light or darkness, Light stress increases at a rate of 200%/day. Otherwise, it decreases to 0% exponentially at a half-life of 1.38625 days for values of light stress below 50%. <!-- experimental calculation assuming plant simulation runs every tick which may not be guaranteed. function uses lerp smoothing and that's broken, see https://www.youtube.com/watch?v=LSNQuFEDOyQ -->
 +
 
 +
====Light/Darkness Deficiency====
 +
Light per day and Darkness per day requirements are tracked by TimeLitRatio and TimeDarknessRatio variables which are initialized at 50% for each plant. For non-deficient plants (ratios above 0%), these values decrease by 100%/day. Plants with a deficiency decrease the corresponding value at a slower date (S-curve from -100%/day at 0% to 0%/day at -500%). Plants exceeding their light/darkness per day requirements decrease their corresponding value at a faster rate (S-curve from -100%/day at 100% to -500%/day at 1000%).
 +
 
 +
<!-- WANTED FOR GUIDE: Images plotting the AnimationCurves for light/darkness usage and light/darkness gain.
 +
Curves are an EaseInOut curve on Objects.Items.PlantRecord::_darknessLightUsageMultiplier:
 +
Keyframe(-5, 0),
 +
Keyframe(0, 1),
 +
Keyframe(1, 1),
 +
Keyframe(10, 5)
 +
and an EaseInOut curve on Objects.Items.PlantRecord::_darknessLightGainMultiplier:
 +
Keyframe(-5, 5),
 +
Keyframe(-0.01, 2), (even this is still an S-curve instead of a step function)
 +
Keyframe(0, 1),
 +
Keyframe(1, 1),
 +
Keyframe(5, 0)
 +
-->
 +
 
 +
TimeDarknessRatio is supplied when the plant is in darkness (not under sunlight or growlight illumination). Supplying darkness increases the value (on an S-curve) by 200%/darkness per day period at -1% to 500%/period at -500%, 100%/period on 0-100%, and 100%/period at 100% to 0%/period at 500% (on an S-curve).
 +
 
 +
TimeLitRatio supply is similar (though using light per day instead), but the increase in values is multiplied by how much light the plant is exposed to, which can be viewed as the Light Intensity parameter on the Plant Analyser [[Cartridge]]. A plant counts as being in light if it is exposed to at least 1% of earth's average solar irradiance (1367 W/m²). Grow lights within distance of a plant count as an additional 80% solar irradiance regardless of how close they are to it. Multiple grow lights illuminating the same plant don't stack, but sun exposure on top of a grow light does.
 +
 
 +
===Maximizing Light Efficiency===
 +
 
 +
Plants with TimeLitRatio above 100% and not under darkness deficiency receive a multiplicative buff for excess TimeLitRatio, multiplying light efficiency by up to 2x at 400% TimeLitRatio. <!-- LightEfficiency *= Lerp(1, 2, (TimeLitRatio - 1) / 3) -->
 +
 
 +
Light Efficiency also receives a multiplicative debuff based on how much light stress the plant is under. LightEfficiency = 1 / (1 + LightStress)
 +
<br>Because light stress has a very slow decay period, we want to avoid any circumstances placing the plant into a deficiency.
 +
 
 +
Maximizing TimeLitRatio while avoiding a darkness deficiency requires exposing plants to as much strong light for as long as possible while still meeting the plant's darkness per day requirements throughout its entire lifetime.
 +
<br>Because TimeDarknessRatio is only initialized at 50%, plants under this farming regime need to be exposed to its first darkness period within half a day of being planted, and it needs to be long enough to last until the next darkness period.
  
  
 
==Farm designs==
 
==Farm designs==
  
Farms benefitting from grow lights can be generally separated into two types: Indoor farms that can be placed in locations without regular sunlight exposure, and outdoor greenhouses where grow lights are used to augment the sun and provide faster growth rates.
+
Farms benefitting from grow lights can be generally separated into two types: Indoor farms that can be placed in locations without regular sunlight exposure, and greenhouses where grow lights are used to augment the sun and provide faster growth rates.
 +
 
 +
===Indoor farms===
 +
 
 +
Farms using exclusively grow lights can use cheaper walls, are simpler to automate and can use horizontal space more efficiently. However, they need a reliable supply of power.
  
 +
Their grow light timing can be completely decoupled from the day-night cycle, affording more choices in how they're used.
  
 +
===Outdoor greenhouses===
 +
Farms using the sun have higher build costs and can tolerate intermittent power, but have increased cooling demands and automation systems that need to take sunlight status into account as turning grow lights off isn't guaranteed to ensure darkness.
  
 +
==Clock sources==
 +
Turning the light on/off for a period of time needs a means of detecting time. Some of which include:
  
 +
===Stopwatch===
 +
Accessible from [[Kit (Music Machines)]]. Provides a continuously increasing timer when activated which can be reset by turning it off and on again, looped with a modulo [[Kit_(Logic_Processor)#Math_Unit|Math Unit]] or paused by disabling its Activate signal. Needs continuous power to avoid a timer reset.
  
 +
===Memory-based Timer===
 +
A [[Logic Memory]] unit which continuously updates a value through logic. Preserves its current value during a power loss, but requires additional power for logic elements needed to update its value.
 +
 +
===IC10 Stack Timer===
 +
A timer preserving its time on power losses by storing its current time on an IC10 stack memory location. Comes virtually free when automating grow lights with a programmable chip, but requires using a programmable chip for automation.
 +
 +
===Daylight Sensor===
 +
Provides celestial tracking information for the sun and the ability to check if sunlight is currently hitting its location (by reading the Activate logic parameter). While tracking maximums and minimums of its vertical angle can be used to identify noon and midnight, the angles cannot be directly relied on as a timing source because they change depending on seasons. Additionally, sunlight cannot distinguish between an eclipse and a sunset on its own.
 +
 +
==Timing Circuits==
 +
 +
Circuits which provide adjustable duty cycle grow light operation. No effort is provided for synchronization with daylight, so greenhouses operating off them should use [[Composite window shutter]]s to prevent sunlight from denying darkness periods if the timers happen to get out of sync.
 +
 +
=== Stopwatch timer ===
 +
 +
A stopwatch is used as a clock source, with day duration being provided by the memory unit and darkness duration being provided by the dial (accessible through [[Kit (Logic Switch)]]). Using separate devices for these roles removes ambiguity without the need for a [[Labeller]], even in arrangements where the memory unit and dial are on the same logic network.
 +
 +
[[File:Stopwatch Grow Light Timer.png|An example indoor grow light pulse width modulation circuit.]]
 +
 +
With the provided settings, the timer will start with the light turned off for the darkness duration, then turn the light on for the rest of the day length (stored in the memory unit as 1200 seconds or 20 minutes).
 +
<br>Starting with the grow light off is safer for occasional blackouts as the circuit has no awareness of how long it's been turned off for during a blackout and short blackouts risk stressing plants with excess light.
 +
====IC10 Equivalent====
 +
{{ICCode|
 +
define SecondsPerDay 1200
 +
define SecondsPerTick 0.5
 +
define DarknessTimeSeconds 300 #how much time per day to keep grow lights off
 +
alias TimeSinceStartUp r0
 +
alias CurrentCycleTime r1
 +
alias GrowLightStatus r2
 +
start:
 +
yield #wait until the next tick
 +
add TimeSinceStartUp TimeSinceStartUp SecondsPerTick #increment time since startup
 +
mod CurrentCycleTime TimeSinceStartUp SecondsPerDay #T_CurCycle = TotalRuntime % DayLength
 +
sge GrowLightStatus CurrentCycleTime DarknessTimeSeconds # = 1 if CycleTime>=DarknessTime
 +
sb HASH("StructureGrowLight") On GrowLightStatus #batch write to all grow lights
 +
    #optional debug code that lets you see CurrentCycleTime if running on an IC housing
 +
    bdnvl db LineNumber start #if we can't see our own line number we're not on one
 +
    s db Setting CurrentCycleTime #writes its value to the housing's current state
 +
j start
 +
}}
 +
 +
=== Memory Unit Timer ===
 +
The stopwatch clock source from the previous timer is replaced with an incrementing memory. This preserves light status during power losses at an additional 10W of power consumed, and potentially adds confusion requiring a labeller as multiple components of the same type are now present in the same logic network.
 +
 +
[[File:Memory Grow Light Timer.png|Adaptation of the previous circuit replacing the stopwatch timer with a persistent memory unit timer.]]
 +
 +
In order to reduce component count, this timer uses ticks instead of seconds as a unit of time measurement.
 +
 +
===IC10 Equivalent===
 +
Includes generic stack clearing code that takes up more space than the changes required to implement timer persistence do.
 +
{{ICCode|
 +
define ProgramHash HASH("Persistent Timer Grow Light Script 0.1") #check for stack setup
 +
move sp $200 #we do this by checking for the presence of a guard variable at its end.
 +
peek r0 #if it's there we can assume it's been initialized and we can run as usual.
 +
beq r0 ProgramHash start #if it's not, we clear and initialize the stack first.
 +
#fast version of nuking the stack, but crashes if we're not running on an IC housing.
 +
bdnvl db LineNumber SlowClearStack#Only IC housings have this property
 +
clr db #clears the entire stack off the device (in this case, the housing this is on)
 +
poke $1FF ProgramHash #writes guard variable
 +
j start
 +
SlowClearStack: #routine that traverses the entire stack to clear it.
 +
move sp $000
 +
push 0 #partially unrolled loop, 8*64 iterations
 +
push 0
 +
push 0
 +
push 0
 +
push 0
 +
push 0
 +
push 0
 +
push 0
 +
brne sp $200 -8 #leave once we've reached the end off the stack, otherwise loop again
 +
poke $1FF ProgramHash #write guard variable at the end of stack
 +
#now the stack has been cleared, we can get to the actual program itself.
 +
define SecondsPerDay 1200
 +
define SecondsPerTick 0.5
 +
define DarknessTimeSeconds 300 #how much time per day to keep grow lights off
 +
start:
 +
alias TimeSinceStartUp r0#aliases are processed at runtime.
 +
alias CurrentCycleTime r1#you can do some interesting pass-by-name stuff with it.
 +
alias GrowLightStatus r2 #That'll be outside this program's scope, though.
 +
#https://stationeers-wiki.com/Advanced_IC10_Programming#Redefining_Aliases
 +
yield #wait until the next tick
 +
move sp $001 #In order to make TimeSinceStartUp persistent, we're preserving it on stack.
 +
pop TimeSinceStartUp #this consists of loading its existing value (0 on initialization)
 +
add TimeSinceStartUp TimeSinceStartUp SecondsPerTick #incrementing it
 +
push TimeSinceStartUp #and saving it back to its address (in this case, $000).
 +
mod CurrentCycleTime TimeSinceStartUp SecondsPerDay #T_CurCycle = TotalRuntime % DayLength
 +
sge GrowLightStatus CurrentCycleTime DarknessTimeSeconds # = 1 if CycleTime>=DarknessTime
 +
sb HASH("StructureGrowLight") On GrowLightStatus #batch write to all grow lights
 +
    #optional debug code that lets you see CurrentCycleTime if running on an IC housing
 +
    bdnvl db LineNumber start #if we can't see our current line number we're not on one
 +
    s db Setting CurrentCycleTime #writes its value to the housing's state
 +
j start
 +
}}
  
<!-- rest of old guide for now. will start changing this later. solar angle thing is incorrect outside the moon and even technically incorrect within it, as a starter. -->
 
  
 +
==Synchronized Timing Circuits==
  
 +
===Sunset-triggered timer===
 +
<!-- WANTED: LOGIC-BASED TRIGGER CIRCUIT THAT ISN'T DEPENDENT ON COMPONENT PLACEMENT/LOADING ORDER -->
 +
This shows a pitfall of logic circuits in that circuits relying on recursive logic are senstive to not just they order in which logic components were placed, but also the order in which they were loaded into the world. A design may function when first built, but stop working when the world is reloaded because logic components are run on a different execution order.
  
 +
'''This design is not recommended for use because it is sensitive to logic component execution order, which may not persist across world loads.'''
 +
[[File:Sunset Triggered Timer.png]]
 +
<br>The circuit uses a [[Logic Pulse Former]] assembly to create a single-tick pulse when a sunset is detected, which is then used to reset a counter to the darkness timer memory setting.
 +
<br>The darkness timer memory setting is a negative value, exploiting the fact writing any value equal or greater than 1 to a device's "On" setting turns it on. This removes the need for an additional logic compare component.
  
 +
===IC10 equivalent===
 +
Because instructions within a single IC10 run at a well-defined execution order, this design isn't sensitive to component placement order.
 +
A [[Daylight Sensor]] with cells exposed towards zenith needs to be present in d0.
 +
{{ICCode|
 +
define ProgramHash HASH("Sunset Sensing Grow Light Timer 0.1")
 +
define DarknessTimeSeconds 300
 +
define SecondsPerTick 0.5
 +
define SunsetAngle 100
 +
alias CurrentSunsetStatus r1
 +
move sp $200#check for guard variable
 +
pop r0
 +
beq r0 ProgramHash start
 +
#As an alternative to clearing the entire stack, we can just clear the values we'll use
 +
poke $0 0 #Sunset status on last check
 +
poke $1 DarknessTimeSeconds #Time since last sunset was detected
 +
poke $1FF ProgramHash
 +
start:
 +
alias DaylightSensor d0 #Aliasing a device also labels its corresponding screw.
 +
bdnvl DaylightSensor Vertical CrashWithoutSensor
 +
l r0 DaylightSensor Vertical
 +
yield
 +
sge CurrentSunsetStatus r0 SunsetAngle #r1 = are we in sunset right now?
 +
move sp $1
 +
pop r0 #get last sunset status, store into r0
 +
push CurrentSunsetStatus #and store current sunset status
 +
brle CurrentSunsetStatus r0 2 #Are we in a sunset while we weren't in one before?
 +
    poke $1 0 #If so, We're found one and restart the time since last sunset.
 +
move sp $2
 +
pop r0 #load the saved time,
 +
add r0 r0 SecondsPerTick #increment it,
 +
push r0 #and save it into non-volatile memory.
 +
sgt r1 r0 DarknessTimeSeconds
 +
sb HASH("StructureGrowLight") On r1 #Turn grow lights on if the timer has expired.
 +
    bdnvl db LineNumber start
 +
    s db Setting r0
 +
j start
  
 +
CrashWithoutSensor:
 +
alias NoDaylightSensorConfigured d0
 +
sb HASH("StructureGrowLight") On 0 #turn grow lights off as a safety precaution
 +
l r0 d0 None #throw a LogicTypeIsNone exception
 +
}}
  
  
 +
<!-- rest of old guide for now. will start changing this later. solar angle thing is incorrect outside the moon and even technically incorrect within it, as a starter. -->
  
  

Latest revision as of 06:30, 12 November 2025

Disclaimer[edit]

Due to the frequency of game updates, all solutions are subject to change and may or may not be functional.


The designs on this page are valid as of v0.2.3771.18264 (2023-01-12)

Plant mechanics[edit]

Plant growth rate is multiplied by its growth efficiency. Thus, maximizing growth efficiency results in a more effective farm.
Factors which affect it are Breathing, Hydration, Temperature, Pressure, and Light efficiencies, the plant's Growth speed gene, and a small random variance assigned when planting each plant.
Proper grow light use can maximize light efficiency.

Light Efficiency[edit]

Factors which affect light efficiency include a multiplicative debuff of 1/1+Light Stress, and a multiplicative buff which is only applied if the plant has exceeded its light per day requirements and is not darkness deficient.

Light Stress[edit]

Light Stress increases by 1% every time a plant transitions from light to darkness or vice-versa. The amount of times this happens should be minimized if possible.

If a plant is deficient in light or darkness, Light stress increases at a rate of 200%/day. Otherwise, it decreases to 0% exponentially at a half-life of 1.38625 days for values of light stress below 50%.

Light/Darkness Deficiency[edit]

Light per day and Darkness per day requirements are tracked by TimeLitRatio and TimeDarknessRatio variables which are initialized at 50% for each plant. For non-deficient plants (ratios above 0%), these values decrease by 100%/day. Plants with a deficiency decrease the corresponding value at a slower date (S-curve from -100%/day at 0% to 0%/day at -500%). Plants exceeding their light/darkness per day requirements decrease their corresponding value at a faster rate (S-curve from -100%/day at 100% to -500%/day at 1000%).


TimeDarknessRatio is supplied when the plant is in darkness (not under sunlight or growlight illumination). Supplying darkness increases the value (on an S-curve) by 200%/darkness per day period at -1% to 500%/period at -500%, 100%/period on 0-100%, and 100%/period at 100% to 0%/period at 500% (on an S-curve).

TimeLitRatio supply is similar (though using light per day instead), but the increase in values is multiplied by how much light the plant is exposed to, which can be viewed as the Light Intensity parameter on the Plant Analyser Cartridge. A plant counts as being in light if it is exposed to at least 1% of earth's average solar irradiance (1367 W/m²). Grow lights within distance of a plant count as an additional 80% solar irradiance regardless of how close they are to it. Multiple grow lights illuminating the same plant don't stack, but sun exposure on top of a grow light does.

Maximizing Light Efficiency[edit]

Plants with TimeLitRatio above 100% and not under darkness deficiency receive a multiplicative buff for excess TimeLitRatio, multiplying light efficiency by up to 2x at 400% TimeLitRatio.

Light Efficiency also receives a multiplicative debuff based on how much light stress the plant is under. LightEfficiency = 1 / (1 + LightStress)
Because light stress has a very slow decay period, we want to avoid any circumstances placing the plant into a deficiency.

Maximizing TimeLitRatio while avoiding a darkness deficiency requires exposing plants to as much strong light for as long as possible while still meeting the plant's darkness per day requirements throughout its entire lifetime.
Because TimeDarknessRatio is only initialized at 50%, plants under this farming regime need to be exposed to its first darkness period within half a day of being planted, and it needs to be long enough to last until the next darkness period.


Farm designs[edit]

Farms benefitting from grow lights can be generally separated into two types: Indoor farms that can be placed in locations without regular sunlight exposure, and greenhouses where grow lights are used to augment the sun and provide faster growth rates.

Indoor farms[edit]

Farms using exclusively grow lights can use cheaper walls, are simpler to automate and can use horizontal space more efficiently. However, they need a reliable supply of power.

Their grow light timing can be completely decoupled from the day-night cycle, affording more choices in how they're used.

Outdoor greenhouses[edit]

Farms using the sun have higher build costs and can tolerate intermittent power, but have increased cooling demands and automation systems that need to take sunlight status into account as turning grow lights off isn't guaranteed to ensure darkness.

Clock sources[edit]

Turning the light on/off for a period of time needs a means of detecting time. Some of which include:

Stopwatch[edit]

Accessible from Kit (Music Machines). Provides a continuously increasing timer when activated which can be reset by turning it off and on again, looped with a modulo Math Unit or paused by disabling its Activate signal. Needs continuous power to avoid a timer reset.

Memory-based Timer[edit]

A Logic Memory unit which continuously updates a value through logic. Preserves its current value during a power loss, but requires additional power for logic elements needed to update its value.

IC10 Stack Timer[edit]

A timer preserving its time on power losses by storing its current time on an IC10 stack memory location. Comes virtually free when automating grow lights with a programmable chip, but requires using a programmable chip for automation.

Daylight Sensor[edit]

Provides celestial tracking information for the sun and the ability to check if sunlight is currently hitting its location (by reading the Activate logic parameter). While tracking maximums and minimums of its vertical angle can be used to identify noon and midnight, the angles cannot be directly relied on as a timing source because they change depending on seasons. Additionally, sunlight cannot distinguish between an eclipse and a sunset on its own.

Timing Circuits[edit]

Circuits which provide adjustable duty cycle grow light operation. No effort is provided for synchronization with daylight, so greenhouses operating off them should use Composite window shutters to prevent sunlight from denying darkness periods if the timers happen to get out of sync.

Stopwatch timer[edit]

A stopwatch is used as a clock source, with day duration being provided by the memory unit and darkness duration being provided by the dial (accessible through Kit (Logic Switch)). Using separate devices for these roles removes ambiguity without the need for a Labeller, even in arrangements where the memory unit and dial are on the same logic network.

An example indoor grow light pulse width modulation circuit.

With the provided settings, the timer will start with the light turned off for the darkness duration, then turn the light on for the rest of the day length (stored in the memory unit as 1200 seconds or 20 minutes).
Starting with the grow light off is safer for occasional blackouts as the circuit has no awareness of how long it's been turned off for during a blackout and short blackouts risk stressing plants with excess light.

IC10 Equivalent[edit]



Memory Unit Timer[edit]

The stopwatch clock source from the previous timer is replaced with an incrementing memory. This preserves light status during power losses at an additional 10W of power consumed, and potentially adds confusion requiring a labeller as multiple components of the same type are now present in the same logic network.

Adaptation of the previous circuit replacing the stopwatch timer with a persistent memory unit timer.

In order to reduce component count, this timer uses ticks instead of seconds as a unit of time measurement.

IC10 Equivalent[edit]

Includes generic stack clearing code that takes up more space than the changes required to implement timer persistence do.



Synchronized Timing Circuits[edit]

Sunset-triggered timer[edit]

This shows a pitfall of logic circuits in that circuits relying on recursive logic are senstive to not just they order in which logic components were placed, but also the order in which they were loaded into the world. A design may function when first built, but stop working when the world is reloaded because logic components are run on a different execution order.

This design is not recommended for use because it is sensitive to logic component execution order, which may not persist across world loads. Sunset Triggered Timer.png
The circuit uses a Logic Pulse Former assembly to create a single-tick pulse when a sunset is detected, which is then used to reset a counter to the darkness timer memory setting.
The darkness timer memory setting is a negative value, exploiting the fact writing any value equal or greater than 1 to a device's "On" setting turns it on. This removes the need for an additional logic compare component.

IC10 equivalent[edit]

Because instructions within a single IC10 run at a well-defined execution order, this design isn't sensitive to component placement order. A Daylight Sensor with cells exposed towards zenith needs to be present in d0.




Geometry of Daylight Sensors[edit]

The Solar Angle variable from Daylight Sensors go from 0 degrees at mid-day, to 180 degrees at midnight, and then back to 0 degrees. The value is never negative.

Daylight sensor vertical.png

How much light/dark do plants need?[edit]

Plant 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Corn L L L L L L L L L D D D D
Potato L L L L L L L L L L D D D D
Pumpkin L L L L L L L L L D D
Rice L L L L L L L L L L D D D D D
Soybean L L L L L L L L L L D D D D D
Tomato L L L L L L L L D D D D D
Wheat L L L L L L L L L L D D D D D
Darga Fern L L L L L L L L L L D D D D D
Fern L L L L L L L L D D D D D
Hades Alpha L L L L L L L L L L D D D D D
Hades Beta L L L L L L L L L L D D D D D
Peace Lily L L L L L L L L L L D D D D D
Switch Grass L L L L L L L L L L D D D D D
Tropical Lily L L L L L L L L L L D D D D D
Winterspawn Alpha L L L L L L L L L L D D D D D
Winterspawn Beta L L L L L L L L L L D D D D D

As you can see from the table above, most plants need a minimum of 10 minutes of light, and 5 minutes of darkness. We can split the remaining 5 minutes equally, giving us 12.5 minutes of light and 7.5 minutes of darkness.

Let's do some math...[edit]

  • The planet rotates 360 degrees per day.
  • A day is 20 minutes.

360 degrees / 20 minutes = 18 degrees per minute

  • We need light for 12.5 minutes per day.

18 degrees per minute * 12.5 minutes = 225 degrees

  • We want half the light-budget on either side of mid-day

225 degrees / 2 = 112.5 degrees on either side

Bringing it all together[edit]

What you need:

  • Logic I/O (x2) > Reader and Batch Writer
  • Logic Processor > Compare
  • Logic Memory
  • Kit (Sensor) > Daylight Sensor
  • Place the Daylight Sensor. Direction of data-port doesn't matter.
  • Logic Reader > IN: Daylight Sensor VAR: Solar Angle
  • Logic Memory > Value: 112.5
  • Logic Compare > 1: Logic Reader 2: Logic Memory OUT: Less
  • Logic Batch Writer > IN: Logic Compare OUT TYPE: Grow Light OUT VAR: On

Saving Power[edit]

You can save a bit of power by delaying turning on the light. If you reduce the time with lights to 10.5 minutes, then you can set the Logic Memory to 94.5.