by BeanieBots » Wed Jan 17, 2024 11:51 am
Decoupling:
Whenever a transistor switches state, it has to move a bunch of electrons from one location to another. Very similar to discharging a capacitor.
That results in a very brief yet high current. What is not appreciated is that the time can be sub nano second or even pico second and the current can be as much as 10's of amps. It is not possible to see this even with the best o'scope but it IS there.
These 'spikes' can cause all manner of issues, not only to the device which is switching but also to other nearby devices. Especially when analogue and digital are mixed on the same board.
Memory devices have very fast spikes, an IO changing state is much slower but the current is on for much longer.
A simple analogy would be like comparing hitting a nail with a hammer compared to nudging the garage door with your car!
So, what to do about it.
The answer is to have something that can supply that current for the amount of time required.
If capacitors and the PCB were perfect, it could simply be solved by fitting a capacitor.
Unfortunately, all tracks, connections, component legs and even devices have both resitance and inductance. (as well as capacitance)
Although these values are very small, when we are talking about amps and sub nano second time scales, they become significant.
All capacitors have a characteristic ESR (effective series resistance). It is a compound value made up of resistance and inductance.
As a general rule, the smaller the capacitor, the lower the ESR. Or more to the point, large value capacitors tend to have a large ESR.
Therefore, fast switching needs low value capacitance and slow switching requires larger capacitance to be effective.
Unfortunately, it doesn't end there.
As leads etc. also have inductance and resistance, where the capacitor is physically placed and how far away it is from the device it is trying to decouple can have a large effect. It needs to be fitted as close as possible to the device. If it is at the end of some long tracks or even leads, fitting a decoupling capacitor can actuall make things worse. That is because you now have inductance + capacitance + current spike = tuned circuit. You've now made a radio transmitter!
Summary:
Use several decade values of capacitor in parallel as close as possible to each switching device. 10uF - 100uF + 10nF - 100nF will fix most issues.
Regulators are another subject. Most REQUIRE capacitance on input and output to actually work. The datasheet will advise.
Sorry about the long ramble but it really is a missunderstood subject. More than happy to give any further explanation if required.
Decoupling:
Whenever a transistor switches state, it has to move a bunch of electrons from one location to another. Very similar to discharging a capacitor.
That results in a very brief yet high current. What is not appreciated is that the time can be sub nano second or even pico second and the current can be as much as 10's of amps. It is not possible to see this even with the best o'scope but it IS there.
These 'spikes' can cause all manner of issues, not only to the device which is switching but also to other nearby devices. Especially when analogue and digital are mixed on the same board.
Memory devices have very fast spikes, an IO changing state is much slower but the current is on for much longer.
A simple analogy would be like comparing hitting a nail with a hammer compared to nudging the garage door with your car!
So, what to do about it.
The answer is to have something that can supply that current for the amount of time required.
If capacitors and the PCB were perfect, it could simply be solved by fitting a capacitor.
Unfortunately, all tracks, connections, component legs and even devices have both resitance and inductance. (as well as capacitance)
Although these values are very small, when we are talking about amps and sub nano second time scales, they become significant.
All capacitors have a characteristic ESR (effective series resistance). It is a compound value made up of resistance and inductance.
As a general rule, the smaller the capacitor, the lower the ESR. Or more to the point, large value capacitors tend to have a large ESR.
Therefore, fast switching needs low value capacitance and slow switching requires larger capacitance to be effective.
Unfortunately, it doesn't end there.
As leads etc. also have inductance and resistance, where the capacitor is physically placed and how far away it is from the device it is trying to decouple can have a large effect. It needs to be fitted as close as possible to the device. If it is at the end of some long tracks or even leads, fitting a decoupling capacitor can actuall make things worse. That is because you now have inductance + capacitance + current spike = tuned circuit. You've now made a radio transmitter!
Summary:
Use several decade values of capacitor in parallel as close as possible to each switching device. 10uF - 100uF + 10nF - 100nF will fix most issues.
Regulators are another subject. Most REQUIRE capacitance on input and output to actually work. The datasheet will advise.
Sorry about the long ramble but it really is a missunderstood subject. More than happy to give any further explanation if required.