power still on when removing the usb

my project consists of an arduino mega and a 16 chan relay board. the board has a 12v external power connector which i have hooked up to my power supply. everything works great but if i unplug the usb which usually is what is powering the board, it still remains powered. if i turn off my power supply, the arduino will shut down.

the relay board has 16 digital inputs, vcc, grnd and then 12v power/ground.

i have no issues with it retaining power when the usb cable is removed; In fact, i actually prefer it this way (less wires to run), but is this going to damage anything?

Okay -
by

the board has a 12v external power connector which i have hooked up to my power supply.

do yu mean that you connected the 12V supply for the external realy card to the power supply input on the Arduino board? If so, that is what that connector is for and 12V will work fine in this application. The regulator on the Arduino board might warm up a bit, but it is just doing its job.

nope. the only connecting between the card and the arduino is the i/o pins, the vcc (5v) and ground.

...the vcc (5v) and ground.

You might have voltage coming from the powered relay card to the 5V connection on the Arduino. (Hopefully, it's not more than 5v!)

Since the relay board is 12V, why is there a 5V connection between these two boards???? Do you have some information on the relay board you are using?

unfortunately no. it was an ebay buy and i didn’t realize it till too late that it was from hong kong
here is a photo of the board if it would help.

i’ll check to see if it’s 5volts on my mm tonight

If you ran a wire from the relay board's +12vdc to the arduino Vin pin then you would not see this 'back door' power behaviour you are seeing. The arduino auto-voltage switch always gives priority to external power via Vin over the USB power.

Lefty

ok, i'll hook it up that way to be safe. curious though, is it harming the board the way it's wired now? should i put a diode on the vcc line or optically isolate the power from the arduino?

scott_fx:
ok, i'll hook it up that way to be safe. curious though, is it harming the board the way it's wired now? should i put a diode on the vcc line or optically isolate the power from the arduino?

With out a schematic on relay board I won't try and explain by what path the 'back door' circuit is getting there, but as you are only wiring digial pins and ground from the relay board to the arduino, then the path must include the output pins and that is never a safe condition. No diode should be needed, just power the arduino via the Vin pin using the external +12vdc from the relay board and life will be good.

Lefty

retrolefty:
but as you are only wiring digial pins and ground from the relay board to the arduino,

im wiring the 5v pin as well as the ground and digital i/o pins

m wiring the 5v pin as well

To where?
It looks like from the picture that the board generates 5V as there is a step down switch mode chip on it.
So don't connect the 5V pin if you don't want this to happen.

scott_fx:

retrolefty:
but as you are only wiring digial pins and ground from the relay board to the arduino,

im wiring the 5v pin as well as the ground and digital i/o pins

Again without a schematic of the relay board to look it's pretty useless to guess at the path(s) being taken when the arduino is powered off via unplugging the USB cable. Just solve the problem by not allowing the arduino to power off as long as the relay board's +12vdc is powered on. Some of those asian relay boards have 'jumper' options to change how the board operates and what power source is shared or isolated.

That make sense?

Lefty

Grumpy_Mike:

m wiring the 5v pin as well

To where?

the 5v power pin from the arduino is connected to the 5v pin on the relay board. the ground from the arduino is connected to the ground pin on the relay board. then the 12v and ground from the power supply is connected to the screw terminals on the relay board.

retrolefty:
Again without a schematic of the relay board to look it's pretty useless to guess at the path(s) being taken when the arduino is powered off via unplugging the USB cable. Just solve the problem by not allowing the arduino to power off as long as the relay board's +12vdc is powered on. Some of those asian relay boards have 'jumper' options to change how the board operates and what power source is shared or isolated.

That make sense?

Lefty

yes. that part makes sense. thank you