Cmos circuit is automatically switched on when applying power

Thread Starter

Holz1

Joined Jan 21, 2020
87
You are making it very difficult for people to help with your problem as you will not supply a schematic. From the very limitied information you have just supplied it seems that you need to hold the "trigger IC" (Which I guess may be a 4013.) in a reset condition for a few mS when power is applied. Without a schematic we can't suggest how to do that.

Les.
I will provide a schematic as you are correct to make everything visible.
 

Thread Starter

Holz1

Joined Jan 21, 2020
87
What you have described is a circuit that has bo power switch, so when you power it up it starts operating, right?

So the solution is to add a power switch between the power supply + and the circuit +.
No, because this is the same: powerswitch ON, circuits starts. When you have a tvset protected with a central on/off device and you switch the mains ON again, the tv-set will remain OFF as in standby-mode. As you trigger the remote, tv- set is turned ON.
 

Thread Starter

Holz1

Joined Jan 21, 2020
87
We're not clairvoyant,
How can we help if we don't know what circuit you are talking about?
Oké,here are the files in PNG format. The IR gate is in "switching mode" : when IR gate is blocked, IR OUTPUT is HIGH
The signal is passed through the cd40106; and inverted : OUTpUT LOW. This is the normal the function .

Now I apply the voltage (put the transformer in the mains, and the 5volts DC is +5 Volts (HIGH). The circuits starts automatically.
What I would like to receive from you is the solution for only this problem. NOT the solution: you can make another IR gate or something like this. Thanks for your understanding
 

Attachments

BobTPH

Joined Jun 5, 2013
11,566
When you have a tvset protected with a central on/off device and you switch the mains ON again, the tv-set will remain OFF as in standby-mode.
Finally, a description that actually communicates what you are trying to do.

Guess what? To do that, you need some circuit that is powered immediately and it senses a button press and switches on the rest of the circuit. I am sure someone will post such a circuit now that we know what you want.
 

eetech00

Joined Jun 8, 2013
4,709
Oké,here are the files in PNG format. The IR gate is in "switching mode" : when IR gate is blocked, IR OUTPUT is HIGH
The signal is passed through the cd40106; and inverted : OUTpUT LOW. This is the normal the function .

Now I apply the voltage (put the transformer in the mains, and the 5volts DC is +5 Volts (HIGH). The circuits starts automatically.
What I would like to receive from you is the solution for only this problem. NOT the solution: you can make another IR gate or something like this. Thanks for your understanding
So...there is only one 5v power supply that operates the IR gate circuit and the 40106/4093 circuit, right?
And, when the 5v supply is powered on, both the IR gate circuit and the 40106/4093 circuit powers on at the same time? correct?
 

LesJones

Joined Jan 8, 2017
4,509
My understanding is thst you want the latch to start in the state which is last in the path of the train. If that is so then forcing a low state at startup from the second sensor can be achieved by adding a capacitor and a diode. Connect the anode of the diode to the junction of the phototransistor collector and the 10K resistor. Connect the cathode of the diode to the + end of the capacitor. Connect the - end of the capacitor to the negative supply rail. I would suggest trying a 10 uF capacitor to start with. You will probably also need to connect a high value resisitor in parallel with the capacitor to ensure the capacitor is discharged at powe on. (I suggest a 2.2 Meg resistor for this.)

Les.
 

eetech00

Joined Jun 8, 2013
4,709
Here is an equivalent circuit.
So far, looks like the CD40106B inverters should be removed along with PU resistors R1,R2,R6,R7

1701712755248.png
 
Last edited:

LesJones

Joined Jan 8, 2017
4,509
eetech00, I do not agree that the inverters need to be removed. The latch changes state on a low input pulse. The static state is the beam is not broken so the collector of the phototransistor will be low. So the output of the inverter will be high. When the train breaks the beam the phototransistor collector goes high and the output of the inverter goes low triggering the latch.

Les.
 

MisterBill2

Joined Jan 23, 2018
27,712
What I see is that it would be called a "race issue" because the response time of the logic elements is faster than the response time of the photo-transistors. So the solution will be to make the CMOS logic wait a few milliseconds before responding, either every time or just at power-on.
The two sensors seem to be sending set and reset signals to the latch circuit at about the same time. So you need to delay the "Latch" signal for quite a few microseconds so that the "reset/unlatch signal can stabilize first.

One more thing is that CMOS logic devices do not need external pull-up resistors.

So my one question is how fast does this circuit need to respond?
 

eetech00

Joined Jun 8, 2013
4,709
eetech00, I do not agree that the inverters need to be removed. The latch changes state on a low input pulse. The static state is the beam is not broken so the collector of the phototransistor will be low. So the output of the inverter will be high. When the train breaks the beam the phototransistor collector goes high and the output of the inverter goes low triggering the latch.

Les.
Oops....I left out this part, sorry.
But if the connections to the transistor(s) were swapped, then the 40106's wouldn't be needed.
See below.


1701726124213.png
 

LesJones

Joined Jan 8, 2017
4,509
Yes, that would work. But my suggestion in post #26 of using a capacitor and diode to force the latch into the required state would not work as the pull up from the phototransistor would be too strong. Another series resitor could be added to weeken the pull up on the capacitor.

Les.
 

MisterBill2

Joined Jan 23, 2018
27,712
The inverters are useful because the output of the photo interrupter probably does not change fast enough Adding an initial delay to enabling the latches would allow things to become stable. And there are the required nand gates available. Replace the last inverter with a nand, then have a delayed signal at the other input. No extra ICs to buy, just one R and one C to deliver a 2 second delay.
 

Thread Starter

Holz1

Joined Jan 21, 2020
87
So...there is only one 5v power supply that operates the IR gate circuit and the 40106/4093 circuit, right?
And, when the 5v supply is powered on, both the IR gate circuit and the 40106/4093 circuit powers on at the same time? correct?
There is only 1 power supply of 5 Volts DC. No, the 1st IR gate is triggered and starts the OUTPUT. To end and to stop the OUTPUT, I have to activate manually the 2nd IR gate in order to reset the circuit
 

Thread Starter

Holz1

Joined Jan 21, 2020
87
My understanding is thst you want the latch to start in the state which is last in the path of the train. If that is so then forcing a low state at startup from the second sensor can be achieved by adding a capacitor and a diode. Connect the anode of the diode to the junction of the phototransistor collector and the 10K resistor. Connect the cathode of the diode to the + end of the capacitor. Connect the - end of the capacitor to the negative supply rail. I would suggest trying a 10 uF capacitor to start with. You will probably also need to connect a high value resisitor in parallel with the capacitor to ensure the capacitor is discharged at powe on. (I suggest a 2.2 Meg resistor for this.)

Les.
This could work and I have to try this on a breadboard. I saw someone incuded an optocoupler. I used the OC in my first circuits. The OUTPUT was, I think HIGH and the OC, the OC is used to divide 2 circuits with galvanic isolation, I left it because of more components and separate power supply. Also when I used the OC, the circuit started when applying power supply!
 

LesJones

Joined Jan 8, 2017
4,509
Have you tried my suggestion in post #26 or MisterBill2's in post #32 ? Both of these solutions simulate the second gate being blocked for a second or 2 when power is first applied.
Re your post #34. The problem is not related to the opto sensors. It is related to the latch (formed by the 2 nand gates on the left hand side of IC1 in your drawing or U2a & b in the nice schematic posted by eetech00 in post #27.) The state of this latch at startup is random so you need to do something to ensure it starts in the required state

Les.
 
Last edited:

Thread Starter

Holz1

Joined Jan 21, 2020
87
eetech00, I do not agree that the inverters need to be removed. The latch changes state on a low input pulse. The static state is the beam is not broken so the collector of the phototransistor will be low. So the output of the inverter will be high. When the train breaks the beam the phototransistor collector goes high and the output of the inverter goes low triggering the latch.

Les.
I understand this explanation despite my missing electronic knowledge! Thanks.
 

Thread Starter

Holz1

Joined Jan 21, 2020
87
Yes, that would work. But my suggestion in post #26 of using a capacitor and diode to force the latch into the required state would not work as the pull up from the phototransistor would be too strong. Another series resitor could be added to weeken the pull up on the capacitor.

Les.
No, not yet. Here in Holland is the time AM 9.48. So , I just opened the forum.
 

Thread Starter

Holz1

Joined Jan 21, 2020
87
My understanding is thst you want the latch to start in the state which is last in the path of the train. If that is so then forcing a low state at startup from the second sensor can be achieved by adding a capacitor and a diode. Connect the anode of the diode to the junction of the phototransistor collector and the 10K resistor. Connect the cathode of the diode to the + end of the capacitor. Connect the - end of the capacitor to the negative supply rail. I would suggest trying a 10 uF capacitor to start with. You will probably also need to connect a high value resisitor in parallel with the capacitor to ensure the capacitor is discharged at powe on. (I suggest a 2.2 Meg resistor for this.)

Les.
This is what I understand from yr description
 

Attachments

Thread Starter

Holz1

Joined Jan 21, 2020
87
No. Do not confuse the output state of a given gate with the power being on or off. Just because the output of a gate is at or near ground does not mean that the power is blocked. When you connect power to a circuit there will be a set of transient behaviors which are not characterized or guaranteed. Once the power rails reach a stable value, circuits will then behave according to their specifications listed in the datasheet. In most complex systems there is, by design, a reset procedure which ensures that all devices begin operation in a known state. It is also common to include circuitry that detects undesirable states and transitions to a known state.
I understand yr explanation! Thanx
 
Top