Ground triggered Latching Circuit using transistors

cmartinez

Joined Jan 17, 2007
8,768
@cmartinez .. so I can put a 5 volt LED in my circuit, as long as I sign the resistor accordingly?

Tony
As I said, there is no such thing as a "5 volt LED" (unless you're talking about a module) but rather a 10 mA LED, for instance.
And yes, as long as you use a resistor rated for that amount of current you should be alright. Just follow Ohm's law:
V=I×R, so R=V/I, and since we want 10mA and you are working with 12V,
R=12/0.010 = 1,200 ohms.

In reality a bit less of current will flow through that arrangement since I didn't include the diode's voltage drop in my calculation. But that's ok, your LED will shine anyways, and will be better protected.

EDIT: I've just taken a look at the pics you posted, and yes, you're using a standard, ordinary red LED with a 1K resistor in series with it (that is brown-black-red stripes). So you should be ok.
I'll take a closer look at your wiring later on, see if I can find an anomaly.
 
Last edited:

Alec_t

Joined Sep 17, 2013
15,119
The cap pictured is marked ".01", so I guess it's a rather old one and that its value is 0.01uF, = 10nF (whereas you want 100nF). That might account for erratic triggering, but doesn't explain why you need to keep the button pressed for the circuit to latch.
Two observations on the breadboard:
1) Unused input pins of a CMOS IC must not be left floating, or the IC can behave oddly. That's the most likely reason you're getting weird results. So, connect pins 8,9,10,11 to ground.
2) The 'decoupling' capacitor(s) on the power rails should be connected as physically close to pins 7 and 14 as possible.

An ordinary red LED has a Vf of about 1.8V. If you are running your circuit fom 12V and the resistor in series with the LED is 1k the LED current will be ~(12-1.8)/1k = ~ 10.2mA (actually a bit less, because of the internal resistance of the IC). The 4013 will be struggling to manage that.
 

cmartinez

Joined Jan 17, 2007
8,768
Ok, just a preliminary assessment here, but the unused inputs of your IC have to go somewhere, and should not be left floating. I'll model your circuit the way it's shown in your pictures, and not in your diagram, and then let you know how it went.
 

Thread Starter

stillgrowingup

Joined Jul 15, 2015
219
The cap pictured is marked ".01", so I guess it's a rather old one and that its value is 0.01uF, = 10nF (whereas you want 100nF). That might account for erratic triggering, but doesn't explain why you need to keep the button pressed for the circuit to latch.
I replaced those old caps with radio shack 0.1uF Ceramic Disc Capacitors I bought today.

1) Unused input pins of a CMOS IC must not be left floating, or the IC can behave oddly. That's the most likely reason you're getting weird results. So, connect pins 8,9,10,11 to ground
Tonight I grounded the those pins.

2) The 'decoupling' capacitor(s) on the power rails should be connected as physically close to pins 7 and 14 as possible.
I put one of the new caps right at the power 7 and 14 pins.

An ordinary red LED has a Vf of about 1.8V. If you are running your circuit fom 12V and the resistor in series with the LED is 1k the LED current will be ~(12-1.8)/1k = ~ 10.2mA (actually a bit less, because of the internal resistance of the IC). The 4013 will be struggling to manage that.
I use this LED. http://www.onlinecomponents.com/lumex-ssllx3044id12v.html?p=11699665

TONY
 

cmartinez

Joined Jan 17, 2007
8,768

Thread Starter

stillgrowingup

Joined Jul 15, 2015
219
If you must use a LED, I suggest you power it up through a transistor instead. That would make things much easier on the 4013.
Hi guys

I did add a NPN, to the 4013 output. See attached.

I put a 1.5K in series with the LED.

But it wasn't till I started playing with the resistance from the 4013 output that it started to latch. See my chart below.

Using a 2n2222 NPN:
100 ohm resistor from 4013 Output. LED stayed ON, but turned OFF when PB was pressed. Never toggled.
42.5 ohm resistor from 4013 Output. LED stayed off, but came on when PB was pressed. Never toggled.
55 ohm resistor from 4013 Output. LED stayed ON, but turned OFF when PB was pressed. Never toggled.
48 ohms resistor from 4013 Output. LED toggled seldomly. Not reliable. :(

Using a BD139 NPN:
No resistor from 4013 Output. LED stayed off, but came on when PB was pressed. Never toggled.
48 ohms resistor from 4013 Output. LED stayed off, but came on when PB was pressed. Never toggled.
82 ohms resistor from 4013 Output. LED stayed ON, but turned OFF when PB was pressed. Never toggled.
68 ohms resistor from 4013 Output. LED stayed off, but came on when PB was pressed. Never toggled.
72 ohms resistor from 4013 Output. LED toggled seldomly. Not reliable. :(

I have no idea whats this means. But at least it toggled. How to get it stable now? :)

TONY
 

Attachments

Alec_t

Joined Sep 17, 2013
15,119
Those resistor values are far too low. Even with 100Ω you are asking the poor old 4013 to source over 100mA! Try R5= something like 10k from the Q output to the transistor base, then use the LED + R3=1.5k as the collector load.
 

cmartinez

Joined Jan 17, 2007
8,768
Those resistor values are far too low. Even with 100Ω you are asking the poor old 4013 to source over 100mA! Try R5= something like 10k from the Q output to the transistor base, then use the LED + R3=1.5k as the collector load.
Alec, you beat me to it again... this is what I get for over-sleeping on saturday mornings... :confused::D
 

Thread Starter

stillgrowingup

Joined Jul 15, 2015
219
Those resistor values are far too low. Even with 100Ω you are asking the poor old 4013 to source over 100mA! Try R5= something like 10k from the Q output to the transistor base, then use the LED + R3=1.5k as the collector load.
Alec_t. .. by playing with it, I found Those values. I will try the new values you mentioned.

HI:)

I hope no one minds me jumping in here but I have suggestion..:)

Why not use a ULN2004 to drive the loads?

See attached...I've only shown the graphic for one of the lamp circuits but they would both be the same.
Eetech00 ... feel free to jump in. I've never heard about a ULN2004 ... if it will work. I'm all for it. :) ... I just got find a ULN2004 to try it.

Tony
 

eetech00

Joined Jun 8, 2013
4,705
Alec_t. .. by playing with it, I found Those values. I will try the new values you mentioned.



Eetech00 ... feel free to jump in. I've never heard about a ULN2004 ... if it will work. I'm all for it. :) ... I just got find a ULN2004 to try it.

Tony
Hi

Yes...the ULN2004 would be able to drive the loads.
 

dl324

Joined Mar 30, 2015
18,333
The ULN2004 outputs can be paralleled for higher output current.
Current capability isn't an issue; total load is around 300mA. My point was that there are 7 darlingtons in that package and 5 will be unused. OP is having a problem with latching, so this suggestion will not help.
 

Thread Starter

stillgrowingup

Joined Jul 15, 2015
219
Current capability isn't an issue; total load is around 300mA. My point was that there are 7 darlingtons in that package and 5 will be unused. OP is having a problem with latching, so this suggestion will not help.
Correct. Right now. I can NOT seem to get this 4013 to toggle. :( ... which is very frustrating to me. This is not a new idea. It's old and proven to work, with similar circuit designs for many years. ... why it doesn't work for me is mind boggling to me. :(

The cost of the uln2004 is low and comparable with a couple BDXXX transistors.

IF I can get this 4013 circuit to work. I may want to add an additional 4013 and utilizing the remaining uln2004 outputs. :)

Tony
 
Top