How to store surplus from a belt?

Is there a way to store in chest resources on belt that are not in use now?

In other words, can I use the logistic system to detect that resources stopped moving from a belt and put it in a chest. In the opposite case, if the resources are moving, inserters must not grab the resources.


What I typically do is have an inserter(s) which moves items from the belt to a chest, then another inserter(s) which moves items back from the chest to the belt.

You will need to wrap the belt around the chest, or use multiple chests, in order to get this to work.

It works much better if you have a mod that adds bigger (in area) chests. Warehouses are 6x6. It's also trivial with diagonal inserters.

Keep in mind you don't want to do this for every production line. Creating too many of an item that won't be a bottleneck is just a waste of resources.


When the belt is not completely full when in nominal production, you can connect a red or green wire from the inserter to a belt tile which comes after the inserter. Set the connected belt's setting to "read belt contents" and the content read mode from "pulse" to "hold". Have the inserter activate when the resource the belt is holding is > 6 (if both lanes hold the same item type) or > 3 (if you only have items on one lane). That count will only be reached if the belt is "backing up":

inserter only takes overflow (belt goes north)

When the source of the items on the belt is so productive that the belt is always completely full even when it's moving at maximum speed (good job!), then use a belt of one tier higher for the measuring tile. If the whole belt is already the highest tier you can currently build (great job!!), you can use a splitter to split it into two, place the measuring tile on one of the two branches, and rejoin them with a second splitter:

with splitting


If what you want is for the excess resources to be put back on the belt when things are low (as opposed to storing them for another purpose), then you don't need any kind of decision mechanism — just have one inserter moving items from the belt to the chest and another moving items from the chest to the belt, and the chest will naturally empty/fill as needed. This is commonly called a buffer chest.

Here's a fancy buffer chest design I just threw together:

Two splitters branch off the main line to two inserters feeding two chests. Inserters then feed items from the chests to belts that sideload back onto the main line.

Simple buffer setups don't let items bypass the chests; here they can, so you aren't limited in throughput by how many items the inserters can handle (though the left side will steal some items when its chest isn't full and the belt is). The belt arrangement at the bottom sideloads items from the chest so that the main path gets priority (not emptying the chest unnecessarily).


I have a simpler option to the other answers, it doesn't work in all situations, as it can use a little more room. And as you can see only works where you can insert onto the start of a belt from 90 degrees.

An inserter cannot pick something up that's moving directly away from it on a higher tier belt.

With the below fast belt going up. The standard inserter at the bottom of a fast belt won't be able to pick anything up until the belt is full.

Inserter and fast belt

I use it for stocking up Logistics Chests with e.g. ammo from my military science pack production line.

It works with either Fast Belts, with standard, long or burner inserters. Or with Express Belts with any inserter.