Yahoo 知識+ 將於 2021 年 5 月 4 日 (美國東岸時間) 停止服務,而 Yahoo 知識+ 網站現已轉為僅限瀏覽模式。其他 Yahoo 資產或服務,或你的 Yahoo 帳戶將不會有任何變更。你可以在此服務中心網頁進一步了解 Yahoo 知識+ 停止服務的事宜,以及了解如何下載你的資料。
Has anyone driven a small 5Volt relay directly from an Arduino output? Or does the turn off spike kill the pin?
5 個解答
- amania_rLv 73 年前最愛解答
It's unlikely to supply enough current to energise the coil. But if it did, you must include a flyback diode as shown in (a) in khalil's diagram. You don't need 2 diodes like in (b).
Don't wire the relay to a 12V supply like in Kahlil's diagrams. Arduino doesn't use open collector drivers so you'd damage the chip. Instead drive the relay directly from the Arduino output.
- 匿名1 年前
What "pin"? Sounds more like a solenoid.
If you refer to Back EMF fr relay, it can damage, Especially at hi current/many turns of wire. Faraday's law and ampere/turns.
A small reed wont need any protection. Maybe a 1N4001 across the coil, the anode (striped end) to negative, cathode to +. I do on every relay or motor I add to my car, just in case. Reduces noise in radio, too.
- fuzzyLv 73 年前
thanks all but got it working fine direct drive (with flyback diode) from 5 Volt rail. Used a reed relay - pulls about 10mA.
- 匿名3 年前
Hi this is when you need a transistor to drive the relay even a bc109 would at least drive a small relay however you will need a diode connected in reverse direction so it protects the transistor across the relay's coil. otherwise when the transistor switches off the back e.m. f. will destroy the transistor with a reverse high voltage spike.
- khalilLv 73 年前
if the output cannot provide enough current for the relay, we may use a driver ( usually a common emitter transistor )..
yes ... we should use a damper diode to clip the spike ..D1 in fig. (a)