Cmos circuit is automatically switched on when applying power

LesJones

Joined Jan 8, 2017
4,509
One point that you have to considder is that the 5 volts supply voltage needs to drop to close to zero volts when the mains is removed. If you do not leave the power switched off for long enough for this to happen then the reset circuit will not work correctly. If you need it to work even when the supply has been off for only a short time then we would have to make a modification to the power supply circuit to ensure the output voltage drops quickly enough when the power is removed.

Les.
 

Thread Starter

Holz1

Joined Jan 21, 2020
87
One point that you have to considder is that the 5 volts supply voltage needs to drop to close to zero volts when the mains is removed. If you do not leave the power switched off for long enough for this to happen then the reset circuit will not work correctly. If you need it to work even when the supply has been off for only a short time then we would have to make a modification to the power supply circuit to ensure the output voltage drops quickly enough when the power is removed.

Les.
Yes, I understand. Your answer is logic and what I did was extreme to plug and unplug again. Ofcourse there is power left in the ELCo's and there is not time enough to dissipate the remaining power. The modelrailroad is turned on, not only for abrief moment but for a longer period of time. I think it may occur that, when unplugging the mains of that model railway, the circuit is triggered briefly because it gives a "spike" of current. And this is, I think also the reason when using a relay there is a diode between the + and -. Correct me,if I am wrong. I am still learning electronics but it is a "hell-of-a-Job" to decipher all do's and dont's. .
 

eetech00

Joined Jun 8, 2013
4,709
I think it may occur that, when unplugging the mains of that model railway, the circuit is triggered briefly because it gives a "spike" of current. And this is, I think also the reason when using a relay there is a diode between the + and -. Correct me,if I am wrong. I am still learning electronics but it is a "hell-of-a-Job" to decipher all do's and dont's. .
In general, it is best practice to connect a diode across the coil of a DC relay (neutral, or single polarity type) to suppress the inductive spike that occurs when the magnetic field of the energized coil collapses. The spike can cause logic glitches and maybe even damage semiconductor components.
 

MisterBill2

Joined Jan 23, 2018
27,683
For most CMOS logic devices, there is a voltage level range where the operation is undefined and often variable. If the supply voltage does not change instantly, it passes through that region and no particular result is promised.
 

Thread Starter

Holz1

Joined Jan 21, 2020
87
Any IC you use should have a 0.1uf cap connected across its power pins, otherwise, the circuit behavior can be erratic.

I understand there is a language barrier here, so PLEASE draw your WHOLE circuit on a sheet a paper and post, so we can communicate effectively, and see what we are working with.

Also, to be clear:
Blocked = the IR beam is broken.
unBlocked = the IR beam is not broken.
Correct?
Finally the complete drawing. Based on the explanation of Les and eetech, I think this could do the job????
 

Attachments

LesJones

Joined Jan 8, 2017
4,509
I started to convert the wiring diagram on post #65 into a schematic and realised it was the schematic posted in post #51 by eetech00. If you have corrected the problem with the logic low level being +2.6 volts (post #42) then it should work. Using the transistors as inverters will require the collector of the phototransistors to be LESS than +0.6 volts to be considered as a logic 0.

Les.
 

Thread Starter

Holz1

Joined Jan 21, 2020
87
I started to convert the wiring diagram on post #65 into a schematic and realised it was the schematic posted in post #51 by eetech00. If you have corrected the problem with the logic low level being +2.6 volts (post #42) then it should work. Using the transistors as inverters will require the collector of the phototransistors to be LESS than +0.6 volts to be considered as a logic 0.

Les.
Thank you Les. I have measured the voltage again (see # 55)
IR gate 1: unblocked = 5 Volts (logic HIGH)) blocked = 0.20V (logic LOW)
IR gate 2: unblocked = 5 Volts blocked = 0.17 V (logic LOW)
I am going to build the circuit and will inform you asap!
 

LesJones

