Transient filter dimensioning

I built an automatic fail-over circuit to keep my arduino plus a few other items running. It runs from a regulated wallwart most of the time (5V regulated), and a 12V battery (run through a regulated) during failure. This all actually works. I can switch back and forth between regulated wall power and regulated power from the battery. The problem is that I haven't yet put a filtering cap between the wallwart and the rest of the system. Originally I didn't think I'd need to because it's regulated... Well, not a great idea. When I plug in the wallwart the regulated supply shoots up to as much as 33V before it settles back to about 5.1 to 5.2V.

So, I can see that I need a filter cap to keep this in check. This got me thinking that, while I could just guess and slap a cap in there, I really would like to know how to properly go about dimensioning the cap. If I am running 5V from the wallwart and drawing between 50ma and 500ma then what sort of cap should I use to make sure the initial transient spike is absorbed? I tried googling this a bit but didn't see anything I really liked. Any pointers either here or via a link to a good reference would be appreciated. I know this is probably a reasonably basic sort of thing but sometimes self taught people just don't know all the basics.

Rather then a cap (sizing will be tricky and only testing will find an exceptable value I think) how about just wiring a 5 watt 5.6 volt zener across the output of the wall wart power module?

Lefty

Hmmm... Yes, that could be a viable solution. Thanks!