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.
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.
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.
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)
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.
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
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)