Contact Info

sean [at] coreitpro [dot] com gpg key

Mastodon

sc68cal on Libera

Managing solar power and accumulators in Factorio

Another interesting programming challenge that I found in Factorio, was how to utilize the Accumulators that I had installed in my base on Vulcanus.

Solar panels are very efficient on Vulcanus, getting a 400% boost compared to Nauvis and the day/night cycle is shorter. Having huge fields of Accumulators can help store solar energy during the night cycle, however they take up a lot of room on the map and there can still be times where your factory draws more power than the solar panels provide, and completely discharge the accumulators.

So, you need a secondary source of power generation for these situations.

Vulcanus has geysers of sulfur on the surface that can be collected into pipes, and then sent to a chemical plant for acid neutralization which creates steam. This steam can then be sent to turbines, to generate electricity.

By default, the electric network in Factorio will draw electricity from Solar first, then steam engines or turbines, then lastly from accumulators. This means that without a circuit control network, under normal conditions the accumulators will never actually be used and just remain fully charged. The turbines that are fed steam from the chemical plant would act as the base load, constantly running and only scaling back when the day cycle begins and solar takes over.

I felt that having entire fields of accumulators that I had built, never being used was a waste, so why not create a circuit network that would have the accumulators and solar act as the base load power generation, with the acid neutralization and turbines acting as peak load power?

The key is a set of decider combinators that process the accumulator charge level as a signal.

The first decider combinator has logic to handle the accumulators dipping below 10% charge. When this occurs, it emits the D (for discharge) signal with a value of 1, and it is wired to a latch.

This latch has two conditions, the Any signal being greater than 0 and the A signal not equal to 1. When both these conditions are met, it emits the Checkmark signal, with a value of 1.

That Checkmark signal activates the pump that sits between the storage tanks full of steam, and the pipes that feed the electric turbines. These turbines will then start generating electricity, and there are enough of them and enough steam built up that it will recharge the accumulators.

The last part of the circuit is the piece that will reset the latch, after the accumulators have reached full charge.

When the accumulator hits 100% charge, the signal emits the A signal with a value of 1 which resets the latch, and disables the steam pumps once again.

The final result can be seen in the power graph over time, where the turbines moved from being the primary source of power, to almost no usage as I scaled out more solar panels and the accumulators powered the base during the night cycle.

For anyone interested, here’s a blueprint that you can copy and paste into Factorio as a blueprint import.

0eNrNl2GO6jYQx68S+bN5SgIBgtRKT+oN+nG1ikwygFXHtmyHLVpxgN6iZ+tJOk4IZFlDNk9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