• 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.

Help With a JK Flip Flop.

Status
Not open for further replies.

Hellraz0r1

New Member
I have constructed this circuit which I found online. I powered it with 12v and with 5v and I cannot get it working. I have checked the connections 1000 times.

If somebody would like to offer a different idea, Im looking for a soft on off switch. I an going to use it so I can use my car alarm to control various of things in the car.

Can somebody please help!!! Im ripping my hair out!!!
 

Attachments

John Sorensen

New Member
I really don't see how this circuit could work. I think the idea was that if J and K are tied high, the output will toggle with a clock pulse. Looking at the datasheet, there is no such thing. A place to start would be to feed back the Q output to the K input, but I still don't think this is a good circuit. Although it looks like there is an attempt to debounce the switch, I don't know if it will give a sharp enough pulse to prevent multiple transitions of the JK.

If you just want an on-off, try this:

j.
 

Attachments

Roff

Well-Known Member
The 4027 will in fact toggle on each rising clock edge when both J and K inputs are tied high. This is not obvious from the state table in the TI datasheet, but it's there. The HEF4027 state table is easier to decipher. I see no reason why the circuit won't work - although it may not do what HellRaz0r1 wants. What is meant by "soft on off switch"?
 

Hellraz0r1

New Member
Soft on off: the switch would be a momentary push button. It would push on, and then push off... Yeah all that circuit does is get hot and sit there.... cant figure it out
 

Roff

Well-Known Member
Hellraz0r1 said:
Soft on off: the switch would be a momentary push button. It would push on, and then push off... Yeah all that circuit does is get hot and sit there.... cant figure it out
It may get warm (probably not hot) if you don't have all the unused inputs of the spare flip-flop tied to a supply voltage rail (I would use GND). The circuit should still work. What do you have the outputs connected to, if anything?
 

Hellraz0r1

New Member
they arent connected to anything, they are connected to a multimeter... do i need to connect them to something so that there is a load? I also read the schematic wrong while i was getting my parts and mistook the 100n for nano and not micro. I have a 100uf electrolitic an a .1uf ceramic, which would you reccomend.
 

Roff

Well-Known Member
Hellraz0r1 said:
they arent connected to anything, they are connected to a multimeter... do i need to connect them to something so that there is a load? I also read the schematic wrong while i was getting my parts and mistook the 100n for nano and not micro. I have a 100uf electrolitic an a .1uf ceramic, which would you reccomend.
You don't need a load. I would use the 0.1uF cap for the switch debounce circuit.
 

John Sorensen

New Member
What if you tried tying the Q output back to the K input, and grounding the J input?

The part may be smoked by now, if it really is getting hot.

j.
 

Roff

Well-Known Member
John Sorensen said:
What if you tried tying the Q output back to the K input, and grounding the J input?

The part may be smoked by now, if it really is getting hot.

j.
If you do this, the Q output will go low and stay low on the first clock pulse, if it is not aready low. This is not the toggle mode. JKs are designed to toggle when both inputs are high. Below are the function tables for the Philips HEF4027 and the TI CD4027. The Philips table is easier to interpret than the TI datasheet table.
The HEF4027 also has a Schmitt trigger on the clock input, which is apparently not in the CD4027.
I also suspect that the part you have is dead, and you need to try another one.
 

Attachments

ljcox

Well-Known Member
Hellraz0r1 said:
I have constructed this circuit which I found online. I powered it with 12v and with 5v and I cannot get it working. I have checked the connections 1000 times.

If somebody would like to offer a different idea, Im looking for a soft on off switch. I an going to use it so I can use my car alarm to control various of things in the car.

Can somebody please help!!! Im ripping my hair out!!!
1. You need a Schmitt Trigger to speed up the clock signal. Use a 74C14, 40106, etc. Connect 2 Schmitt sections in tandem (in order to prevent inversion) between the capacitor and the clock input.

2. You don't need D1.

3. R1 should be about 100k in order to provide sufficient debounce.

4. Do you have a 100 nF capacitor across the IC supply pins?

5. The 4027 has Active High PR and CLR inputs. You have drawn them as Active Low.

Len
 

Hellraz0r1

New Member
I REALLY REALLY all of this help but I cannot read datasheets, I can read schematics really well though. I got my CD4027 from jameco.

http://www.electro-tech-online.com/custompdfs/2004/04/12888.pdf

I dont think it has a schmidt trigger.

Also I was browsing this site and found these toggle circuits.

Would they be a good alternative because I do not have a schmidt trigger so Im gonna have to get some more IC's anyway.
 

Attachments

John Sorensen

New Member
If you do this, the Q output will go low and stay low on the first clock pulse, if it is not aready low. This is not the toggle mode. JKs are designed to toggle when both inputs are high. Below are the function tables for the Philips HEF4027 and the TI CD4027. The Philips table is easier to interpret than the TI datasheet table.
If you look at the Philips datasheet, you're right. But if you read the TI datasheet, my idea should work. If (Q) K is low, J is DK, then following a clock pulse, Q goes high, K goes high, and so it goes. I find no fault with this logic, though maybe it isn't the preferred toggle mode for a JK. Just looking at the TI sheet, I would have called J=1 K=1 a "forbidden" state. I like the looks of the Philips on better :? .

Now, of course this all depends on nice sharp clocks...

j.
 

Roff

Well-Known Member
If you look at the Philips datasheet, you're right. But if you read the TI datasheet, my idea should work.
I have included the TI CD4027 table below, with the lines numbered on the left.
If (Q) K is low, J is DK, then following a clock pulse, Q goes high, K goes high, and so it goes.
There is no line where K is low and Q is low prior to clock. But if you look at line 3, you will see that, if J is low and Q is low, Q stays low after clock, regardless of the state of K.
I find no fault with this logic, though maybe it isn't the preferred toggle mode for a JK. Just looking at the TI sheet, I would have called J=1 K=1 a "forbidden" state. I like the looks of the Philips on better :? .

Now, of course this all depends on nice sharp clocks...

j.
J=1 and K=1 is not a forbidden state. Line one says that if J=1 and Q=0, Q will change to 1 at clock time, regardless of the state of K.
Line 4 says that if K=1 and Q=1, Q will change to 0 at clock time, regardless of the state of J.
Taken together, this means that if J=1 and K=1, Q will toggle at clock time.
Ron
 

Attachments

John Sorensen

New Member
I just saw that Q column after the inputs (before the clock). I don't know how I missed it, but it makes a lot more sense if it's there! :oops: Let me reconsider my idea.

j.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top