Joined Jan 8, 2017
4,509
Re post# 67. I don't see how you can get those voltage reading with the the outputs of the photo detectors connected to the bases of the BC547 transistors the base emitor diode of the transistors will clamp the voltage to about 0.7 volts. This is OK as this will be a logic high to the base of the transistor. You have not told us how you managed to get the logic low level from the photo sensors down from 2.6 volts to 0.2 volts without changing the value of the 10k collector resistor. Check that the voltage at the collectors of the BC547 changes between close to +5 volts and about +0.6 volts when the path is blocked.
My understanding is that the current circuit is that shown in your wiring diagram in post #65.
When you said " I am going to build the circuit and will inform you asap! " you dont tell us which circuit.
In post #55 you talk about LEDs turning on and off but I don't see anye LEDs in your diagram in post #65

Les.
 

Thread Starter

Holz1

Joined Jan 21, 2020
87
Re post# 67. I don't see how you can get those voltage reading with the the outputs of the photo detectors connected to the bases of the BC547 transistors the base emitor diode of the transistors will clamp the voltage to about 0.7 volts. This is OK as this will be a logic high to the base of the transistor. You have not told us how you managed to get the logic low level from the photo sensors down from 2.6 volts to 0.2 volts without changing the value of the 10k collector resistor. Check that the voltage at the collectors of the BC547 changes between close to +5 volts and about +0.6 volts when the path is blocked.
My understanding is that the current circuit is that shown in your wiring diagram in post #65.
When you said " I am going to build the circuit and will inform you asap! " you dont tell us which circuit.
In post #55 you talk about LEDs turning on and off but I don't see anye LEDs in your diagram in post #65

Les.
I have drawn the IR gate which I use in the leftside top of the circuit: 4 IR gates have an OUTPUT to BJT Q1 -Q4. I assumed in the beginning (and posted it) the output was 2 Volts therefore I revoked this(and posted it) and I measured the output voltage of the IR gates which are not yet connected to the transistor.
Re: leds. Eetech made in #51 the circuit which I have built for testing. So, my IR gates were connected to this circuit and this worked. I used a blue led because this was the first led available. The photo is not clear but for me was it the indication that it works. I connected a led to pin 3 of the CD4093 and it works.

I will check the base voltage as described in yr last post and willcome back to you. Thanks!!
 

MisterBill2

Joined Jan 23, 2018
27,683
The voltage of the "Gate" is dependent on the intensity of the light, and so the mechanical arrangement will have a big effect on the contrast ratio, blocked versus unblocked beam. So reducing random light while having a more intense source will increase the ratio. SO a bit of a shield tube can help keep outside light off the sensor.
Both Honeywell and Fairchild made light sensors with nominally digital level outputs. I used them in a standard product 20 years ago, I do not know if they are still in production. That would be another option.
 

MisterBill2

Joined Jan 23, 2018
27,683
That will take some digging they are on the drawing, I think, and I no longer have Autocad on a working computer. One supplier we bought from was Digikey, which would be a good site to investigate for what is presently available.
 

Thread Starter

Holz1

Joined Jan 21, 2020
87
I have drawn the IR gate which I use in the leftside top of the circuit: 4 IR gates have an OUTPUT to BJT Q1 -Q4. I assumed in the beginning (and posted it) the output was 2 Volts therefore I revoked this(and posted it) and I measured the output voltage of the IR gates which are not yet connected to the transistor.
Re: leds. Eetech made in #51 the circuit which I have built for testing. So, my IR gates were connected to this circuit and this worked. I used a blue led because this was the first led available. The photo is not clear but for me was it the indication that it works. I connected a led to pin 3 of the CD4093 and it works.

I will check the base voltage as described in yr last post and willcome back to you. Thanks!!
Hello Guys
I am sorry for the time past and keeping you not informed of my experiments.
A lot went not so good. I know it is not an excuse but still.. I hope to let you know soon of my findings.

Good weekend
Henry
 
Top