Below you can find a list of the parts, schematics and programming needed to allow you to recreate and produce this project.
1
This WiFi Module will receive signals from Alexa and turn them into signals to turn on and off a relay. The relay is used turn things on and off.
2
The transistor is used as a curernt amplifier in this circuit to help the nodeMCU low current turn on and off the relay.
3
The relay is switched on and off from the NodeMCU. The Normally Open contacts are used to turn on and off different objects like lights, TVs and other electronics that use switches.
4
The diode is used a suppression or flyback diode. These are needed when switching on and off inductive loads like motors or a relay in this case. Otherwise can cause damage to NodeMCU or transistor.
Below I list exactly how to hookup your Alexa Device with the parts listed:
The NodeMCU is powered by MicroUSB 5V and is the main Microcontroller and Wifi Module for the Projects. This will receive Alexa commands and output a Pin.
This transistor will almost act as a Current Amplifier to allow the Output Pin to switch on the Relay circuit.
The Relay Circuit uses the Transistor to switch 3.3V through the coil to switch ON and OFF. The flyback diode is used to suppress the inductive current from the coil.
Download the following libraries: WebSocketsClient.h, ArduinoJson.h . Then open Arduino IDE and connect the NodeMCU with a Micro-USB cord.
You can find the full Instructions on my GitHub Repository
The Relay Circuit uses the Transistor to switch 3.3V through the coil to switch ON and OFF. The flyback diode is used to suppress the inductive current from the coil.