Projects   /   Development Boards & Kits   /   PIC16F877A

Password Based Circuit Breaker using PIC Microcontroller with C code

Here i am going to explain you a simple Password based circuit Breaker Project using PIC Microcontroller. This project is much similar to my previous one, “Password Based Door Locking System”.

Published
Updated

At a glance

CategoryDevelopment Boards & Kits
PIC modelPIC16F877A
IncludesCircuit diagram
Reading time~3 min

Summary of Password Based Circuit Breaker using PIC Microcontroller with C code

This article details a password-controlled circuit breaker project using a PIC16F877 microcontroller. It allows authorized users to toggle power loads by entering specific passwords on a keypad, which are verified via an LCD display. The system uses two distinct passwords to control two separate relays, effectively acting as switches for connected loads.

Parts used in the Password Based Circuit Breaker:

  • PIC16F877 Microcontroller
  • Keypad
  • 16x2 LCD Display
  • Relays (two units)
  • LCD 4-bit Interface Module
  • Keypad Interface Module
  • PIC C CCS Compiler Software

Password Based Circuit Breaker using PIC Microcontroller with C code

Circuit breakers are electromechanical devices used in the power system to connect or disconnect the power flow at the generator, substation, or load location. Only authorised persons with correct password can connect or disconnect the circuit breaker. Each Line will have separate passwords to operate, By entering the password the current state of the line is toggled. That is, the load will gets connected or disconnected. For verification, after entering the password you need to press the ‘=’ button on keypad (Which is just like an ‘ENTER’ key).

Block Diagram of the Password based Circuit Breaker

Block-Diagram-circuit-Breaker-project

PIC16F877 is the heart of this project, which takes input from keypad as password and displays the current status on a 16x2 LCD Display. For the demonstration purpose, I am using only two loads, which is controlled by two relays.

“1234” and “9876” are the two passwords used here for activating and deactivating the Load 1 and Load 2 respectively. As I mentioned in the above paragraph, don’t forget to enter ‘=’ after feeding the password. Press ‘ON/C’ Button to clear the screen.

Circuit Diagram of Password Circuit Breaker

Password Based Circuit Breaker using PIC Microcontroller with C code SchematicEmbedded C Code

#include <16f877.h>
#include <lcd_4bit.c>
#include <keypad.c>
#include <string.h>
#use delay(clock=4000000)
char u1[]="1234",U2[]="9876",p[10],k,v1[10];
int i=0,d1,d2,z1=1,z2=1;
void main()
{char m[30];
lcd_init();
lcd_str("Password Based");
gotoxy(0,1);
lcd_str("Circuit Breaker");
delay_ms(1500);
The C Code is compiled in PIC C CCS Compiler. Download The simulation, C-code and Project Files.
  • What is the main function of this circuit?
    It connects or disconnects power flow at a load location only when an authorized person enters the correct password.
  • How do you verify the entered password?
    You must press the '=' button on the keypad after typing the password to act like an 'ENTER' key.
  • Which microcontroller is used in this project?
    The PIC16F877 is used as the heart of the project to process inputs and control outputs.
  • What are the specific passwords for Load 1 and Load 2?
    The password "1234" activates Load 1 and "9876" activates Load 2.
  • How can you clear the screen during operation?
    Press the 'ON/C' Button to clear the display screen.
  • Does each line have its own password?
    Yes, each line has a separate password to operate the circuit breaker independently.
  • What happens after entering the correct password?
    The current state of the line toggles, meaning the load gets connected or disconnected.
  • Can I download the code for this project?
    Yes, the simulation, C-code, and project files can be downloaded from the source.
Beginner Tutorials · PIC16F877A

PIC16F877 Driving LCD in 4-Bit Mode using PIC16F877 with Proteus Simulation

Introduction This microcontroller project shows how a PIC16F877 can drive an LCD display using 4-bit mode inside a Proteus simulation.The project demonstrates...

Programmers & ICSP · PIC16F877A

EPE PIC/LCD Demo using PIC16F877 with Proteus Simulation

IntroductionThe EPE PIC/LCD Demo is a classic microcontroller project that demonstrates how a PIC16F877 can fully control a PG12864F graphical LCD.Designed as...

Motors & Robotics · PIC16F877A

Efficient Sun-Following Robot: A Solar Tracker with Microcontroller Control

Abstract The impending global challenge of dwindling non-renewable fuel resources underscores the urgency of transitioning towards renewable energy alternatives like solar power....

Development Boards & Kits · PIC18F4520

Voltage Measurement with A PIC Microcontroller

Voltage Measurement with PIC Microcontroller articulates a methodical framework for facilitating analog voltage measurement using the PIC18F4520, an advanced member of Microchip’s...

Development Boards & Kits

Ultra-Low Power: Microcontroller Standby Current to 130uA with OPEnS Power Control Board

At the OPEnS Lab, a key focus for our projects is achieving exceptionally long battery life. This was particularly true for the...

Development Boards & Kits

An Integrated Approach to Developing Applications with Microchip PIC Microcontrollers

1. Introduction In our daily lives, a variety of devices such as telephones, household appliances, and cars incorporate "smart" electronics, typically manifested...

Ibrar Ayyub

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough...