Wednesday, 21 June 2017

switches - Can arduino be used as a switch?



Hello I have had zero luck with finding anything related to this problem. Lets take the most basic circuitry: switch that turns on the light




  • The values on the sketch are not accurate, couldn't change the values


How can I "replace" the Switch with Arduino? Do I need Zener Diode to achieve that?


I want to use it to light up a 225V, 330Watts Lamp (I'm in Europe) that is used in my room.



Answer



If you use Arduino directly as a switch for AC supply then this is not going to work although it would cause a catastrophe because 225V across Arduino's pins are going to damage a lot.


So the solution is to use Isolation of two Arduino and the Lamp. Isolation can be done as @yogece said using a Relay and Relay driver.



Relay is kind of current operated switch i.e. if sufficient amount of current flows through Relay coil then a switch will be CLOSED otherwise remains OPENED. The current driven by a typical relay at its rated voltage is between 25mA to 70mA.


As the I/O pins of Arduino can provide maximum 40mA current (According to ATMEGA 328 Current Specifications) it is not a good idea that you directly connect it to a Relay and if you do so it may burn the Arduino. This is why you need a relay driver.


A very simple Relay driver can be made using a transistor. This article can help you understand very basic Relay driver www.jaycar.com/images_uploaded/relaydrv.pdf


Here is a typical circuit,


schematic


simulate this circuit – Schematic created using CircuitLab


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...