How to add temperature control to a soldering iron
You would need some type of temperature sensor. Temperature controlled irons likely use either thermocouples or thermistors (probably the former as they are generally perfectly happy at high temperatures). If you were able to wire a thermocouple down near the tip of your iron, you could simply read the temperature and implement some controller (PID, fuzzy, whatever) to manage the power.
Alternatively, you may be able to read the temperature based on the change of resistance of the heating element. Monitor the voltage and current passing through the element to get the resistance (R = V/I), and use the temperature coefficient of resistance of the element (probably Nichrome) to calculate the temperature. It would take a great deal of care to get this to be decently accurate, as you'd have to subtract out the lead and possible connection resistance (both of which may also change with temperature).
In any event, your results are bound to be fairly poor. Beyond simple temperature control, there are often many other significant differences between a Radio Shack iron and a (e.g.) Hakko. Namely, the proximity of the heating element to the tip (good irons will have their heating element inside the tip), and the "density" of the heating element (the entire 65 W heating element in a Hakko is about 3/16" dia. x 1/2" long), both of which serve to couple the heat generated into the tip extremely quickly and efficiently. If you simply want a temperature-controlled iron, just buy one. The only reason to make one is for some design experience (but it's been done before, so really why bother? Spend your time on something totally new).
For an automatic temperature control, you would need three basic components:
- A way to sense the temperature of the iron at the tip
- A way to control the power supply to vary the temperature
- A microcontroller to read the temperature and determine how to adjust the power supply to achieve the desired temperature
Since you asked for preceding work here is a nice build log of a DIY mod to a soldering station including a lot of nice pictures, schematics, and firmware.
And Dangerous Prototypes looks to be putting together a kit of some sort. But some of the links are dead and information is missing. But they do have a nice custom PCB for the project that is currently out of stock as of this writing. I'm not sure if this is a work in progress or just an unfinished and forgotten about project. You could probably email them and ask for an update.
PS: I agree with AndrejaKo's assessment on the dimmer controlled iron. For some people, that's all they want'need. Here is a nice Instuctable on how to do just that.