Complete Guide: Switch Control Project
### Switch Control Project - Complete Guide
## 1. Overview
This guide provides step-by-step instructions for building a smart switch control system using an
ESP32,
OptaCounter Relay ×2, and Bluetooth remote with a 50-meter range.
## 2. Components Required
- ESP32 development board
- OptaCounter Relay ×2
- Bluetooth Module (HC-05/HC-06)
- 5V 2A power adapter
- Rechargeable battery for Bluetooth remote
- Push buttons for remote control
- Enclosure (similar to an AC remote)
- Screwdrivers (PH1 for screws)
- Jumper wires, resistors, and soldering tools
## 3. Circuit Connections
- Connect ESP32 GPIO pins to the relay module
- Bluetooth module TX to ESP32 RX and vice versa
- Power the setup using a 5V 2A adapter
## 4. Programming the ESP32
Page 1
Complete Guide: Switch Control Project
Install the required libraries:
#include <BluetoothSerial.h>
BluetoothSerial SerialBT;
void setup() {
[Link]("SmartSwitch");
pinMode(25, OUTPUT);
pinMode(26, OUTPUT);
void loop() {
if ([Link]()) {
char received = [Link]();
if (received == '1') digitalWrite(25, HIGH);
if (received == '2') digitalWrite(25, LOW);
if (received == '3') digitalWrite(26, HIGH);
if (received == '4') digitalWrite(26, LOW);
## 5. Remote Control Design
- Use a small AC-style remote case
- Rechargeable Li-ion battery
Page 2
Complete Guide: Switch Control Project
- Buttons mapped to send commands (1,2,3,4)
## 6. Installation & Testing
- Upload the code using Arduino IDE
- Test Bluetooth range and relay control
## 7. Features
- Bluetooth control (50m range)
- ESP32-based smart control
- Rechargeable remote
- Fully customizable commands
### Contact for Support: ChatGPT Assistance
Page 3