Arduino error in light sensor circuit

Hello everyone,

I'm still having problems with this circuit design. I tried to organize a proper schematic scheme, in the attachment you will find the outcome. However due to the fact that the relay is a self-made part, I couldn't further organize it.

I hope this makes the system somewhat more clear so maybe someone could give advice about why the system gives an error and resets the arduino after the actuator moved for a couple of seconds. The circuit uses two relays to control an actuator to follow the direction of the sun. This is done by comparing the inputs of two light sensors, through the arduino. The double relay is switched by NPN transistors two control the actuator in two directions. The diodes are added to prevent the current from reverting, but it seems that this happens anyway,

Looking forward to your responses,