We've developed a Microcontroller System for automotive use with few sensors and a solenoid valve control output via a Relay. We've found these valves resets the microntroller used (ATmega128) when opening or closing and partially solve the problem with a diode in parallel of the solenoid. Moreover, in seldom cases the progam resets or loose it's variables (counters) stored in eeprom. Voltage regulation is based in a LM2574 switcher. We have not implemented further filtering circuits and our housing is made of aluminum. In my understanding we need some EMI shielding, or power line filters to avoid the reset problem. Any advise is appreciated.