top of page
Writer's pictureSanskruti Ashtikar

How to Create a Smart Home Automation System in TinkerCAD

Updated: Sep 15

Home automation is a growing trend in modern living, allowing us to control and monitor various household devices remotely. From lights to security systems, smart homes make life more convenient, efficient, and secure. In this project, we'll create a simple smart home automation system using TinkerCAD, where we’ll control an LED light (simulating a home light) and a fan using a smartphone app interface. This project is a great way to learn about microcontrollers, relays, and remote control via Bluetooth.



Components Required for Smart Home Automation


To build this project in TinkerCAD, you’ll need the following components:

  • Breadboard (Small)

  • Arduino Uno R3

  • LED (representing a light bulb)

  • DC Motor (representing a fan)

  • NPN Transistor (e.g., 2N2222)

  • 220-ohm resistor (for LED)

  • 10k-ohm resistor (for transistor)

  • Diode (1N4007)

  • HC-05 Bluetooth Module (simulated)

  • Jumper wires



Building the Smart Home Project


Step 1: Setting Up the Breadboard and Arduino


  1. Open TinkerCAD: Log in to your TinkerCAD account and navigate to the "Circuits" section.

  2. Create a New Circuit: Click "Create new Circuit" to open the workspace where you’ll build the smart home automation system.

  3. Place the Breadboard and Arduino: Drag a small breadboard and an Arduino Uno R3 onto the workspace. Position them next to each other for easy wiring.


Step 2: Connecting the LED (Smart Light Control)


  1. Place the LED: Drag an LED onto the breadboard. The longer leg (anode) connects to an empty row, and the shorter leg (cathode) connects to the ground rail.

  2. Add a Resistor: Connect a 220-ohm resistor from the anode of the LED to digital pin 8 on the Arduino. This resistor limits the current flowing through the LED.

  3. Connect Ground: Use a jumper wire to connect the ground (GND) rail of the breadboard to one of the GND pins on the Arduino.



Step 3: Connecting the DC Motor (Smart Fan Control)


  1. Place the Transistor: Place an NPN transistor on the breadboard. The flat side should face you, with the pins (from left to right) as emitter, base, and collector.

  2. Connect the Motor: Drag a DC motor onto the breadboard to represent the fan. Connect one terminal of the motor to the 5V rail on the breadboard, and the other terminal to the collector pin of the transistor.

  3. Add a Diode: Place a diode across the motor terminals, with the cathode (marked end) connected to the 5V rail. This diode protects the circuit from back EMF generated by the motor.

  4. Connect the Emitter: Connect the emitter pin of the transistor to the ground (GND) rail on the breadboard.

  5. Connect the Base: Use a 10k-ohm resistor to connect the base pin of the transistor to digital pin 9 on the Arduino. This will control the motor.



Step 4: Adding the HC-05 Bluetooth Module


  1. Place the Bluetooth Module: Drag an HC-05 Bluetooth module onto the breadboard.

  2. Connect VCC and GND: Connect the VCC pin of the Bluetooth module to the 5V rail and the GND pin to the ground (GND) rail on the breadboard.

  3. Connect TX and RX Pins: Connect the TX pin of the Bluetooth module to the RX pin (pin 0) on the Arduino, and the RX pin of the Bluetooth module to the TX pin (pin 1) on the Arduino. These connections allow the Arduino to communicate with a smartphone via Bluetooth.


Step 5: Writing the Code


  • Open the Code Editor: Click on the "Code" button at the top right of the TinkerCAD interface to open the code editor.

  • Choose Text-Based Coding: Switch to "Text" mode to write the code in Arduino’s C/C++ language.

  • Write the Code:

char receivedChar;

int lightPin = 8;  // LED connected to pin 8

int fanPin = 9;    // Motor connected to pin 9

void setup() {

  pinMode(lightPin, OUTPUT); // Set pin 8 as output

  pinMode(fanPin, OUTPUT);   // Set pin 9 as output

  Serial.begin(9600);        // Start serial communication at 9600 bps

}

void loop() {

  if (Serial.available()) {

    receivedChar = Serial.read(); // Read the incoming data

    if (receivedChar == '1') {

      digitalWrite(lightPin, HIGH); // Turn on the LED

    } else if (receivedChar == '0') {

      digitalWrite(lightPin, LOW); // Turn off the LED

    } else if (receivedChar == '3') {

      digitalWrite(fanPin, HIGH); // Turn on the fan

    } else if (receivedChar == '2') {

      digitalWrite(fanPin, LOW); // Turn off the fan

    }

  }

}
  • This code sets up the Arduino to receive commands from a smartphone via the Bluetooth module. Sending the character 1 turns on the LED, 0 turns it off, 3 turns on the fan, and 2 turns it off.



Step 6: Simulating the Circuit


  1. Start Simulation: Click on the "Start Simulation" button to test your smart home automation system. Although TinkerCAD doesn’t support real-time Bluetooth communication, you can simulate the control by entering commands in the serial monitor.

  2. Controlling the Devices: In the TinkerCAD serial monitor, type 1 to turn on the LED and 0 to turn it off. Type 3 to turn on the fan (DC motor) and 2 to turn it off.


Troubleshooting Tips


  • LED or Motor Not Working? Double-check your wiring, especially the connections to the Arduino pins and the ground rail.

  • Incorrect Bluetooth Connections? Ensure that the TX and RX pins are correctly connected between the Arduino and the Bluetooth module. You might need to swap them if the communication isn’t working.

  • Simulation Issues? TinkerCAD doesn’t fully simulate Bluetooth communication, so use the serial monitor to mimic Bluetooth control.



Conclusion


You’ve successfully built a basic smart home automation system using TinkerCAD! This project has introduced you to key concepts such as controlling devices via a microcontroller, using transistors as switches, and simulating remote control through Bluetooth. These principles are foundational for developing more complex home automation systems, including those with multiple sensors, security systems, and integration with voice assistants.

TinkerCAD provides an excellent platform to prototype and test your designs, making it a valuable tool for both beginners and experienced developers. With this basic system, you can expand and customize your smart home project to include more devices and features, turning your home into a true smart home.


Happy tinkering!




Order Electronics Projects

Want us to guide you through your project or make the project for you? Click on the button below or reach out to us via Call/WhatsApp at (+91) - 7600948607


You can -


  • Order Basic Electronics Projects

  • Order Embedded Systems Projects

  • Order IoT Projects

  • Order FPGA Projects

  • Order VLSI Projects

  • Order Image Processing Projects

  • Order Matlab Projects

  • Order TinkerCAD Projects

  • Order Proteus Projects


Click on the button below to fill out the project inquiry form -




Create Various Projects

Check out our Free Arduino Projects Playlist - Arduino Projects 

Check out our Free Raspberry Pi Projects Playlist - Raspberry Pi Projects 

Check out our Free TinkerCAD Projects Playlist - TinkerCAD Projects 

Check out our Free IoT Projects Playlist - IoT Projects 

Check out our Free Home Automation Projects Playlist - Home Automation Projects 

Check out our Free NodeMCu Projects Playlist - NodeMCu Projects 


Follow us -


Please do follow us i.e. #learnelectronicsindia to get daily updates about new blogs, videos, courses, products, offers, competitions, quizzes, and Internship Opportunities.




140 views0 comments

Related Posts

See All

Comments


bottom of page