Introduction: NIGHT SENSOR 220VAC

About: designer of circuits and professional electronic projects www.pcbway.com

In this project we will make a sensor that detects darkness and turns on a 220VAC light bulb.

For this project we will see the operation of the LDR, a variable resistance due to light or lighting, at night it behaves with a very high resistance reaching mega OHMS but when it detects light its resistance decreases almost to 0 OHMS, this will allow us to compare those factors and design it for our purpose.

This project has a source on the same PCB so that the electronic circuit works at 5V and has a 220VAC voltage as its input and also as its output to activate the 220VAC light bulb, so we will no longer need an external source for our circuit.


Supplies

Step 1: LDR

Photoresistors or LDR (from the English Light Depending Resistor) are a type of resistor whose value depends on the light they are receiving. It is very small when it receives a very intense light (a few Ωs), and increases in value as the light it receives decreases.

They are typically used in two ways, for an automatic lighting system that turns on when there is little ambient light, or to detect nearby motion if something comes between the light bulb and the photoresistor.

Photoresistors have only two legs, just like normal resistors, so to measure a voltage variation (as we have done with potentiometers) we will have to use a little trick that will serve us for many other things.


Step 2: SCHEMATIC DIAGRAM AND OPERATION

Here we will see the operation by means of a voltage divider between the resistor R1 and the LDR through these two resistors we will detect a positive current and a negative current.

When there is darkness, a positive current will reach the base of the transistor, activating the RELAY and the 220VAC bulb.

When there is light, a negative current will reach the base of the transistor, deactivating the RELAY and therefore the relay and the 220VAC bulb do not work.


Step 3: ELECTRONIC COMPONENTS

·        SOURCE AC/DC MODULE POWER 220VAC/5VDC 1st

·        1 BJT TRANSISTOR 2N2222A

·        1 RESISTOR 10K 1/2W

·        1 LDR

·        1 DIODE 1N4148

·        1 RELAY 5VDC

·        2 TERMINAL BOARDS 10A

·        1PCB


Step 4: CIRCUIT CHARACTERISTICS

·        VIN 220VAC

·        Output voltage 220VAC

·        1 RELAY output

·        I MAX 100mA

·        light sensitive

·        compact circuit

·        output current 10A


Step 5: PCB Design in EASYEDA

Here we will see the pcb design in the easyeda software and the 3D image of the PCB.

Step 6: PCBWay

10pcbs at $5 order them here www.pcbway.com

We thank PCBWAY for the professional pcb they provide us for this project.

GERBER PCB:

https://mega.nz/file/TAJiwBoR#ieUGTWDcIDeq_7zmVIWP0q5XLchCSXx414hANio7L2Y