Electrical feedback problems with automated animal maze

Project:

A maze in the shape of a T with returning arms ( just draw a line from the top of each side of the T to the bottom ) that has 3 sliding doors ( each door controlled by two DC motors that are wired to run opposite direction for opening and closing ), 2 solenoid valves, 4 LEDs, and 4 photocells ( LEDs and photocells are used as beam breaks to trigger motors and valves). The DC motors and solenoid valves run off of a 12V power supply, which in turn run through an 8-channel duel state relay that can be controlled by Arduino. Arduino has 8 outputs going to all 8 relay inputs, 4 inputs for the 4 photocells, and 4 outputs that feed into a data acquisition board.

Mechanically, everything works pretty well.

Problem:

The 4 outputs that feed into the data acquisition board have posed a problem as it will shut down the interface after a motor or solenoid goes off. It seems like there is some sort of power surge coming out through the relay and back into the Arduino board. It could entirely be my wiring as I'm not an electrical engineer by any means, however, it doesn't seem like the solution is that far off considering it's a simple design.

Any suggestions?

I suggest you provide a schematic and a block diagram of what you are looking at, as we can't see that far from here.

Paul

it will shut down the interface after a motor or solenoid goes off

You have inadequate power supply decoupling. The simplest fix is to power the motors and solenoids with a different power supply, separate from that powering the sensors and logic.

Be sure to connect all the grounds.

In the rare but possible situation that you still have interference, use shielded cable for sensor wiring, and twisted pair for motor and solenoid wiring, in order to reduce radiative coupling.

Running signal cables completely different route from the power wiring to the motors and relays will definitely
help reduce chance of interference, as this reduces capacitive and inductive pickup dramatically.

Its important never to have wiring loops, so each return path must be in the same cable as the outgoing current, typically as a twisted pair or shielded cable. Two wire loops of significant area will couple like a transformer
and both radiate and receive EMI.

Reducing the sensor bandwidth at the Arduino by connecting the sensor wire to ground via a capacitor can
often help reduce interference spikes (assuming the sensor doesn't need to be fast responding).

crewl2:
it will shut down the interface after a motor or solenoid goes off

Any diodes in parallel with these inductive components, as in the diagram below?