@Johonn covered the point.
My answer is only for augmenting his.
That kind of sorter works fine, at least until you produce too much.
Yep, this happens.
When your pile of chests fills up to the top, the comparator starts to output a gradually stronger signal, up to its maximum when the hopper he is analyzing gets completely full.
But far before this point, the system has already failed!
...when the comparator outputs a signal that's longer than two, it messes up the other filters as well, compromising all the sorting.
The most simple/efficient way to solve this problem, called "Overflow" is to slightly modify the configuration.
I'll show you how.
These two are the only two layers that you want to alternate, side to side to each other, to achieve your Overflowproof Item Sorter! Just this easy.
Please note that the first two hoppers are not facing downward. You can either point them toward the comparator (and the block below) or in the opposite direction; not down or toward a side hopper.
Also, note the redstone torch under the block with the comparator on top.
Your item input should go right over the hopper with the orange carpet on, replacing the carpet (i only used it for showcasing)
Another note about what to put in the first hopper to sort out items.
I do not recommend using the sortable item itself.
Instead, my suggestion is to use a cheap, 16-stacking item (did anyone say snowballs?) after renaming it with an anvil, however you like.
Only a few experience levels spent for a more secure, and efficient system: in fact you only need four renamed snowball (mine are "Filler") and 6 items of "deposit" in the dropper.
For the input, you COULD use a hopper chain, but i do not recommend... they barely manage large amount of items, putting stress on the cpu due to their mechanics, and generating lag if on a server.
A smoother, more efficient and in my modest opinion even more elegant way of funneling the items is via a water-on-packed-ice slide.
You can drop items in the water by any means you prefer, i used an auto dropper clock mechanism in the example.
You see the items, streaming down the flux, move to the outer limit of the packed ice block (due to the sloped path and End Chest particular hitbox ) and get sucked by the one and only right hopper.
Use packed not normal ice so that it doesn't melt.
Use End Chest, not normal ones or items could get stuck.
Making the flux loop is better, so that items that didn't get caught at first passage surely with get at the second one.
The idea is not mine, i think the first one to come up with it is JL2579 in this video (
), alt least is the first one i saw. It's really complete and fascinating, even if old, but the used redstone mechanisms did't change much since.
Hope helped, good luck building & sorting all your work! ;)