Please help with JK flip flop sensor circuit

Thread Starter

DD2500

Joined Nov 29, 2013
3
Hello all. I'm new to the forum, so thanks for having me.

I'm doing my senior project and am having a heck of a time with what I thought would be a simple sensor circuit. Basically I have 6 photoresistors that are normally getting hit by light from laser diodes. When the beam is broken, the resistance goes up. I've got the output from the photoresistors inputted to the clock pin on a 4027 dual JK flip flop. I've got J tied to 6V VSS, and K, Set, and Reset tied to ground. I can get one side of the JK working just fine. The problem is when I wire up the second side of the JK, I get nothing. The Q output stays low no matter what. When the beam of light is broken, nothing happens. Even when I try a second 4027, it won't work. I can only get one of my JK's to work correctly. No matter what I've tried, I can't get more than one sensor to work. I've got Vss and ground decouple using a 100 μF cap. My power supply is a BK precision regulated bench supply.

I've uploaded a circuit diagram. Any help with this would be much appreciated. Thank you.
 

Attachments

MrChips

Joined Oct 2, 2009
30,806
100μF for C1 and C2 is rather extreme for your circuit.
Use 0.1μF ceramic with short leads instead for C1 and C2.
Add a single 10μF electrolytic across the power rails.

Show us a photo of your layout if you can.
 

Thread Starter

DD2500

Joined Nov 29, 2013
3
I've attached several pics of my layout. The pics are with two separate JK's hooked up, because as I said in my previous post, I couldn't get both sides of a single JK working so I tried using two separate JK's. I took them from multiple angles so hopefully everything can be seen. The white and yellow, and the red and black wires that come in from off camera are coming from the photoresistors.


Also MrChips, question....you said

"Use 0.1μF ceramic with short leads instead for C1 and C2.
Add a single 10μF electrolytic across the power rails."


I did as you said and the electrolytic cap across the power rails is 10 μF. For the ceramic disk, is that one going to go straight from Vdd to Vss? You said short leads, and short leads wouldn't make it from Vdd to Vss. Or did you mean for that one to be across the power rails as well? The ceramic disk you see in the pic is a .1 μF, and I've got it across the power rails.

Also, in a few of the pics I have LED's and in others I don't. Those were just indicator lights, and I removed them after the first few pics to de-clutter the circuit a bit for ease of viewing. Thanks.
 

Attachments

Last edited:

Alec_t

Joined Sep 17, 2013
14,313
Photoresistors are slow acting, so the clock pulse edge may not rise fast enough to trigger the flip-flop reliably.
The 4027 is static-sensitive, so one of them may have been damaged if anti-static precautions were not taken.
 

MrChips

Joined Oct 2, 2009
30,806
Presumably you are using the LEDs for testing.
You cannot drive the LEDs directly from the output of the flip-flop.
Even worse, you cannot drive an LED and assume that the output of the flip-flop will show a valid logic level voltage.

Use some kind of buffer such as a transistor, gate, inverter or non-inverting buffer to drive the LED. Make sure you use a current limiting resistor such as 220-470Ω in series with the LED.
 

Thread Starter

DD2500

Joined Nov 29, 2013
3
So I now have an LM324N op-amp driving my LED, still to no avail. The Q output will just not go high. The strange thing is that one JK is working fine and dandy. I break the light beam, and Q goes high and latches as it's supposed to. It even lights it's LED. But the minute I put another JK in the circuit, whether it's just the other side of the same dual JK, or even that completely separate JK, no dice. I'm so stuck.....I've been tinkering with this thing for about a month now.

Do you guys think that it has anything to do with not having pull up/pull down resistors? I tried using a pull up on the Q output with no luck. I'm completely out of ideas.
 

MrChips

Joined Oct 2, 2009
30,806
Do you have a DMM?

Measure the resistance of the LDR out of circuit with light and with no light.

Next, with the LDR in-circuit, measure the voltage across the LDR with light and with no light.
 

Alec_t

Joined Sep 17, 2013
14,313
The strange thing is that one JK is working fine and dandy
Not so strange if there has been static damage.
The most likely problem is a wrong or missing connection. Talking of which, all unused INPUTS of a CMOS circuit should be connected to either ground or V+ or you will get weird results.
 
Last edited:
Top