Logic input resistor

Thread Starter

Dritech

Joined Sep 21, 2011
901
Hi,

On the datasheet of an IC which I am using suggests that a 10Kohms resistor is connected between the IC logic input and the MCU (please see attached diagram 1).
Now I decided to use an opto isolator, hence I have to connect another resistor with the collector (please see diagram 2).
In this case shell I remove the 10Kohms and replace a resistor with the same value to the collector? or it is best to divide the 10kohms between the two resistors?
 

Attachments

ronv

Joined Nov 12, 2008
3,770
You can leave them both. I think it is there to save the rest of the circuit if something bad happens to your IC.
PS. Opto isolators are kind of slow, so if you are using it for PWM check that the switching speed is fast enough for your PWM frequency.
 

Thread Starter

Dritech

Joined Sep 21, 2011
901
Thanks for the replies. From the datasheet of the opto I found that if a 330ohms resistor is used with the collector, the switching time will be approx. 45ns.
The problem is that 330ohms is far to small when compared to the 10Kohms suggested by the IC manufacturer.
Is it safe to use just a 330ohms resistor please?
 

crutschow

Joined Mar 14, 2008
34,452
Thanks for the replies. From the datasheet of the opto I found that if a 330ohms resistor is used with the collector, the switching time will be approx. 45ns.
The problem is that 330ohms is far to small when compared to the 10Kohms suggested by the IC manufacturer.
Is it safe to use just a 330ohms resistor please?
Yes. The 10kΩ is to protect the output of the MCU, not the logic input (which is only concerned about voltage).
 

Shagas

Joined May 13, 2013
804
Yes. The 10kΩ is to protect the output of the MCU, not the logic input (which is only concerned about voltage).
Assuming the logic input is of a CMOS family , then it has very high impedance.
I read that CMOS inputs exhibit high capacitance at high frequencies so I'm guessing that a series resistor is only required if the micro is driving the CMOS at very high frequencies am I right?
 

BobTPH

Joined Jun 5, 2013
8,967
The only reason I have heard to put a resistor between an microcontroller output and and input is to make sure there is not a short if the input is accidentally made an output. And then a few hundred Ohms suffices. A 10K is just asking for noise to enter.

Bob
 

MrChips

Joined Oct 2, 2009
30,810
The resistor at the opto-isolator collector is the load.
A 330Ω load resistor will draw about 15mA @ 5V Vcc.
This will affect the the switching time of the output transistor.

Personally, I find this current somewhat excessive. I would opt for a resistor between 1kΩ and 4.7kΩ.

A resistor on the input of the circuit is to limit the current drawn by the input in the event of overvoltage or undervoltage. I have witnessed LM311 comparators being damaged if there is no resistance on the input. If your circuit and the opto-isolator share the same power supply then it is ok to omit the series resistor. It is still ok to include a 10kΩ resistor as suggested by the datasheet.
 

Thread Starter

Dritech

Joined Sep 21, 2011
901
Thanks for the replies.

It is still ok to include a 10kΩ resistor as suggested by the datasheet.
If I do include the 10kΩ resistor, will it effect the switching time of the opto isolator?
 
Top