| Electronics > Projects, Designs, and Technical Stuff |
| Help with optocoupler optocoupler connect to schmitt trigger 74HC14 |
| << < (3/5) > >> |
| StillTrying:
--- Quote from: Danesh_SA on December 30, 2019, 06:13:02 pm ---It Will be and EVM board and maybe someone configure that pin as output accidentally, --- End quote --- With only 3.3V I don't think having a couple of the MCU's and the 74HC14's outputs fighting each other for a while would cause any permanent damage in practice. --- Quote ---2-I will change the resistor to 1k --- End quote --- Zero's calculations seem to be on a Vcc of 4.5V, your schems show only 3.3V, with 1k the LED current will only be ~1.4mA. We don't know if the red LED is just a PCB indicator, or something that's to be easily visible in a brightly lit room. The proper way to do it would probably be to use another gate to light the LED, that way the MCU doesn't see any of the damaged logic level due to the LED's mA. --- Quote ---4-another question ,would you please explain about the maximum speed of this circuit ? is it possible to capture more than 100 Hz ,input signal? --- End quote --- With those values switching the 24V at ~5kHz would still get through to the MCU, once you've decided the max speed needed some RC filtering can be added to reduce higher frequency noise level below the 74HC14 hysteresis levels, so it doesn't switch on the noise, - in theory. :) |
| Zero999:
Oh I missed that the supply voltage as only 3.3V :palm: In that case it will be fine since the output resistance of the 74HC14 is higher, at low supply voltages, so the current will be limited to a safe level, even if it's connected to a short circuit. 1.4mA might be bright enough for a modern efficient LED, under normal office lighting, but the current might need to be increased, requiring a lower, not higher value series resistor. |
| Danesh_SA:
Thank you all for the replies. All the system power is 3.3V. I add my final schematic for this EVM ,I change this items: 1-I place "MCUIN1" after R3 wihich is 1K res .R3 will Limit the current for D3 which is a GREEN LED and limit the current,when someone accidentally configure this MCU pin as output Low and 7414 output is High ,It will prevent short circuit and damage to MCU pin and 74HC14.(Is it OK? or i should add another 1k resistor paralell with R3 and connect it to "MCUIN1"?) 2-Since it will be an EVM ,Finally maybe someone wants to install it in din rail rack , in this situation ,brightness is NOT important ,LEDs just for indicator.( Thanks for your attention @StillTrying :-+) |
| Zero999:
I was wrong about R3 because I missed the 3.3V supply and assumed 5V. If it's a high efficiency green LED you might get away with 1k, but if it's a crappy old yellowish-green LED, you might need to reduce the resistor value back to 470R or less. Are you talking about connecting the MCU input to the LED? If so, check the LED's forward voltage is high enough to be a valid logic level high for the MCU. Failing that connect it directly to the output of the 74HC14. Again, I was wrong about high currents flowing, because I missed that the supply voltage is only 3.3V, which will mean the output resistance of the 74HC14 will limit the current to a safe level, even if the MCU's I/O port is configured as an output. |
| Danesh_SA:
Thank's for your response, So you mean is it OK to connect 74HC14 Directly to MCU pin without any current limit resistor? and the reason is 3.3V voltage .I can't find that you say "...at low supply voltages, so the current will be limited to a safe level, even if it's connected to a short circuit" on 74HC14 datasheet ,i think short circuit is always short circuit and it cause draw current(even in 3.3V or 5V ),why you say it's safe because it's 3.3V and NOT 5V? I was Wrong about connecting the MCU input to the LED,the LED's Vf=1.25v ,and i think it's a little bit creepy to sense input signal from here,therefore i connect the 74HC14 output directly (or with series limit current resistor ) to MCU input. I attached the schematic below after correct it,now all things OK? Thanks Zero999 :-+ |
| Navigation |
| Message Index |
| Next page |
| Previous page |