Elec Eng student here, I've joined a project at my university's mechanical eng department who are building a rather large hybrid rocket. Unfortunately they've been having issues with the microcontroller (an atmega32) that's driving a hobby servo connected to the oxidizer valve. when testing in the lab everything works fine, but in two static tests in the field the valve closes shortly after opening. I suspect it's a power issue causing the MCU to randomly reset as they are running the MCU from a cheap switchmode 240VAC > 5VDC PSU with the only smoothing being a 100nF cap across the MCU! The problem I think is that in the lab they use normal mains but in the field it's powered by a generator..
If I can recreate the issue in the lab I'm going to look at beefing up the power-supply to the MCU, perhaps running from the 12VDC line into a linear reg (7805? ) with lots of input and output smoothing. what else could I do to make the power-supply bulletproof? common mode choke on the input? any suggestions or cool app-notes are welcome :P I'm also considering a grounded metal box for the electronics to sit in as opposed to the current plastic one. good idea?