Hello. I have a 2 channel relay that is when connected to their respective devices, the relay won't work properly. But once I unplug the source of these devices, the relay works fine immediately.
Here are my connections:
12V external power source (+) : common terminal of both devices
12V external power source (-) : Connected to negative terminals of both devices
2 channel relay module (N.O.) - both positive terminals of the devices are connected to the normally open terminal of the relay.
To summarize, I powered up both devices by connecting them parallel to the power source so I do not have to use 2 external power sources, both of the device receive enough current to function, but it's the 2 channel relay module that does not work properly.
For the sake of completeness, perhaps show all the wiring (both sides of the relay) as well as details of the relay module and the loads. And the code too?
When you say ...
... what does "properly" mean? Seems to me a relay either works or it doesn't, but "properly" makes me wonder if it's working "partly" in your view,
What happens if you attach only one load at a time?
With optocoupled relay boards, that defeats the purpose. @helloworld9016, please provide a link to your relay board(s).
Complete schematics are a must.
+12V from power source goes to both devices. Negative of the devices goes to either NO or CMN of relay, the other one (CMN or NO) goes back to the negative of the power source.
What are your devices? Can the 12V deliver enough power for your device(s)?
If you add debug print statements to your code in *setup(), do you get the message each time that you activate the relais? That would indicate that the Arduino reboots.