Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Regarding Toggle Function

Status
Not open for further replies.

Anantha Krishna

Member level 1
Joined
Feb 10, 2011
Messages
41
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,642
Hi all,

I am using a J-K flip flop IC 74HC73 for a toggle function to switch on and off a MOSFET. This IC works fine till 6V. But I need to switch a voltage of 9V.
So I decided to use HCF4027 IC. But even though it is a J-K flip flop, I am unable to achieve toggle function. I connected J and K to Vcc, S and R to GND. I am applying a pulse using a normal switch and RC circuit to handle debouncing.

Please let me know if I am doing anything wrong.

Further, is there any simpler method to implement this toggle function?[To reduce the Size of the circuit]
 

Post a diagram of your circuit with all details shown. That will help others in isolating the fault.
 

Which way you managed your components and how they are connected ? It can not be got understood in text, post the circuit for better help and proper guidance.
 

Post the circuit. Coz if the IC is correct then there may be some problem with the circuit.
 

Hi all,

I am using a J-K flip flop IC 74HC73 for a toggle function to switch on and off a MOSFET. This IC works fine till 6V. But I need to switch a voltage of 9V.
So I decided to use HCF4027 IC. But even though it is a J-K flip flop, I am unable to achieve toggle function. I connected J and K to Vcc, S and R to GND. I am applying a pulse using a normal switch and RC circuit to handle debouncing.

Please let me know if I am doing anything wrong.

Further, is there any simpler method to implement this toggle function?[To reduce the Size of the circuit]
As others have said, it would be useful to see your circuit.

However, As far as I can see from your post, you have connected the switch to a RC debounce intefrator & then to the Clok inpt of the IC.

This IC does not have a Schmitt Trigger on its Clock input.

Therefore, the rise & fall times of the clock signal will be much too slow to toggle the FF.

EDIT
Is the switch a SPDT or a SPST? It is very simple to debpounce with a SPDT.

I am currently working on a debounce circuit for the 4013 using a SPST since I can't use a SPDT. So I'll post it for you once you have answered my question.
 



Hi All,

I have attached the image of the circuit that I am using.

I found the problem. I was using a box type capacitor for testing. When I replaced it with a Ceramic type, it worked fine.

But I am facing a new problem. The quiescent current that is mentioned in the datasheet is less than 20 uA.
But when I am measuring the current consumed, it is showing somewhere around 2mA. But this current is fluctuating unpredictably. i.e. the current is varying from 1 to 2 mA. Sometimes the current would go below 1 uA.

Since I am using the output just to drive a P-MOSFET, the current consumed is almost negligible. I dont know why it is behaving like this.

Please help.

Thank you.
 

As I told you in post #5, this IC does not have a Schmitt Trigger on its Clock input.

Also, you do not have a bypass capacitor across the supply line.

I suspect that it is oscillating internally.

I have attached what I am intending to build soon.

The 4013 & 4027 have an upper limit on clock pulse rise & fall times. From memory, it is about 15 us max.

EDIT
Sorry, I forgot to include the diode in the previous drawing. See the new amended one.
 

Attachments

  • Bounce supp & toggle 1.jpg
    Bounce supp & toggle 1.jpg
    75.6 KB · Views: 85
Last edited:
Further to my edited post above:-

The purpose of the diode is to hold the capacitor discharged while the button is pressed.

When the button is released, the capacitor will start to charge.

When it reaches the level at which the FF resets, Q1 goes low & the capacitor starts discharging in preparation for the next button press.

A time constant of about 22 ms will be adequate as my recollection is that the bounce is generally finished within 5 ~ 10 ms.

So you could use R = 220 k & C = 0.1 uF
 
Last edited:

I agree about better using a schmitt-trigger circuit for the clock signal. There's howver a more trivial problem of the circuit, that should be rectified first. It's discharging the capacitor with a switch without any current limiting resistor. This will quickly degrade the switch and also causes an oscillation, that possibly unintentionally toggles the FF on switch press. Adding a 100 to 500 ohm series resistor to the switch schieves clean switching.

The other factor, that decides about unwanted multiple FF toggling is the placement of the 1 uF capacitor near to the FF and power supply bypassing.
 

EDIT.
I remembered the reason I did not include the resistor after posting this reply & logging out.

The point is that the capacitor is not charged when the button is pressed & it cannot charge to more than about 0.6 Volt (or about 0.3 Volt if a Schoktty diode is used) while the button is pressed.

When the button is released, the capacitor will charge to the reset level with a time constant of about 22 ms. Then Q will go low & it will discharge to 0 Volt with the same time constant.

I expect that the FF will toggle on switch press since there is likely to be bounce both when the switch is pressed & later when it is released.

It does not matter either way since all we need is for the FF to be set synchronously at button press or release & to be reset asychronously after a delay that is long enough to cover the bounce on switch release.

If you look at the circuit I posted, it has a 100 nF bypass capacitor.
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top