First post and only second project with my arduino so any advice or help is greatly appreciated.
I am using an arduino uno to control two relays. The relays are 5v JQC-3FF-S-Z. I also want to be able to manually control/actuate the relays without the arduino powered on. How do I go about protecting the arduino so that I am not shorting the output pins to ground, and allowing current to flow to the relay instead of the Arduino?
Below I have a schematic I made up in an online editor (the green and yellow wires do not connect in the bottom left by the two 1k resistors). My basic understanding of schottky diodes may be wrong here but they act as a "one-way" valve in this situation protecting the arduino? How do I size/spec one appropriately Also should the 1k ohm resistor be there? The actuation current of the relay is 5mA, that is why I chose 1k ohm.
No I will not be sending more than 5v into the relay module when I trigger it manually. Everything in the circuit is powered from the 5v rail on an ATX PSU. Because the relay modules and the arduino use the same ground, I wanted to make sure I did not short the arduino pins to ground when I open the switch to actuate the relay module. I was afraid that the output pins on the arduino would be "backdriven" and with no diode, the micro-controller could be damaged. Also just learning and trying to use proper circuit design.
You could also solve this problem by replacing your manual switch with a SPDT (single pole, double throw) switch. Connect the common to relay, one terminal to the arduino pin and the other terminal to the +5V. That way, when you switch on the manual, you are simultaneously disconnecting the arduino pin. Get two of these switches - one for each relay module.
I have a switch to the Arduino so that I can shut it off and control the relays manually for a calibration procedure. I do not want to have to unplug the unit in order to power down the arduino. If I unplug the arduino that means losing the ability to manually open and close the relays from the switches.
I am not sure what does not make sense about powering everything from one source?
This is not an XY problem. This was me, asking the community for their knowledge on electrical components. I received some really useful information and help. Your's however, was not needed.