Are flyback diodes needed in my circuit ?

Hello .
I was about to create a new topic for a Flyback diode question
that i have as per my totally low level knoledges on electricals.

Because i found this topic i will made here my question
that may help "Real electronic men" to understand what the beginners(like me)
dont know....but please if you dont like it here feel free to just tell me to open a new topic.


Before some time i had a circuit with MODULES relay and
arduino was reseting...and i solve it by adding a diode ....

Any way now i am creating my perfboard and bought relays (and not modules)
that can be triggerd directly from the low amperes of the digital pin of arduino.
(and also they are triggering to HIGH and not in LOw as many modules that the beginners bying ....)...

And the thing is that i REALLY dont know what i must do in order
to NOT make a HUGE and SILLY mistake...

You can see in the picture my questioins.
For beginning (if someone wants to help me)
dont bother with the B problem... but only with the A problem.

So the questions for the A problem is
1)Do i need ANY diode ?
2) If yes then the diode must go from A3 pin to the one side of the relay(coil)
(in order to not allow any spike to go backward on A3)

OR.... like the theory saying to be in the edjes of the coil of relay and opposite direction?

3)Are they exists any spikes from the NC,NO and COM pins of relays
(..that in this case i must protect the VCC also )
or the spikes from such types of relays are only from the 2 pins that triggering relay?
(A3 and Grnd in the example)

I am sorry if not understanable but....hope someone can easilly find
the GAP that i have and i am really totally confused.

And in case that someone wants to know the type of relay here it is.

Type of relay: Electromagnetic
Contacts configuration: DPDT
Rated coil voltage: 5V DC
AC contacts rating @R (at resistance load): 1 A / 125 VAC
DC contacts rating @R (at resistance load): 1.25 A / 30 VDC
Contact current max.: 2A
Switched voltage: max 125V AC, max 30V DC
Relay variant: Miniature
Mounting: PCB
Coil resistance: 167Ω
Operate time: 6ms
Release time: 3ms
Coil power consumption: 150mW
Operating temperature: -30...70°C
Relay series: RS
Contact resistance: 100mΩ
Contact material: AgCdO
Coil current: 29.9mA

Split from another topic

UKHeliBob:
Split from another topic

Ok..thank you very much...and i hope someone help me a little.!

You need a diode for the relays, yes. If you have been switching the relay without one you have already damaged your Arduino.

Also, there are very few relays that draw low enough current to connect directly to an output, usually you need a driver of some kind, for example a MOSFET.

Apologies for the blank graphic but splitting topics containing attachments is a bit hit and mess

PerryBebbington:
You need a diode for the relays, yes. If you have been switching the relay without one you have already damaged your Arduino.

Also, there are very few relays that draw low enough current to connect directly to an output, usually you need a driver of some kind, for example a MOSFET.

In my first perfboard i had
1 diode from A3 pin intermidiate before touch the relay triggerng pin.
meaning
A3 ->diode-> relay(trigger pin)-Coil ->"Ground" Pin of relay->Ground of arduino

But also i had (have already) onother diode
(because i am "student of Tesla!! heheh)

Going (interrupring) the VCC meaning
Vcc ->diode> COM of relay ->NO of relay->...some load what ever ...and ...Ground etc.

And i dont knwo WHITCH diode saved my arduino...
Thats why i confused now that i want to make the more 'perfect' perfoboard !!!

Verbal circuit descriptions are often lacking and easily misunderstood. Schematic drawings are much better at conveying information. And fancy CAD drawings are not necessary. A hand drawn, photographed and posted schematic will beat word salad any day. A tutorial on schematic drawing.

30mA continuous is pushing it for an Atmega328, 2 or more at the same time could cause damage. The kickback diode goes in PARALLEL with the relay coil, cathode (end with band or stripe) to the + end, anode to - end, at that current level I would use a 1N4148.
https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.bing.com%2Fth%3Fid%3DOP.p9othZBP5wCULQ474C474%26o%3D5%26pid%3D21.1%26bw%3D0%26bc%3DFFFFFF&f=1

groundFungus:
Verbal circuit descriptions are often lacking and easily misunderstood. Schematic drawings are much better at conveying information. And fancy CAD drawings are not necessary. A hand drawn, photographed and posted schematic will beat word salad any day. A tutorial on schematic drawing.

Ok ,i followed our advise and i hope now beiing more understandable.

Those my questions...(basically)...

But the diode in case 2 is opposite ,,,i know...(just my forts trying)

JCA34F:
30mA continuous is pushing it for an Atmega328, 2 or more at the same time could cause damage. ....
https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fwww.bing.com%2Fth%3Fid%3DOP.p9othZBP5wCULQ474C474%26o%3D5%26pid%3D21.1%26bw%3D0%26bc%3DFFFFFF&f=1

Ok...first of all thank you.

Secondly ,,, as for the proper way of diode lets say i unserstand.

But (thirdly) now confused more!
Because YES!!!!
I have 2 such relays on my arduino.
Is it for sure that will harm it?

I mean this is a new aspect (and problem) that you just game me.

Use a transistor to drive each relay coil. Connect the coil between 5V and the transistor collector. Ground the transistor emitter. Put an approximately 1k ohm resistor between the Arduino output and the transistor base.


Motor, relay - same thing!

Ok...i did some experiments with NPN BC547 and now i am more confused.

First of all ,my application wants to wake up 4 times a day(every 6 hours)
and take the readings of
5 HX711 amplifiers for load sensors
1 DHT xx temperature and humidity sensor.

From the datasheet of XH711 i am readings that in normal operation needs
1.5 mA thus ...a total of five amplifiers may need 7.5 mA
And DHT (from datasheet) wants 0.3 mA

So i have a total of lets say 10 mA that i want open for 30 seconds
,,read and close with a relay.
...even if maybe is better to put amplifier in sleep mode but lets forgot this...

And just now i test this with a simple BC547 (NPN) transistor and is working fine!

What this mean?
That i am totally stupid
(or in the best case unrelated-irrelevant in electronics)
that i believed i must use a relay instead of transistor?

Please advise if i must replace the relay with the transistor.
(to save also - beyond milliAmperes - space in my perfboard.)

Please advise if i must replace the relay with the transistor.
(to save also - beyond milliAmperes - space in my perfboard.)

Your original post showed you driving a relay directly from the pin of an Arduino along with questions about how to do this. The answers you have received cover the fact that a most relays draw too much current to be driven directly, so need a transistor to drive them, and ALL relays need a flyback diode across their coil.

From the datasheet of XH711 i am readings that in normal operation needs
1.5 mA thus ...a total of five amplifiers may need 7.5 mA
And DHT (from datasheet) wants 0.3 mA

So i have a total of lets say 10 mA that i want open for 30 seconds

That's fine for 1 pin, no transistor needed.

PS. Please can you read and follow:
How to make a schematic
Thanks

That's fine for 1 pin, no transistor needed.

Ok..this is amazing....I havent though!

I test it and it also works fine (no relays-no transistor)

Just the pin to HIGH and connected with VCC of amplifiers...

So i will have only one relay for SIM800L that needs 2A (max)
...at least until to learn if i can use multi transistors or mofset etc for that(instead of relay)

THANK.........YOUUUUUUUUUUUUUUUU