I search some parts for a low friction spool holder, added a low cost load cell, some electronics and a OLED display. Wrote a small BASCOM program for an ATMEGA168.
The result : A spool holder with an integrated load cell for measuring the weight of the filament on the spool. From the weight we can calculate the lenght of the remaining filament on the spool.
Added an filament guide
Increase the perimeter, top and bottom layer to at least 10 for part "load_cell_1".
Print part "load_cell_4" with supports.
The 2kg load cell is only usable for max. 1kg filament spools. If you use bigger one, take an 3kg or 5kg load cell !