Low power detector w/ combinators instead of inserters

Post pictures and videos of your factories.
If possible, please post also the blueprints/maps of your creations!
For art/design etc. you can go to Fan Art.

Post Reply
JasonC
Filter Inserter
Filter Inserter
Posts: 448
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Low power detector w/ combinators instead of inserters

Post by JasonC »

Here is a low power detector that uses combinators instead of inserters:

Image

The top combinator should be powered by the accumulators of the system being monitored. The bottom combinator is always powered.

The top one is set to YELLOW * -1 and outputs YELLOW. The bottom one is set to YELLOW + 1 and outputs YELLOW. The connections are what they look like (red wire connects top combinator input, bottom combinator input, and bottom combinator output).

Run a green wire out from the top combinator and a red wire out from the bottom (or a green wire out from both), and the sum of YELLOW on the two circuits will be 1 when the power is OK and >1 when the power is out.

The lamp is not necessary, it is just an example. The lamp here is set to YELLOW > 1 and lights up when the power is out.

You can use a decider to translate that to whatever signal you need.

The idea is that the bottom combinator is a counter, and the top combinator always outputs its negative value as long as it has power. The reason for using a counter is to keep a signal change happening constantly, which requires power. So while there is power the sum of the two outputs will be 1 (it's 1 not 0 because it takes a tick for the value to be computed, but that's not important here). When there is no longer power, the top combinator stops updating, and so the sum of the two outputs becomes a count of the number of ticks since the power went out.

When monitoring accumulators it's pretty clean cut. If monitoring the main system, insufficient power will cause the top accumulator to slow down, so the output sum will reset more and more slowly until it stops resetting.
Last edited by JasonC on Mon May 09, 2016 5:29 pm, edited 2 times in total.
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.

Qon
Smart Inserter
Smart Inserter
Posts: 2091
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by Qon »

Nice idea, I like it. Didn't know combinators slowed down on low electricity. Thanks.
Edit: Your picture disappeared :o

JasonC
Filter Inserter
Filter Inserter
Posts: 448
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by JasonC »

Qon wrote:Edit: Your picture disappeared :o
Should be fixed. Moved the pic to imgur. Snag.gy has been very unreliable lately.
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.

Qon
Smart Inserter
Smart Inserter
Posts: 2091
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by Qon »

The Map
You can upload them to this forum. The "Upload attachment" button is right below area where you type your messages. Or is there a reason you refuse to use something that is as reliable as the forum itself?

JasonC
Filter Inserter
Filter Inserter
Posts: 448
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by JasonC »

Qon wrote: You can upload them to this forum. The "Upload attachment" button is right below area where you type your messages. Or is there a reason you refuse to use something that is as reliable as the forum itself?
There's a good reason why I don't do that: 'Cause I'm stupid. I didn't realize that button could be used for inline images. I thought it was only for documents. Thanks!!
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.

Qon
Smart Inserter
Smart Inserter
Posts: 2091
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by Qon »

JasonC wrote:
Qon wrote: You can upload them to this forum. The "Upload attachment" button is right below area where you type your messages. Or is there a reason you refuse to use something that is as reliable as the forum itself?
There's a good reason why I don't do that: 'Cause I'm stupid. I didn't realize that button could be used for inline images. I thought it was only for documents. Thanks!!
As good reason as any! Live and learn. ;)

sckuzzle
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Thu Mar 31, 2016 8:51 am
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by sckuzzle »

Hi JasonC,

I found this contraption quite useful and used it in my creation here. Thanks for sharing it!

Guu
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Sun Feb 28, 2016 5:59 pm
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by Guu »

and how it affects the performance of the game ? because the combinators constantly sum up their counters . not whether these calculations slow down the game?

Qon
Smart Inserter
Smart Inserter
Posts: 2091
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by Qon »

Guu wrote:and how it affects the performance of the game ? because the combinators constantly sum up their counters . not whether these calculations slow down the game?
Sounds like you are worried that this will affect your UPS.

Addition and multiplication are one of the simplest and fastest things you can do on a CPU. Math blocks aren't animated, don't require any physics calculations, interacts mostly with circuit signals, has no complex behaviour or state. Basically everything else requires much more calculations. This design uses 2 math blocks.

It's a design that is beyond tiny and each part uses much less calculations than every other item in the game. If this affects your UPS then you should avoid building inserters, splitters, belts, trains, electric network, assemblers, pipes, miners, robots, radars, roboports, anything that pollutes and so on to avoid getting lower UPS.

Guu
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Sun Feb 28, 2016 5:59 pm
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by Guu »

well , I just drew attention to the huge numbers that can arise for a long time

Qon
Smart Inserter
Smart Inserter
Posts: 2091
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by Qon »

Guu wrote:well , I just drew attention to the huge numbers that can arise for a long time
If your power is off for a year you will have a count of 1 892 160 000, which requires the exact same computing power as 0.
That year of 2 billion increments can be done in a second on any modern CPU.
For a computer, that number is tiny. Though the combinators might be using 32 bit numbers so you might get overflow if you try to play factorio without power for 2 years. But no one will do that...

Guu
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Sun Feb 28, 2016 5:59 pm
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by Guu »

Qon wrote:
Guu wrote:well , I just drew attention to the huge numbers that can arise for a long time
If your power is off for a year you will have a count of 1 892 160 000, which requires the exact same computing power as 0.
That year of 2 billion increments can be done in a second on any modern CPU.
For a computer, that number is tiny. Though the combinators might be using 32 bit numbers so you might get overflow if you try to play factorio without power for 2 years. But no one will do that...


my friend , stop humiliating me your knowledge :shock:

JasonC
Filter Inserter
Filter Inserter
Posts: 448
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by JasonC »

Qon wrote:... you might get overflow if you try to play factorio without power for 2 years. But no one will do that...
Challenge accepted.
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.

Qon
Smart Inserter
Smart Inserter
Posts: 2091
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by Qon »

Guu wrote:my friend , stop humiliating me your knowledge :shock:
The key to learning new things is to feel awe and wonder when presented with knowledge you don't already have. There's no shame in not knowing things if you are willing to learn from you mistakes. We all have to start from the beginning. ;)
JasonC wrote:
Qon wrote:... you might get overflow if you try to play factorio without power for 2 years. But no one will do that...
Challenge accepted.
You should get a mod that lets you speed up the game above 60 UPS. And avoid building things that are not absolutely necessary. GL :)

JasonC
Filter Inserter
Filter Inserter
Posts: 448
Joined: Tue Mar 22, 2016 3:05 am
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by JasonC »

Qon wrote: You should get a mod that lets you speed up the game above 60 UPS. And avoid building things that are not absolutely necessary. GL :)

Code: Select all

/c game.speed = 100
:D
Took a break from 0.12.29 to 0.17.79, and then to ... oh god now it's 1.something. I never know what's happening.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by Adil »

Yeah game.speed and headless server. Come back to nauvis few centuries after the first contact.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

Ahry
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Jul 31, 2017 12:37 am
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by Ahry »

This is quite good, but It work only if power supply is less then 50%. So i do not see any advice over accumulator and read signal A.

The Eriksonn
Fast Inserter
Fast Inserter
Posts: 230
Joined: Wed Jun 08, 2016 6:16 pm
Contact:

Re: Low power detector w/ combinators instead of inserters

Post by The Eriksonn »

Ahry wrote:This is quite good, but It work only if power supply is less then 50%. So i do not see any advice over accumulator and read signal A.
I belive this thread was created Before accumulator Connections was implemented.

Post Reply

Return to “Show your Creations”