Last tetanus was?
In general you need a tetanus (now TDaP)booster once every ten years.
If you have a penetrating injury and your last tetanus shot was more than 5 years ago you should get a booster. I would not consider the injury you described as at risk if you stepped on a clean pin in your home, If you are still having pain, please be sure nothing was left in the wound, i.e. part of the pin.