MEGA 2560 with 48 relays

I just received an 8 channel and a 2 channel relay module today. It took me a while to figure out that the pins have to be driven low, not high, to cause the relay to activate.

There is actually a VERY good reason for that: to be able to guarantee that at powerup and Arduino Reset that no relays will actuate, even momentarily, until activated on purpose by your software.

See the explanation and sample code on the ArduinoInfo WIKI http://arduinoinfo.info Here: http://arduino-info.wikispaces.com/ArduinoPower#4-8

See "Important Note"...

Years ago, we had to sequence and time power supplies to guarantee this on Chip Manufacturing equipment.