Wifi-Controlled Switch

In this project, we created a WiFi-enabled electrical switched outlet.

Scroll down for links to products/components used in this project.

Download the Arduino IDE Sketch

Included in the video is a full breakdown of the schematic diagram:
Click/Tap for Full Image

Click/Tap for Full Image

Using my Amazon Link for any purchases helps my channel. I get a tiny commission, and it does not affect your cost in any way.

These are the actual components I used, except where mentioned as possible substitutions:

5-Volt USB Power Cube (Pack of 5) -- I recommend this particular listing because all 5 measure within 0.1 volts, and for the reasons explained in the video:
https://amzn.to/3oE7Els

Chanzon AMS1117 (3.3V Regulator, Surface Mount):
https://amzn.to/3PKjaaU

Alternate 3.3-Volt Regulator (TO-92 Package, Thru-Hole):
https://amzn.to/3vosYPE

ESP-01 Microcontroller (Set of 3):
https://amzn.to/3OIjdT6

ESP-01 USB Programmer (Set of 2):
https://amzn.to/3oB2vuo

(Substitute, If you just want ONE chip and programmer):
ESP-01 (single) WITH single USB programmer:
https://amzn.to/3PL3lRl

8-Pin Socket for ESP Chip:
https://amzn.to/3voarD4

(OPTIONAL) Breadboard Adaptors (since the ESP-01 can't straddle a standard breadboard):
https://amzn.to/3zGKuRI -OR-
https://amzn.to/3zfEKNs

Transistor Assortment (including the BC337 used in this project):
https://amzn.to/3biaZ6M

(Substitute):
Search for the BC337 by itself (usually in kits or bulk packs):
https://amzn.to/3JbBes2

2N7000 MOSFET transistor (bulk pack):
https://amzn.to/3oJs3Fz

(Substitute: Search for 2N7000):
https://amzn.to/3ozwnr8

Resistor Assortment Pack (there are a LOT but you can't beat the price if Electronics is a hobby):
https://amzn.to/3zGlI47

(Substitute):
Search for "resistor assortment":
https://amzn.to/3BqjxTQ

Capacitor Assortment (SEE MY NOTE BELOW, but this IS the kit I used):
https://amzn.to/3zgoITp

(Substitute):
Search for "capacitor assortment":
https://amzn.to/3cCXkY3

Relay - Not the exact ones I have but exact same specs and pinout (pack of 10):
https://amzn.to/3cDIhxg

Alternative 5-pack of Similar Relays:
https://amzn.to/3SbQfhC

Perfboard (PCB Board) - pads on ONE side as used in this project for better mains voltage isolation:
https://amzn.to/3vnpDAs

60/40 Lead-based solder (the Radio Shack brand I have is out of stock but this will work just fine):
https://amzn.to/3Q1Mh9h

Desoldering Wick (Pack of 6):
https://amzn.to/3bfLOlg

Diode Assortment (I used the 1N5819, but for this project almost any diode will do fine):
https://amzn.to/3PMReTU

Project Box (Pack of 5):
https://amzn.to/3zGNz4b

** NOTES ABOUT CAPACITORS **
As I mentioned in the video, many of the capacitors you get in "assortment" packs from Amazon, eBay or AliExpress might be "rejects" or counterfeit. I admit, I still use them, but I do two main things:

- ALWAYS at least double the voltage rating from what you intend to use. So on a 12 volt circuit, use at LEAST a 25-volt rated capacitor. For 5 Volts I typically stick with 16-volt rated (I don't trust the 6.3 or 10 volt ones).

- ALWAYS check the capacitance rating using an LCR meter, as shown in the video. If it's far off, throw it out and grab another from the kit...

See my video where I learned this the hard way:
https://youtu.be/DRGzUKWORjA


.

Valid CSS!

Buy Me A Coffee

Home | About Me | More Info

Privacy Policy