A rotary optical encoder is described to provide the pole position of the rotor in a permanently magnetized motor. A sidewall structure cooperates with the pane to define an open cavity facing the surface. A plurality of vertical rails is coupled to an interior face of the perimeter wall wherein the vertical rails are positioned in the interior space. An electrically conductive structure can be formed on a top surface of the substrate that surrounds the orifice. The on-board system can be adapted for use with a tracked trencher andor other mobile equipment. Through this, it may be possible to alleviate a shock when contacting a contact.