JK FLip Flop trouble - confused.

Status
Not open for further replies.

krissie

New Member
In theory this should be simple - build a divide by two circuit with a JK flip flop using a push switch for its clock... but it's not working out that way. is is my circuit, as breadboarded/prototyped...

**broken link removed**

When I turn the circuit on, I expect to find the LED either on or off, and for a button press to toggle it (though I realise that the switch needs debouncing too). What I actually get is the LED flickering a half brightness. When I hit the switch it either goes off or gets brighter (a seemingly random decision as to which).

To make sure it wasn't something to do with the switch itself, I removed the lead from the bace of the transistor to the IC and the LED went out. I also connected the base of the transistor to both Q and !Q outputs on the IC, and the same thing happens on each - flickering at half brightness and random brightening or going off on pressing the switch.

I then reduced the value of the collector resistor to 1k, and placed a 1k resistor between the base of the transistor and pin 15. This stopped the LED flickering, but the circuit still did not toggle the output of Q and !Q (pins 14 and 15).

On removing the 1k resistor from the collector while the circuit was live, I noticed that the LED remained on at the same half brightness, and so I removed the transistor and LED, replacing them with a voltmeter...

**broken link removed**

While the switch is open, pin 15 (Q) supplies between 2.2v and 2.4v at the voltmeter, and pin 14 (!Q) supplies between 2.6v and 2.8v

While the switch is closed, pin 15 (Q) supplies 0v at the voltmeter, and pin 14 (!Q) supplies 5v

Both Q and !Q are supplying roughly the same voltage. While the switch is closed, Q is always low, and !Q is always high. While the switch is open, both Q and !Q supply 2.2 - 2.4v and 2.6 -2.8v respectively.

I've even tried replacing the IC, but that also has the same behaviour.

Any help would be greatly appreciated, because I'm more than a little confused by this.

... leaving me with no idea what's going on. I've even tried a replacement IC.
 
Hi,

You can not leave the clock input open, but you really need to debounce the clock input switch. That will eliminate the randomness.

Also keep in mind that when you measure DC voltage with a volt meter you may be seeing the average voltage of two pulses, one high and one low.
 
Last edited:
First off, Cmos IC's with the inputs floating causes some unstable conditions and excessive current consumption. The inputs to the second stage pins 3 thru 7 should be tied either high or low. For clocked bistable mode of section 2. pins10 an 11 should be tied to pin 16. Pins 9 and 12 tied to pin 8. When the power is applied eithier Q1 or Q1 not will be high. You can determine which is always high by using power up set or reset.
 
hi Krissie,
This is a composite image of the 4027 states which I did a while ago for another OP, it may help you understand the 4027.
 

Attachments

  • 4027.gif
    113.7 KB · Views: 1,015
The simple rule that so many newbies fail to follow is "Let NO CMOS inputs float". Otherwise you are just about guaranteed erratic operation. This includes the push-button which requires a resistor to ground (besides needing debounce).

Your transistor should have a base resistor to limit its current.
 
Thank you very much everybody!

It was indeed that I have floating inputs on the Cmos chip, and had failed to tie the level of the switch input with a resistor. Having tied down all inputs, including the switch, everything worked like a charm. Thank you all so much... and that's another rule learned
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…