WARNING! WARNING! WARNING!
High voltage 240V. Exercise caution
In this article, we’ll control an AC light over the Internet using NodeMCU board and Blynk App.
Why do we use relay to control an A.C light bulb?
A.C the 220V supplied by utility (PHCN) cannot be controlled directly from the The NodeMCU board (which operates at 3V). The relay is an electromagnetic switch that electronically controls power applied to loads, in this case an AC bulb.
A relay has NO, NC and COM, what do they mean?
- COM – Common, as the name suggests is common to both NC and NO terminals.
- NO – Normally Open is normally open until power is applied to the relay’s coil, so current does not flow until the relay is activated.
- NC – The Normally Closed terminal allows current to flow until the current is applied to the relay at which case it goes off.
For the purpose of this tutorial, I’ll be using COM and NO.
You’ll need the following to carry out this project
Hardware
- NodeMCU 12-E board, get here
- 5V DC, 10A 250V AC relay module. get it here
- 2N7000 MOSFET, get it here
- 4.7k Ohm resistor.
- An A.C light bulb.
- 10 mm wires.
Software
- Blynk app, refer to this article here if it’s your first time working with Blynk
- Latest Arduino IDE, get it here
STEP 1: CIRCUITRY
Please note: The purpose of the transistor is to invert the output of the NodeMCU (The relay is coil is activated when logic 0 is sent in and vice versa). Also it shifts the voltage level to 5V-0V, the relay operates at 5V.
STEP 2: Setting up BLYNK
We will be using Blynk app to control the A.C bulb over the internet. I showed you how to set up Blynk and create a button, if you missed it you can check it out here. For the purpose of this tutorial, we would be using the button we created. If you’ve set up Blynk successfully which entails getting your AUTH TOKEN, you can move to the next step.
(NOTE: SAVE THE TOKEN, IT CAN BE REUSED FOR OTHER PROJECTS)
STEP 3: NodeMCU code
I also showed you how to setup the NodeMCU board in the Arduino IDE, if you missed it, check it out here. After successfully setting up the board, upload this code.
When the IDE is done uploading the code to the NodeMCU board, fire up your serial monitor to debug the connection to your Wi-Fi connection. Open up your Blynk App and control your A.C light bulb!!!!
Results
If everything is done right, your A.C bulb should light up like this when you control it with the Blynk App
Wanna Do More?
A setup such as this can be used to control water pumps, A.C/D.C fan, lights, garage doors.
Are You interested in advertising that costs less than $40 monthly and delivers hundreds of people who are ready to buy directly to your website? Please send me a reply here: michael4621gre@gmail.com to find out how this works.
thank u
Greetings, I was just checking out your website and filled out your contact form. The contact page on your site sends you messages like this to your email account which is why you’re reading through my message right now correct? This is the holy grail with any kind of advertising, getting people to actually READ your ad and I did that just now with you! If you have an ad message you would like to blast out to millions of websites via their contact forms in the US or to any country worldwide send me a quick note now, I can even focus on specific niches and my prices are super reasonable. Send a message to: harry2947har@gmail.com
thank u
Had you heard that website contact page messages like this one can actually be an effective method to generate leads for your online or offline business? How exactly is this done? Easy peasy, we craft an ad text like this one for your online business and we mass post it to hundreds of thousands website contact pages on sites in whatever niche or country you want to target. Do ads like these work well? Well you’re reading this now aren’t you? The best part is, you can do this for less than a cup of coffee a day! Want more info? write an email to: UlisesDonaldsoni4472@gmail.com
I AM NOT going to sell you anything! Instead I want to show you 50 FREE ADVERTISING strategies:https://cutt.ly/cTOKIBW