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.

LDR Switch

Status
Not open for further replies.

axro

New Member
I want to have an LDR Switch on about 500mA worth of LED's when a room gets dark. This is the circuit I found:

opamp46-gif.36326


What are RF and R4 for? And can they be left out and have the circuit still function?
 

Attachments

  • opamp46.gif
    opamp46.gif
    8.3 KB · Views: 4,253
i'm not sure about rf but i think r4 is to pull the output of the chip low so when the chip output is on (too bright) it stops the transistor base from being connected to ground thefor not activating the ralay. however when the output is low(off) the base is coonected to ground turning the relay on
 
You don't need the Rf if you want to light up the LED in a dark room/off in lighted ambience.

However, if you want to adjust the brightness of your LED according to brightness of the room, this circuit is for that purpose, hence the RF is to attenuate your voltage from the divider between the LDR and VR1. This is quite difficult to achieve since the transistor is current controlled, unless you're using MOSFETs.

R4 is to provide virtual grounding for the signal coming out from the op-amp, I suppose. I think it can be omitted.
 
i'm not sure about rf but i think r4 is to pull the output of the chip low so when the chip output is on (too bright) it stops the transistor base from being connected to ground thefor not activating the ralay. however when the output is low(off) the base is coonected to ground turning the relay on
I think you have it backwards. When the comparator output is low, the transistor should be off.

I think the +/- signs of the comparator are reversed, and Rf is meant to provide hysteresis so the relay doesn't chatter when the light intensity is near the switching threshold.
 
You don't need the Rf if you want to light up the LED in a dark room/off in lighted ambience.

However, if you want to adjust the brightness of your LED according to brightness of the room, this circuit is for that purpose, hence the RF is to attenuate your voltage from the divider between the LDR and VR1. This is quite difficult to achieve since the transistor is current controlled, unless you're using MOSFETs.

R4 is to provide virtual grounding for the signal coming out from the op-amp, I suppose. I think it can be omitted.

Not to nitpick, but "as stated" this is incorrect. The brightness of his LEDs will be unaffected by the circuit. The "responsiveness" of the comparitor to light input, however, can be adjusted.

The brightness will be unaffected because the output is a relay switch closure. His LEDs will not be analog, they will have two states ON/OFF.
 
Rf does the function of a 'schmit trigger' which prevent the op-amp from oscillating when the inverting and non inverting inputs become equal. u don't need it as long as u dont want to use a relay. as for R4, i helps to keep the base or the transistor down untill the output goes high u can avoid it if u dont want to apply it to other sensitive circuits.
 
So R4 should be a very high value resistor?

So how does RF work exactly? Does it just add some extra current to the base or how exactly does it help? I"m not saying I don't want to use, I would just like to know how it works.
 
So R4 should be a very high value resistor?

So how does RF work exactly? Does it just add some extra current to the base or how exactly does it help? I"m not saying I don't want to use, I would just like to know how it works.
Are you locked in to a particular type of amplifier in the circuit? If so, what is the part number? If not, a comparator will work better.
Post a complete schematic, with component values, if you have one. Otherwise, we can create one for you.
 
Not to nitpick, but "as stated" this is incorrect. The brightness of his LEDs will be unaffected by the circuit. The "responsiveness" of the comparitor to light input, however, can be adjusted.

The brightness will be unaffected because the output is a relay switch closure. His LEDs will not be analog, they will have two states ON/OFF.

I was mistaken. I thought the LED was driven by the transistor. No hard feelings though. ;)
 
Are you locked in to a particular type of amplifier in the circuit? If so, what is the part number? If not, a comparator will work better.
Post a complete schematic, with component values, if you have one. Otherwise, we can create one for you.

All I'm sure of is the Op-amp I have is a TL081. As for values I haven't sat down and figured themout yet. Just in the planning/learning phase right now.
 
Could anyone explain the concept of Input Offset Voltage. I was looking at the TL081 Datasheet, and I've read a little about it online, but I don't quite grasp it.

Is the offset voltage part of what makes negative feedback work on an opamp?
 
Last edited:
Could anyone explain the concept of Input Offset Voltage. I was looking at the TL081 Datasheet, and I've read a little about it online, but I don't quite grasp it.

Is the offset voltage part of what makes negative feedback work on an opamp?
No, offset voltage is a measure of the imperfection of the op amp. Ideally, it is zero. Input offset voltage is the differential input voltage required to make the output voltage equal zero.
To learn about negative feedback, see the .
 
So if the differential is 3mV to get the output to a true 0V you would need one input to be say 5V and the other to be 5.003V?
 
So if the differential is 3mV to get the output to a true 0V you would need one input to be say 5V and the other to be 5.003V?
Yes. Keep in mind that the datasheet spec is for the maximum you might expect from any part. If the spec is ±3mV, it could be anywhere in between. For your circuit, input offset voltage is irrelevant.
 
Last edited:
The (+) and (-) inputs of the opamp are drawn backwards. Rf is supposed to provide positive feedback, not negative feedback. When the LDR is dark and a high resistance then its voltage is low and you want you want the (+) input to be low to turn off the transistor and relay.
Rf provides a "snap action" when the circuit is at its threshold voltage.
R3 and R4 form a voltage divider to reduce the output-low voltage of +1.2V of the opamp to below +0.4V so the transistor can turn off.
 
The (+) and (-) inputs of the opamp are drawn backwards. Rf is supposed to provide positive feedback, not negative feedback. When the LDR is dark and a high resistance then its voltage is low and you want you want the (+) input to be low to turn off the transistor and relay.
Rf provides a "snap action" when the circuit is at its threshold voltage.
R3 and R4 form a voltage divider to reduce the output-low voltage of +1.2V of the opamp to below +0.4V so the transistor can turn off.

Just curious, where do you come up with the 1.2V?
 
The minimum output voltage of most opamps is 1.2V above the negative supply voltage that is 0V in this circuit. A "rail-to-rail" opamp has outputs that go to 0V and to the positive supply voltage when the load current is very low.
 
The minimum output voltage of most opamps is 1.2V above the negative supply voltage that is 0V in this circuit. A "rail-to-rail" opamp has outputs that go to 0V and to the positive supply voltage when the load current is very low.

Is that value listed in the datasheet somewhere?

So you are saying, that if my positive supply is 5V my negative supply is 0V and the inverting input is higher than the noninverting my ouput will be 1.2V and not 0v?
 
Tell us the part number of your opamp and I will show you in its datasheet where it shows its max output low voltage.

The lousy old 741 opamp is still popular. On the datasheet for the MC1741 (single 741 opamp) and MC1458 (dual 741 opamp) it shows a max output low voltage that is 4V above the negative supply voltage and shows a graph of the typical output low voltage of 2V above the negative supply voltage.
 

Attachments

  • MC1458 output low voltage.PNG
    MC1458 output low voltage.PNG
    16.8 KB · Views: 478
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top