Cobblers boss Aidy Boothroyd is familiar with the 27-year-old, having signed him for the Sky Blues in June 2010 when he was in charge at the Ricoh Arena.
"Roy is a striker who can also play in both wide areas," said Boothroyd.
"He has played a number of games in the Premier League and was someone I tracked very closely when I was at Colchester. I then took him to Coventry when I went there.
"He is fit, athletic, mobile and he has an eye for goal. He will give us a different kind of threat to the other players we have at the club.
"I have worked with him before and he is a good character. I know what we are getting with Roy and I am very pleased we have been able to bring him in."
Roy Keane took O'Donovan to Sunderland from Cork City in 2006. He made 17 appearances for the Black Cats before enjoying a series of loan spells, including at Hartlepool, where he scored nine goals in 15 games at the end of the 2008/09 season.