Factorio

Factorio

View Stats:
Combinators, and power switch
I have enough solar now that I can shut off my steam engines, but I'm keeping them as a backup mainly in case biters attack and the lasers need more power. I had the idea of using a power switch and combinators, reading the level in an accumulator, but I'm having difficulty figuring out exactly how to connect it. Here's how I want it to work:

1. Power switch remains OFF while the accumulators have more than 30% (I don't want the steam engines coming on at night unless they really need to)
2. Switch turns ON if the accumulators drop below 30% (this should only happen if there's an attack, otherwise power stays above that level even at night)
3. Once activated, the switch stays ON until the accumulators are above 50%

Part 3 is the difficulty -- otherwise it would be simple matter of connecting a single wire between an accumulator and the power switch. Doing this causes the engines to turn off and on really fast, maintaining 30% but not recharging to 50% like I want it to.

I've tried various arrangements of combinators, trying to use feedback to keep the switch on and then interrupt that feedback when it's time to turn it off, but nothing seems to work. Anyone know how I can do this?
< >
Showing 1-11 of 11 comments
ExavierMacbeth Aug 13, 2016 @ 2:01am 
Remade post to clean it up...
http://imgur.com/a/JFB3Y

- 1x Inserter
- Belt goign from dropoff back to pickup
- Inserter: A = 100
- Belt immediatly under dropoff: A < 10
- Other belts: Read Contents continuously
- Accumulator (just need 1 hooked to the circuit since they all drain evenly)
- Power Switch: Plate > 0
- 1 plate on the belt

- When accumulator hits 100% the inserter moves the plate to the inactive belt.
- When accumulator hits 10% the belt activates moving the plate into detection area.
- Powerswitch enables while it can see the plate, Steam operates.
- When accumulator hits 100% again the inserter activated, moves plate again, power switch no longer sees plate and deactivates

- Optional: Nixie Tube mod to display the accumulator charge at a glance without haveing to mouse over the power pole.

2nd Power switch in image is just a manual throw switch (since you can't toggle one connected to a circuit network manually) in case of an emergency.

Sorry it doesn't use any combinators but the new belt circuit attachments made backup power so much less of a hassle lol.

Enjoy :)
Last edited by ExavierMacbeth; Aug 13, 2016 @ 2:22am
CrunchyBiscuit Aug 13, 2016 @ 3:09am 
I did this differently (easier, thanks to a helpful forum post some weeks ago), but I have accumulators spread all over my factory (so there's always one nearby).

I just hook up the offshore pumps (the ones that lead to the steam engine arrays) directly to a nearby accumulator with a green or red wire. I set the hooked up accumulator to put out its charge level as 'C' (for 'charge', but doesn't really matter, could be a color or a letter as well, whatever). Then I set the offshore pumps to only enable if 'C' falls below 50% (C<50). No power switches or combinators required.

I can last a whole night on my accumulators, even with some assembling, production and laser fire going on. My Steam engines are still required during continuous attacks or heavy production, but eventually they won't ever have to switch on again, as I build more solar panels and accumulators.

Made a GIF to demonstrate:

https://gifyu.com/image/t8h
Last edited by CrunchyBiscuit; Aug 13, 2016 @ 7:08am
The Chaotic Coder Aug 13, 2016 @ 11:07am 
Originally posted by ExavierMacbeth:
Remade post to clean it up...
http://imgur.com/a/JFB3Y

- 1x Inserter
- Belt goign from dropoff back to pickup
- Inserter: A = 100
- Belt immediatly under dropoff: A < 10
- Other belts: Read Contents continuously
- Accumulator (just need 1 hooked to the circuit since they all drain evenly)
- Power Switch: Plate > 0
- 1 plate on the belt

- When accumulator hits 100% the inserter moves the plate to the inactive belt.
- When accumulator hits 10% the belt activates moving the plate into detection area.
- Powerswitch enables while it can see the plate, Steam operates.
- When accumulator hits 100% again the inserter activated, moves plate again, power switch no longer sees plate and deactivates

- Optional: Nixie Tube mod to display the accumulator charge at a glance without haveing to mouse over the power pole.

2nd Power switch in image is just a manual throw switch (since you can't toggle one connected to a circuit network manually) in case of an emergency.

Sorry it doesn't use any combinators but the new belt circuit attachments made backup power so much less of a hassle lol.

Enjoy :)

That seems kind of complicated... I tried a similar thing using a chest with 2 inserters. When the steam engines need to turn on, an inserter puts a plate into the chest, when they need to turn off the other inserter takes it out again and puts it on a belt that loops back to the beginning. The "out" inserter kept stopping partway through the cycle, though, if the power went briefly above 50% and then dropped below again.

I figured out how to do it using combinators like I wanted to:

http://steamcommunity.com/sharedfiles/filedetails/?id=743302451

- 1 constant combinator, 1 decider combinator, and 1 arithmetic combinator.
- The constant combinator outputs a signal of 20 via red wire on channel S (for "Stop", and I'm using 20 because it's 50% - 30%).
- The decider combinator (which I have selected in the screenshot, its window is over the minimap and sidebar) is set to pass S (the stop signal) if C>50 (more on where C comes from later). This goes via red wire to the power switch and also the input of the arithemtic combinator.
- The arithmetic combinator also receives a reading from the accumulator (green wire) on channel E ("Energy"). It simply adds E + S and outputs the result via green wire on channel C ("Control")
- Because S (20) is normally passed by the decider, C will be 20 more than E. If energy reserves are 100%, C is 120. If 80%, C is 100, and so on.
- When E drops below 30% (the point where I want the steam engines to come on) C drops below 50. This causes the decider to start blocking the Stop signal. The power switch turns on, and the arithmetic combinator no longer adds E + S. Now C = E, which is 30.
- The decider combinator continues blocking S until E, and therefore C, rises above 50.
CrunchyBiscuit Aug 13, 2016 @ 12:48pm 
Oh, now I get it! You have a problem with the engines activating in short bursts, and wish to prevent that.

Sounds like quite a hassle, glad you figured it out! Cool idea too, I might copy it when needed ;)

Why do you dislike having your steam engines activate in short bursts if I might ask? I guess it burns slightly more coal, is that it? Or are there other considerations?

Personally, I'm mostly annoyed by the constant buzzing noise when my factory runs on batteries. Thinking of decoupling my steam engines again and letting them run all night, just because of the increased silence (accumulators everywhere!) :)
ExavierMacbeth Aug 13, 2016 @ 1:13pm 
lol The beauty of the game is there is never just 1 right answer :P

I like mine because the belt doesn't require any power to operate (unlike combiners). So even if my power spikes all the way to zero due to laser turrets the belt will still be turned on & let the plate through to be seen by the switch. The only thing that actually uses any power in my array is the inserter that only needs to activate when the grid has full power to reset the system :)
The Chaotic Coder Aug 13, 2016 @ 2:45pm 
Originally posted by CrunchyBiscuit:
Oh, now I get it! You have a problem with the engines activating in short bursts, and wish to prevent that.

Sounds like quite a hassle, glad you figured it out! Cool idea too, I might copy it when needed ;)

Why do you dislike having your steam engines activate in short bursts if I might ask? I guess it burns slightly more coal, is that it? Or are there other considerations?

I'm going to use the same circuit signals to change the colors of some of my lights, so wherever I am in the base I'll know there's a power issue. I've done this in a previous game, just connecting the power switch directly to the accumulator and having it turn on when the power dropped below 30%, but the strobe light effect of them rapidly switching off and on again made me think I was going to have a seisure.
HySpeed Dec 9, 2016 @ 3:31pm 
Originally posted by jchardin64:
Originally posted by ExavierMacbeth:
Remade post to clean it up...
http://imgur.com/a/JFB3Y

- 1x Inserter
- Belt goign from dropoff back to pickup
- Inserter: A = 100
- Belt immediatly under dropoff: A < 10
- Other belts: Read Contents continuously
- Accumulator (just need 1 hooked to the circuit since they all drain evenly)
- Power Switch: Plate > 0
- 1 plate on the belt

- When accumulator hits 100% the inserter moves the plate to the inactive belt.
- When accumulator hits 10% the belt activates moving the plate into detection area.
- Powerswitch enables while it can see the plate, Steam operates.
- When accumulator hits 100% again the inserter activated, moves plate again, power switch no longer sees plate and deactivates

- Optional: Nixie Tube mod to display the accumulator charge at a glance without haveing to mouse over the power pole.

2nd Power switch in image is just a manual throw switch (since you can't toggle one connected to a circuit network manually) in case of an emergency.

Sorry it doesn't use any combinators but the new belt circuit attachments made backup power so much less of a hassle lol.

Enjoy :)

That seems kind of complicated... I tried a similar thing using a chest with 2 inserters. When the steam engines need to turn on, an inserter puts a plate into the chest, when they need to turn off the other inserter takes it out again and puts it on a belt that loops back to the beginning. The "out" inserter kept stopping partway through the cycle, though, if the power went briefly above 50% and then dropped below again.

I figured out how to do it using combinators like I wanted to:

http://steamcommunity.com/sharedfiles/filedetails/?id=743302451

- 1 constant combinator, 1 decider combinator, and 1 arithmetic combinator.
- The constant combinator outputs a signal of 20 via red wire on channel S (for "Stop", and I'm using 20 because it's 50% - 30%).
- The decider combinator (which I have selected in the screenshot, its window is over the minimap and sidebar) is set to pass S (the stop signal) if C>50 (more on where C comes from later). This goes via red wire to the power switch and also the input of the arithemtic combinator.
- The arithmetic combinator also receives a reading from the accumulator (green wire) on channel E ("Energy"). It simply adds E + S and outputs the result via green wire on channel C ("Control")
- Because S (20) is normally passed by the decider, C will be 20 more than E. If energy reserves are 100%, C is 120. If 80%, C is 100, and so on.
- When E drops below 30% (the point where I want the steam engines to come on) C drops below 50. This causes the decider to start blocking the Stop signal. The power switch turns on, and the arithmetic combinator no longer adds E + S. Now C = E, which is 30.
- The decider combinator continues blocking S until E, and therefore C, rises above 50.

Hi,

Is there any chance you can post all of the screen shots?
I can't quite get this right.

thanks,
jon
There's actually a simpler way to do it. I don't have a game running at the moment, so I can't show you a screenshot, but here's a video showing how and explaining how it works.

https://www.youtube.com/watch?v=vEOXGBYR6oM

This guy does it by connecting the wire to the offshore pump, turning it and therefore the steam engines on/off. This works just as well, but I prefer to connect it to a power switch between the steam engines and the rest of the electric network, as this stops the engines instantly (instead of after a few seconds while they use up the last of the hot water.)
Last edited by The Chaotic Coder; Dec 9, 2016 @ 3:54pm
Warlord Dec 10, 2016 @ 8:06am 
Originally posted by jchardin64:
There's actually a simpler way to do it. I don't have a game running at the moment, so I can't show you a screenshot, but here's a video showing how and explaining how it works.

https://www.youtube.com/watch?v=vEOXGBYR6oM

This guy does it by connecting the wire to the offshore pump, turning it and therefore the steam engines on/off. This works just as well, but I prefer to connect it to a power switch between the steam engines and the rest of the electric network, as this stops the engines instantly (instead of after a few seconds while they use up the last of the hot water.)

Heh, this works out to be a faster way then MY first attempt at an emergency power system, where I simply stopped the belt of fuel going into my power station based on accumulator power level. Then I realized that they could only provide like 10% of my base's power needs anyway, and tore it all up. I'm pretty good at maintaining power for my bases, so it's not enough of an issue for me.

I do want to say, though, that now I wanna make a blueprint that has about a hundred lamps, all arranged in the shape of a battery. And I want to make it look like those laptop or cell phone battery icons, have the lights in rows turn off based on power level of my base. Then scatter them all over.
Last edited by Warlord; Dec 10, 2016 @ 8:08am
Killcreek2 Dec 10, 2016 @ 7:07pm 
Have you tried using small pumps [2 in parallel gives same flow rate as 1 offshore pump] to control the flow between the boilers and the steam engines? It's better than toggling the offshore pumps as the hot water remains in the boilers, ready to be used immediately when needed.

I have mine setup to switch on/off incrementally as the accumulator charge drops below certain thresholds ~ at 40% first 40 kick in, 30% adds 40 more, 20% another 40, and if it reaches 10% the final 80 kick in. As the charge levels rise again they switch off incrementally in reverse order. http://i.imgur.com/facUE3J.png

Combinators are setup to input the accumulator charge as a %, each outputs 1 "W" signal if less than its assigned % charge [40 /30 /20 /10]. The first block pumps are setup to turn on if "W>0", second group if W>1, 3rd if W>2, and the last ones if W>3.

An amusing effect happens when the first block of engines are just enough to tip it above 40% ~ the yellow light in my power bar flashes as they switch on and off roughly once a second as the charge level hold steady at ~40%. Happy accident.
Last edited by Killcreek2; Dec 10, 2016 @ 7:21pm
taronin Dec 11, 2016 @ 2:24am 
You can do it with combinators without too much trouble. I have a setup that does exactly this, here's how it works. You need two combinators, one decider and one arithmetic

Accumulator charge "A" connected to decider input
Decider set "A" < 30, output "B" = 1, output connected to power switch *and* arithmetic input
Arithmetic combinator set "B" * -20 output to "A", output connected to decider input
(You'll have to manually type in the -20 in the arithmetic combinator, since the slider won't go negative.)

This remains off until the charge drops below 30, at which point the arithmetic combinator kicks in and the decider starts seeing a "charge" of only 10. By the time the real charge gets back up to 50, the decider sees 30 and kicks back off again.

You can pick any start and stop points by setting the numbers in the combinators appropriately. Personally I use the steam only as an absolute last resort, so I have the numbers set at 1 and -14 -- only kick on when the charge drops to zero and charge to 15%. I use it as a signal to go build more solar capacity whenever it kicks on.

I keep my steam engines isolated from the rest of the grid except for the power switch, and use underground pipes to separate them far enough from the boilers that I can keep the inserters feeding the boilers powered even when the steam engines themselves are disconnected, so that it can all kick back on instantly when needed.
Last edited by taronin; Dec 11, 2016 @ 2:27am
< >
Showing 1-11 of 11 comments
Per page: 1530 50

Date Posted: Aug 13, 2016 @ 1:04am
Posts: 11