Home automation with ESP8266
Hi ,friends. Welcome back to Helal Tech. In this video, we’re going speaking about “Home automation with ESP8266”.
First of all, the ESP8266 can only be powered by 3.3v, so we have a voltage regulator to regulate the voltage from 5v to 3.3v
; But how can we get 5v to regulate? You can use a battery but this is not effective and you have to change the battery continuously. We will put this board in our home panel to control the high voltage loads, so what about rectifying the main voltage to 5v dc.
I have used a “high link” power supply to rectify the voltage from 220v ac to 5v dc.
Here is the schematic of the power supply.
And I have made an indication of rectifier output by this resistor and LED. According to pin configuration of the ESP8266, we have 2 pushbuttons. One at the GPIO0 to can flash the code which we have set as pull up pin. And the other at the reset pin which we have also set as pull up pin.
These pins can’t be used because they are reserved by the chip. We can use GPIO4,5,12,13 and 14 as input or output. We will use them as output to can control the relays; but as you can see, we have 7 channels or 7 relays and we have used only 5 GPIOS, so I’ll use TX pin and GPIO 15 as output to can control the last two relays. But how can we program the chip? I have put a 4 male pin header to can program the chip with USB to TTL converter.
As I mentioned I used 7 relays; but as you know the relay coils withdraw large amount of current compared to the chip current, so we can’t control the relays directly, so I use a darlington transistors which are embedded in ULN2003 IC to control the coils of relays.
And the IC have a free wheeling diodes to free the reversed current came from relay coils to protect our control circuit.
As you can see, we have a resistor and LED connected in parallel with the coil supply to indicate the coil status. And wired the COM,NO and NC pins to a 3 pin screw terminal.
This is the PCB layout, I put components on the top and bottom of the board to can get a compact size. The track width of the screw terminals of relays is about 4mm to can withstand the high current; but the control tracks is 0.25mm in width. And the track width of the power supply is 1 mm.




Comments
Post a Comment