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.

Programming LDR

Status
Not open for further replies.

moonstreat

New Member
I bought an LDR light sensor, and called an LED ..

When it's dark, the LED is off;
When it is light, the LED is lit;

I wanted the opposite, ie, when the dark had LDR sensor used to activate the LED, and when the light emitted in the LDR LED would be deleted ..


Know if there is no way of programming to do this project?
 
Not without knowing what LDR light sensor you have.
 
is my sensor:

168-ldr.jpg
 
I don't really understand what you're asking. Do you just want the LED to come on when it's dark and go off when it's light, or does the light coming out out the LED have to be sensed by the LDR and the circuit react to it? Can you please clarify or post a schematic?
 
Are you just connecting the LDR in series with the LED? If yes, then because the LDR's resistance decreases with increasing illumination, then the LED will turn on when light falls on the LDR. It would take the addition of a transistor and some other components to "invert" the function.
 
Course mikeML ! that's right, I just want to turn on the LED when the LDR is in the dark!


Can you give me a scheme that spoke?
 
**broken link removed**

its working.
in dark relay is on and lamp is working
in light lamp is not working

BUT u must use relay's NC pins for ur idea.
NC = close in normal
 
Last edited:
Cordelian, are you sure that this system works? I'll risk it and I even use!

My goal is to simulate the activation of the lights of a car, when it is used at night!

think I'll bet your circuit! ;)
 
:) i said it in theory i didnt try it.Its basic circuit.
try it in proteus its files links
**broken link removed**
 
Last edited:
To do a detailed design, I would need to know the resistance curve of the LDR. This shows the idea, but the actual resistor values would depend on your LDR, Battery voltage, and LED. The plot shows LED current vs LDR resistance.
 

Attachments

  • Draft53.png
    Draft53.png
    28.8 KB · Views: 543
MikeML, I'll feed the LDR to 5V because it is the tension that the LED can stand

The LED doesn't care what the supply voltage is as long as it has the correct current-limiting resistor in series with it. Look at R1 in my circuit. It limits the current to 18mA.

Here is a modified circuit that starts with a supply voltage of 5V. I still need to know the resistance of the LDR when it is in dim light.
 

Attachments

  • Draft53.png
    Draft53.png
    30.3 KB · Views: 253
Last edited:
Your circuit seemed to me simple and functional, just did not realize where I turn on the lamp! : S

is in D1??

D1 is the Light Emitting Diode (Red is modeled). The plot shows current through the LED (Y axis), which controls its brightness, as a function of LDR resistance (X axis).
 
The resistance of LDR is 100 ohms

Need more info:

LDR resistance in total darkness?
LDR resistance at the illumination level when the LED starts turning on?
LDR resistance in bright light?
 
The current to rise, the resistance goes up, the farm business! then this circuit is for what I precizē? just make these connections, and connect the LED on the site of the D1 component in the circuit?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top