Protecting Arduino from Manually controlled relay

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.

Thanks in advance.

That are relay modules, not plain relays.

A diode should do the job indeed. A regular one like the 1N4148 or 1N4007 will work fine, doesn't have to be Schottky type.

Thanks for the response. Would I still need the resistors or are those not needed because they are on the relay module?

Not needed indeed.

Confused, are you going to be sending more than 5v into the relay module when you trigger it manually?

Slumpert,

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.

BLH64

That is a great idea, I never thought of that. I may try and find some small ones and use those instead.

Thanks!

Mighty TCR Electrical Schematic.png

mabauer:
I also want to be able to manually control/actuate the relays without the Arduino powered on.

mabauer:
Everything in the circuit is powered from the 5v rail on an ATX PSU.

Taken together, these two statements make no sense.

There is no need whatsoever to disconnect the power to the Arduino.

In addition, the glaring blunder is that you show the 5 V supply connected to "Vin".

Sigh! Another "XY Problem". No end to them. :roll_eyes:

Paul B.

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.