I'm working on this project for opening a lot of solenoids and to turn on/off lights. When I'm testing, everything seems fine, but in production, the Arduino resets or even behave strangely by opening solenoids or starting the buzzer randomly.
I've noticed that It resets when I switch on and off the lights (fluorescent light, 12 of them, so a lot of spikes) Here is the original schematic.
I want to add the optocouplers 4n35, that are not currently in the scheme.
Can anyone advise, if there is something wrong with the orignal schematics. Are there any improvements that can be made in order to make this work? Is the solution I've proposed going to solve the problems?
Note, that the 24V is actualy 12V but from a different power source just to separate the spikes from solenoids.
Thank you an best Regards, Mircea