HCF4027B delayed commutation.

Thread Starter

q12x

Joined Sep 25, 2015
1,658
Break the beam once, LED comes on.
Break the beam again, LED goes out
repeat

Yes?

ak
EXACTLY !
It is as you put it, but it is also a bit more to it.
Its like this:

Break beam, shadow over ldr, input triggered as 0(ground). shadow leaving ldr, Output switch&remain triggered on 1, LED comes ON.
Break beam, shadow over ldr, input triggered as 0(ground). shadow leaving ldr, Output switch&remain triggered on 0, LED comes OFF.
repeat

Why shadow over? Because I can keep my hand over ldr how long I want. Only when im getting out the hand from ldr (shadow leaving), then the actual contact is happening and also remains as ON or OFF. But maybe im too detailed. It is what i observed from my first circuit (and what i remember) because i attached a relay and he clicked every time the beam was interrupted (in and out of beam) so, in one wave, there were 2 relay clicks, and it was AWESOMEEE. Trust me on this. Its like you have a superpower and you 'touch' the light beam, and CLICK, it's very satisfying, and i want that feeling back in my room.
I also thank you all here for all the interest and help so far.
 
Last edited:

Audioguru again

Joined Oct 21, 2019
6,674
The pins on the PNP BC327 transistor are shown correct on the schematic.

If the light is incandescent AC, is a compact fluorescent or is a PWM dimmed LED type then it pulses and the LDR might be fast enough to trigger the Flip-flop many times.

I agree that the clock input must have a fast risetime which the LDR and the filtering capacitors do not produce.
 

Attachments

Thread Starter

q12x

Joined Sep 25, 2015
1,658
The pins on the PNP BC327 transistor are shown correct on the schematic.
I did a mistake in my circuit ,inverting transistor pins, and I corrected in the mean time, but the comments about it remained.
This is the transistor story.

If the light is incandescent AC, is a compact fluorescent or is a PWM dimmed LED type then it pulses and the LDR might be fast enough to trigger the Flip-flop many times.
All the lights you enumerated are not used to trigger the ldr. They are just to light my room. Whatever model i use.
I will use a simple blue led light, or maybe a laser, that will beam into ldr and that will be the actual switch.

With this said, I think i should insert the led in my circuit too. I now see i presume way too much, so my mistake.
 
Last edited:

Thread Starter

q12x

Joined Sep 25, 2015
1,658
Playing around, I discovered something interesting about this IC.
If I take pin 3 wire, and connect it directly to +, output change state accordingly to the internal state of the IC.
If i connect the wire to - (gnd), pin 3 is switched internally. But nothing shows in the output.

So,
connect to +, output switch to ON state.
connect to -, internally switched but output remains in ON state as before.
connect to +, output switch to OFF state(as the internal mechanism dictates probably)
connect to -, internally switched but output remains in OFF state as before.
and so on.
This is a perfect contact that it does. No random stuff.

In my very old (20years) circuit I had 2 relays on the board. Now i realize that the second relay most probably was to directly ground that pin 3. Im not completly sure, since a lot of the components and wires are messed up and is very weird looking now. But it worked then! Very, very well.
 

MrChips

Joined Oct 2, 2009
30,720
Playing around, I discovered something interesting about this IC.
If I take pin 3 wire, and connect it directly to +, output change state accordingly to the internal state of the IC.
If i connect the wire to - (gnd), pin 3 is switched internally. But nothing shows in the output.

So,
connect to +, output switch to ON state.
connect to -, internally switched but output remains in ON state as before.
connect to +, output switch to OFF state(as the internal mechanism dictates probably)
connect to -, internally switched but output remains in OFF state as before.
and so on.
This is a perfect contact that it does. No random stuff.

In my very old (20years) circuit I had 2 relays on the board. Now i realize that the second relay most probably was to directly ground that pin 3. Im not completly sure, since a lot of the components and wires are messed up and is very weird looking now. But it worked then! Very, very well.
Your experimentation is null and void. You cannot test a CD4027 by playing around with the clock input on pin-3.

