Page 1 of 1

Instant-On Backup Power

Posted: Fri Apr 29, 2016 12:34 am
by sckuzzle
Ever want your backup steam power to only activate when you are out of your accumulator power? Now you can! While the inserter method works, it can be finicky in the timing and also takes a few seconds to activate - in which time your base could be swamped! So here's my instant (well, 2-tick) method of activating backup power.

I used JasonC's method of detecting when accumulators are out of power found here. Without it this would not have been possible!

Requirements:
Circuit network
Electric Engine

Strongly Suggested:
Fluid Handling

I'll create a blueprint string containing all of it tomorrow for you guys to try out. For now, an explanation of how it works:

An overview:
overview.png
overview.png (1.72 MiB) Viewed 16008 times
Section A deals with the detection of low power and converting that information to a variable length ON signal before checking for power again. There is a two-tick delay before the power comes on, so I suggest checking every 3-10 seconds. More on this later.

Section B: A backup power system. You need this not to be connected to the main grid so that you still have energy to power the pumps to the steam engines.

Section C: The pumps. These only turn on when given the "go" signal (RED >1) from A. Note that the steam generators are connected to the main grid, as well as the inserters for the boilers. Each pump can supply enough water for 5 steam generators (so don't put 10 in a line).

The detailed bit:
detailed.png
detailed.png (702.06 KiB) Viewed 16008 times
D, E, F, and K are all the same as JasonC's method. I will briefly cover what they do, but for more information go to his thread.

Pole K is attached to the main grid, and powers an accumulator. We are going to detect when this accumulator runs out of power in order to determine when to turn on the backup power.

Pole D covers the accumulator and combinator E. It is NOT attached to any other poles (shift+left click to remove lines).

Combinator E is set to YELLOW * -1 and outputs YELLOW.

Combinator F is powered by the BACKUP grid (pole G). It is set to YELLOW+1 and outputs YELLOW.

Red wire connects the inputs of E and F, the output of F, and the input of H. A green wire connects the output of E and the input of H. When there is full power, the green and red network sum will be 1 for yellow. When there is low power, the numbers become mitchmatched and increases. Combinator H takes as a condition that YELLOW > 1 and outputs RED with a value of 1. Whenever there is low power, combinator H outputs 1 on RED.

Combinators I and J form the timer. I has parameter RED < 600 (or the time to check for power, in ticks*), and outputs RED as the input count. J has parameter RED > 1, and outputs RED as 1. Green wire connects the output of H, I, and J to the input of I and J as well as ALL of the electric pumps. In conjunction, these two combinators increase RED by one each tick until it reaches 600, at which point it resets back to one. When there is low power, this count is increased to two, and the process restarts.

*actually the low-power detector adds around 20 to this number. So for the first 20 ticks, the number counts at double speed, resulting in 1/3 sec less than you would expect.

The Results:
power.png
power.png (78.29 KiB) Viewed 16008 times
The system detects in two ticks when the power is off, and kicks in the backup. It runs for a brief period, and shuts off. Since the backup power has charged the accumulators, it lets them run until the power is again off and it turns on again.


Let me know if something isn't clear and I can revise my description / make a simplified diagram!

Re: Instant-On Backup Power

Posted: Tue Oct 25, 2016 12:10 pm
by GhengizCohen
I'm glad I found this and got it to work.....eventually. Kept thinking I was doing something wrong so redid all parts a few times, untill I realised I had to set the conditions on the pumps themselves too, yep I'm stupid lol. sorta kinda missed that reading the description, maybe for other future idiots you could make that point a bit more obvious or highlight it.

Re: Instant-On Backup Power

Posted: Tue Oct 25, 2016 2:16 pm
by impetus maximus
i use a simpler method.

have an SR latch (1 combinator, 1 arithmatic) connected to a power switch, to connect the power poles to the steam engines. no pumps besides offshore. no empty boilers.
the SR latch reads the accumulators, during low power it switches on the steam engines which are already up to normal operation temperature. no waiting for power.

Re: Instant-On Backup Power

Posted: Sat Oct 29, 2016 12:58 am
by cheetored20
impetus maximus wrote:i use a simpler method.

have an SR latch (1 combinator, 1 arithmatic) connected to a power switch, to connect the power poles to the steam engines. no pumps besides offshore. no empty boilers.
the SR latch reads the accumulators, during low power it switches on the steam engines which are already up to normal operation temperature. no waiting for power.
do you have any images of it i can use? i cant figure out how to get the arithmatic sr latch to work

Re: Instant-On Backup Power

Posted: Sat Oct 29, 2016 10:10 am
by impetus maximus
cheetored20 wrote: do you have any images of it i can use? i cant figure out how to get the arithmatic sr latch to work
SR.latch.jpg
red wire from accumulator to decider combinator. A < 10 (when to switch on), output A 1. GREEN wire from decider combinator output to arithmetic combintator input.
set A * -25 (tells when to turn off. in this example it turns on when accumulators are less than 10 and turns off when they are above 34.) output A.
red wire from arithmetic out to decider combinator input. then red wire from decider combinator output to the switch with enable condition A > 0.
run copper wire from power network to switch, then switch to steam engine poles.

a good video explaining how and why this works here. just wire to the switch instead of the pump as he instructs.