I'd also add more supply decoupling on the 5V rail right next to the relay and its transistor. 220uF or so. Replace that 1N4007 with a fast recovery rectifier, its too slow.
I'd also add more supply decoupling on the 5V rail right next to the relay and its transistor. 220uF or so. Replace that 1N4007 with a fast recovery rectifier, its too slow.