Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
LinkBack Thread Tools Display Modes
Old 27th August 2003, 02:14 PM   (permalink)
Default cd4027 latch (help needed)

When the "ON/OFF" button is pressed once, the equipment goes on and stays on. It goes off when the button is pressed again. The circuit is straight forward. It uses a JK CMOS FlipFlop to with its JK terminals tied high to achieve the toggling action. The clock is provided by the push button used for on/off action. The resistor and the capacitor near the on/off switch debounces the contacts.
Note that when the circuit is switched on, the relay may land in a on or off state. It can be brought to the off state by pressing the RESET button.

I have tried the circuit in the attachment using electrolytic capacitor, but it is not working. Pls advice if anyone could help me or if there is any other simpler circuit out there.

Thanks

naren
Attached Images
File Type: gif 1_135.gif (5.7 KB, 1458 views)
File Type: gif 1_137.gif (5.7 KB, 1456 views)
File Type: gif 1_107.gif (5.7 KB, 1460 views)
naren is offline  
Old 27th August 2003, 03:57 PM   (permalink)
Default

I see several problems:

1. The maximum allowable clock risetime is 10 usec. Your risetime is nearly 50 msec. You need two Schmitt triggers (CD40106) between your debouncer and the 4027 clock pin.

2. Reset is a logic high level. If you have a normally open switch as shown, you need to connect the switch between +9v and the reset pin. Add a 47k pull down resistor between the reset pin and gnd. If your switch is normally closed, you can leave it where it is, but you still need to add a 47k resistor from the reset pin to +9v.

3. For minimum dissipation, tie all unused INPUT pins on the unused flip-flop to gnd.

4. You need more base drive for your transistor. As drawn, you have less than a milliamp of base drive (remember that the 4027 Q output has some internal resistance). The SL100 has a minimum beta of 40, and this is with a Vce of 10 volts. Beta at saturation (Vce<0.5v or so) will be considerably less. A good rule of thumb is to make Ic/Ib=10. This is very conservative, so you can probably get away with a 1k resistor in the base in place of the 8.2k.

5. Add a 1N4001 diode across the relay coil, cathode to +9v. This will protect the transistor from breakdown due to the flyback pulse from the relay coil that will occur when the transistor turns off.
Roff is offline  
Old 27th August 2003, 04:36 PM   (permalink)
Default

thank you so much for helping me. i'm truly honoured.
naren is offline  
Old 27th August 2003, 05:01 PM   (permalink)
Default

If you just need a momentary pushbutton circuit for turning a relay on and off, theres a far simpler way. You can use a simple SR flip-flop circuit, like the one below. This one uses a 7400 but just about any inverting logic gate IC will do such as a 7401,7402,7403 etc.

__________________
Two roads diverged into a woods...i took the one less travelled by. R. Frost.
nettron1000 is offline  
Old 27th August 2003, 05:28 PM   (permalink)
Default

You can't make a S/R latch out of noninverting gates such as 7408 and 7411. You can use NOR gates (7402), but the polarities of set and reset must be inverted (input must go high to initiate state change).
Input pull up resistors are a must on CMOS gates controlled by switches. They are recommended for bipolar (74LS00, 7400, 74F00, etc.), but not absolutely necessary for low noise environments.
Roff is offline  
Old 27th August 2003, 06:41 PM   (permalink)
Default

Quote:
You can't make a S/R latch out of noninverting gates such as 7408 and 7411.
Ive never tried using AND gates in a flip-flop circuit before, i read in a post somewhere that they would work. So i just bread boarded a flip-flop circuit using a 7408 IC to find out for sure and yep, your right Ron , AND gates DO NOT work as flip-flops.

Thanx for the info Ron...noted and fixed.




Quote:
Input pull up resistors are a must on CMOS gates controlled by switches. They are recommended for bipolar (74LS00, 7400, 74F00, etc.), but not absolutely necessary for low noise environments.
I agree. Yes I usually put pull-up resistors on the inputs (set/reset) but it didnt seem to make much difference in this simple setup, so i left them out just for clarity.
__________________
Two roads diverged into a woods...i took the one less travelled by. R. Frost.
nettron1000 is offline  
Old 27th August 2003, 07:06 PM   (permalink)
Default

i would agree that that reset is floating, but you do not need and schmitt trigger because the JK has a schmitt on the inputs. And if he used that SR latch that would not toggle at all :?:
e is offline  
Old 27th August 2003, 07:42 PM   (permalink)
Default

Quote:
And if he used that SR latch that would not toggle at all
Which one are you referring to?
__________________
Two roads diverged into a woods...i took the one less travelled by. R. Frost.
nettron1000 is offline  
Old 28th August 2003, 12:26 AM   (permalink)
Default

Quote:
Originally Posted by e
i would agree that that reset is floating, but you do not need and schmitt trigger because the JK has a schmitt on the inputs. And if he used that SR latch that would not toggle at all :?:
I looked at CD4027 datasheets from 3 different manufacturers, and none mentioned Schmitt trigger inputs. In fact, the maximum clock risetime for a 10 volt supply was 5 usec for 2 of them and 10 usec for the other. This is why I said a Schmitt was needed. Of course, there are other types of Schmitt triggers and even other types of debouncers that could be used.

And you're correct about the cross-coupled NAND latch. It's not a toggle FF, because it requires 2 inputs.

The Reset switch seems redundant to me. You can accomplish the same thing by pressing the Toggle switch. If you want a POWER ON reset, replace the reset switch with a resistor and connect a cap from the Reset pin to +9v. The time constant of this RC combination needs to be considerably longer than the risetime of the power supply voltage.
Roff is offline  
Old 28th August 2003, 02:28 AM   (permalink)
Default

opps your right i was looking at the HEF family http://www.philipslogic.com/products/hef/pdf/hef4027b.pdf[/url]
and it states: "Schmitt trigger action in the clock input makes the circuit highly tolerant to slower clock rise and fall times."

I agree i think the reset switch is worthless, why not just put a cap there to reset it upon power up no matter what?

I built this exact type of circuit a few weeks ago to toggle a relay, and it works just perfectly, no problems with the rise and fall times as long as it is debounced well.
e is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 12:59 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

eXTReMe Tracker