This is a spool holder with a weight sensor included, it is based on a 2kg load, an HX711 board, and an Arduino nano, I made it basing on my CR10 v2 by creality but it can easily be fitted to other printers it will require:
I think this can be a pretty cool Arduino project and it's pretty simple i found it pretty amusing i suggest understanding how it works too if you wanna get into this kind of stuff. A pdf guide on how to assemble it is also included in the downloadable files and the ino file for the arduino script other than the 7 stl files. The total cost is pretty low if you go with Chinese websites for electronics but it's not that bad even with amazon even tho prices are high for electronics there. Note that the reading is acceptable only while not printing because of the tension of the filament.