~28vac to 5vdc supply

I am trying to find a way to run the arduino chip aka atmega328 on 28vac supply for an hvac thermostat. While commonly the 5volt regulator is used but the input voltage would be to high should I use the 12 volt regulator and as far as turning the ac to dc should i use a transformer or could I get away with using diodes then going into the regulators? What is the best way to do that.

I stand corrected the 5v regulator offered by radio shack can handle ~30vdc input as for the question for ac to dc should i use a small transformer or is it even needed in this application?

28Vac has peak voltage (amplitude) of about 40V, since ac voltages are measured rms...

Also, the voltage drop from the rectified AC will mean a high heat loss for a linear regulator. You would need to use a switching regulator rated at the required voltage.

Weedpharma