I have a complicated problem with my Arduino circuit being reset/crashing, I will try to describe the best I can.
Basically I have a Arduino 328P circuit that is monitoring some temperatures in an automotive environment. Several one wire temperature sensors connect to the PCB with various distances from 2-10 ft. Each is on a seperate pin. I have also tried analog LM35 sensors. The system works outside the car just fine.
When the car is shut off (not the PCB) the Arduino is being reset despite power still being connected. There is no power spike or loss to the PCB. The car is not actually running, I am just turning the key on and off.
What I have learned:
-When I disconnect the temperature sensors from the PCB, problem goes away.
-It makes no difference if the wires to the sensors are shielded.
-It makes no difference if I use one wire digital or analog sensors.
-It makes no difference if I connect the PCB directly to the battery
-The problem goes away if I run the PCB on a battery not connected to the car. (fully isolated)
-The problem comes back if I ground the PCB to the chassis, but still leave the +12V isolated.
-The chance of a reset changes when the sensors are moved or the length of wire is changed.
-It only resets when the key is turned off, never when turned on.
I tried to explain the best I can without writing a novel. I think I might need to isolate the ground to my PCB somehow. The problem is in the ground or the long wires to the sensors.