Mono 555 Connected to Photo-interrupter

Thread Starter

kaufmanda

Joined Mar 5, 2020
8
Hi all,

I am pretty new at dealing with ICs, transistors, etc. so forgive me for any inexperience that might come out. I'll explain the operation of the circuit before I get to the question.

1. I am using a 555 in monostable mode to delay a signal from a photo-interrupter on an existing piece of equipment then delivering that signal through some logic gates back to the PCB on the equipment. All power and grounds come from that PCB over a wiring harness.

2. The input pulse comes from 5V being supplied from 2 photo-interrupters which then go low when the flags block the beam.

3. I have bench tested this and tested it on the equipment with a breadboard. The circuit works as intended except for after being left for ~3-4 hours with the trigger pulse at 5V. After this, the photo-interrupters give a reading of 600mV high, instead of 5V. It seems to me as if the reverse current from the trigger pin is somehow harming the transistor etc. in the photo-interrupter? Just a guess there. Unfortunately, there is no way to distinguish any markings on the interrupters to pull a datasheet on them. The current at pin 2 is around 50mA

I've attached a schema of the circuit. U1, U2 are the logic gates. That part works as intended. C1 is 180microFarad, C2 10microfarad, R2 10kOhm, R1 100Ohm.

Any ideas are why the photo-interrupters are breaking?

Thanks
 

Attachments

ericgibbs

Joined Jan 29, 2010
11,122
hi k,
Welcome to AAC,
The 555 Trig input has no pull up resistor to +Vcc.
What are the U2 and U3 device types.?
Show the photo interrupter circuitry and component values.

E
 

Alec_t

Joined Sep 17, 2013
11,743
Depending on the characteristics of the interrupters, you may need pull-up resistors on both sides of C2.
 

dl324

Joined Mar 30, 2015
11,890
Welcome to AAC!

I am pretty new at dealing with ICs, transistors, etc. so forgive me for any inexperience that might come out.
You have the trigger input to the timer floating. It needs to be a pullup resistor. R1 is unnecessary. C2 doesn't need to be so large.

It would be helpful if you told us what the logic gates were.

Here's an approximation of your circuit to show a better way to draw it:
1583517442654.png
I added the missing resistor on the trigger input.

The connection from C3 C1 to U3 is unwise. That's a slowly changing voltage.

EDIT: corrected component designator.

Why are you using 3 input gates when you could use 2 input? I guessed at the function; NOR could also be used.
EDIT: Or NAND.
 
Last edited:

Thread Starter

kaufmanda

Joined Mar 5, 2020
8
I appreciate the information from all, thank you!

What are the U2 and U3 device types.?
The logic gates are TI SN74LVC1G58DCKR Configurable Multi-Function gates. Both have 2 inputs. U1 is set up as an inverted A input (IN1) AND gate. U2 is the same gate but in an OR configuration instead.

The connection from C3 to U3 is unwise. That's a slowly changing voltage.
The connection between C3 and U3 is unwise? I believe you mean C1? I know that connection is a bit funky, but I'm trying to capture a LOW value from threshold and discharge to make my logic work. The purpose of U3 is to make sure the output of U3 is LOW if pin 2 on the 555 remains LOW. The changing voltage does give an unwanted 100ms "blip" (HIGH) on U3, but with the RC timing, it isn't really an issue, just not the "correct" way? Is there a better way to capture that LOW?

If R1 is unnecessary, I can eliminate that, then a 10k pull-up resistor is appropriate after C2 (your R3)? What about possibly needing a resistor before and after C2? I'm guessing the lack of a pullup resistor is damaging the photo interrupters?

I can try and get some images of the circuit, resistors, and ICs on the interrupters, but there is no way the company that puts them in this equipment will give me the information to pull a data sheet on them, it's a terrible company to work with, and the interrupters have a severe lack of markings to look up any sort of specific data on them.

Once again, thanks for all the information, diagrams, etc.
 

dl324

Joined Mar 30, 2015
11,890
The connection between C3 and U3 is unwise? I believe you mean C1? I know that connection is a bit funky, but I'm trying to capture a LOW value from threshold and discharge to make my logic work.
Yes, I meant C1.

The connection is less "funky" now that we can see that the gate has Schmitt inputs. That will prevent excessive power dissipation and problems with a slow rise time at the threshold voltage. Schmitt inputs have different positive and negative thresholds, so you won't have issues with noise.
 

dl324

