Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] light and motion activated lamp using LDR and PIR sensors

Status
Not open for further replies.

KhaledOsmani

Full Member level 6
Joined
May 4, 2014
Messages
384
Helped
1
Reputation
2
Reaction score
1
Trophy points
18
Activity points
3,933
Hello,

I want to make a circuit that does the following:
1) When there is complete darkness (regardless of the sensitivity) I want to actuate relay R1 (12VDC coil)
2) If still there is darkness, (R1 is ON), and there is a motion (detected by a PIR), I want to actuate relay R2 (12VDC coil).
3) When R2 is actuated, and hence NO becomes NC, I want to light a small bulb for a certain delay dictated by the PIR sensor it self.

The purpose of such circuit, is, when you are sleeping, and urgently woke up to do something, there would be a helping light. Or if a visitor entered, and does not know where the bulb switches are, the light will help him for few seconds so he can discover the room.

No digital programming/microcontroller is intended to be used.

Here is the circuit:




All components are clear, except for the PIR, it must have a 5VDC as input, delivered by the 7805 regulator.

When soldered the circuit no problem existed, so I manipulated the sensitivity of the LDR, using the 100K pot, and switched lights off, to a complete darkness. R1 got actuated, and since I was near the PIR sensor, R2 was also actuated. You can set the sensitivity level, and output duration using two screws on the sensor it self.

The weird thing, when lights are off, and motion is detected, instead of having the bulb (LED bulb operated under 220VAC) normally glow for duration regulated from within the sensor, it starts flickering repeatedly, as ON/OFF, and so on.

Before asking what is the problem and how the circuit must be justified, from the PIR datasheet, it says that when connected to a power source, and detected motion the user must wait for 1 or more minutes in order for the sensor to stabilize. If this is the only problem, how can I minimize the "startup" time for the sensor or neglect it (please don't tell me I have to remove caps and re-solder other ones).

Thanks in advance

- - - Updated - - -

Added: the flickering light is caused by repetitive on/off of the relay at ms between each turn.

When no bulb is connected this does not happen. i.e the relay doesn't excessively turn on and off
 

When no bulb is connected this does not happen. i.e the relay doesn't excessively turn on and off

Chattering relay can happen because of drooping power supply voltage. The voltage is normal with light or no load. It might help to use a separate power supply for the load. Or, rework the supply to the sensing circuit so it is regulated and at lower amplitude.
 
Hello Brad,

It might help to use a separate power supply for the load. Or, rework the supply to the sensing circuit so it is regulated and at lower amplitude.

Are you saying that the input for the 7805 regulator, after the R1 N.O must be from another 12VDC source?
 

Added:
I placed a unique power source for the load relay with GND connected to the first other source to see if chattering vanishes. Same result occured.

I also connected two electrolytic caps of 100uF, first across relay coil, second between base point of the BJT and GND. Also same results occured.



Note: the bulb is of 15W only and 12VDC relay supports 10amps at 250VAC.

Any clues?

Thanks
 

Are you saying that the input for the 7805 regulator, after the R1 N.O must be from another 12VDC source?

You can use a single 12V source eventually, but only after you succeed at stabilizing all sections of your circuit.

This simulation illustrates my suggestion in post #2 (in case the problem is a drooping 12V supply). It's a familiar zener regulator. It serves to isolate a section of circuitry which requires a stable power supply.

5630055700_1485125240.png


Loads do not necessarily need regulation. Regulation is not needed for the relay coils, nevertheless you should check the current draw of the relay coils. It's probably a few tens of mA. Not a lot but together they could create odd drops in the supply voltage, depending on how robust your 12V supply is.

By the way, could your lighting arrangement cause the following?
1) light turns on,
2) illuminates photosensor,
3) causing light to turn off,
4) darkness causes circuit to activate,
5) causing light to turn on.
>> Indefinitely?
 
You will need a delay and some lock-out to prevent chatter in your design.
 
Could it be that, when the light turns on, you momentarily "blinds" the photocell?

Do an experiment: cover your lamp, such that only a very minute amount of light comes out (so you can detect it).
 
Hello all

Thanks for replying.

The problem was as you mentioned, the light activated by the two sensors, momentarily blinds the photocell causing a yoyo effect.

If you have no other comments, the circuit is done.

Thanks again
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top