Automatic Staircase Lightning

Embed Size (px)

Citation preview

  • 8/9/2019 Automatic Staircase Lightning

    1/23

    DIY- PIR Based Automatic Staircase LightingCOST- 250

    This tutorial will teach you how to make the simplest motion detecting staircase light without anyneed of any additional microcontroller and programming using PI !ased Sensor"

    #read!oard Setup for $utomatic Staircase %ight"

    Required Components:

    &" PI sensor

    2" &'( ))0 ohms esistors

    )" &2* SP+T elay module or a" &2* SP+T elay

    !" &k( ))0 ohms esistors

    c" &, 00. +iode

  • 8/9/2019 Automatic Staircase Lightning

    2/23

    d" #C5 . Transistors

    e" %/+

    " #ul! with !ul! holder 1attage and type of !ul! is of your choice

    5" 2 pin male plug

    3" 1ires

    ." &2* adapter

    4" emale +C 6ack

    7" Plastic !o8

    About PIR Sensor

    Passi9e Infrared sensors !asically measure the Infrared light radiated !y an o!6ect present in its :eld"$ll li9ing creatures and o!6ects with a temperature a!o9e a!solute ;ero which is 0 'el9in or -2.) oCemit heat energy in form of radiation" The PI sensors are tuned in such a way that they detect onlythe radiation emitted !y human !eings"

    To know more a!out how it works go to this link< =ow PI Sensor works

    =ere the sensor would help in detecting the human presence mo9ing on the stairs"

    emem!erake sure they !oth are set to high since we would re?uire the PI to!e ?uick and also keep the light in O, state for a longer duration Imagine the light going O midway!efore the person ascends@descends the stairs completely" Aou wouldnBt want that to happen wouldyou

    About Rela s

    http://www.engineersgarage.com/electronic-components/transistor-bc547-datasheethttp://www.engineersgarage.com/electronic-components/transistor-bc547-datasheethttp://www.engineersgarage.com/insight/how-motion-pir-sensor-workshttp://www.engineersgarage.com/insight/how-motion-pir-sensor-workshttp://www.engineersgarage.com/electronic-components/transistor-bc547-datasheet
  • 8/9/2019 Automatic Staircase Lightning

    3/23

    The switches at our home need to !e operated manually !y hand or Dmechanically triggeredE in orderto work" If we need to control the switch using a microcontroller or electronic circuit( we would re?uiree8tra mechanical arrangements like a ser9o with an arm( to press the switch" Instead of !uilding suchcomplicated arrangements we can go with a relay" These can directly !e controlled !y electricalmeans"

    1orking of elay

    The a!o9e shown diagram is of a SP+T S ingle P ole Dou!le ! hrow elay" It consists of 5 terminals" Two of them are from the coil where the input to dri9e the relay is supposed to !e gi9en" The otherthree are ,O " ormally # pen ( ,C " ormally C losed and CO> Com mon "

    1hen no input is gi9en to the coil( there is no magnetic :eld produced" So the D,CE and DCO>Eterminals are connected and the D,OE terminal is left free"

    http://www.engineersgarage.com/insight/how-relay-switch-workshttp://www.engineersgarage.com/tutorials/introduction-to-different-types-of-relayshttp://www.engineersgarage.com/tutorials/introduction-to-different-types-of-relayshttp://www.engineersgarage.com/insight/how-relay-switch-workshttp://www.engineersgarage.com/tutorials/introduction-to-different-types-of-relays
  • 8/9/2019 Automatic Staircase Lightning

    4/23

    1hen the input is gi9en( the current Fowing through the coil produces magnetic :eld #asic physicsand thus attracting the le9er( which !reaks the connection !etween DCO>E G D,CE and makes aconnection !etween DCO>E G D,OE terminals"

    ree-wheeling diode

    There is a pro!lem in connecting a relay directly to an electronic circuit" 1hen the input power issuddenly remo9ed to switch O the relay( a 9oltage spike occurs due to the presence of the inducti9eload The coil inside the relay is an inductor right " This 9oltage spike can permanently damage theelectronic circuit to which the relay is connected to" $nd thus we re?uire a diode"

    $ diode connected in re9erse !ias with respect to the input supply( will pre9ent the 9oltage spikeproduced !y the relay when the supply is suddenly switched O from reaching the other part of the

    control circuit"

  • 8/9/2019 Automatic Staircase Lightning

    5/23

    ,e8t( we need something to supply enough current to the relay input so that it doesnBt tripune8pectedly" So we use a transistor in !etween microcontroller and relay" $nd the circuit !ecomes likethis

  • 8/9/2019 Automatic Staircase Lightning

    6/23

    ,ote< Aou can !uy relay modules which come with the a!o9e re?uired circuit in-!uilt" This is what itlooks like

  • 8/9/2019 Automatic Staircase Lightning

    7/23

    I couldnBt get a single relay module so IBm using a 2 elay module which looks like this

  • 8/9/2019 Automatic Staircase Lightning

    8/23

    It consists of following features>O, and ,O >$%%A OP/,terminals of the relay"

  • 8/9/2019 Automatic Staircase Lightning

    14/23

    Once you are done with testing on !read!oard( start soldering on PC# "

    Take some male headers and solder them onto a small PC#( followed !y the wires coming from PIsensor and the power supply wires"

    http://www.engineersgarage.com/articles/printed-circuit-boards-pcb-design-manufacturinghttp://www.engineersgarage.com/articles/printed-circuit-boards-pcb-design-manufacturing
  • 8/9/2019 Automatic Staircase Lightning

    15/23

    ind an appropriate enclosure to accommodate the PI sensor and relay module" emem!er that thePI sensorBs lens should !e out"

  • 8/9/2019 Automatic Staircase Lightning

    16/23

    >ark the area to !e cut for letting out the sensorBs lens out of the !o8"

    Try :tting it normally and incase if it doesnBt stay :t( use hot glue to stick the sensor

  • 8/9/2019 Automatic Staircase Lightning

    17/23

    Place the relay module@ your own made relay circuit into the !o8 and mark the place where it should!e placed"

  • 8/9/2019 Automatic Staircase Lightning

    18/23

    Jse nuts and !olts to :8 the relay into the !o8" Then mark and cut the place where the screw terminalsare 9isi!le" This is to let in the $C wires for connecting to the relay terminals"

  • 8/9/2019 Automatic Staircase Lightning

    19/23

  • 8/9/2019 Automatic Staircase Lightning

    20/23

    $lso make a hole at the !ottom opposite to the relay !oard to let out the +C power supply wire"

    Place e9erything inside the !o8 neatly( connect all the wires and pull out the power supply wiresthrough the hole"

  • 8/9/2019 Automatic Staircase Lightning

    21/23

    Solder the female +C 6ack to the power supply wires" #e 9ery careful with the polarity"

    ,ow connect the $C wires to the relay terminals through the holes" Plug in the &2* adapter to the +C 6ack"

  • 8/9/2019 Automatic Staircase Lightning

    22/23

    ThatBs itK Aou are ready with your de9ice" ,ow place the de9ice at such a place that the motion sensorgets triggered whene9er someone ascend or descends the stairs"

    or e8ample( the staircase at my home is at right angle and so I placed the sensor and light near the!end so that the sensor co9ers ma8imum distance" =a9e a look at it

  • 8/9/2019 Automatic Staircase Lightning

    23/23

    &ideo: