Lights Control System

0
16
Lights Control System

Recently I was working on understanding Microcontrollers and IOT based devices for Security Research purposes. So, I thought of building a small home automation system for practice. I am yet to complete this, but for startup i’ll be sharing how I used Raspberry Pi 2 and some other electrical components to control my room’s lighting in this post. Also, I will not be talking about Initial setup for Raspberry here, you may find various tutorials for that.

But in this project, I will introduce this docker pi series product to you.

Supplies:

Component List:

  • 1 x Raspberry Pi 3B+/3B/Zero/Zero W/4B/
  • 1 x 16GB Class 10 TF card
  • 1 x DockerPi series 4 Channel Relay Board (HAT)
  • 1 x 5v@2.5A power supply which is from 52Pi
  • 4 x Light strip
  • 1 x DC connector
  • 1 x 12V power supply for the light strips.
  • several wires.

Teacher Notes

Teachers! Did you use this instructable in your classroom?

Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Knowing About DockerPi Series 4 Channel Relay Board

DockerPi 4 Channel Relay is a member of the DockerPi Series,more commonly used in IOT applications.

DockerPi 4 Channel Relay can relay AC/DC, instead of traditional switches, to achieve more ideas. DockerPi 4 Channel Relay can stack up to 4, and can be stacked with other DockerPi expansion board. If you need to run for a long time, we also recommend that you use our DockerPi Power expansion board to provide more power.

NOTE OF CAUTION

Before we proceed further I’d like to WARN you about the DANGER of experimenting with the “Mains Electricity”.If anything goes wrong the worst consequence may be death or atleast burning down your own house. So, please DO NOT ATTEMPT to do anything mentioned in this article if you don’t understand what you are doing or better take the help of some experienced electrician. Lets get started.

Step 2: Features

  • DockerPi Series
  • Programmable
  • Control directly(without programming)
  • Extend the GPIO Pins
  • 4 Channel Relay
  • 4 Alt I2C Addr Support
  • Relay Status Leds Support
  • 3A 250V AC Support
  • 3A 30V DC
  • Can Stack with other Stack board Independent of the mainboard hardware (require I2C support)

Step 3: Device Address Map

This board has seperate register address, and you can just control each relay by one command.

Other Requirements:

  • Basic Understanding of Python or C or shell or Java or any other language (I’ll be using C, python, shell, and java)
  • Basic Understanding of Linux systems
  • Presence of Mind

Now, before moving ahead you’ll need to understand the electrical components we will be using:

1. Relay:

A relay is an electrical device which is generally used to control high voltages using very low voltage as an Input. This consists of a coil wrapped around a pole and a two small metal flaps(nodes) that are used to close the circuit. One of the node is fixed and other is movable. Whenever an electricity is passed through the coil, it creates a magnetic field and attracts the moving node towards the static node and the circuit gets completed. So, just by applying small voltage to power up the coil we can actually complete the circuit for the high voltage to travel. Also, as the static node is not physically connected to the coil there is very less chance that the Microcontroller powering the coil gets damaged if something goes wrong.

Step 4: Connect the Relay to the Bulb Holder Powered by Main Electric Supply

Now to the tricky part, We’ll connect the relay to the Bulb holder powered by Main Electric supply. But, first I want to give you a brief idea about how the lights are switched ON and OFF via direct power supply.

Now, when the light bulb is connected to the main supply, we usually do this by connecting two wires to the bulb. one of the wire is a “Neutral” wire and other one is the “Negative” wire which actually carries the current , also there is a switch added to the whole circuit to control the ON an OFF mechanism. So, when the swith is connected (Or Turned ON) the current flows through bulb and the neutral wire, completing the circuit. This turns the light bulb ON. When the switch is turned of, it breaks the circuit and the light bulb turns OFF. Here’s a small circuit diagram to explain this:

Now, for our experiment, we’

Read More

Leave a reply