Night switch for steam engines based on combinators

Power Plants, Energy Storage and Reliable Energy Supply. All about efficient energy production. Turning parts of your factory off. Reliable and self-repairing energy.
orzelek
Smart Inserter
Smart Inserter
Posts: 3922
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Night switch for steam engines based on combinators

Post by orzelek »

I tried building another version of night switch - this time with combinator based pump steering.
Accumulator measuring is done with standard accumulator sharing between two networks.

Con:
Needs careful tuning - you need power to calculate state and activate pumps before accus run out.

Pros:
Can control anything with it and it reacts very fast - especially if used on pumps that are between boilers/hot water tanks and steam engines.
You can set for how long it will be active to control time of steam power running - only small buffer is in the pumps themselves.
Combinators1.png
Combinators1.png (1.51 MiB) Viewed 22206 times
Smart chest contains 8 wood. It's connected with green wire to the pole - might not be clearly visible on picture.
Combinator settings as follows:
- top one has input codition wood > 5, output is red signal at 1 - this is the trigger switch
- bottom left one - input is red > green, output is red at 1 - this is the memory to store the trigger
- top one from the pair(on the right) - input is red = 900, output is green at 1 - this is disable trigger
- bottom one from pair(on the right) - input is red < 1000, output is red at input count - this is the timer that measures how long engines work

Each pump connected to circuit requires enable condition of red > 0.
Total run time is approximately 1000 ticks - that means about 17 seconds of pumps running (60 ticks a second).

Time can be easily adjusted - just make sure there is a small gap between disable trigger value and timer condition. There is a slight processing delay - in this setup timer waits at 902.

Setup as pictured is configured with small buffer - removal of one light will make the buffer marginal (still works but it's close :D). Can add more lights to provide bigger safety margin.
Reticality
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Jul 25, 2015 11:03 pm
Contact:

Re: Night switch for steam engines based on combinators

Post by Reticality »

You could fix the con by making a seperate power network to power the pumps (and combinators if they need power). Just 1 solar / 1 accu should be enough. Connect the pumps to both your main network and your 1 solar/accu network and you don't need to worry about it. Remember you can shift right click power poles to disconnect them and use the copper cable item to connect specific poles.
Zhab
Fast Inserter
Fast Inserter
Posts: 101
Joined: Sat Jul 18, 2015 10:17 pm
Contact:

Re: Night switch for steam engines based on combinators

Post by Zhab »

I guess that the primary advantage over previous setups is the timer.
Gus_Smedstad
Fast Inserter
Fast Inserter
Posts: 163
Joined: Fri May 16, 2014 2:30 pm
Contact:

Re: Night switch for steam engines based on combinators

Post by Gus_Smedstad »

I've been using a variant on this plus the power-detector circuit from another thread in my current factory. I revised it so that instead of a timer that starts when the accumulator gives out, the timer starts when power returns, and it turns on the steam-engine network when either power is out or the timer is still running.

The thing is that if you control the steam network via pumps instead of the old method of turning off the fuel inserters, the steam power shuts down very, very fast. Too fast, and I ended up with poor performance as it cycles on and off. The advantage of pump over inserter control is that you have fine control over how long the steam stays up - the inserter method runs until the fuel runs out, which can be quite a while for 5 units of solid fuel.
Zhab
Fast Inserter
Fast Inserter
Posts: 101
Joined: Sat Jul 18, 2015 10:17 pm
Contact:

Re: Night switch for steam engines based on combinators

Post by Zhab »

Gus_Smedstad wrote:The thing is that if you control the steam network via pumps instead of the old method of turning off the fuel inserters, the steam power shuts down very, very fast. Too fast, and I ended up with poor performance as it cycles on and off. The advantage of pump over inserter control is that you have fine control over how long the steam stays up - the inserter method runs until the fuel runs out, which can be quite a while for 5 units of solid fuel.
I guess that this is an other way to say that the main advantage is the timer.
orzelek
Smart Inserter
Smart Inserter
Posts: 3922
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Night switch for steam engines based on combinators

Post by orzelek »

Yeah timer is the main benefit. You could easily control pump for example with signal of the first smart chest but that wouldn't work well.
Could use smart chest to control inserter loading fuel but that gets fiddly with 10's of them that you can have.

Pumps are easier and you'll get one per set of steam engines usually (I was pumping hot water to get minimum delay).
User avatar
MadZuri
Fast Inserter
Fast Inserter
Posts: 178
Joined: Tue Jan 06, 2015 8:15 am
Contact:

Re: Night switch for steam engines based on combinators

Post by MadZuri »

There are ways of providing backup steam power without any use of inserters, combinators, or even colored wire. Such a system would even faster and more responsive to power demands.
Zhab
Fast Inserter
Fast Inserter
Posts: 101
Joined: Sat Jul 18, 2015 10:17 pm
Contact:

Re: Night switch for steam engines based on combinators

Post by Zhab »

MadZuri wrote:There are ways of providing backup steam power without any use of inserters, combinators, or even colored wire. Such a system would even faster and more responsive to power demands.
Such as manual intervention ?
orzelek
Smart Inserter
Smart Inserter
Posts: 3922
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Night switch for steam engines based on combinators

Post by orzelek »

MadZuri wrote:There are ways of providing backup steam power without any use of inserters, combinators, or even colored wire. Such a system would even faster and more responsive to power demands.
Of course there are. Maybe should leave inserters there since it will be difficult without them.
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1685
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Night switch for steam engines based on combinators

Post by MeduSalem »

orzelek wrote:
MadZuri wrote:There are ways of providing backup steam power without any use of inserters, combinators, or even colored wire. Such a system would even faster and more responsive to power demands.
Of course there are. Maybe should leave inserters there since it will be difficult without them.
At least I haven't seen any leak-free implementations of it that do not depend on using at least one inserter doing the magic somewhere controlling it all so to have the least amount of wiring and I've seen pretty much all implementations by now over here, on wiki or reddit. And that even I'm not using solar power in the first place, but just look at the stuff out of curiosity.

But there are inserter-free solutions if you are able to accept leakage during the nights while the accumulators aren't fully dry yet.



And I don't think that combinators in combination with an inserter are currently worth it for controlling the nightswitch, because that basically means you could skip out on the combinator stuff entirely and use the inserter instead in the old fashioned way without the additional complexity rendering it prone to more human error.

My hypothetical solution using combinators (I haven't tried it due to it's complexity but that's how I imagine it could work):

A thing one could try to do is creating a synchronous-clock system... where there is a clock #1 outputting signal #1 in the maingrid and another clock #2 outputting signal #2 behind an accumulator with the accumulator being on both grids. Once clock #2 loses it's power because of the shared accumulator being drained faster it will get stuck with a specific number on signal #2, while clock #1 will continue to work and so signal #1 and signal #2 will become asynchronous which can be measured by another decider to kick on a signal for the pumps. Up to that point I could implement a working solution, but...

... of course there would also need to be a reset signal that makes both clocks go synchronous again when time is ripe to prevent the pumps from working. And that's what I'm having trouble with. If someone wants to give my idea a shot let me know if you could come up with an appropriate trigger that sends the reset signal. Like once the solar panels are working again + delay so they can take over safely or something. I guess it might work with a third clock that only works when solar power is back on.



But for the most part we will probably have to wait for accumulator/power sensors and/or power switches, both obviously coming in 0.13, so it doesn't really matter. I guess the Devs should have tried to rush at least the accumulator/power sensor into 0.12 because it probably is much less work since it doesn't require any new graphics. With the accumulator/power sensor one could at least have switched on/off the pumps that control the flow from the hot water storage tanks to the steam engines as a new temporary solution to the final one of just (dis-)connecting the power grids.

After 0.13 it will be a piece of cake with one cable hooking up the sensor and the switch and that's it. Pretty much like controlling the oil industry has become thanks to tank sensors and pump switches. It's not even a big deal anymore.
Zhab
Fast Inserter
Fast Inserter
Posts: 101
Joined: Sat Jul 18, 2015 10:17 pm
Contact:

Re: Night switch for steam engines based on combinators

Post by Zhab »

MeduSalem wrote:A thing one could try to do is creating a synchronous-clock system... where there is a clock #1 outputting signal #1 in the maingrid and another clock #2 outputting signal #2 behind an accumulator with the accumulator being on both grids. Once clock #2 loses it's power because of the shared accumulator being drained faster it will get stuck with a specific number on signal #2, while clock #1 will continue to work and so signal #1 and signal #2 will become asynchronous which can be measured by another decider to kick on a signal for the pumps. Up to that point I could implement a working solution, but...

... of course there would also need to be a reset signal that makes both clocks go synchronous again when time is ripe to prevent the pumps from working. And that's what I'm having trouble with. If someone wants to give my idea a shot let me know if you could come up with an appropriate trigger that sends the reset signal. Like once the solar panels are working again + delay so they can take over safely or something. I guess it might work with a third clock that only works when solar power is back on.



But for the most part we will probably have to wait for accumulator/power sensors and/or power switches, both obviously coming in 0.13, so it doesn't really matter. I guess the Devs should have tried to rush at least the accumulator/power sensor into 0.12 because it probably is much less work since it doesn't require any new graphics. With the accumulator/power sensor one could at least have switched on/off the pumps that control the flow from the hot water storage tanks to the steam engines as a new temporary solution to the final one of just (dis-)connecting the power grids.
That sound needlessly complicated.

Main Network
(1) Clock
(2) if clock signal > 60 then activate pump

Shared zone
(3) If clock signal > 30 then reset clock.

There you go. The clock is always reset before the pump can activate. But if there is power issues the reset signal dies and the clock carry on counting until pump activates. When power is back the reset signal revives and reset clock which kills pump.

You could easily add in the delay idea of orzelek to keep power on for a minimum amount of time.

Edit: Nevermind... I thought that a combinator with no power would not output any signal. Make sense to me. If no power than how can you possibly generate a signal ? But nope... actually testing this in-game reveal that a combinator simply cannot change it's output when un-powered. So the asynchronous clock idea seems like a ways that could work.
Last edited by Zhab on Sun Aug 02, 2015 4:12 pm, edited 1 time in total.
Gus_Smedstad
Fast Inserter
Fast Inserter
Posts: 163
Joined: Fri May 16, 2014 2:30 pm
Contact:

Re: Night switch for steam engines based on combinators

Post by Gus_Smedstad »

Zhab wrote: I guess that this is an other way to say that the main advantage is the timer.
If you're telepathic, yeah.
User avatar
MadZuri
Fast Inserter
Fast Inserter
Posts: 178
Joined: Tue Jan 06, 2015 8:15 am
Contact:

Re: Night switch for steam engines based on combinators

Post by MadZuri »

MeduSalem wrote: At least I haven't seen any leak-free implementations of it that do not depend on using at least one inserter doing the magic somewhere controlling it all so to have the least amount of wiring and I've seen pretty much all implementations by now over here, on wiki or reddit. And that even I'm not using solar power in the first place, but just look at the stuff out of curiosity.
I have improved on this design a bit since I first posted it, certainly you remember it? You replied to the topic 3 months ago. It seems to be just generally ignored. But there you go, no inserters used, no wire conditions used, and no leakage. Instant response to power conditions. What more could you want from a backup power controller? It is simple and fail-proof.

It can certainly be modified easily to act as a night switch, given the increased control we now have over pumps.
orzelek
Smart Inserter
Smart Inserter
Posts: 3922
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Night switch for steam engines based on combinators

Post by orzelek »

I did see it - thats why I wrote about needing inserters - water won't boil itself :D

If you don't like combinators - no need to use them. They do make timing much easier. Chose whatever you prefer :)
User avatar
MadZuri
Fast Inserter
Fast Inserter
Posts: 178
Joined: Tue Jan 06, 2015 8:15 am
Contact:

Re: Night switch for steam engines based on combinators

Post by MadZuri »

Ooooooooooh. Those inserters. Well now I feel stupid. Yeah, those are kinda needed for any design... actually, now that I think about it, you could have miners directly feeding boilers without inserters. That kinda limits the placement of power systems to "directly on top of coal patches" tho.
Zhab
Fast Inserter
Fast Inserter
Posts: 101
Joined: Sat Jul 18, 2015 10:17 pm
Contact:

Re: Night switch for steam engines based on combinators

Post by Zhab »

MadZuri wrote:I have improved on this design a bit since I first posted it, certainly you remember it? You replied to the topic 3 months ago. It seems to be just generally ignored. But there you go, no inserters used, no wire conditions used, and no leakage. Instant response to power conditions. What more could you want from a backup power controller? It is simple and fail-proof.

It can certainly be modified easily to act as a night switch, given the increased control we now have over pumps.
I'm fairly new and did not see this before. Using the difference in pump performance is very clever. It is also analog. But needing a extra separate solar and boiler setup doesn't make it the most compact design. As such, a pure combinators setup (no inserter/belt/chest) still sounds interesting to me. Unless your newest version is somehow more compact than even that.
orzelek
Smart Inserter
Smart Inserter
Posts: 3922
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Night switch for steam engines based on combinators

Post by orzelek »

Zhab wrote:
MadZuri wrote:I have improved on this design a bit since I first posted it, certainly you remember it? You replied to the topic 3 months ago. It seems to be just generally ignored. But there you go, no inserters used, no wire conditions used, and no leakage. Instant response to power conditions. What more could you want from a backup power controller? It is simple and fail-proof.

It can certainly be modified easily to act as a night switch, given the increased control we now have over pumps.
I'm fairly new and did not see this before. Using the difference in pump performance is very clever. It is also analog. But needing a extra separate solar and boiler setup doesn't make it the most compact design. As such, a pure combinators setup (no inserter/belt/chest) still sounds interesting to me. Unless your newest version is somehow more compact than even that.
From my point of view both of those have main drawback - need to fiddle with separate power networks. I'm hoping that proper sensor of accumulator state will solve this problem. Still hoping it will come in 0.12.x not in 0.13 :)
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1685
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: Night switch for steam engines based on combinators

Post by MeduSalem »

Zhab wrote:That sound needlessly complicated.

Main Network
(1) Clock
(2) if clock signal > 60 then activate pump

Shared zone
(3) If clock signal > 30 then reset clock.

There you go. The clock is always reset before the pump can activate. But if there is power issues the reset signal dies and the clock carry on counting until pump activates. When power is back the reset signal revives and reset clock which kills pump.

You could easily add in the delay idea of orzelek to keep power on for a minimum amount of time.
I'll most definitely have to check that out because it sounds simple and neat once I'm back to playing Factorio, which I have unfortunately postponed due to the newest Prison Architect release, which I haven't caught up on for some months too. So currently I'd like to be able to split myself... :lol:
MadZuri wrote:I have improved on this design a bit since I first posted it, certainly you remember it? You replied to the topic 3 months ago. It seems to be just generally ignored. But there you go, no inserters used, no wire conditions used, and no leakage. Instant response to power conditions. What more could you want from a backup power controller? It is simple and fail-proof.

It can certainly be modified easily to act as a night switch, given the increased control we now have over pumps.
I'll take it back, I'm sorry, because you are completely right! I almost completely forgot about that one ever since back then... Because it is not listed on wiki like most other of the threads are or at least it wasn't listed when I last checked and it obviously got unrightfully buried way too fast after only 3 days. Someone should have put in on the wiki...
Zhab
Fast Inserter
Fast Inserter
Posts: 101
Joined: Sat Jul 18, 2015 10:17 pm
Contact:

Re: Night switch for steam engines based on combinators

Post by Zhab »

MeduSalem wrote:Because it is not listed on wiki like most other of the threads are or at least it wasn't listed when I last checked and it obviously got unrightfully buried way too fast after only 3 days. Someone should have put in on the wiki...
I also think that it is a design that deserve to be on the wiki.
User avatar
MadZuri
Fast Inserter
Fast Inserter
Posts: 178
Joined: Tue Jan 06, 2015 8:15 am
Contact:

Re: Night switch for steam engines based on combinators

Post by MadZuri »

If I had access to the wiki, I would prolly delete every reference to buffer systems, belt lane swappers and rebalancers, and rail loops designs. I am not surprised that absolutely none of my designs have made it into the wiki, as my design philosophy directly conflicts with much of the conventional wisdom and the popular builds that seem to permeate these forums, /r/factorio, and YouTube. Twitch, on the other hand... I've spent a LOT of time there. Lesson learned: don't give me an account on the Wiki.

Edit: Maybe not delete, but add some heavy caveats as to when they are applicable, including pros and cons to each type of design. Belt swappers are completely useless, rebalancers are a sign of poor design (its better to design an inherently balanced system or only feed one side and have a simple 1-splitter balancer) and buffer systems should be limited to what you can easily move in under a minute or for the 2 important exceptions: fuel for power systems or oil barrels. Don't get me started on the whole rail loops vs intersections thing...
Post Reply

Return to “Energy Production”