Page 1 of 1

How do you make a diode setup / 1 way power

Posted: Thu Dec 08, 2016 2:08 am
by oldmanbeefjerky
I dont know about other people but when i go out exploring and make remote stations, i like to set up solar+ accumulators so its off grid and working on its own then later when i can, or once i expand my territory, i hook it up to the grid.

Problem is, when the main grid goes down, so do these ones.

Is there a way to have power flow only one way? currently best i can do is have an accumulator over there and a power switch that turns off when it drops below 80% so my remote mine, oil rig, etc still has its 80% to keep it going through the blackout.

Is there a better way to do this? i know diodes dont literally exist, though they would be handy in prioritising the order in which the factory might fail in the event of a power outage.
Is there some sort of way to wire a power pole to the logic network in order to have it shut off a switch when the power level drops?

Re: How do you make a diode setup / 1 way power

Posted: Thu Dec 08, 2016 9:12 am
by Deadly-Bagel
Accumulators are currently the only power-related entity you can connect to the circuit network so basically what you've got is about the best you can do.

Not sure if it helps but you can connect an accumulator to two separate electric grids. This allows one network to charge the accumulator and the other to drain it, which sort of restricts flow between the two networks.

Re: How do you make a diode setup / 1 way power

Posted: Thu Dec 08, 2016 12:54 pm
by Optera
I'd love to see a power diode in base game.
The old transformer mod kinda works for that, but isn't really user friendly. Not to mention that 50Hz hum is driving me nuts.

Your way of switching outposts away from the main grid at 80% accu charge is the best you can do right now.

Re: How do you make a diode setup / 1 way power

Posted: Fri Dec 09, 2016 2:00 am
by MalcolmCooks
this may work: https://wiki.factorio.com/Accumulator#I ... r_Networks

it should ensure that the power generated in your outpost is prioritised to the outpost before being sent into the main grid.

Re: How do you make a diode setup / 1 way power

Posted: Fri Dec 09, 2016 11:58 am
by Deadly-Bagel
Would this be possible in a mod? Something like an accumulator with two connectors, one that 'charges' it and one that drains it. Give them a high charge and drain rate (can be connected in parallel if required) only on the applicable sides and voilĂ .

It would be ideal if this could be built into the power switch but it wouldn't be its own entity, uses are too circumstantial to be its own entity for vanilla.

Re: How do you make a diode setup / 1 way power

Posted: Fri Dec 09, 2016 12:28 pm
by impetus maximus
or a switch that lets current enter one connection, leave the other, but not the other way around.

Re: How do you make a diode setup / 1 way power

Posted: Fri Dec 09, 2016 1:47 pm
by Deadly-Bagel
There is no 'current' in Factorio. When a power line connects something it's all treated as a network and updated with the available level of power. There is nothing to 'enter' or 'exit'.

Thus the small internal buffer. One network would charge it, the other would drain it. This might be the only way this would actually work with the existing systems.

Note this would have a side effect of the diode appearing as draining the power rather than the entities on the other side of it, but as you cannot connect the networks there is no way around this. A mod might mitigate the issue by having a power UI that allows you to monitor and open power grids remotely for your various diodes.

Re: How do you make a diode setup / 1 way power

Posted: Fri Dec 09, 2016 4:30 pm
by Optera
Transformer mod uses an assembler to drain one network and an generator to power the other. With the amount of code used to control these two entities, Accumulator links should have better performance.

Re: How do you make a diode setup / 1 way power

Posted: Mon Dec 12, 2016 6:14 am
by Yoyobuae
Optera wrote:Transformer mod uses an assembler to drain one network and an generator to power the other. With the amount of code used to control these two entities, Accumulator links should have better performance.
I recently noticed the existence of the electric-energy-interface entity. It's allows complete control of all the electric parameters from LUA script, which makes it a lot easier to implement an electric network diode / transformer.

So I made a small test mod for it:
https://mods.factorio.com/mods/Yoyobuae ... ransformer

For now it only transfers power from the electric network connected to the left side to one connected to the right side (didn't implement rotation). It can output the power being transferred to circuit network as the signal configured by opening it's UI. Didn't implement a tech for it either (available from the start).

Re: How do you make a diode setup / 1 way power

Posted: Thu Dec 15, 2016 3:16 am
by BenSeidel
Are you after a one-way flow (diode) or are you after an overflow valve? You said that your outposts are being tied to the main grid. Are you after the excess power to flow from the outpost to the main base or are you after the main base's power to supplement the outpost's power?

Either way, the diode setup below will only allow power to flow from the top series of power poles to the bottom right power pole when the accumulators have reached 100%.
diode.png
diode.png (1.77 MiB) Viewed 10017 times
If instead you want to actively syphon energy off one network to another network the below setup does that. It's a similar configuration where the line of accumulators is attached to two different networks but instead you control what network is attached via a SR latch. This setup only works when there is an energy deficiency in the 2nd network.
active syphon.png
active syphon.png (1.89 MiB) Viewed 10017 times
blueprint string (some wiring required). Ensure that the combinators are always powered.

Code: Select all

H4sIAAAAAAAA/71W7W7qMAx9FdTf7dQPypimXGnPMV1VITEQLU2qNGWrqr77TQJcWr7WMga/inzsxMfHjqmccEkwn2SoAaGZZlCiphE4B+SVkmMVFFgA9/xC
lsYqBWq+UOzXKIhmbevvkDlQVuUBcCBaMRIUksM5l/jgUshPUEH5yTRZ96FB+JRa9OwpbX0ihVaSZwtY4w2TCjWEKVIxnRkL3fksmSp1VrKVwBw1ui5M/A1T
usLm4rtcnDGIPBey1FhoFJnPvMAKaxPXQ17rbMLkYKIaGt69yPuLGgXUUOLYqTNG0bS1v+Gpu2SSYbENrPMvGntUkNizOixjQqq84jbDI+SzIzkyHA8Ap2PA
yX/wmerJShfVsFq9XSrISgGIHm0v/l4VlrU+h1Hf1iWUAmHUqNDIYMHEaSrRNpPWp0xtL2F0fJrTLsxBkeUYSb51JRkeSdIfwdeCY/LhghW1uUsldLZUMs+Y
MBHQEvMSBhM6tyy9e/F5axTezun0EZzCBlSt10ysLvf7n1HkhncitqfUuK/UpG87VOB4Sti54J8pS/JTqScPlPpL+oNyPFDrV0j9fiDbeRyPbY5frsL9myO6
UyX6cyW+Msdv6Y4rQ+v7Qs5dIQe94VezSC7bpn3k8y1vfzpiwXr5hf0qvMN+NTpzm8x8YOwjkmcjjwrt2zU9eChMsTrddF1cnxF3laZPHNOQ71nbuhukoPDl
FpfL2O42vvewbfCqQFdKTLJXEPQfBv0iGdALAAA=
Neither setup allows for the charging of accumulators on the second network. These are the setups I use with a steam powered base.