Here is the reason why.

Your CD4027 is a dual J-K flip-flop with both J and K connected to logic HIGH. This makes it a T-type flip-flop.
The output of a CD4027 wired as a T-type flip-flop will change state (i.e, toggle) with every positive going transition of the CLOCK input.

Moving the wire connected to pin-3 causes spurious transitions. This is known as switch bounce.There is no guarantee that the clock input will see only one transition.

This is good reason why your circuit with the LDR is not working, You need to condition the signal from the LDR using Schmitt triggers and one-shot monostable multivibrators.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,658
As i said already, I was playing with only the wire, not the rest of the circuit. And the wire itself did a formidable result, on the output. But it must be switched between + and - and that is my personal discovery from playing with it, and also it is unusable this way. You may know a lot of stuff, but I dont. So my experiment is very valid, finding new functionalities about this IC that no one will tell me directly. Keep in mind, you are not talking with a profesional electronist. Im just a dude with a limited knowledge base. That's why you have more to say than me, and im listening to everything you advice me.
So, using only the wire itself, without the rest of the ldr circuit, is VERY effective, and also it proves the IC is in good shape, at least that pin3 is ! That is another good observation. But I CAN NOT USE it like this at all. I must automate that + to - and again + to - switch. Thats what ldr is doing, but is too linear in doing so. I need something to bring down more fast the voltage over that pin3, like the wire is doing very effective. Some component is not functioning as it should. again, maybe the IC, maybe the ldr, maybe the transistor. Or all at once a bit from everything. Who knows? It's what i strongly suspect, because as i said, they already functioned in their time and i am reusing them again.
My intuition is that pin 3 need a square signal. From 5 to 0 and 0 to 5 in a shorter time than is currently doing. Exactly like the wire.
I will try and implement your suggestion so far with the comparator, Schmitt triggers and one-shot monostable multivibrators. If i can find them in my components. I didnt work with comparators too much. So this is the final solution, these 3 variants. Then i get it and thank you.
 
Last edited:

Thread Starter

q12x

Joined Sep 25, 2015
1,658
I looked over Schmitt triggers on youtube, and i certainly cross over them in time, but never used them. Thats why im not aware of them. I mean, i never used them in my circuits. I see there are IC or simple transistor circuit to be made. And it is exactly as i suspected too, making a square signal which is very good. Now i understand that comparator and Schmitt trigger is the same thing.
- My question is, what is the most common IC's ?
From my first google find i get LM937. Can you put me a list of the most common? Like 3 or how many, most common you can think of. Thank you and sorry for getting so down to the basics with me. Some stuff i know, some i dont.
 

dl324

Joined Mar 30, 2015
16,846
Now i understand that comparator and Schmitt trigger is the same thing.
A comparator can be used as a Schmitt inverter, but it's much more versatile. If you want a Schmitt inverter, use a Schmitt inverter.
- My question is, what is the most common IC's ?
For Schmitt inverter? 74*14, CD4093 (a NAND), CD40106.
 

MrChips

Joined Oct 2, 2009
30,720
Try this circuit.
Note. This circuit has not been tested. The resistance values are off the top of my head.
What are your LDR values in light and dark?
You can add capacitors somewhere to filter out noise.
Experiment to get the desired results.

LED Trigger Circuit.jpg
 

Thread Starter

q12x

Joined Sep 25, 2015
1,658
Thank you mister dl324 for your nice clarification and information !
I just took my very short number of IC', some new some from boards, and saved each pdf's in: "my IC's" folder. I should have make it long ago. Eh well, Now is better than never. : )
I did not find any Schmitt inverter or comparator in all my IC's i have !

Thank you mrChips for the circuit, I'll try it now.
 
Last edited:

Thread Starter

q12x

