We try to apply a JK Flip-Flop to Light sensor switch circuit experiment. It uses MC14027 or CD4027 or TC4027 as CMOS-IC, inside JK-Flip-Flop and 16 pins. Which each pin has a different function as shown below.
On left section.
Pin 1 to pin 7 are pins of a first flip flop. Then,
Pin 9 to pin 15 are pins of a second flip flop.
Look at right, block diagram inside each flip flop.
It includes, R means “Reset”, S equals “Set”. Both pins will work when a logic “1”.
In addition, input J, K, and CK. The CK is triggered with a rising edge. These pins are the JK-Flip-Flop (JK-FF).
The pin S set to flip-flop. If S is “1”. It causes an output Q is “1”, and Q is “0” right away, by not attend to state of the pulse signal at CK. The R is reset pin, if R = “1” will cause Q = “0” also same it.
In normal operation, if not use these pins will must to connect with logic “0”.
How does circuit work
The circuit that use experiments is shown in Figure 2 is using JK-FF act as the T-FF try to assemble on the breadboard. To experiments for the photo transistors in that Figure 2 is dual-transistors type that connecting together in darlington from. Its top chassis transparent. When the light shine to it will have a collector current flow through R1 and VR will have voltage drop across makes voltage at collector drop from 12 volts into 0 volts.
When light go out, voltage this point is 12 volts,as before. Cause the pulse signal to CK of JK-FF.
When the flip-flop change state from logic “0” into “1”, output Q will supply to drive the transistor through R2-resistor. The transistor will increase the current and drive coil of relay by DC voltage of 12-volts,then a contact of relay will use to turn on/off the electric appliance.
The photo transistor, should use in a darlington type. To use high gain cause have high slope pulse. Do not use a CdS or general photo transistors. If pulse signal change from high to lower than 0.3 volts per uS, will flip-flop can work error.
This photo transistors should place in a room, Should not be exposed to direct sunshine, The variable resistor -VR-50 K ohms is used to adjust sensitivity to the light.
R1,R2 = 6.8K
The relay should has a coil voltage of 12-volts in single contact type. And have resistance of coil more than 100 ohms or will also use lower voltage. But we have to change the power supply and the value of others components such as resistors,
We should not connect the relay on the breadboard directly because lead of large relay and have a AC-220 volts parts to connects near outside the breadboard or PCB.
Then connect the wire both the collector of transistors – BC337 and the positive of power supply to the coil of relay, should not use too small. Because this section has flowing current more than 100 mA.
The 1N4007-diode is used to protects the other semiconductor devices in this circuit from the surge voltage in the coil of a relay.
The section of the section relay is used to turns on-off a load that is the 220-volts AC circuit, so must be carefully makes electrical wiring in this position. Do not cause a short circuit. Should install fuse protection to safety for first time we not insert load. The experiment in first also will not connected the Load and this section circuit above (Just noticed the operation of the relay is enough.)
Figure 3 is photo of connecting the components on the Perforated PCB board to use in the experiment.
Firstly turns on a power supply switch, the flip-flops may be set or reset (Q = “1” or “0”) indefinitely. If Q = “1” will hear the relay “click” indicating the coil pull the contact.
Secondly, shine a flashlight to the phototransistor.
Then, Whisk hand through the beam of a flashlight, will hear relay work or stop, it shows that has pulse into the flip-flop and change state.
In experiment use the JK-FF only one, another not use, should connected input with Vpp or Vss, do not leave it idle floating strictly prohibited.
Up to $20 shipping discount on first order now: https://jlcpcb.com/quote