My made in 2004 LG frontloader has a simpler device for this. A ball bearing rests in the path of an LED light. If it shakes, the ball moves, allowing the light to shine on a phototransistor. The machine will slow down or stop and toss the load around depending on how much trouble it is having.