Introduction: Turn Any Decorative Thing Into a Smart Device

About: Maker 101; Beginner and intermediate level Maker projects! You can find projects such as "How to" and "DIY" on programmable boards such as Arduino, ESP8266, ESP32 and Raspberry Pi on this channel. The projects…

In this project, I will show you how to make any decorative object into an IOT smart device. I chose a plant pot to make it smart and I'll turn it into a device that sends motion notifications. We will use an ESP-01 WiFi module for wireless communication and a few components for the circuit. We will also be using a free service for notifications.

You can make different projects using the methods you will see in this project, so let's get started.

Step 1: Watch How It Works?

As you can see in the video, I built a very simple IoT based notification sending project that is not complicated. The project consists of six parts and all stages of the project are shown step by step. I just tried to show "how to do it?".

Step 2: Create an Event (Get API Key)

The ESP8266 is a Wi-Fi module great for IoT and Home Automation projects. Comparing the ESP8266 with other Wi-Fi solutions on the market, it is a great option for most “Internet of Things” projects! it only costs a few dollars and can be integrated in advanced projects.

For this project we’re going to use a free service called IFTTT that stands for If This Than That. This service is used to automate a wide variety of tasks online. In this case, we will get a notification when the sensor detects motion.

  • Go to the IFTTT (https://ifttt.com/) web page and click the “Get started” button. Complete your details and create your account.
  • After that click the create “New Applet” button.
  • Click the “If This” add button and search for the “Webhooks” service. The Webhooks service allows you to integrate other services on IFTTT with your DIY projects via simple web requests.
  • You need to type in an event name like “Smart_Plant_Pot”.
  • Click the “Create trigger” button. Now press the “Then That” add and search for the Notification service. This action will send a notification to your devices from the IFTTT app.
  • Type the message you want to be displayed on the notification screen.
  • Finally press the “Create action” button.
  • You should have your Applet created after clicking "Continue" and “Finish”.
  • Now, let's get the API key that we will add to the source code.
  • Go to "Webhooks" from "My Services".
  • Click the “Documentation” tab. Here you can find your unique API key that you must keep private. Copy your unique API key to use in the code.

Step 3: Upload the Source Code

Open the source code from this link: https://create.arduino.cc/editor/mertarduinotech

I suggest you use the Arduino Web editor for editing. Thus, details such as adding a library will not take your time.

  • Replace with your "Event name" and "API key" in the code.Source code does not need any other changes. We will do the wireless network connection later easily.
  • Now the code is ready to be uploaded to the ESP-01, we will need a programmer module. For this, we will use the FTDI module, the FTDI serial converter module is used as a power source and to program the ESP-01.
  • When connecting to an ESP-01, the working voltage of the FTDI USB to TTL serial converter module needs to be set to 3.3V (instead of 5V).
  • Connect the module to the ESP-01 as shown in the circuit diagram.
  • Then plug the module into the computer with a USB cable.
  • Now we select the Generic ESP8266 Module and the connected port from the "Boards" section of the editor and click upload.
  • The uploading may take some time, this is normal.
  • Now we have the ESP-01 WiFi module ready for our project.

Required components:

ESP8266 ESP01 Module - http://bit.ly/2XgAkWn

FTDI USB To TTL - http://bit.ly/2RL89st

Jumper Wire - http://bit.ly/2pBD9BQ

Step 4: Build the Circuit

I built and tested the circuit on a breadboard. The circuit is as complex as it looks, so I designed a PCB to make it fit for the project. If you don’t want to use a PCB, you can still make this project by assembling the circuit on a breadboard. The next steps will be the same for both.

I used browser-based software to design the circuit and PCB. Designing a circuit works like in any other circuit software tool, you place some components and you wire them together. Then, you assign each component to a footprint. Then you place each component. When you’re happy with the layout, you make all the connections and route your PCB. Then you export the Gerber file for the PCB order.

So how to order PCB?

  • Go to PCBWay website, PCBWay is a full feature Printed Circuit Board manufacturing service.
  • Then open the "PCB Instant Quote" page.
  • Use the “Quick-order PCB"
  • Press the “+ Add Gerber file” button to upload the provided Gerber files.
  • You can increase your PCB order quantity and change the solder mask color. I’ve ordered the Blue color.
  • Then order boards for approximately $5. The shipping cost will vary depending on your country. If you aren’t in a hurry, you can use the China Post shipping method to lower your cost significantly.
  • Once you’re ready, you can order the PCBs by clicking “Save to Cart” and complete your order.

The next step is soldering the components to the PCB. Don't worry we will not use SMD components so soldering will be easy.

Step 5: Soldering

  • I'll first start by soldering the ESP-01 WiFi module. I did not use headers to keep the card size small, but you can use female header pins.
  • We will use an electrolytic and a ceramic capacitor capacitor to smooth the voltage peaks. The capacitors prevent unexpected resets or unstable behaviour for your ESP8266.
  • The ESP recommended operating voltage is 3.3V, so you’ll need a voltage regulator.
  • Add a status LED to observe the program progress.
  • Then I add a battery buckle to power the board.
  • Also I left 2 pins for those who want to use an on / off switch.
  • Finally, I add the mini motion sensor that will detect the motion and trigger the system.

We have completed the soldering. In the next step, we will assemble the board into the plant pot.

Required components:

Mini PIR Motion Sensor - http://bit.ly/2Lr42AN?
ESP8266 ESP01 Module - http://bit.ly/2XgAkWn

FTDI USB To TTL - http://bit.ly/2RL89st

LD1117 Voltage Regulator - https://amzn.to/2NgrYJB

1000uF Electrolytic Capacitor - http://bit.ly/2XaOQtT

100nF Ceramic Capacitor - http://bit.ly/2KLB7rF

LED - http://bit.ly/2IWyzos

Slide Switch - http://bit.ly/2wwntPZ

Battery Connector - http://bit.ly/2M8PZCC

Jumper Wire - http://bit.ly/2pBD9BQ

Soldering Tool Kit - http://bit.ly/2D6YbuC

Solder Wire - http://bit.ly/36escZ0

Tweezer - http://bit.ly/3og8suc

Plier - http://bit.ly/2Gbl6aq

Step 6: Assembling

The assembly will vary depending on the decorative thing you want to use. I used a plant-pot. If you like this, here is the link: https://amzn.to/30IzMb7 Just adapt the object you will use to your circuit.

Step 7: Wifi Connection (Final Section)

We used the WiFiManager library in the source code. WiFiManager allows you to connect your ESP8266 to different Access Points without having to hard-code and upload new code to your board.

Your ESP will automatically join a known network or set up an Access Point that you can use to configure the network credentials.

After establishing a connection with ESP, you will be directed to a web page that allows you to configure your SSID and password.

When a new SSID and password is set, ESP restarts and the connection is complete.

Finally, download the IFTTT application and install it. Sign in to your IFTTT account and turn on notifications.

That’s it for now. I hope this project was interesting and you can apply these concepts to your own home automation projects.

Microcontroller Contest

Participated in the
Microcontroller Contest