Joined Mar 30, 2015
11,890
The logic gates are TI SN74LVC1G58DCKR Configurable Multi-Function gates. Both have 2 inputs. U1 is set up as an inverted A input (IN1) AND gate. U2 is the same gate but in an OR configuration instead.
I was going to try to draw an updated schematic, but you started using different component designaters. U1 was the 555 timer in your original schematic.

Edited version:
1583543987413.png
 

Thread Starter

kaufmanda

Joined Mar 5, 2020
8
U1 is set up as an inverted A input (IN1) AND gate. U2 is the same gate but in an OR configuration instead.
My apologies, this should have read as U2 and U3 respectively.

You have the trigger input to the timer floating. It needs to be a pullup resistor. R1 is unnecessary. C2 doesn't need to be so large.
I did put a 750Ohm resistor I had laying around as a pull-up after C2 on my breadboard, I can now see the RC curve clearly in both positive and negative directions, unlike before. As for C2 would 10nF or so capacitor be a better choice so the RC time isn't longer than need be?

As for the interrupters, I am going to try with some new pieces at the beginning of next week with the pullup added. How hard is it to tell if the floating input was taking out the interrupters without being able to pull any data on them?

Thanks,
 

dl324

Joined Mar 30, 2015
11,890
I did put a 750Ohm resistor I had laying around as a pull-up after C2 on my breadboard, I can now see the RC curve clearly in both positive and negative directions, unlike before.
750 ohms is smaller than it needs to be. You just need the trigger input to be above Vcc/3 before the timer times out.
As for C2 would 10nF or so capacitor be a better choice so the RC time isn't longer than need be?
We still don't know the characteristics of whatever is triggering the one shot. You only need AC coupling if the trigger signal doesn't go above Vcc/3 before the timer times out.

Did you remove the 100 ohm resistor?
 

dl324

Joined Mar 30, 2015
11,890
This is the modified schematic. I added Schmitt inverters so it would be clear that the gates you're using have Schmitt inputs:
1583552548327.png
If this schematic is correct, the signal on I2 would have to be a negative pulse with a HIGH steady state. Otherwise, the output of U2 would always be LOW. So you wouldn't need C2 or R3.
The purpose of U3 is to make sure the output of U3 is LOW if pin 2 on the 555 remains LOW.
It won't do that; it would have to be an AND gate to be able to make O1 LOW. The timing cap voltage isn't dependent on the voltage on the trigger input. Once the oneshot is triggered, the voltage on C1 will rise to 0.67Vcc. At that time, the capacitor will be discharged and the timer output will go low; provided that the trigger input voltage is above 0.33Vcc.
 
Last edited:

Thread Starter

kaufmanda

Joined Mar 5, 2020
8
Dennis- I think I need to explain the details of the entire circuit more clearly than I have been. Here is the breakdown:

1. The interrupters are activated by a "manual" method where if a metal bar literally runs into an object it will rotate, block the interrupter beam, and send a LOW signal (without the 555) through a PCB to what appears to go "directly" to an Altera Cyclone IV chipset. This is turn activates code/instructions that tell the equipment (a printer in this case) to move up and away from the object. This only needs to see a LOW for this action to happen, any high signal after this is doesn't matter as the printer takes about 5 minutes to finish that process.

1a. There is an inherent flaw to this system. If you activate the metal gate as quickly as possible, the signal never gets "read" by the Cyclone IV. It has to be done somewhat slowly. This is the entire reason for the mono 555. I have tested the existing circuit, with its flaws, and no matter how quickly I activate the metal gate, the chipset now reads it with the delay (about 1-1.4s on an O-Scope). This is critical as about $10k worth of parts can be taken out in seconds if the signal is not read.

1b. The functionality of the logic gates are also critical to this process. There is no set time where the signal can go from LOW to HIGH depending on the state of the machine. U2 inverts the 555 out and reads the state of the interrupters. If they are LOW the machine is still "crashed" if HIGH it has moved away. Let's say the machine is still crashed (worst case scenario) then U2 outputs LOW. This will keep the machine in a crashed condition until it reads HIGH, and that's critical, especially if something in the circuit fails.

**Just had an epiphany, U3 is useless as it only creates a "blip", nothing else. Now I understand your last post, I had to re-simulate to see the fault in my own logic.**

Now, with all that being said, does that clear up the need for C2, R3? In turn i'm guessing that can answer why the interrupters are failing?
 

dl324

