Hi,
I have a 5V relay (N4078-2C-5V-0.2) that I want to control. Since Arduino (Nano Every) digital output is 5V this should be possible. The output (D8) measured gives about 4.7V without any load. However when connected to the relay, output drops to about 3.3V and the relay does not work. Actually the relay needs about 4V to function.
Is there anything that I can do to get it working ? There are servos and ESCs connected to Arduino, so I think that is why voltage drops so much.
If I add a small capacitor to the circuit, does it help ?
Any help would be much appreciated, thanks !
heikkiw:
Hi,
I have a 5V relay (N4078-2C-5V-0.2) that I want to control. Since Arduino (Nano Every) digital output is 5V this should be possible. The output (D8) measured gives about 4.7V without any load. However when connected to the relay, output drops to about 3.3V and the relay does not work. Actually the relay needs about 4V to function.
Is there anything that I can do to get it working ? There are servos and ESCs connected to Arduino, so I think that is why voltage drops so much.
If I add a small capacitor to the circuit, does it help ?
Any help would be much appreciated, thanks !
Anything to do? Yes. Supply a schematic of your project. I sure hope you are not trying to power the relay from one of the Arduino pins. The forum is full of similar questions to yours. The answer is to use the Arduino to control a transistor/FET that actually controls the external 5 volt power to the relay.
Paul
You actually get 3.3 V to the relay?
Wow! That Nano Every is doing remarkably well into a gross overload!
This is your data sheet and I suggest you read it. Your part number reflects a coil power of 0.2 Watt so with a 5 volt coil and 0.2 Watt I see 0.2 Watt / 5.0 Volts = 0.040 Amp or 40 mA. Does your nano have a 40 mA out capability? Think about it.
Ron
Hi,
Yes I have really connected Arduino D8 to relay pin 1 and relay 16 to GND. The datasheet gives no information which one 1 or 16 is +/- but I tested it to make sure.
It is strange that I have the same relay in another circuit where pin 1 is connected to D6 and the relay works as expected ! The voltage in D6 is 4.07V (loaded) that is enough compared to D8 (3.3V).
The only relevant difference (I think) between circuits is that the working (D6) circuit is powered with Lipo 2S(7.4V) no voltage requlator,
but the other (D8) circuit has Lipo 3S(12V) and voltage regulator to 5.0V that goes to Arduino.
Can this explain the difference ?
I also wonder that usually relays are connected with the board where there are 3 pins GND, VCC(5v) and IN that makes it easy to connect with Arduino, but here I have only the relay (N4078) with 2 pins in the input side.
Can someone show a schematic (or post a link) how to connect the relay, with possible transistors and resistors(and there values) included. The only instructions I can find are the easy stuff with relay boards.
Do I have to use solid state relay (SSR) to turn on relay ? This N4078 relay is STDP (single throw double pole) that fit s perfectly to my needs
OK, it seems you have failed to take the hint.
This relay requires 40 mA to operate. No Arduino has output pins rated to source that current. For the UNO or Nano, the "Absolute maximum rating" for any pin is in fact, 40 mA which is to say you never want to attempt to draw that current (although if you do put a 125 Ohm load such as the relay in question on an output pin, it will not supply that current anyway as the voltage will drop substantially in the process - as you have already observed on your system).
In fact, for the "Nano Every" the Absolute Maximum rating for a pin appears to be 20 mA. You clearly risk overloading and damaging the microcontroller.
So you simply do not connect a relay to an output pin (unless you have one whose coil resistance is at least 250 Ohms; some reed relays might be suitable).
The relay modules such as you cite with Vcc, ground and "IN" pins include a transistor to switch the relay current, and only require a much smaller current (5 mA) to control the transistor. That is the way to operate a relay from an Arduino
Here is my current relay connection schematic. Voltage between pins 1,12(the schematic is not for N4078) is about 4.2V, but it is independent of whether D8 is high (4.7V) or low. But the relay does not connect. What is wrong ?
Is transistor 2N4401 suitable for this purpose ? Is the schematic OK ? Help !
“ Is the schematic OK ? Help ! “
You need a kickback diode across the relay.
Turn on the transistor with a HIGH on pin D8, measure Vce on the transistor to see if it is saturating.
If the transistor is not saturated, try a smaller base resistor.
Use an N channel MOSFET.
FYI
Let’s see your wiring.
Drop the base resistor to 390 or 470 Ohms, put a 1N4148 diode in parallel with the relay coil, cathode (end with band) toward +5V.
Hi, thanks you all from help. I was very unlucky with this project, both the relay and transistor were defective.
I replaced them both and now it works as expected. Either they were initially defective or got damaged in the solvering process. Can you explain the meaning of 1N4148 diode ? (I am quite newbie in electronics) Is it possible that without that diode, can cause damage to the transistor/relay ? I will add it before really using this relay circuit.
The 1N4148 is just a small signal switching diode. It has for the most part replaced the older 1n914. This is the data sheet. A big plus is it is a fast diode. Yes, they are popular when used as a flyback diode across relays and other coils.
Ron
heikkiw:
Is it possible that without that diode, can cause damage to the transistor/relay ? I will add it before really using this relay circuit.
It is not only possible but very likely to damage the transistor. An inductive load like a relay coil can generate a large voltage spike when the power to it is interrupted. The purpose of the diode is to safely shunt this spike and protect the other electronics.
S.
40 mA is well within the rating of a 1N4148/ 1N914.
Even 200 mA would be OK.
The diode only ever passes - and that briefly - the same current as the relay, and is only ever subject to the supply voltage as a reverse bias.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.