Reset failure during power dips

I have a data logging application running powered from a mains power supply. The grid has dipped a lot recently and on most occasions the Arduino has not reset properly and thus not run the sketch. A manual reset works fine. Has anyone else had this problem or do I just have a poor quality mains power supply? Going for a battery backup and switchover seems over the top; would I get any improvement by increasing the capacitance on the 5 V regulator circuit?

Thanks for any hints.

How long is the dip? Also, how much power is everything drawing? If the datalogger doesn't draw much power, and you have relatively quick dips, a cap should be fine.

baum

Thanks, I don't know how long the dips have been as I have been asleep or at work. On 2 out of 6 the Arduino reset properly but on the other it just hung. The microwave, cooker , etc all reset too. The Arduino is talking to a geiger counter which draws next to nothing in comparison. I suspect it is a very short transient which does not completely drop the 5V line to zero before it comes up again. I will try different power supply first. I was just interested to see if anyone else had observed this and had a good fix.