Introduction: Home Automation the Switch
This is a IOT socket designed as a part of full automation project
Step 1: Bill of MATERIALS
- ESP-01 8266 board
- raspberry pi { i used for local mqtt server BUT can be replaced with cloud server }
- piece of zero pcb
- a Ams 1117 (smd varient)
- an old charger chip (or any small 5v power supply)
- a relay module (or a relay combo made with transistor)
- a piece of ply board .5 cm thick
- a switch
- socket
- connecting wire
- soldering iron
- cutting saw 4 ply
- hot glue gun or any adhesive u prefer
Step 2: Making the Enclosure
cut a piece of ply bard such that the socket fits into that
then Screw it properly
now Do Same for the the switch and secure it with screws
now for side panel
try to stack all things like charger circuit and relay in such a way that it saves the space
them measure the height and cut sides accordingly
Step 3: THE Inner Electronics
power Supply for ESP_8266
esp works om 3.3v
BUT we have 220v ac, so we will use an old phone charger to convert 220v ac to 5v dc
and use AMS 1117 voltage regulator bring it down to 3.3 v
FOR RELAY
Relay works on 5 v so We will use same chargers output tp o power relay
(signal will be given by our esp )
Step 4: Mounting the Esp and RELAY
i used female header so that esp can be replaced or code could be uploaded
for Normal working
connect
CH_pd to Vcc
ground to ground
Gpio 1 as signal pin for Relay
RELAY CONNECTIONS
gnd --- gnd charger
5v --- charger 5 v
signal ---- GIOP 1 of ESP
Step 5: Setting Up the Broker
For Setting up a broker check
https://www.instructables.com/id/Installing-MQTT-B...
and one its done now its time for coding ESP8266
Step 6: Programming Esp
Step 7: The Code
https://github.com/johermohit/Rocket/blob/master/e...
code is on github just replace your info with mine
Step 8: The Control
Two ways to do that:
1. Paho mqtt - a python based esp client emulated on rpi itself letting u publish over mqtt by cli
2. android Apps on play store : recommended
So connect th box to mqtt and rock your world
Participated in the
Arduino Contest 2017
Participated in the
Remote Control Contest 2017
Participated in the
Raspberry Pi Contest 2017