How to Repair the Rotation Sensor on a LEGO MINDSTORMS EV3 Motor

How to Repair the Rotation Sensor on a LEGO MINDSTORMS EV3 Motor

I had a LEGO MINDSTORMS EV3 large motor that quit working properly. After some investigation, I figured out that the problem was that the rotation sensor doesn’t work any more. I’ve also seen a few posts on Facebook where this has happened to other people. LEGO customer service sent me a new motor to replace the broken one, but I still had the old one lying around, so I thought, why not try to fix it?


First, let’s clarify the problem that we are fixing. Your motor problem might not be the same as mine.

The way I noticed this problem at first was that the motor would run at full speed even when my program was telling it to go slower. After further inspection, I found that the rotation sensor of the motor was not working. You can verify this by using the Port View feature on the EV3 brick. When you rotate the motor by hand, the rotation value stays at 0 degrees instead of changing like it should as shown in the video below.

After disassembling the motor (more on this later), I was able to further diagnose the problem to a faulty IR emitter. LEGO MINDSTORMS motors have an IR emitter and a dual IR detector that is used to sense the rotation of the motor. There is a black plastic wheel with holds in it that either blocks or permits the IR light from the transmitter to the detectors. I used the IR beacon from the LEGO MINDSTORMS EV3 31313 (retail) set to trigger IR detectors, so I knew that the emitter must not be working.

Parts and Tools

This fix requires a few specialized items.


  • Torx T-5 screwdriver (Adafruit)
  • LEGO 630 Brick separator (LEGO)
  • Soldering iron


  • Everlight Electronics IR928-6C-F (Digikey)


Alternately, you can use a solder sucker if you have one instead of the de-soldering braid. (And yes, I bought the RadioShack stuff a long time ago.)


Now, for the actual repair. The first step is to disassemble the motor. Remove all of the screws. However, don’t try to pry anything gray apart yet. There are two more hidden screws still holding it together.

Next, we need to remove the white cover on the back. Don’t use anything metal to pry it apart. It will damage the plastic. I used a LEGO brick separator to pry the white piece from the bottom. You also need to push on the white part from the side (into the page from the point of view of the picture). There is a tab that locks it into the gray part. Do this on both sides, then the white part should come free.

Once the white plastic part is removed, remove the last two screws. Then pry the two halves of the outer gray case to remove the motor. The red rotating part doesn’t come apart, so be gentle as you bend the plastic.

The IR emitter is the translucent component next to the black wheel with holes in it.

Use the solder remover to remove this part and replace it with the new one. I found that first adding some fresh solder to get things flowing and then adding some rosin flux really helped the de-soldering braid suck up the solder.

Once the part has been replaced, we can test it before we put the motor back together to make sure it works.

Now that we know it is working, we can put the motor back together. First, make sure the wires are still in the slots on the motor where they belong.

Then place the back piece that surrounds the cable jack, making sure it is oriented properly.

Now put the motor back into the large gray plastic part, gently prying the two haves apart as before. I tested it with the EV3 brick again at this point to make sure everything still works.

Then replace all of the screws. I’ve labeled them Long, Medium and Short in case you forgot to take notes.

Now, replace the white plastic cover and your motor is as good as new!

10 Comments on “How to Repair the Rotation Sensor on a LEGO MINDSTORMS EV3 Motor

  1. Hi,

    My EV3 large motor stop working and looks like stuck. I opened the motor case and checked, the motor is not running smooth as normal. Do you think I can just replace a new motor? Any ideas of the motor type (R5170?