Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Dark detector

Status
Not open for further replies.
To help you debug it, I labeled all of the nodes in the circuit, and did two .DC simulations with the LDR dark >100KΩ (first set) and with the LDR fully illuminated <10KΩ (second set). I printed out both sets of expected node voltages so that you can compare to what you are getting. I think you have a bad transistor somewhere? Comparing your circuit voltages to what I just posted should help in figuring this out.

Since you are not using the relay I expected you to use (you keep changing things that are important without telling me), then make R5 about twice to three times whatever the resistance of the 12V relay coil is. If you are not using a 12V relay (but some other voltage), that changes how the relay is driven.

Mydark.gif


Mylight.gif


For example, look at V(c1), the collector voltage for transistor Q1, in both the dark and light tables. Note that it switches from completely off V(c1)=23.99V to completely on V(C1)=0.05V
 
Last edited:
Working on it too . I have changed transistors ,checked them etc to no avail I still get the relay ON and collector voltage on Q2 of 21 Volts base and emitter both 21 also and the trany is good . Its a lead anyway. Might remake and try again

I do tell you of changes but I suspect you read the email message rather than the post itself and I make many edits to my posts as I said above. Anyhow let the air at them it stops the fungus growing!

EDIT --Got it thanks Mike .
turned out I had no 10k resistors so I used 2 x 12 K's .Just a voltage divider I thought but the LED runs through there too and I altered the balance I expect. Reduced both to 8.2K and away it went. Perhaps it needed more current flow for the tranys I used .Now to get the second running and install them both .

It seems much better on the adjustment.Can get up close to twilight
 
Last edited:
I received a PM asking for a 12V version of the circuit I posted back in #18 of this thread. Here it is.

The resistance of the simulated LDR (R2) is plotted as the green trace. The resistance of R2 in kΩ is proportional the voltage in kV. The red trace shows the current through the 12V relay coil. Note that with the setting of the trimpot shown (R2=90kΩ), the relay picks up as the LDR resistance increases through ~30kΩ, and drops as the LDR resistance decreases through ~18kΩ. Changing R2 effects the primarily the LDR resistance when the relay trips. R6 effects the amount of hysteresis.

39a.gif
 
I received a PM asking for a 12V version of the circuit I posted back in #18 of this thread. Here it is.

The resistance of the simulated LDR (R2) is plotted as the green trace. The resistance of R2 in kΩ is proportional the voltage in kV. The red trace shows the current through the 12V relay coil. Note that with the setting of the trimpot shown (R2=90kΩ), the relay picks up as the LDR resistance increases through ~30kΩ, and drops as the LDR resistance decreases through ~18kΩ. Changing R2 effects the primarily the LDR resistance when the relay trips. R6 effects the amount of hysteresis.

View attachment 92641
Hi MikeMI,
Quality test of your design has been done just now! :) Wow it's so impressive and I never expected that we can make such non-linear dark detector just using two pieces of general purposes transistor! Before I've seen various comparator based circuits to get non-linear (escaped from relay chattering problem) output. So I was worrying to use any rare (here) comparator ICs! It's mindblowing idea! And not only from 12V, it's working with just 4V too. And at 4V, I used a LED as a load and its ON OFF is looks like digital ON and OFF! I know 2V LED (D2) is doing magic in the circuit, by setting a threshold (Vref) voltage and like a comparator.
Thank you so much!
 
Last edited:
Dear Mike, I think I also can make a good timer just replacing few resistors and using a capacitor for timing, isn't it?
 
I think you may be right . I wonder if I could use a cheap garden solar cell. Don't see why not if I can get one to run the relay current.
The other problem is that I want it to be pretty well dark before it switches on.

Must be a ready made device out there I can just plug in.

There is a good amount of power in a 2"x 2" garden mushroom light. I put 3 cells in parallel to run an electric toy boat it runs all day. If you want it pretty dark before lights come ON use too many solar cells, over kill will make the relay stay on until it is very dark.
 
Here is my first test circuit. This is NOT the one I was discussing earlier as I am still working on it. This one incorporates a combo motion/light sensor to illuminate a bright red led for the duration of time that the motion detector timer is adjusted to. I tested it on a breadboard and it works just as I want it to.
The obvious purpose of this gizmo is to simply provide a visible signal to an observer when motion is detected in the vicinity of the sensor. I tested this circuit with a 12v battery and a high power 3w led with led driver. I will have the correct pieces when they are delivered later today. I like the way the 2N3904 'opens the gate' when current is sent from the sensor and allows the current to flow. I might be starting to get my brain around this thanks to you all. I've been 'electric stupid' my entire life, but am learning a lot.

upload_2017-7-8_16-23-42.png
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top