Should a ferrite bead be placed close to the MCU or close to the power supply?

You should generally place filtering components as close as possible to the source of the noise you want to filter out. If you're concerned about noise from your power supply, put your filter near the PSU. If you're concerned about noise from the microcontroller, put the filter near the MCU.

For sensitive analog inputs, though, you want to put a filter close to that input. This can be thought of as because the entire trace leading to it is the noise source you're concerned about here; you just want to isolate that antenna of a trace from the input.


Place it

  1. as close as possible to the source, e.g. switching circuit of the power supply.

This will attenuate the noise before it can travel through wiring, to avoid emissions by the wiring. These emissions (egress) can cause ingress or interference within the device itself and into other devices.

  1. as close as possible to any sensitive analog inputs.

This will reject ingress captured by any wiring and connectors that lead to these sensitive inputs. Keep it close to the inputs, to cover as much input wiring as possible.