Over the years, legislators and courts have decided that noncompete agreements can t be used as clubs. You can t be restricted from competing forever or even close to it. One to three years is a time period considered reasonable. You can be restricted in an area your competitor has his business, not nationwide or worldwide. The agreement can restrict certain core functions but can t be so sweeping that the signer won t be able to earn a living from doing what he did for the company.
Laws vary from state to state in terms of how receptive they are to noncompete agreements.
If they re tacked on later, there must be something new given by the employer either a significant promotion, large raise or other similar enticement. And yes, it needs to be in writing. Which brings us to your situation. There seems to be a few flaws here. You agreed to disclose business dealings you were involved in but had permission to work on your own projects on your own time using your own equipment.