1

While reverse engineering a garden twilight switch I frowned upon the fact that there is no positive feedback for the OPAMP. Rather than that I found a simple top detector D7/C5/R5 to drive the output transistor. When it gets dark very slowly, the output will very likely get very unstable with an ever so slight variation in light. The D/R/C combination will attempt to smoothen that to drive the transistor and in turn the relay.

What would be the design consideration for this set up rather than having a large feedback resistor from OPAMP output to its non-inverting input, effectively introducing a slight hysteresis.

In other words the question is: Why the peak detector config rather than a hysteresis, what is the advantage of that config?

Maybe good to know is the fact that 24V is derived from a capacitive "power supply", with a 24V zener and a 470µF buffer cap. It is not a "hard" 24V.

schematic

simulate this circuit – Schematic created using CircuitLab

jippie
  • 33,033
  • 16
  • 93
  • 160

3 Answers3

1

In this configuration they are using the op-amp as a comparator.

When it gets dark enough the LDR resistor gets higher which drops the voltage on the minus Pin of the OP_AMP. When it drops below the reference voltage from the other side of the bridge, the Op-Amps output goes to near the battery level, driving on the transistor on.

The RC circuit R9 and C6 form an integrator with a long time constant ~40seconds that stops small variations in light from causing the sensor to switch on and off around the ambient light transition time.

The op-amp is used this way to provide high impedance inputs that do not disturb that sensing bridge circuit.

However, the circuit could use some hysteresis. If it were me I would have added a positive feedback resistor in there from the output to the plus pin to shift the voltage on R7 up when the op-amp switches. Maybe 200K.

Why they used the peak holder in there instead of hysteresis is a good question... But then again, I have had some junior engineers that could never quite figure out how to do hysteresis...

However, it may also be thy wanted the circuit to turn on and off close to the same light level, which they thought would not be the case with hysteresis.

Trevor_G
  • 46,364
  • 8
  • 68
  • 151
  • 1
    yes the problem may be the 24V ripple voltage affects on weak relay driver currents will cause line chatter on contacts. – Tony Stewart EE75 Mar 31 '17 at 20:04
  • What do you mean by "line chatter on contacts"? @TonyStewart.EEsince'75 – jippie Mar 31 '17 at 20:14
  • If capacitive "power supply" has ripple voltage and driver current slowly rises the contacts could vibrate when closed at the line ripple frequency. It is a question of how much hysteresis is designed into relay coil spring vs how much ripple voltage on 24Vdc . so depending on relay could vibrate or simply close with weak chatter on contacts, rather than a solid click. If driving dips voltage on 24Vdc then this acts as negative feedback and reduces mechanical positive feedback, So the design depends on hysteresis in the relay and stability of Cap DC supply – Tony Stewart EE75 Mar 31 '17 at 20:19
  • @Trevor that was pretty much my thought. Being a cheap consumer grade piece of electronics it may be designed by an apprentice, although the 230VAC part looked pretty well designed with X2 caps, power resistor and proper distances on the PCB. – jippie Mar 31 '17 at 20:21
  • Often these problems can be explained by Relay substitution from buyer cost reductions, Relay hysteresis is normally 50% minimum, and maximum 18.0 (must ON) , (must OFF) 2.4 but may switch anywhere in between – Tony Stewart EE75 Mar 31 '17 at 20:22
  • @TonyStewart.EEsince'75 all good points. I have no idea what it has to do with the question though... – Trevor_G Mar 31 '17 at 20:26
  • 1
    The design was critical about lack of electrical hysteresis but ignored the inherent mechanical hysteresis of better relays. – Tony Stewart EE75 Mar 31 '17 at 20:27
  • Yes indeed @TonyStewart.EEsince'75 – Trevor_G Mar 31 '17 at 20:28
  • @TonyStewart.EEsince'75 added link to the relay datasheet. http://pdf1.alldatasheet.com/datasheet-pdf/view/451826/MACOM/SRUDH-SS-112D1.html – jippie Mar 31 '17 at 20:31
  • can you make it chatter? – Tony Stewart EE75 Mar 31 '17 at 20:42
  • if so, then assuming perfect smooth DC base drive the %ripple in the 24Vdc is greater than the % hysteresis in the relay or otherwise, there is a midpoint in the relay motion where the spring deflection has a deadspot (quality issue) and thus the hystereis is reduced by the lack of gain and becoming linear.. – Tony Stewart EE75 Mar 31 '17 at 21:09
1

What would be the design consideration for this set up

I suppose to create more stability when LDR1's value goes low suddenly. But R4/C5 is so low it isn't going to help much.

the first line of defense against transients is in LDR1/R9/C6. D7/C5 doesn't add much.

dannyf
  • 4,272
  • 1
  • 7
  • 9
1

Hysteresis would be a good thing as others have stated .It is best to not rely on the relay for this.I never do because when I design a circuit I want the customer to have flexibility when it comes to relay purchase.So it is agreed that it is best to give the relay a defined clean on/off voltage .If there is no time constant then it is plausible that say a tree blowing in the wind could make the relay do lots of cycles and wear out early.The calculated relay life of a cheap relay can easily be 25 years+ when the switching occurs on/off for day night .If the time constant is not present then some installs may die young .Sure the LDR is slow but not slow enough to ensure good relay life on all installs .The time constant circuit design is not stunningly elegant but I think you should tart it up so time constant is still present.Another reason to keep some time constant despite adding hysteresis is that some lamps die young when being switched on and off all the time .

Autistic
  • 14,235
  • 2
  • 27
  • 65