Washer won't spin unless lid is lifted then closed

The washer worked great last weekend. This morning, I ran a load and came back when it was finished to find suds still in the basket noticing a burning smell. Thinking I put in too much detergent, I restarted it back half way. After refilling with water, it agitated but when it was time to start the spin (after the normal 5-10 second wait), the normal noise was made but there was no spin. I lifted the lid and closed it then the spinning started. The smell went away but I’ve successfully done 4 loads since but I have to be right there when the agitating stops.

What can I do to fix it??

Sounds like the lid switch is broken. Part #AP3180933.

Here’s the parts breakdown http://www.appliancepartspros.com/partsearch/model.aspx?model_id=5136644

Nat

If the timer doesn’t interrupt power during the spin period, you have a bad timer.