latching IC - how to make work

Thread Starter

aj7877

Joined Jul 5, 2008
6
Hi,

I wondered if anyone can tell me how you would generally design a circuit to do the following.

I want to have two momentary switches, when you press one switch, it sends voltage to an IC and it latches on to drive a transistor. When you press the other switch it also sends a voltage to an IC and the IC latches another set of gates to drive at transistor. At the same time, it unlatches the first set of gates.

I've been looking through my old electronics books and google but still can't quite figure out how it's done.

Also, any suggestions on the IC to use?

Thanks
 

Wendy

Joined Mar 24, 2008
23,421
I believe what you are thinking of is a Set\Reset Flip Flop. They exist in almost every flip flop made. Basically they can be made with 2 NOR or 2 NAND gates, I'll draw a schematic shortly. The thing you will need to keep in mind is the pull up or pull down resistors, which keep the chip happy when the button isn't pressed.

*******************

This is a basic Set Reset Flip Flop....



Just look for any flip flop IC that has S and R inputs, the CMOS 4013 or 4027 comes to mind, but the numbers of chips that have this function are so common it is completely open to choice.
 
Last edited:

Søren

Joined Sep 2, 2006
472
Hi,

[...] Basically they can be made with 2 NOR or 2 NAND gates, I'll draw a schematic shortly. The thing you will need to keep in mind is the pull up or pull down resistors, which keep the chip happy when the button isn't pressed.

*******************

This is a basic Set Reset Flip Flop....

Using NOR gates (like in your drawing), you need pull downs and the switches should go to Vdd. As you have drawn them, the gates should be of the NAND variety.
 

Wendy

Joined Mar 24, 2008
23,421
You're right, I took about 5 minutes to draw it up and it was late.

*************************************

I've corrected and enhanced the drawing.
 
Last edited:

Thread Starter

aj7877

Joined Jul 5, 2008
6
I believe what you are thinking of is a Set\Reset Flip Flop. They exist in almost every flip flop made. Basically they can be made with 2 NOR or 2 NAND gates, I'll draw a schematic shortly. The thing you will need to keep in mind is the pull up or pull down resistors, which keep the chip happy when the button isn't pressed.

*******************

This is a basic Set Reset Flip Flop....

So a couple of questions now. I've been doing some more reading. Is this an SR latch?

Also, what do the resistors do? I'm guessing that they either pull the input to ground when the switch is open. Or do they limit the current when the switch is closed? What values would you suggest?
 

Wendy

Joined Mar 24, 2008
23,421
With CMOS chips you could use as high as 10MΩ, though 1MΩ might be better, they provide bias for the inputs. Some logic families will assume a logic level if they pin is left with no connections, but CMOS isn't one of them so you give it something or it can just oscillate. These are refereed to as pull up resistors and pull down resistors respectively, and are very common in most logic families.

Yes, it can be called a SR latch, latch being an alternate name for flip flop. These are the core for all flip flops, add a second set and you can make a circuit that toggles off a clock pulse, refereed to as a master/slave flip flop. Volume 4 Chapter 10 of the AAC eBook covers flip flops (aka multivibrators).
 
Last edited:

beenthere

Joined Apr 20, 2004
15,819
If you want an SR latch in 4000 series CMOS, look up the data sheet on a CD4044. For CMOS, anything between 100K and 47K works fine for the pullups (or -downs).
 

Thread Starter

aj7877

Joined Jul 5, 2008
6
Thanks guys, I'm starting to get my head around it. It's been 5 years since I have done any electronics.

What I'm trying to achieve is this. I have 3 momentary switches, when I press switch A I want a high output that is latched.

When I press switch B I also want a high output but the output needs to be separate from switch A. Same again for switch C - needs to be a separate output from switch A & B.

When each switch is pressed, it must cancel/reset the latch from the other two switches.
 

SgtWookie

Joined Jul 17, 2007
22,230
See the attached. It's using a single CMOS 40106 Schmitt trigger hex inverter, a dozen resistors, three SP NO pushbuttons and a 0.1uF cap.

It should run OK on anything between 3v and 16v. The cap makes it automatically select Out1 high on power up. One of the three outputs will always be high, the other two will be low, depending upon power up or which switch was pressed last.

CMOS IC's will only output a few mA's. Look at using Darlington transistors or MOSFETS to power other things like relays, etc.

If you're running at 5v or below, put a 3.3k resistor between this circuit's outputs and the load; if over 5v, use 10k resistors. If you use a Darlington driver IC like a ULN2003A (for <=5V) or ULN2004A (for >5v), they have built-in base resistors so you won't need to add them.
 

Attachments

Last edited:

Thread Starter

aj7877

Joined Jul 5, 2008
6
See the attached. It's using a single CMOS 40106 Schmitt trigger hex inverter, a dozen resistors, three SP NO pushbuttons and a 0.1uF cap.
Thanks for the drawing. I appreciate it. Can you explain how it works in a little more detail? And where do I put the Vcc?
 
Top