Heavy light blinking with burning smell

My dishwasher a few weeks ago would stop working intermittently as it would get stuck and heavy and quick lights start blinking. I washed the dishwasher from inside with CLR and it worked fine for a few days. 2 days ago the same thing started and then it would not move forward. The washer starts for a few minutes, it looks it fills up a little bit or produces steam and then heavy and quick lights started blinking. I then took out the washer and checked the drip pane at the bottom, there was no water but there was dried marks which I cleaned. Then I cleaned the float also and then took out the grinder from inside and cleaned that as well. When I switched it back it is still the same thing. I also smell some burning wire and when I opened it again the motor at the bottom was very hot and I can see some black mark.
Any help would be appreciated as I don’t want to call a service guy.if cannot be fixed then I will replace it.

Thanks