Issues with sensors and external power

I've got a rather large project that I've been working on for a few months. I've been testing each component separately, and am now at the point where I'm putting it all together. The thing I'm (re)building is a 35mm motion picture film scanner from the 90s. I was able to re-use most of the components (sensors, stepper motors, sprocket drive, etc). All of the individual pieces work fine, when I test them on their own. However, now I'm having some issues after putting the whole thing together.

My setup involves a PCB Arduino Mega 2560 shield I made. This has 3 25-pin headers, which connect to external DB25 connectors, which in turn go to breakout cables that connect to the sensors and motors. Again, these all check out fine individually. One cable is for motor and relay control, and the other cable is for the sensors.

All of the sensors (proximity sensors and photo switches) require between 5 and 24VDC external power, and I re-used a 12VDC power supply that was in the scanner. In my testing, I used a benchtop power supply, but I've tested this power supply and it works fine. It should be more than powerful enough to handle the dozen or so sensors it needs to power.

The issue I'm having is this: When I connect all of the sensors to the cable, and I connect the external 12V power to the sensors, they all work fine. Each of them powers on, and each reacts accordingly when the sensor is tripped.

HOWEVER, when I plug the DB25 connector into the Arduino, none of them will power on and the power lights on the 12VDC power supply go out. When I disconnect the Arduino from the sensor cable, I get power to the sensors and the power lights on the power supply come back on. So, something is clearly amiss.

The cable bundle consists of 5 shielded cables, with a common DB25 connector. All of the cable shields are spliced together, and the ground from the Arduino connects to these. The ground from the 12VDC power supply also connects to the shields. In some cases, there are grounding wires built into the cables I used (which are tied to the chassis at the sensor). These are also spliced into the Cable Shield/Arduino Ground/Power Supply Ground.

+12V goes to 11 sensors from a single wire spliced into a quick-release connector outside the cable bundle. I've checked that none of the ground/12V wires are shorted inside my cable. I've also tested that none of the wires that carry signals from the sensors to the Arduino are crossed, and that none of them are short circuited to ground or +12V.

A bank of 12 pins on the arduino (on my PCB) have 4.7K pullup resistors, and use the +5v out of the Arduino for power. This mirrors the setup I had on my breadboard, which worked fine. However, the breadboard didn't more than 4 sensors going at once, and I'm wondering if all those resistors hanging off of the 5V out on the Arduino are causing problems.

Any ideas?

Thanks!

and I'm wondering if all those resistors hanging off of the 5V out on the Arduino are causing problems.

Have you measured the 5V? Is it sagging.
What about your decoupling?
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

It is time to fault find by measuring what happens to the voltages rather than just saying it does not work.

I'll test that tomorrow when I'm back in the office. So your thought is that the issue might be with the 5V power, not the external 24V power supply, then?

Since the PCB is already printed, this could get interesting, trying to cram a bunch of caps in there...

-perry

The issue could be any power supply.

Since the PCB is already printed, this could get interesting, trying to cram a bunch of caps in there...

Use surface mount caps, you can solder them between pins of a 0.1" pitch chip.

UPDATED BELOW

So I've tested the voltages and here's what I found:

(a shot of the PCB, for reference)

In the upper board, you can see where the resistors go (on the right side, between the reverse "K" pattern of thru-holes and the wide trace that comes down the right side of the board). The trace all the way on the right side is +5V from the Arduino. There are 12 resistors in total, all 4.7k.

Sensors Connected, Scanner Power Off
+5V trace: 4.78V.
Other side of the resistors: 4.76V
12V Power Supply (measuring +12V and COM terminals): -0.12V

Sensors Disconnected, Scanner Power Off
+5V trace: 4.76V.
Other side of the resistors: 4.74V
12V Power Supply (measuring +12V and COM terminals): -0.00V

Sensors Connected, Scanner Power On
+5V trace: 4.59V.
Other side of the resistors: 4.57V
12V Power Supply (measuring +12V and COM terminals): -0.03V (Power Lights on Power Supply are off)

Sensors Disconnected, Scanner Power On
+5V trace: 4.59V.
Other side of the resistors: 4.57V
12V Power Supply (measuring +12V and COM terminals): +12.14V (Power Lights on Power Supply are On)

UPDATE:
On a hunch I replaced the 12V power supply with my bench power, set to 12V. Everything now works perfectly and powers up as expected. So the problem is either that the Power Supply is messed up or my wiring is off on that. I'll look into this further.

Is the troublesome PSU isolated (floating output)?? Bench supplies usually are(*), eliminating
any chance of ground-loops or ground-mismatch issues.

(*) Though they usually have an optional strap to mains earth.

It sounds like you have not connected the 12V common to the arduino ground.

Is the troublesome PSU isolated (floating output)?? Bench supplies usually are(*), eliminating
any chance of ground-loops or ground-mismatch issues.

It sounds like you have not connected the 12V common to the arduino ground.

In the setup that causes the PSU to output 0V (and thus never turns the sensors on), the 12V common is connected to the cable shield, which also connects to the arduino ground at the DB25 connector. This is a soldered connection, and has been thoroughly tested, so it's definitely going back to the Arduino Ground. The PSU itself is grounded to the scanner chassis, which is in turn grounded to earth.

In the setup that appears to work, power is coming from a bench power supply (practically new, I just got it a few months ago, vs the 12V supply that was in the scanner originally and is about 20 years old). In this setup, the same +/- 12V power connections are used for the sensors, so the bench power supply's common is now connected to arduino ground exactly as above with the older chassis PSU. The only difference I can see is that this power supply is not itself grounded to the scanner chassis.

In part because I'd like the inside of the machine to be as clean as possible, and because I want to keep all the power-related stuff in one area that can be easily accessed from a panel when the chassis is all buttoned up, I've ordered a couple new power supplies that mount on the existing DIN rails inside the machine. I'm hoping these take care of the problem and that maybe the issue is with the older 12V PSU.