tag:blogger.com,1999:blog-236630323640582849.post6839581004290100270..comments2023-11-08T12:55:20.362+08:00Comments on Arduino for Beginners: Controlling a 12V DC motor/fan with an ArduinoUnknownnoreply@blogger.comBlogger26125tag:blogger.com,1999:blog-236630323640582849.post-31855487511821138562019-10-25T14:48:15.072+08:002019-10-25T14:48:15.072+08:00This comment has been removed by a blog administrator.asdhttps://www.blogger.com/profile/08679456929523061648noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-5974040431947792582019-09-30T17:13:48.572+08:002019-09-30T17:13:48.572+08:00This comment has been removed by a blog administrator.Anonymoushttps://www.blogger.com/profile/01913661523386682794noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-69853719945362814132013-06-02T02:52:03.650+08:002013-06-02T02:52:03.650+08:00Yes, the most common way I have seen to protect el...Yes, the most common way I have seen to protect electronics from a relay coil's counter-EMF is to connect a diode across the coil with its cathode toward the (+) supply. This is called a "clamping diode" as it clamps any harmful counter-EMF spike to a mere 0.7 volts.stanton47https://www.blogger.com/profile/01438911822021378226noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-36705292987859234842013-05-29T20:39:05.021+08:002013-05-29T20:39:05.021+08:00Understood and thank you very much for the reply. ...Understood and thank you very much for the reply. Just to see if I understand it correctly..a diode wouldn't also do it?<br /><br />Thank you!eskrimadorhttps://www.blogger.com/profile/15450295587784022203noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-769404619906670322013-05-28T22:43:55.001+08:002013-05-28T22:43:55.001+08:00What I meant was those Arduino/Atmega328 digital p...What I meant was those Arduino/Atmega328 digital pins are very sensitive and low powered, 40mA only... and you would not want to damage those pins in any way...<br /><br />You can drive a 5V relay without any issues most of the time but for good practice (not always being followed) is to drive a transistor/optoisolator so that the 5V power rail will directly drive the 5v relay without having the current doing thru the Arduino pins...<br /><br />Stanleyhttps://www.blogger.com/profile/05425545478966156895noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-47371174528928872112013-05-28T20:33:32.920+08:002013-05-28T20:33:32.920+08:00Thank you for the quick reply. As I am a very begi...Thank you for the quick reply. As I am a very beginner I might be wrong. So I was not specific previously. <br /><br />So what I wanted to write is:<br /><br />If I have a relay which requires 5V that is needed to activate the armature and the maximum voltage it can handle is above 12V then it would work without damaging the arduino, right? <br />And I do not understand why do yo write you want to isolate the two the circuits. In the relay there are isolated, aren’t they? One circuit is connected to the electromagnet (arduino) the other circuit is connected to the armature (12V battery). The electromagnet and the armature are isolated, so the two circuits are also isolated. Or am I wrong?<br />Thank you for your reply in advance, as I know that I need to learn a lot…:)<br />eskrimadorhttps://www.blogger.com/profile/15450295587784022203noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-38662692806513131132013-05-28T19:37:53.871+08:002013-05-28T19:37:53.871+08:00If yr relay is 5V, yes you can do that... but I wi...If yr relay is 5V, yes you can do that... but I will put an optoisolator to isolate the relay circuit from my Arduino circuit to protect the Arduino pins from reverse current when the relay is switched off as the current will run thru the arduino pins to ground...<br /> <br />Just good electronic practice...<br />Stanleyhttps://www.blogger.com/profile/05425545478966156895noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-77453488927561938002013-05-28T18:40:01.151+08:002013-05-28T18:40:01.151+08:00Hi! Thank you very much for this tutorial. However...Hi! Thank you very much for this tutorial. However I still do not understand something. Why do you need the optoisolator? Why not enough to send the arduino 12 pin on HIGH to the relay (5volts) and then the relay closes the other circuit (12 volt) and the motor is switched on?eskrimadorhttps://www.blogger.com/profile/15450295587784022203noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-76546618969223639912013-05-15T19:48:13.432+08:002013-05-15T19:48:13.432+08:00I appreciated your kind way of knowledge.Great Stu...I appreciated your kind way of knowledge.Great Stuff Here..hope more to come.<br /><br /><a href="http://www.dc-fan-ac-fan.com/products-page/dc-axial-fan/" rel="nofollow"></a>Cooling fanshttps://www.blogger.com/profile/11112029200359601481noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-72028088895392869052013-04-13T12:03:41.332+08:002013-04-13T12:03:41.332+08:00Like resistors on a LED, 220R or 1kR will do... Like resistors on a LED, 220R or 1kR will do... Stanleyhttps://www.blogger.com/profile/05425545478966156895noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-71238663387347391812013-04-13T12:00:17.760+08:002013-04-13T12:00:17.760+08:00can i know what ohm of resistor use ?can i know what ohm of resistor use ?Shah Rizalhttps://www.blogger.com/profile/11359350156494590033noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-28666221657208150322012-02-08T10:02:05.503+08:002012-02-08T10:02:05.503+08:00I use the optoisolator to control the relay...
Se...I use the optoisolator to control the relay...<br /><br />See this links on how to connect the reed relay : http://www.kpsec.freeuk.com/components/relay.htm<br /><br />Future questions, pls post to my fb page... it is more interactive there with more people to help you with your questions...Stanleyhttps://www.blogger.com/profile/05425545478966156895noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-1548915208919565512012-02-08T07:36:06.314+08:002012-02-08T07:36:06.314+08:00hello im trying to conect a 12v pump but i dont ge...hello im trying to conect a 12v pump but i dont get how to connect the relay ?<br />in the foto wich one is the collector, emitter, etc.<br /><br />heres the code im using:<br /><br />/*<br />* Trigger a relay<br />*/<br /><br /> <br />int pumpPin = 12; // relay<br /><br />unsigned long time;<br />unsigned long lastPumpTime;<br /><br />int pumpPeriodHours = 6; // hours between pumps<br />int pumpPeriodSec; // seconds between pumps<br /><br />int pumpDurationSec = 10; // seconds the pump is running<br /><br />int statusPeriod = 5000; // ms time between status blinks-- to let you know it's alive<br /><br />void setup()<br />{<br /> pinMode(pumpPin, OUTPUT);<br /> digitalWrite(pumpPin, LOW);<br /> pumpPeriodSec =30; //pumpPeriodHours * 60 * 60; // seconds between pump starts<br /> //pumpPeriodSec = 30; // for setting short periods when testing<br />}<br /><br />void loop(){<br /><br /> lastPumpTime = millis();<br /> <br /> // Activate the pump<br /> digitalWrite(pumpPin, HIGH);<br /> delay((pumpDurationSec*1000));<br /> digitalWrite(pumpPin, LOW);<br /> }luisnoreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-32544120497563031902012-01-26T04:07:02.558+08:002012-01-26T04:07:02.558+08:00Pls post yr questions on my fb group page...Pls post yr questions on my fb group page...Stanleyhttps://www.blogger.com/profile/05425545478966156895noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-26603190071225506352012-01-22T00:27:08.388+08:002012-01-22T00:27:08.388+08:00hello..
I just wanted to know if you could help...hello..<br /> I just wanted to know if you could help with the process to make the circuit for a line bot..<br />i mean a detailed explanation as to how to connect the Dc motors, relay, pot and everything? :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-6301027698659115982012-01-02T06:20:48.619+08:002012-01-02T06:20:48.619+08:00@jeffery, yes, you can control the fan speed by th...@jeffery, yes, you can control the fan speed by the time of the day. If you would also like to reverse the polarity, you would also need a H-bridge to do that.Stanleyhttps://www.blogger.com/profile/05425545478966156895noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-92208405002158126912012-01-02T06:04:57.588+08:002012-01-02T06:04:57.588+08:00@Kase, if you just wanted to switch ON / OFF somet...@Kase, if you just wanted to switch ON / OFF something on a 12V, NO, it does not work as the current passing thru the optoisolator (pin 4 & 5) might be too HIGH for the transistors inside to handle.<br /><br />From the 4n35 datasheets, the collector max current is only 100mA.Stanleyhttps://www.blogger.com/profile/05425545478966156895noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-73690768888538179582012-01-02T05:51:36.755+08:002012-01-02T05:51:36.755+08:00@ScottInNH, thanks, error corrected.@ScottInNH, thanks, error corrected.Stanleyhttps://www.blogger.com/profile/05425545478966156895noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-37809857760790835102011-12-12T16:45:43.107+08:002011-12-12T16:45:43.107+08:00Hi there?
I am also new to this!
But since the opt...Hi there?<br />I am also new to this!<br />But since the opto-isolator can stand high voltage (upto 70V)<br />if we for ex. need to switch ON or OFF something wich is already have its own 12 V supply <br />( you can imagine any 12 V circuit with LED as load but somewhere a open switch with we can then feed into Emitter and Collector of Opto-isolator accordingly.)<br />So can we just use Opto-isolator as a switch ON or OFF <br />if required? <br /><br />(I am sorry I am not good in explaining hopefully you understood what I mean.)<br /><br />In facts I want to use arduino to do nothing more than switching ON and OFF a certain Switch which hence completes (closes) a certain circuit.<br />will this right?<br /><br />Thanks.Kasehttps://www.blogger.com/profile/03758067513032799452noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-13115677141837758142011-12-11T06:13:50.500+08:002011-12-11T06:13:50.500+08:00thanks!thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-24690749825109538272011-11-19T13:32:33.588+08:002011-11-19T13:32:33.588+08:00new to this topic i did not realize that there'...new to this topic i did not realize that there's a chip for this. i was using my IR emitter detector diode. but it was giving too weak output. i could light a small led but not a 6v motor. even though the battery was 6v. big thanks for the tipAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-75381557488434516472011-11-15T02:41:55.343+08:002011-11-15T02:41:55.343+08:00>>Arduino pins can only supply a maximum of ...>>Arduino pins can only supply a maximum of 40mA or 0.4 Amp<br /><br />This is a rather old blog entry but I thought you'd want to fix this line anyways.<br /><br />40mA is 0.04A, not 0.4A<br /><br />:)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-28203511996171595352011-11-08T20:38:02.464+08:002011-11-08T20:38:02.464+08:00Hi. Please correct your Arduino pin power statemen...Hi. Please correct your Arduino pin power statement - your decimal point is off. This text should say <br />"Arduino pins can only supply a maximum of 40mA or <b>0.04 Amp</b>".ScottInNHhttps://www.blogger.com/profile/04982032777257014542noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-29716302577968587132011-07-30T08:12:28.808+08:002011-07-30T08:12:28.808+08:00How would I control a DC motor with a real time cl...How would I control a DC motor with a real time clock. I would like to have preset times to operate the motor. Then I would like to preset a time to reverse polarity and run the motor in the opposite direction. Thank you Jeffrey.1ofakindworkhttps://www.blogger.com/profile/04668582429972069894noreply@blogger.comtag:blogger.com,1999:blog-236630323640582849.post-86053168395039137822011-04-03T11:35:20.422+08:002011-04-03T11:35:20.422+08:00Hi,
Pls post the questions to the facebook group ...Hi,<br /><br />Pls post the questions to the facebook group on the Useful Links above, there are project pictures and more interactions compared to this comments notes...Stanleyhttps://www.blogger.com/profile/05425545478966156895noreply@blogger.com