Motor encoder unit, with enhanced sensor protection, combine bearing and sensor functionality into a single, compact, robust and easy to install unit. They enable accurate and continuous monitoring of speed and direction of rotation. The units include integrated protection for their electronic sensors that enables them to deliver accurate data, even in harsh electromagnetic environments, while avoiding electronic failures, which can result in a reduction of maintenance and warranty costs.