Calculating stack size

Hey guys. I’m programming for an internal stacker (dr4b, chainbar, etc) and I’ve been pondering this problem pretty much since the season started. Basically I need our bot to figure out how tall its stack is. I’ve toyed with various implementations, from figuring it out based on movements (that wasn’t fun), to putting a potentiometer on our mobile goal lifter (it used to be a pulley) to try and calculate the weight of the stack (this ended up being too noisy to seriously consider). My most functional idea was to use a DIY color sensor (yellow filter on a light sensor and a normal one for comparison), mounted in a place on our lift that would always remain equidistant to the stack and figure it out passively as our driver raised and lowered it (there’s a cone at this height, so the stack is at least this tall; there’s no cone at this height, so the stack is shorter than this). For some reason my team decided having a big metal rod sticking out with expensive sensors in a constantly moving area was a bad idea, so that was scrapped (I couldn’t get the sensors close enough). I’m curious to what other teams have come up with to solve this problem.

You just keep a count…

Yeah an easy way would to have the robot manually count when the claw releases the cone or something. You could also have a partner remote with a button which adds one to the cone count when pressed.

You may also want to include a statement about when button for mobile goal is pressed to bring the goal down, the count goes back to zero. Just a thought.