Introduction

In the previous video, we build an Alexa-controlled Door Locking System. So many people loved the project and we got so many positive responses! Today we are going to turn on and off electronic devices using your favorite personal assistant.

For the demo purposes, we will be connecting some LED strips but you can connect whatever you want to this circuit. So let’s take a look at the circuit.

The Circuit

The Altium designer environment has loaded. This is where we will be connecting the input voltage. A 7805 regulator is linked to the input power. The 7805 can take an input voltage of 7–32V and regulate it down to a constant 5V DC supply. LEDs serve as indicators at key spots to make troubleshooting easier.

Here I will be using an Arduino Nano with WiFi connectivity for this project. This board operating voltage is 3.3V so you have to keep in mind that, the maximum voltage that can be sent to Arduino GPIO pins is 3.3V, and make sure that you will not be connecting any voltage greater than 3.3V to Arduino GPIO as it may damage the board.

Here, If you take a closer look, you should be able to see two voltage inputs right? The Arduino and other onboard components can be powered from one voltage input, while the electronic devices attached to the relay can be powered from the other voltage input.

The relays are wired to four different Arduino GPIO pins. Relays are circuits or elements that can open and close switches in an electrical circuit. In this case, I’ll be making use of a Solid State Relay (SSR), a special kind of relay that doesn’t require any sort of mechanical trigger.

Getting the PCBs Done

I ordered my PCBs from PCBWay. PCBWay is a PCB manufacturer specializing in PCB prototyping, low-volume production, and neat and tidy PCB Assembly. To order your PCBs from PCB way, Go to the PCBWay website and fill in the basic board details in the instant order form.

And in the next screen, you can completely customize your PCB. You can change the thickness, change the solder mask color as well as the silkscreen color, materials used, you can customize it in every way possible. Corresponding prices will be updated here in real-time. In PCBWay, you can even manufacture your PCBs with TG 150-160 for the same prices as that of TG 130-140 which means your PCB will be able to operate at high temperatures without any damage.

On the next screen, you should be able to upload your Gerber file and submit it for review. Once the review is completed, all that is left is to add to the cart, make the payment, and wait for your PCBs to arrive.

Once you get all the components and the PCB, it’s time for you to solder them together. Solder all the components onto the board and make sure to check the polarity of the components. After soldering the PCB looks like this. And this is it. This one is small and I think it will fit nicely on top of the glove

Coding

Let’s move on to the programmatic details now. In this instance, I’ll be utilizing Arduino IoT Cloud to write the board’s code.

Go to things, then pick the “make a thing” tab. Everything pertinent to your project is listed here. This is where you can view all of the information related to your project in one place, including the circuit board, variables, network, sketch, etc. The first step is to name the project. The complete setup for the project can be seen below.

Now let’s take a look at the code. Arduino IoT cloud is helpful because after you’ve set up your thing and all the variables, it will automatically build a skeleton code that includes all the variables and critical function that is needed to run the code. More variables and operations need only be added.

Now I will be removing all unnecessary comments so that it will look, neet. And here are our final code guys now let’s take a deeper look into it.

#include "thingProperties.h"

void setup() {
  Serial.begin(9600);
...
Read more »