My mains is the standard 240V 50hz and my required output is 24V 5A. Although the device i am powering has a large voltage range, 24V is recommended.
What's the voltage range? If it's really wide, then the regulator can be skipped, leaving you with just a bridge rectifier and smoothing capacitor, which will be much more efficient and not get as hot as a linear regulator.
In Europe, the mains voltage is 230V -6% +10%, a range of 216V to 253V, meaning the output voltage of the transformer will also vary by the same percentage. On top of that, the transformer's load regulation needs to be taken into account: the secondary is specified at full load, when less current is draw, the voltage will be higher.
I specified voltage range of 13V to 30V already in one of the replies. I'd prefer to use a linear regulator to keep the voltage down because on the device itself at 24V reports a usage of less than 2A. This means that on a transformer with secondary of 6A 24V rating it is possible to exceed 30V on very light loads so if i use capacitors + linear the voltage will always be a maximum of what i set it to be. I would just set the linear regulator to 28V so even though Vin is smaller than Vout, Vout=Vin if Vin <28V which would be suitable in protecting device as long as the lower voltage wont damage the linear regulator.
Although voltage range is big if the power source isnt good the device will go into a boot loop and one of the reasons for using a linear regulator is because you dont get the same noise and ripples you get with switching PSUs. Sure its not an efficient power source but using components rated for higher loads does improve efficiency and heat output. I will post a schematic later, all that matters is that it works and wont spoil the device or ruin its life span.
That's such a large input voltage range, there should be no need for any voltage regulation.
Don't use a 24V transformer, use an 18V transformer.
With no load and the highest mains voltage, assuming a regulation factor of 10%:
Vout = 18*1.1*1.1*root(2) - 1.2 = 29.6V
The minimum output voltage will be:
Vout = 18*0.94*root(2)-1.4 = 22.5V
Filter capacitor sizing:
C = I/(2F*Vripple)
Where:
C is the minimum capacitor size required in Farads.
F is the mains frequency.
Vripple is the maximum allowable voltage ripple.
I is the maximum load current.
In your case, the minimum allowable voltage is 13V so the ripple can be 22.5 = 13 = 9.5V
C = 6/(2*50*9.5) = 10,000µF
In practise you'll probably want to use a larger capacitor than that to account for the fact that the capacitance and ESR will increase with age. Use a 10,000µF and 2200µF capacitor in parallel. The capacitors should be rated to a minimum of 35V.