Hi. I am Rick. I will be your expert. THe 0502 error code indicates that the encoder strip has lost its connection THe steps below should fix it for you.
1. Remove the power cord from the unit.2. Lift the lid of the unit, just below the scanner portion of the All-In-One, to expose the inside of the unit where the printer cartridges are located.3. Gently slide the ink cartridge carrier to the middle of the printer.4. Gently move the top part of the printer belt to the right.5. Using an index finger, gently push encoder strip down and then back up to get it back into the slot located on the back of the ink cartridge carrier.NOTE: There is a small slot that the encoder strip fits into, which is going to be located on the back of the ink cartridge carrier.6. Gently press the strip first to the rear and then forward to ensure that it is seated correctly.7. Manually move the ink cartridge carrier to the left, then to the right to check the positioning of the encoder strip.8. Once the encoder strip has been re-seated, close the lid to the unit.9. Re-connect the power supply to the All-In-One.10. Press the Power button. If the encoder strip was re-seated correctly, the Hardware Error: 502 code will not appear.