I have a genuine Arduino Mega 2560 that is using 12volts from a car battery (regulated) down to 5 volts.
On the same car battery there is another circuit that shares NOTHING in common with mine except source voltage, how ever this circuit controls a large electric fan and relay. When that fan kicks on, everything is all good but when it cuts off, MY Arduino and LCD display garbage and sometimes the controller is stuck in a random state.
So my first thought is fly-back inductance from the fan? well the fan has the zener diode built in along with the relay it is using also has the protection build in. (think when the cars ECU cuts the electric fans on in a car. cause this is the scenario). Ive tried putting a capacitor on the power rails of my breadboard to filter spikes and a/c, no dice. My eventual plan was to have my relay module control the bigger relay for the fan, however even sending ground THROUGH the relay on my circuit without actually hooking the module up to my board, causes garbage.
Its also random, as in sometimes the fan kicking on and off has no effect and then on the 12th time, BAM garbage and stuck state.
I have tried with the vehicle engine not running and with it running.
I have also tried different fans to perhaps see if the internal protect circuitry in the fan is no good. No dice.
I have tried different relays on BOTH sides, and no dice.
Id honestly be okay with my micro-controller not controlling the fan at all, however even with it completely disconnect from EVERYTHING IN THE VEHICLE except power, it still does it.
I don't understand whats going on, Can someome please help me? As every time the fan is cutting off I feel like its a voltage spike then hard drop. I wish I had a scope here as this could easily help identify the problem.
Also just found out my arduino mega is fried, and I have worked with micro-controllers all of my life. This is the 3rd time using an "arduino" brand microcontroller. Is there some kind of sensitivity or shift-register im not aware of? I have another one I am going to reattach the screen to try again.
I am at a loss and really want to use an arduino for my customer instead of PIC (moral reasons).
NOTE: THIS BEHAVIOR IS NOT EXPERIENCED WITH THE SAME LCD MODULE BUT INSTEAD POWERED BY A pic24HJ64GP502 micro-controller