Joined Sep 25, 2015
1,658
Here is an interesting question.
Can you give me your entire list of most used, all types, all categories, of IC that you have in your home?
That you put aside for various, most used, general purpose, whatever reason, circuits?
dl324 or MrChips or anyone else.
In other words, if i have to make a backup of IC's, what you will recommend to have at hand, in home, not having to wait from ebay for most common,most used, general Ic's.
 

dl324

Joined Mar 30, 2015
16,846
Can you give me your entire list of most used, all types, all categories, of IC that you have in your home?
Your useful list will depend on the types of circuits you build. I've been designing circuits for 4 decades and I have a variety of parts on hand because I almost always order extras and in quantity to get price breaks.

For opamps, I use mostly LM358, but have LM308, LM318, LF356, uA741, LM324, LM3900, CA3080, TLV2772, MC32204.

For comparators, I only have LM393 and LM339. Both are the same comparator, but in dual and quad format.

For logic, I prefer CD4xxx because of it's wide operating voltage. You should have the basics: CD4069, CD4011, CD4081, CD4071, CD4013, CD4049, CD4050, CD4093, CD40106. CD4007 is a versatile device. Some devices were available as buffered or unbuffered, you'll want buffered in most cases. CD4007 is only available unbuffered (3 pairs of PMOS/NMOS, one wired as an inverter).

You'll also want some counters. CD4029 is a binary/decade up/down counter with preset and CD4511 BCD to seven segment decoders.

For one shot/timer, NE555 is a go to. I also have CD4538.

I wouldn't buy IC's on eBay these days (or Amazon or Ali Express); too many counterfeit parts (even the inexpensive ones). You'll be better off buying from an authorized distributor (Newark, Jameco, DigiKey, Mouser, Tayda Electronics, etc). The only time I'll buy from eBay is if it looks like the seller is liquidating some new old stock (not something they have available regularly). If they have a regular selection, avoid them because they may not buy from reputable sources.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,658
dl324 thank you for your list share, feel free to add to it if anything important pops in your mind later. Very good answer. (I always want better though ;) )
MrChips ok, thanks : ) Your list is way too basic, I want it a bit more 'normal' list than that.
 

dl324

Joined Mar 30, 2015
16,846
Here's a selection Jameco suggests. I crossed out the ones I don't think are that useful:
clipimage.jpg
CD4584 is equivalent to CD40106.

CD4046 is useful (I dozens on hand), but probably not for a beginner.
 

dl324

Joined Mar 30, 2015
16,846
Just learned that CD40106 has more hysteresis than CD4548:
1580670709832.png

The MC14 prefix is generally the same as CD4. They labeled their CD40106 equivalent as MC14106.
 

Thread Starter

q12x

Joined Sep 25, 2015
1,658
mister dl324, you are very, very cool with the 4000 kit list. You are right, i probably should look on series of IC's like 4000, 7000.
As you mentioned already, depends what direction in electronics you are into. I personally like the automation part of electronics.
"The MC14 prefix is generally the same as CD4. They labeled their CD40106 equivalent as MC14106. " That is a rich piece of information about equivalencies ! I hope is a general rule for every IC, indifferent of producer. I mean not only for this particular case you find here with the MC14 to CD4. Very very good, for me to know about it. I only knew there are equivalencies but i didnt know how to spot them. I think you just teach me that just now. You are super. : ) Big smile.
I also, was curious on SCHMITT-TRIGGER IC's and i did my search for them myself. I searched for 'single schmitt trigger ic' and I find SN74LVC1G17DCKR (lovely name) . I also searched for 'double schmitt trigger ic' and i find SN74LVC2G14. I like the double one. I also learned they all (mine and yours) are 5V limited. The last one you mentioned CD40106 is 3-18Vcc, which is more Voltage versatile.

And for mister bertus, those are the entire production of CMOS IC? Ohoa ! : ) That is ... ohoa. Too much.
Its a VERY GOOD BOOK !!! I like it very much already, but damn, 798 pages ! I wonder if i can get the pdf version of it ?
 
Top