How to make a home automation system with Raspberry Pi Pico board

How to make a home automation system with Raspberry Pi Pico board

Hello and welcome back. In this project, we will learn how to make a home automation system with a Raspberry Pi Pico board. For that, I mainly used Bluetooth technology. That is, I used the HC-05 Bluetooth module. Also, we can easily control this system using our “SriTu Hobby” app. You can download it on the play store. Through this system, you can control any electrical devices in the house.

In this project, I used a two-channel relay module. But you can use any other relay module for this project. It depends on your home’s requirements. You should be careful when using relay modules.

  • If you want to learn more info about the HC-05 Bluetooth module, and how to do this project with Arduino, please use this link.

OK, let’s do this project step by step. The required components are given below.

Step 1

Firstly, identify these components.

Step 2

Secondly, place the Raspberry Pi Pico board on the breadboard as you like. And then, connect the power pins to the breadboard.

Step 3

Thirdly, place the Bluetooth module on the breadboard and connect it to the Raspberry Pi Pico board. Use the circuit diagram below for that.

How to make a home automation system with Raspberry Pi Pico board

Step 4

Now, connect the relay module to the Raspberry Pi Pico board.

Step 5

Next, connect this project to the computer. And then, copy and paste the following script to the Thonny IDE,

  • Full details of this project — Download
# Include the library files
from machine import UART,Pin
from time import sleep

# Set the relay pins as output pins
relay1 = Pin(2,Pin.OUT)
relay2 = Pin(3,Pin.OUT)
uart = UART(0, 9600)

relay1.on()
relay2.on()


while True:
    if uart.any():
        value = uart.readline()
        print(value)
        
        if value == b'A':
            relay1.off()
        elif value == b'a':
            relay1.on()
        elif value == b'B':
            relay2.off()
        elif value == b'b':
            relay2.on()     

Step 6

Now, save this script on the Raspberry Pi Pico board as “main.py”. And then, click the run button.

Step 7

Ok, now let’s set up the SriTu Hobby app. For that follow the steps below.

  • First, download and install the SriTu Hobby app on your smartphone. It’s included in the play store.
  • SriTu Hobby —Download
  • And then, click the control button. After, click the “Home Automation button” and turn on Bluetooth.

  • Next, click the gear wheel icon and find your device. For that, you need to enable location and location permission.

  • Finally, select your device name. Now you can operate your relay using this dashboard.

Ok, enjoy this project. The full video guide is below. So, see you in the next project or tutorial.

How to make a home automation system with Raspberry Pi Pico board

2 thoughts on “How to make a home automation system with Raspberry Pi Pico board”

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart