Hello,
Instead of using a PWM regulator like a SG3525 or a Tl494 is it possible to use a microcontroller like Atmega?
Sure you can.
I would suggest the following pathway if you are dead set on doing it with an MCU:
-Spend a few hours trying to find app notes or example schematics of an MCU based SMPS. This will give you a little insight into what had to be done and what problems there might be that are special to using an MCU for an SMPS controller.
-See if you can get your hands on an evaluation kit of an SMPS that is very close to what you want to make as far as topology, voltage, current, etc. Its okay if it uses a controller IC. The idea here is that you will have a working example you can analyze with a scope and compare to whatever you end up making. This will help you troubleshoot your thinking and design.
-Modern cheap MCU's can sample and react to signals an order of magnitude faster than even a fast SMPS operates at. But there are some things, like the compensation network, which are not trivial to implement purely in code. You will have to have a solid grasp of exactly how those work before you could start to attempt that.
I would suggest that using an MCU because you can make changes faster is probably not going to enhance your learning as much as you might think. Depending on what sort of power conversion you are after, changing the transistors, diode, inductors, and passives may be just as important or more important than the fairly simple logic that actually generates the switching waveforms.