Finally I finished the second version of my circuit which should control different solenoids.
You can view the large version here.
The solenoids parameters are: V = 12Vcc, R = 3.7 Ohm, I = 1.80A
In order to prevent an atmega328p reset due to noise (like it happened in the first version), I added:
an optoisolator 6N136 for each output,
a MOSFET driver MCP1406 for each MOSFET
an isolated power supply THL-25 to power up the atmega328p (main battery is an AGM Battery 12V, 200Ah).
As suggested in the application note of its datasheet, I used an inductor L1-1UH with a capacitor for the THL-25 input. Is it OK?
In this way, I have two different grounds, GND5 is the gnd for 12V, while GND is the ground for 5V . I also added a big 2200uF capacitor between +12V and GND5 in order to avoid noise. The capacitor C5 100nF is OK for the atmega328p? I will place it very close to the atmega pins.
The output named "OUT5/SERVO PWM" should control a 12V, 4A RC servo.
Is there any error in my schematics?
Anything to improve?
The big C3 capacitor is enough for the filtering?
The circuit close to the isolated power supply is correct?
Can you help me, please?
I would like to improve my circuit, if possible.
Thank you for your support and your help!
EDIT1: I updated my schematics by adding the SERVO connections and pinout. EDIT2: I changed the SERVO circuit by using a P-mosfet. This is the SERVO schematics.
EDIT3:: This is the new schematics for the servo controlling.