Arduino Nano resets when driving a digital servo

Problem solved! A 2200uF cap on the 5v line fixed it.