Hello, all! Hopefully, I have posted this question in the right place.
I am trying to make an arduino controlled device that will hold a spool of yarn and dispense it. The part that I am having trouble with is how to get the device to keep track of how much yarn has been used (to alert the user when yarn is running low). I already have the user input the initial length of yarn as listed on the yarn packaging. I was wondering if there is any sensor that would keep track of the length of yarn used more accurately than (what I am currently using) a formula that converts the number of turns of the servo controlling dispensing into a length.
I looked at using an ultrasonic sensor, but the only thing I could think to do with it would be to make the path the string of yarn takes out of the device vary the string's proximity to the sensor cyclically every x inches. Then keep track of the number of cycles to get how much yarn has been used. This just seems less efficient than my aforementioned formula.