Joined Mar 30, 2015
11,890
Dennis- I think I need to explain the details of the entire circuit more clearly than I have been.
Thanks, that'll be helpful.
1. The interrupters are activated by a "manual" method where if a metal bar literally runs into an object it will rotate, block the interrupter beam, and send a LOW signal (without the 555) through a PCB to what appears to go "directly" to an Altera Cyclone IV chipset. This is turn activates code/instructions that tell the equipment (a printer in this case) to move up and away from the object. This only needs to see a LOW for this action to happen, any high signal after this is doesn't matter as the printer takes about 5 minutes to finish that process.
Since the oneshot time period is less than 2 seconds, you need to AC couple the trigger.
**Just had an epiphany, U3 is useless as it only creates a "blip", nothing else. Now I understand your last post, I had to re-simulate to see the fault in my own logic.**
I still don't understand what you want the circuit to do.
Now, with all that being said, does that clear up the need for C2, R3? In turn i'm guessing that can answer why the interrupters are failing?
You need both C2 and R3. C2 can be smaller and R3 can be larger.

I'm assuming the interrupter is what is supplying the signal to I2. That wouldn't explain why the interrupters are failing.

What voltage are you using for VCC? What are the output levels from the interrupter?
 

Thread Starter

kaufmanda

Joined Mar 5, 2020
8
I still don't understand what you want the circuit to do.
The basic premise is this. The printer supplies 5V to the interrupters. They in turn have their outputs coupled together and use a single wire to send the signal to the printer. I have modified the harness for that signal to now trigger the 555. All I need it to do is "extend" that I2 signal for about 1s with the 555 to give the Altera chipset enough time to read the I/O (and I do realize 1s is overkill) and perform its function. U2 keeps the output of the circuit LOW in case the interrupters are still reporting LOW. That is implemented for safety so the output doesn't default to a HIGH state which is unwanted if I2 is still LOW.

I'm assuming the interrupter is what is supplying the signal to I2. That wouldn't explain why the interrupters are failing.
What voltage are you using for VCC? What are the output levels from the interrupter?
See above for the signal portion of this. 5V is VCC for all components. As far as output level for the interrupters go, I only know they switch from 5V to 0V when the beam is blocked/unblocked. As far as the amperage/wattage output, I have not tried to test this yet. I'm not sure I have tools accurate enough. I'd have to take a look.

Due to the lack of being able to obtain information on them, I may have to use my own. Is it possible because I did the AC coupling incorrectly that there was reverse current which overloaded a max input or output current value in the interrupters, being that it was at 50mA (at C2) without the pull up?

You need both C2 and R3. C2 can be smaller and R3 can be larger.
I'm assuming these are creating AC coupling? R3 at 10k ohms and C2 at 10nF sound good enough?

Did you remove the 100 ohm resistor?
Yes I have.

Thanks for your patience
 

dl324

Joined Mar 30, 2015
11,890
All I need it to do is "extend" that I2 signal for about 1s with the 555 to give the Altera chipset enough time to read the I/O (and I do realize 1s is overkill) and perform its function.
Don't understand why you want this. As soon as the trigger input goes below 0.33Vcc, the oneshot output will go HIGH and it will stay HIGH until it times out or the trigger input goes above 0.33Vcc; whichever occurs later.
 

Thread Starter

kaufmanda

Joined Mar 5, 2020
8
Don't understand why you want this. As soon as the trigger input goes below 0.33Vcc, the oneshot output will go HIGH and it will stay HIGH until it times out or the trigger input goes above 0.33Vcc; whichever occurs later.
The reason I need I2 to have the 555 create an extended 1s low signal is to put it enough of a delay that the Altera can actually read the LOW signal. The stock system (interrupters straight to chipset) simply will not respond to any signal shorter than ~300ms. The HIGH output of the 555 needs to be flipped to LOW to tell the Altera it's still in a crashed state.

A flow chart if you will:

Stock system:
Interrupters (I2) -> Crash causes I2 LOW -> If signal is less than 300ms -> Altera chipset does not read I2 LOW at all -> Machine does not initiate recovery ->Machine Damage

With 555:
Interrupters (I2) -> Crash causes I2 LOW -> signal of nearly any speed -> 555 creates 1-1.4s LOW after U2 -> Altera reads LOW every time -> Machine initiates proper recovery -> $$$ Money saved
 

Thread Starter

kaufmanda

Joined Mar 5, 2020
8
After some painstaking work, I believe I have found the correct data sheet on the interrupters. Does it provide any useful information as to why the interrupters are getting fried?
 

Attachments

dl324

Joined Mar 30, 2015
11,890
After some painstaking work, I believe I have found the correct data sheet on the interrupters. Does it provide any useful information as to why the interrupters are getting fried?
No.
1583962785612.png
You'd need to be exceeding specs or switching an inductive load.
 
Top