Author Topic: Resistors between logic chips/mosfets/mcus  (Read 1099 times)

0 Members and 1 Guest are viewing this topic.

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 502
  • Country: it
Resistors between logic chips/mosfets/mcus
« on: May 31, 2021, 11:24:25 am »
Hi,
As the subject suggest, I would like to get a hang on when it's necessary to put a resistor between an IC output and some other inputs.
By inputs I also mean mosfet gates. Of course this is kind of a digital world question, but I don't know whether it can apply to analog stuff too.
Is it always necessary, to limit the current between the transitions? I mean I don't always see resistors between logic inputs and outputs or before mosfets and I don't know a rule to understand when I need those.

Thanks
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7596
  • Country: nl
  • Current job: ATEX product design
Re: Resistors between logic chips/mosfets/mcus
« Reply #1 on: May 31, 2021, 02:35:21 pm »
For a FET, the answer is "maybe". FET is capacitive load, and there are many many factors if you need a 20-100ohm there or not.
You usually dont place resistors between CMOS or TTL circuits, because it is usually unnecessary. The same way, you usually dont use faster logic gates, than what you need. But that doesnt mean, that sometimes these resistors are not needed.

See, it all depends. Thats the beauty of engineering, you start with some generalized rule, and as you do more and more projects, your decision tree gets bigger and bigger.
 
The following users thanked this post: Moriambar

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6031
  • Country: de
Re: Resistors between logic chips/mosfets/mcus
« Reply #2 on: May 31, 2021, 02:52:13 pm »
There often series resistor on high speed buses (>50 MHz) to dampen ringing and reflections that could corrupt the signal.
 
The following users thanked this post: Moriambar

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9914
  • Country: us
Re: Resistors between logic chips/mosfets/mcus
« Reply #3 on: May 31, 2021, 02:54:04 pm »
I tend to use 330 Ohm resistors in series with MCU pins to prevent short circuits should I define an input pin (output from somewhere else) as an output and change its state accidentally.

I also use 330 Ohm resistors on FPGA pins (particularly output pins) because the edges are so fast that they cause ringing.  This was a particular problem when I was connecting a Compact Flash memory card to an FPGA.  I got this idea from the Digilent FPGA board schematics.  Of course, these resistors also prevent short circuit damage.

CMOS uses no appreciable input current so voltage drop across the resistor will not affect the logic level.

Driving a MOSFET is a different deal.  You want fast rise times so if you use a resistor, it will probably be on the order of 100 Ohms.  That would pass 50 mA at 5V logic level and this is usually allowed for MCU outputs (briefly).  Design wise, this may not allow for fast rise time and MOSFET heating will still occur.  MOSFET drivers do a better job.

Other opinions will vary but these ideas work for me.

 
The following users thanked this post: Moriambar

Offline mrkev

  • Regular Contributor
  • *
  • Posts: 225
  • Country: cz
Re: Resistors between logic chips/mosfets/mcus
« Reply #4 on: May 31, 2021, 04:36:16 pm »
Generally, resistors limit the current and they are added for two main reasons:
  • Output protection
  • EMI reduction
Load conditions for pins are usually specified in the datasheet and they have a static (DC) and dynamic (AC) part. The static part is deffined by the maximum output current, the dynamic by the maximum capacitive load. For example this is an exerpt from the PIC32MX microcontroller datasheet and it shows dynamic requirements.

You can see that the maximum allowed load on each IO pin is 50pF. If you'd want to directly control something like a power mosfet with input capacitance of 500pF, you'd have to add a series resistor. Keep in mind that the resistor will slow down the transition, which may cause some other problems (usually, you want the transition to be just a bit faster than needed). If you need faster transition, you can use smaller MOSFET with an input capacitance of few pF and use it to switch the power transistor.

The same goes for EMI reduction. Frequency spectrum of a signal is higher the faster it is changing and higher current produces higher magnetic field. Magnetic fields that are created by high frequency signals are generally more easily emited to the enviroment (higher frequency means lower wavelength and need for a smaller antenna).
 
The following users thanked this post: Moriambar

Offline MoriambarTopic starter

  • Supporter
  • ****
  • Posts: 502
  • Country: it
Re: Resistors between logic chips/mosfets/mcus
« Reply #5 on: May 31, 2021, 08:17:58 pm »
wow so many good answers. Thanks a lot folks!
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19681
  • Country: gb
  • 0999
Re: Resistors between logic chips/mosfets/mcus
« Reply #6 on: May 31, 2021, 09:51:06 pm »
It's often be done when 5V outputs are connected to parts run from 3V. The built-in ESD protection diodes prevent damage to the 3V part, as long as the resistor is a high enough value, to limit the current to a safe level. Care also needs to be taken to ensure the 3V power supply rail isn't pulled-up to a higher voltage by the current passing through the resistors connected to the 5V rail.
 
The following users thanked this post: Moriambar


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf