We often come across a situation where we want to switch on the electrical load by pressing some buttons on a computer program. Consider an example, where you are sitting in a power plant and you want to switch on a circuit breaker remotely. Controlling circuit breakers from a remote location can be achieved by using Microcontroller. We’ll discuss how to make a Remote Control Circuit Breaker Using a Microcontroller.
For this remote-controlled circuit breaker we will need:
A microcontroller is an IC that has the intelligence to understand the commands received from PC by a communication protocol. 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 the 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). A normal switch cannot handle a 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 a command is giving to the microcontroller to turn on the load, the microcontroller pin is set to 3.3V (in the above circuit) which turns on the NPN transistor. When the transistor is ON current flows from collector to emitter of the 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 a 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 the relay is switch off a back e.m.f is generated which can damage the transistor if the magnitude of back e.m.f is more the VCEO voltage of the transistor. To protect the transistor as well as the digital output of microcontroller a diode is used which conducts when the relay is off. This is also known as the freewheeling diode.
The assumed microcontroller gives 3.3V when the pin is high and 0V when the pin is low. Choose a relay of 12 V and 360-ohm coil resistance then-current taken by the relay to get turn on
This is rated current of the 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.