Password based circuit breaker using gsm module
A password-based circuit breaker using a GSM module is a security device that can be controlled remotely using a password sent via SMS. Here's a basic overview of how it works:
Components:
- GSM module (e.g. SIM900A or SIM800L)
- Microcontroller (e.g. Arduino or ESP32)
- Relay module
- Power supply
- Breadboard and jumper wires
Circuit Diagram:
The circuit consists of a GSM module, a microcontroller, and a relay module. The GSM module is connected to the microcontroller, which is programmed to receive SMS commands and control the relay module.
How it works:
- The user sends an SMS message to the GSM module with a specific password (e.g. "1234").
- The microcontroller receives the SMS message and checks if the password is correct.
- If the password is correct, the microcontroller sends a signal to the relay module to turn on or off the circuit.
- The relay module receives the signal and switches the circuit on or off accordingly.
Code:
Here's an example code for an Arduino-based implementation:
#include <GSM.h>
const char* password = "1234"; // set the password here
const int relayPin = 2; // set the relay pin here
GSM gsm;
Relay relay(relayPin);
void setup() {
Serial.begin(9600);
gsm.begin();
relay.begin();
}
void loop() {
if (gsm.available()) {
char incoming[100];
gsm.read(incoming, 100);
if (strcmp(incoming, password) == 0) {
relay.toggle();
Serial.println("Password correct, circuit switched");
} else {
Serial.println("Invalid password");
}
}
}
Note:
- This is a basic example and you may need to modify the code to suit your specific requirements.
- Make sure to set the password correctly and keep it secure.
- You can also add additional features such as timer-based circuit switching or multiple passwords for different users.
Advantages:
- Remote control of the circuit using SMS
- Secure password-based access control
- Can be used for various applications such as home automation, industrial control, or security systems
Disadvantages:
- Requires a GSM network connection and a SIM card
- May have limited range and coverage depending on the GSM network
- Can be vulnerable to hacking or unauthorized access if the password is compromised.