Help with Automotive Electronics Project

I am having issues with a Mega freezing when hooked up to my car.

To verify the board is frozen I had a blinking led controlled by the main loop, it stops blinking in certain cases (usually around starting).

I have tried isolating the power by using an external battery to power my board and that doesn’t seem to help.

Can someone suggest

  1. Appropriate isolation for the inputs?
  2. A way to power though the starting voltage sag? I assume that would be some sort of large capacitor around the LM7805.

Circuit diagram attached.

Thanks!
Chris

Your analog inputs aren't protected against over voltage, your LM339 output needs a pull-up, not a pull-down
resistor.

I'd suggest adding perhaps 10nF to ground on all the inputs to cut down RF and noise interference (not
sure what bandwidth you need for the various inputs though).

For the analog inputs which are rather low impedance, run a 10k in series with the analog pin to protect
against over/undervoltage, and add 10nF at the pin to ground too?

Use schottky diodes in preference to 1N4148 for protection, because schottkys are definitely going
to conduct way before the internal protection diodes they are protecting.

Hi Mark,

Thanks for responding! I will update the schematic with your suggestions and repost.

Just to be clear there is only one IN4148, the other diodes are zener diodes as a voltage regulator. You are only suggesting change the one on the speed sensor? Do you have a suggested part number for the schottkys?

Thanks!
Chris

MarkT:
Your analog inputs aren't protected against over voltage, your LM339 output needs a pull-up, not a pull-down
resistor.

I'd suggest adding perhaps 10nF to ground on all the inputs to cut down RF and noise interference (not
sure what bandwidth you need for the various inputs though).

For the analog inputs which are rather low impedance, run a 10k in series with the analog pin to protect
against over/undervoltage, and add 10nF at the pin to ground too?

Use schottky diodes in preference to 1N4148 for protection, because schottkys are definitely going
to conduct way before the internal protection diodes they are protecting.