Here is my version of a photocell-activated 24V Schmitt Trigger circuit that drives a relay that exhibits snap-on, snap-off.
Note that I able to design and simulate this circuit in LTSpice without having a library of components for a photocell, pot, or relay.
First, this is a
variant of a circuit posted here. I had to make an assumption about the resistance vs illumination curve of your photocell. Without any information from you, I arbitrarily model a photo-resistor that has a resistance of about 11KΩ when illuminated at the level where you want the relay to pull-in. If yours is radically different, you can play with R2 in my schematic to change the trip point.
Note how I simulate the varying resistance of the photo-resistor R1: I create an artificial voltage source V2 that varies linearly with time, creating a voltage that goes from 8V to 15V and back again. The resistance of R1 is the function
1000*V(Rt) which makes the simulated photo-resistor go from 8KΩ to 15KΩ and then back down again over 200 seconds (arbitrary time scale).
R1 is ratio-ed against R2 to create a voltage divider, where V(t) decreases with increasing illumination. Q1 turns on when V(t) is > V(ref) +0.65V.
I use R3 and D1 for two reasons. It is an indicator that the 24V is present and I use the voltage at its anode V(ref) as a reference voltage =~2V. This is dependent on the LED color, so you will have to resim the circuit and adjust resistor values if you change LED color.
R6 controls how much hysteresis there is between where the relay snaps on and snaps off. Again, if you want to experiment with different amounts of hysteresis, resim the circuit with different values.
Finally, you would use the sim to determine at what photo-cell resistance Q2 turns on and off. Look at the sim. I plot V(out) to show the voltage across the relay coil, and I also plot the expression V(t)/I(R1), which, when I learned Ohms Law, is equal to the resistance of R1. Note how I use the cursors to show the turn on and turn off resistances...
I attach the .asc file so you can play with. No additional library components needed.