EDIT: As of version 0.13, which came out 2 months after I made this post, accumulators can be connected directly to circuit networks to read the amount of energy. Thankfully this has completely obsoleted the tedious design detailed in this post. Now all you have to do is wire a single accumulator to the control pumps, set them to turn on when A < 10, and make sure the pumps can get power, such as from a small isolated solar / accumulator network.
This is my version of the steam engine backup. The point is to make the steam engines turn on when power diminishes for any reason, such as accumulators expiring or laser turrets activating. But if accumulators are sufficient, it won't turn on.
Note that there are two isolated electrical systems here. The power for the backup system, is the 3 solar panels and 3 accumulators. It should be enough to power the 3 pumps and the combinators continuously.
The lamp is a visual indicator when the engines turn on.
Zoom in for clearer wires:
Detail for sensor:
Instructions: Blueprint string for the more compact version is below. String mod is linked below. (EDIT: It looks like blueprint strings just aren't precise enough to handle this, so, the string doesn't really work. Sorry about that. But the wiring is visible, and the combinator settings are detailed below, so you can reconstruct it.) Connect the medium pole to the (fuller) tank via green wire. Connect the lamp, or the output connected to the lamp, to the 3 hot water pumps at the steam engines via green wire. (Note: these two green wires can be combined.) (EDIT: You really only need two pumps to fully power a row of 10 engines, not 3. See the new image at the bottom.) Set pumps to A > 0. Configure delay via bottom-left combinator (unit 1/60 second), sensitivity via top-left. (For me sensitivity is 1308, using repeatable method below.) You can use a lamp with a decider to measure the level in the tank. Also make sure the pumps to the engines can be powered by the same 3 solar panels which power the system. The sole pump at the trigger mechanism tanks must only be powered by the main grid. Keep this backup system isolated from the main grid, or it will drain the 3 accumulators.
Description:
I wanted it to be fast enough, and then stay on long enough, to support many laser turrets without hesitation or interruption. The goal then was to make it as sensitive and responsive as possible, so I devised a trigger mechanism involving fluid levels and a pump to determine when power drops even slightly below demand. I measured the total activation delay as 0.20 seconds (by measuring pixels on the power graph). It will work without any combinators, but then it will only stay on for a few seconds, then briefly turn off and back on. It does this because the steam engines provide the necessary power. (Once turned on, it's not possible to tell if and when the network 'would' have enough power if the engines were off.) The slight turn-off, though brief, might be enough to affect laser turrets in a battle, which is bad because the fights are fast and furious in this game. It's sub-optimal.
So, the goal of the circuit is to configure a delay such that, once the backup is triggered, it won't turn off until at least a configurable amount of time has passed. This might have been done before, but I devised this one myself.
All five deciders have A, 1 as output.
Three deciders act as NOR logic gates, parameter A=0. (The cross-coupled ones constitute a NOR latch.)
Bottom center constant is output 1 on B.
Bottom right arithmetic is A * B, output on B.
Bottom left is B < (time)
Pumps for primary backup, and lamp, are A > 0
Bottom left decider is the minimum duration of the backup run. 1800/60 = 30 seconds. Or you could make it 300 for 5 seconds, 900 for 15 seconds, whatever.
Top left is the trigger. The more precisely tuned this is, the faster the trigger. I filled one tank, severed the adjacent pipe, then attached the other tank, the pump, and the pipe above the pump. Hopefully this will let you get exactly 2500 water in the system, a repeatable process. The trigger is attached to the 'fuller' tank, and for me the perfect setting is Water < 1308. If I set it to 1309, the backup activates unnecessarily. But at 1308, I have never once seen it turn on by a jitter or rounding error.
I don't know if this is the kind of thing this thread is for, if not let me know.
String mod:
viewtopic.php?t=6742
Blueprint string (for compact combinator & panel portion, including wires and settings):