Author Topic: Comments on simple night light circuit using LDR and RCWL-0516  (Read 820 times)

0 Members and 1 Guest are viewing this topic.

Offline YurkshireLadTopic starter

  • Frequent Contributor
  • **
  • Posts: 365
  • Country: ca
I've been trying to create a circuit that combines an RCWL-0516 and a photoresistor to create a simple night light. I wanted to design it without using a microcontroller because this is more fun. I think I could solder the photoresistor to the RCWL-0516 but I want to modify the circuit later to use the RCWL-0516's output for something else. And this way is more fun, which is the whole point of this learning experience! This would sit on a window ledge in my dining room and point outside to light up the area between my house and my neighbour's house. If I ever manage to build it!  :-/O

Anyway, this is the most complicated thing I've tried to build and it seems to work well. I'm using a 555 in re-triggerable monostable mode, to keep the LED lit for about 25s. I don't have a bright LED, only the cheapy ones used as status lights but if I do build this, I'll get one later.

R8 could probably be reduced to 1k as I think, from memory, the output of the RCWL-0516 is less than 20mA. Maybe even less than 10mA, I'll have to check the datasheet someone here posted the other day. I just noticed that the +5V supply for RV1 hasn't been changed to use the net label (terminology?), so I'll fix that.

I'd appreciate any comments and suggestions. Thanks!
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 5880
  • Country: de
Re: Comments on simple night light circuit using LDR and RCWL-0516
« Reply #1 on: April 27, 2022, 11:41:45 pm »
You seem to be building a multivibrator:
1: Dark: LDR detects this and turns on the light. Now it's bright.
2: Bright: LDR turns off the light. Now its dark.
3: goto 1

 

Offline YurkshireLadTopic starter

  • Frequent Contributor
  • **
  • Posts: 365
  • Country: ca
Re: Comments on simple night light circuit using LDR and RCWL-0516
« Reply #2 on: April 28, 2022, 12:08:30 am »
Well yes, but the LED only comes on when it's dark and motion is detected.

I forgot to say I don't know if I have an AND gate. I thought I did but I'm not sure where it is. That would replace the NOT and NOR gates and get rid of R5.
« Last Edit: April 28, 2022, 12:10:31 am by YurkshireLad »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12864
Re: Comments on simple night light circuit using LDR and RCWL-0516
« Reply #3 on: April 28, 2022, 12:23:16 am »
While you could fit a photosensor to the RCWL-0516, you can also add one externally, pulling its 'CDS' pin low, which also lets you add a pullup resistor to its 3.3V pin to reduce light sensitivity.  The CDS pin can also be driven as an active high enable pin for the module.  Alternatively you could have used the photosensor to pull the 555's RESET pin low disabling it, or if you wanted a fully adjustable light threshold, used the comparator output to either disable the module or the 555.

Therefore the TTL logic is IMHO superfluous.  If disabling it via Reset doesn't produce the function you require (as once RESET is released, it would run one timing cycle before being ready for TRIGGER) it could be retriggered by resetting it, with Trigger fed from RESET via a small RC delay.  Inhibit it when not dark by holding TRIGGER high

The circuit round the 555 looks somewhat peculiar.  I suspect Q2 is either redundant or could easily be made redundant.  Is it there to make it retriggerable?

Also there is nothing limiting the current sunk by DISCHARGE at the end of the timing interval, which could result in premature failure of the 555.   
I hope you are using a CMOS '555' as a bipolar NE555 or direct equivalent is marginal at only 5V Vcc without decoupling (its min. rated operating voltage is 4.5V, and it typically pulls a current spike of around 100mA when its output transitions, which could easily cause a Vcc dropout).

« Last Edit: April 28, 2022, 12:47:55 am by Ian.M »
 
The following users thanked this post: YurkshireLad

Offline YurkshireLadTopic starter

  • Frequent Contributor
  • **
  • Posts: 365
  • Country: ca
Re: Comments on simple night light circuit using LDR and RCWL-0516
« Reply #4 on: April 28, 2022, 12:41:26 am »
Thanks. It'll take time for me to understand everything you wrote.  :)
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3036
  • Country: us
Re: Comments on simple night light circuit using LDR and RCWL-0516
« Reply #5 on: April 28, 2022, 01:06:32 am »
About R-CDS... this page describes how to use the CDS pads to enable dark-only operation:

https://www.biomaker.org/block-catalogue/2021/12/17/radar-proximity-sensor-rcwl-0516

Quote
The RCWL-0516 also support an optional cadmium disulphide light-dependent resistor (LDR) to allow the device to operate only in darkness. This can be very useful in light control applications. The light dependent resistor (LDR) can be attached to the “CDS” pins. The LDR can actually be hooked up two ways: (i) Using the two CDS pads on the top of the sensor printed circuit board. (ii) By connecting one end to the CDS pin on the main terminal section and the other end of the LDR to ground. The light sensor will disable the device when it detects ambient light. You may also use the CDS pin as an Enable control for the module.

Pin 9 is pulled up (=output enable) by a 1M resistor. Attaching the optional CDS LDR will pull pin 9 down (=output disable) when it is light (i.e. the LDR's resistance drops below ~269k assuming no resistor R-CDS installed). R-CDS allows you to add a resistance in parallel with the onboard 1M pullup to adjust the light level at which pin 9 is pulled <0.7V.
 

Offline themadhippy

  • Super Contributor
  • ***
  • Posts: 2583
  • Country: gb
Re: Comments on simple night light circuit using LDR and RCWL-0516
« Reply #6 on: April 28, 2022, 01:17:47 am »
Quote
I forgot to say I don't know if I have an AND gate.
no need to buy an AND gate,you can build one using  3 of the 7402 NORs,and still have  a NOR  left if you need a NOT.
 

Offline YurkshireLadTopic starter

  • Frequent Contributor
  • **
  • Posts: 365
  • Country: ca
Re: Comments on simple night light circuit using LDR and RCWL-0516
« Reply #7 on: April 28, 2022, 01:27:01 am »
I want to use an external LDR to also give me the option of knowing when there is motion during the day.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf