We often come across a situation where we want to switch on the electrical load by pressing some buttons on computer program. Consider an example, where you are sitting in a power plant and you want to switch on a circuit breaker. Controlling circuit breaker from remote is mainly done by using Microcontroller. Let us discuss methods Remote Controlling of Circuit Breaker by Microcontroller. For that used components are,
A microcontroller is an IC that has intelligence to understand the commands received from PC by a communication protocols. A microcontroller has different communication protocols to communicate with PC like Serial, Ethernet and CAN (Controller Area network) communication protocols. A microcontroller has got many peripherals like GPIO (general purpose Input Output) pins, ADC (Analog to Digital Converter), timer, UART (Universal Asynchronous Receiver Transmitter) and Ethernet and many more peripherals to communicate to the external world.
Digital output from a microcontroller is a low amperage signal. When you set a pin HIGH, the voltage coming on that pin is typically +3.3V or +5V and the ampere that it can source or sink is around 30mA. This is fine if you are controlling an LED whose requirement is tiny.
If we want to control circuit breaker by microcontroller pin then we require a driver that can source the required amount of current to the load to switch on. You need a component in between your microcontroller and the device that would be controlled with small voltage and current. Relays and transistors are most often used for this purpose.
Transistor works as a driver in this application which gives the required current to the relay to get it turned on when it is in saturation Mode.
Resistors are used to limit the current in LED, transistors.
Light emitting diode is used to indicate whether circuit breaker is on or off.
A relay is a switch that is used to control high power electrical load (like Circuit Breaker, Motor, and Solenoid). Normal switch cannot handle high power load that is why relay is used to control high power electrical load.
Working Principle of Remote Controlling of Circuit Breaker by Microcontroller
When command is giving to microcontroller to turn on the load, microcontroller pin is set to 3.3V (in above circuit) which turns on the NPN transistor. When transistor is ON current flows from collector to emitter of transistor which actuates the relay and relay connects the AC voltage to the circuit breaker which turns on the circuit breaker. An LED is used to indicate whether the circuit breaker is ON or OFF. When microcontroller pin is high LED is on (Circuit Breaker ON) when microcontroller pin is low transistor is in OFF condition and no current flows to the coil of relay and circuit breaker is OFF, LED also OFF.
When relay is switch off a back e.m.f is generated which can damage the transistor if magnitude of back e.m.f is more the VCEO voltage of transistor. To protect the transistor as well as digital output of microcontroller a diode is used which conducts when relay is off. This is also known as freewheeling diode.
Assumed microcontroller gives 3.3V when the pin is high and 0V when pin is low. Choose a relay of 12 V and 360 ohm coil resistance then current taken by relay to get turn on
This is rated current of relay.
LED (forward voltage = 1.2 V) takes around 20mA current then resistance RLED
RLED value can be chosen to 500 Ω.
RB can be chosen as 4K to give more base current to transistor GUI (Graphical User Interface): A GUI can be developed in high level language (like C#) which uses the UDP (User Datagram Protocol) to communicate with microcontroller over PC. Below is the GUI that controls the digital output of microcontroller over UDP protocol.