Table of Contents

DIY Voice Activated Light Bulb

Voice Activated Light Bulb project - science project idea
Project Description

Introduction

The internet of things is quite a fascinating technology. One of its many applications is home automation i.e. automating the control of the heating, ventilation, lighting, air conditioning of a home. This project on voice-activated lights is a baby version of the bigger home lighting automation system where we’ll show you how to make a DIY voice-activated light bulb. This project is a perfect start for beginners into the world of home automation projects and for educators who want to introduce their students to IoT and home automation in a fun-filled DIY way!

We’re going to make this project using the evive IoT kit and write its code in PictoBlox – a graphical programming software based on Scratch with advanced capabilities. You can download it from HERE.

Ready to light up your life with IoT? Let’s begin!

 

Attaching the Bulb Holder

  • Let’s understand how to make the voice-controlled light bulb. Let’s begin with making the bulb holder for our Smart Bulb.
  1. Take the upper plate which has a hole in it and the bulb holder. Fix the bulb holder into the plate by removing the outer cap from the bulb holder assembly.Making of the Smart light bulb
  2. Once we have the bulb holder attached to the plate, we will connect the electrical wires to the bulb holder. These wires will connect it to our AC power supply.
  3. Take a small piece of electrical wire and attach it to one of the two outlets of the bulb holder.
  4. Next, take the electrical wires which have a plug attached at one end and the other ends are free. Now, from the two wires, take anyone wire and attach it to the remaining outlet of the bulb holder.Making of the Smart light bulb 2

Relay: Most important component of Home Automation

Relays are one of the most important electrical component of your project for the Home Automation system. Relays basically act like the switch which turns ON or turns OFF when big virtual assistants like Alexa gives them the commands that in turn makes your home a Smart Home.

  1. Coming back to our smart light bulb project, bring the open ends to the top of the plate from the hole given.
  2. Bring in the relay, we are going to use two of the three ports of relay i.e. NO (Normally Open) and COM.
  3. Connect one open wire to NO and the other to COM.
    evive Notes Icon
    Any wire can be connected to any port. The only compulsion is, to choose the NO port and the COM port. Not the third one.
  4. Now, fix the relay onto the plate using hot glue.Attach relay for the Home Automation project

Completing the Box for the Smart Light Bulb

Now, it’s time to assemble the rest of the box.

  1. Attach all the four sides, i.e. front, back, left, and right to the top plate using M3 nuts and bolts.
  2. Now, a little care needs to be taken while attaching the bottom side. Before fixing the bottom side of the box, make sure that you pass the wires through one of the holes given at the bottom. 
  3. Once done, attach the bottom plate using M3 nuts and bolts.Making of the Smart Light Bulb 4
    evive Notes Icon
    You need to leave the hole through which we have passed the wires through.

Making the connections for our Voice Controlled Light

Now, it’s time to connect the relay to evive- Arduino based embedded platform. 

  • Connect: 
  • VCC of the relay to +5V of evive
  • GND of the relay to GND of evive
  • OUT of the relay to Digital Pin 2 of evive

Now, as we need to a Bluetooth Controlled Home Automation project using Arduino (evive) we will connect our HC05 Bluetooth module to evive.

Finally, connect the light bulb to complete the making of our Smart light bulb.Cicuit Disgram for Voice Controlled Home Automation

Working of our Mobile Controlled Light Bulb

As we are going to control our bulb wirelessly, we need to install Dabble in our Smartphones. You can download Dabble from here. Also, Dabble is now available for iOS devices too. If done, let’s move on the next step. 

  1. Open Dabble
  2. Click on the Connect-Disconnect Icon and select your Bluetooth Module from the drop-down list. 
  3. Open the Terminal Module, we are going to send commands to our Arduino platform using it. 
  4. The bulb will turn ON as soon as command “lights on” send and will turn off when the command sent is “lights off”. Also, it is the Google Voice Assistance that makes this IoT project a voice-activated project. Voice Controlled Light Bulb

Writing the Code in PictoBlox

We are going to make this project even easier by writing its script in PictoBlox-  a Scratch based graphical programming platform. Just make the following code by dragging and dropping a few.

The below code shows the very basic function i.e. Bulb will turn ON on sending the command “lights on” and will turn off by sending “lights off”.Code to Control Smart Light Bulb

The below code will also write the status of Smart Light Bulb on the TFT Display:PictoBlox Code for Voice Activated Light Bulb

Conclusion

With this, your IoT based voice-activated light bulb is ready!

Project Downloads - Code and Files

Code LabelCode File
PictoBlox Code for the Voice Activated Light Bulbhttps://ai.thestempedia.com/wp-content/uploads/2023/05/Voice-Activated-Light-Bulb-2.sb3

Circuit Diagram

Circuit Diagram DescriptionCircuit Diagram Fritzing Diagram

Connect: 

  • VCC of the relay to +5V of evive
  • GND of the relay to GND of evive
  • OUT of the relay to Digital Pin 2 of evive

Explore Related Projects by STEMpedia

Explore Community Projects