I need a circuit that counts and prevents inserters from inserting

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
User avatar
Midge
Inserter
Inserter
Posts: 20
Joined: Wed Oct 12, 2022 6:12 pm
Contact:

I need a circuit that counts and prevents inserters from inserting

Post by Midge »

So I have a cool Kovarex blueprint that helps a lot at making a lot of Uranium, but, I have a problem that the inserters keep inserting after the recipe is fulfilled, up to 81 U-235. I need a circuit counting machine that counts how much U-235 has been inserted, ensuring that only 40 pieces of U-235 can be put inside the centrifuge

Here is the blueprint for anyone who needs it
Image

quyxkh
Smart Inserter
Smart Inserter
Posts: 1028
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: I need a circuit that counts and prevents inserters from inserting

Post by quyxkh »

Here's my no-buffer startup bp, I do nuclear late so it uses beacons and S3's but you can take out the beacons and modules, the circuitry works regardless. It's doing signed-overflow bias on the '235 filters, the rounded 2.1G constant is 40 less than the maximum 32-bit signed int, 40 more wraps it to the maximum negative value, filters ignore -ve values so that's how the shutoff works.


Premu
Fast Inserter
Fast Inserter
Posts: 100
Joined: Wed Nov 13, 2019 4:40 pm
Contact:

Re: I need a circuit that counts and prevents inserters from inserting

Post by Premu »

If you're searching for efficient Kovarex designs, there are lots of in this forum in the subforum for "Show your creations".

My personal, optimized layout looks like this:

Image

It loads up automatically with 80 U-235 (40 currently processed, 40 in for the next cycle) to allow for a continuous production, and puts the rest on the belt. Which can start the next Kovarex centrifuge, as this design is tileable.

You could just remove the beacons, of course, and set the constant V to 40 (which is set to 80 in my blueprint) if you don't mind short breaks in the production.



But if you don't want to use beacons and complicated circuits, there are alternatives. I really liked that simple solution, for example:

viewtopic.php?f=202&t=85331

Tertius
Filter Inserter
Filter Inserter
Posts: 675
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: I need a circuit that counts and prevents inserters from inserting

Post by Tertius »

What monster do you intend to feed with 9 Kovarex centrifuges? This is sufficient for Terawatts of nuclear power or for extinguishing whole planets with nuclear weapons. I guess you just don't know how many you actually need, so you just started out big. However, 1 or 2 centrifuges will last even for megabases - depending how much solar power you additionally build to satisfy the base load that never goes away.

Overfilling isn't really an issue. I found the challenge instead is to not get congested with U-238, since they got mixed at ore processing as well as on Kovarex processing. I handle it this way:
- start with nuclear power only after Kovarex became available (i. e. don't use U-235 from ore processing for nuclear power. Instead, save it for Kovarex)
- once Kovarex is running with 40+ U-235, wait until you have 50 U-235. Take out 10 U-235 manually, feed it manually to the uranium fuel cell assembling machine. It will create 100 fuel cells out of it, which will last longer for your first nuclear reactors than the first Kovarex centrifuge will overflow with 40+80 U-235. You should of course employ a wasteless nuclear reactor setup, that stops inserting fuel cells if the steam buffer goes over a threshold.
- at the time new uranium fuel cells are needed, the Kovarex centrifuges already produced so many, they overflow by themselves. No circuit needed for limiting.

Inspired by forum posts, I created this uranium factory myself.
Screenshot 2023-08-27 183209.png
Screenshot 2023-08-27 183209.png (610.34 KiB) Viewed 995 times


To bootstrap and produce the first 50 U-235 as fast as possible, add beacons with speed modules (if available) and speed modules instead of production modules, change the recycling recipe to uranium processing and move the two nuclear train fuel centrifuges to the processing row:
Screenshot 2023-08-27 183923.png
Screenshot 2023-08-27 183923.png (1.14 MiB) Viewed 995 times
You don't need everything fully beaconed and speed-moduled, but every bit helps speeding up the bootstrap process.
If you have 50 U-235, take 10 manually and let the assembling machine create 100 nuclear fuel cells, so you can start your nuclear reactor now.

Revert the changes later to the original blueprint when the first Kovarex centrifuge has 40+80 U235. Don't forget to change the speed modules back to production modules - this will save really big amounts of uranium ore. Disable the 2nd Kovarex centrifuge until you created a good amount of nuclear fuel cells, then enable it to get the full potential of this small uranium factory.

It will take about 18-25 minutes for the first 40 U235, depending on how many speed modules are present, then about 9 minutes more until the first Kovarex centrifuge runs continuously with 40+40 U-235, then another 6 minutes until it overflows after 40+80 U-235. I guess this short time doesn't warrant a sophisticated circuit to limit centrifuge filling that is only relevant for the time of the initial bootstrap.

The speed moduled beacons around the recycling centrifuges are not a joke: this is the first bottleneck and possible source of congestion you will encounter, if you use U-235 mainly for feeding nuclear reactors and not for atomic bombs to obliterate the planet. However, this only starts becoming relevant with many GW energy usage on a 1000+ SPM megabase.

At the time of creating this blueprint, I was obsessed with power saving, so I created that power grid setup with these two power switches. Remove that and permanently power everything, if you like.

User avatar
Midge
Inserter
Inserter
Posts: 20
Joined: Wed Oct 12, 2022 6:12 pm
Contact:

Re: I need a circuit that counts and prevents inserters from inserting

Post by Midge »

Sorry, but none of this is what I'm looking for, I'm not looking for the perfect Kovarex set-up, I want the basics of circuit counters and stuff, the path rather than the solution.

Loewchen
Global Moderator
Global Moderator
Posts: 8322
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: I need a circuit that counts and prevents inserters from inserting

Post by Loewchen »

Midge wrote:
Mon Aug 28, 2023 2:57 pm
I want the basics of circuit counters and stuff, the path rather than the solution.
https://wiki.factorio.com/Tutorial:Circ ... 2F_Counter

User avatar
Midge
Inserter
Inserter
Posts: 20
Joined: Wed Oct 12, 2022 6:12 pm
Contact:

Re: I need a circuit that counts and prevents inserters from inserting

Post by Midge »

Loewchen wrote:
Mon Aug 28, 2023 3:00 pm
Midge wrote:
Mon Aug 28, 2023 2:57 pm
I want the basics of circuit counters and stuff, the path rather than the solution.
https://wiki.factorio.com/Tutorial:Circ ... 2F_Counter
thank you!

User avatar
Midge
Inserter
Inserter
Posts: 20
Joined: Wed Oct 12, 2022 6:12 pm
Contact:

Re: I need a circuit that counts and prevents inserters from inserting

Post by Midge »

Image

I made it, very little thanks to the cookbook however, but it's done.

User avatar
Midge
Inserter
Inserter
Posts: 20
Joined: Wed Oct 12, 2022 6:12 pm
Contact:

Re: I need a circuit that counts and prevents inserters from inserting

Post by Midge »

Image

Green is the inserter and counter, that stops inserting once inserted U-235 is ≥ 40
Red is the clock, Orange resets the clock after 60 seconds
Pink are the end gates, top one checks if 60 seconds have passed, bottom checks if Green is stopped
Blue waits for both to be true and pushes -40 into Green, allowing it to resume insertion

Post Reply

Return to “Gameplay Help”