Home Automation Step by Step using Wemos D1 Mini with PCB Design

A few weeks back we published a tutorial “Home Automation using Raspberry Pi” in rootsaid.com which was well received among hobbyists and college students. Then one of our members came up with an Arduino Home Automation system using NodeMCU.

Arduino Home Automation System

Here we will be showing you how to build an Arduino Home Automation System that can control electrical devices like lights, fans, garage doors etc using our mobile phone from anywhere around the world. To build this DIY Home Automation System, All you need is an Wemos D1 Mini Board, some relays and an android phone.

Online PCB Manufacturer – JLCPCB

JLCPCB is one of the best Online PCB manufacturing company from where you can order PCBs online without any hassle. The company works 24 hours a day, 7 days a week nonstop. With their high tech machinery and automated work stream, they can manufacture huge quantities of high-class PCBs within hours.

JLCPCB can develop PCBs of various complexity. They develop Simple and cheap PCBs with Single layer board for hobbyists and enthusiasts as well as complex multi layer board for high standard industrial applications. JLC works with large product manufacturers and may be the PCB of devices you are using such as laptop or mobile phones were made at this factory.

Step 1 – Drawing Schematics using EasyEDA

To draw circuits and design PCBs, we have online PCB designing tools from EasyEDA, provides all the necessary capability for online PCB Design and PCB Printing of Circuit Boards with hundreds of components and multiple layers with thousands of tracks.

I drew a circuit in EasyEDA which included all the components on the breadboard version – the Wemos D1 Mini, Relay, Regulator and LEDs which are connected to the digital pin of the Wemos.

The Relay

Relays are switching circuits that can close and break circuits mechanically. That means it can control an electrical circuit by closing and breaking connections in that circuit.

As you can see, there are mainly 5 terminals in a relay. Two for energizing the coil, one Common terminal, a Normally Closed terminal which will be connected to the Common terminal when the coil is not energized and a Normally Open terminal which will be in contact with the Common terminal when the coil is energized.

This is how the relay works. In our case, we will be connecting

  • GPIO pins to One End of Coil
  • Ground to other End of Coil
  • Phase of Main Power Supply to The Common terminal or Pole
  • One Terminal of bulb (Or other electrical Appliance) to Normally Open Terminal
  • And the Other Terminal of Bulb to Neutral Point of Main Power Supply

Depending upon the output of arduino board, you can select your relay. Since the Output of Node MCU GPIO pins are 3.3V, you will have to buy a 3.3V Relay. 

Voltage Regulator

I also added a 7805, regulator which will helped me to provide an input voltage between 7 volt and 35 volt in the input, so that I can use a 5 volt USB power supply, 9-volt battery or even a 12 volt lithium polymer battery without any issues.

I also added some indicator LEDs that will let me know if something stopped working. You will find the circuit to my EasyEDA below.

PCB Layout

Next, designing the PCB. PCB Layout is actually a significant part of PCB Design, we use PCB Layouts to make PCBs from schematics. I designed a PCB where I could solder all the components together.

For that, first save the schematics and from the top tool list, Click on the convert button and Select “Convert to PCB”. This will open up a window like this. Here, you can place the components inside the boundary and arrange them the way you want. The easy way route all the component is “auto-route” process. For that, Click on the “Route”...

Read more »