A man who robbed a victim at knifepoint for spare change has been jailed for more than five years.