Passive Perception and Traps [duplicate]

My question is this: should passive or active perception be used for spotting traps? If you use passive, then the DM knows ahead of time whether or not a PC will spot a trap as no die roll is involved (eg. if the highest passive perception is 13, and the DM makes the spot trap DC 14, the PCs will not see it). I would like to avoid railroading PCs by knowing ahead of time which traps they will see and which they will or won’t see. Another problem with passive perception is that you have a 50% chance of getting lower than your passive perception every time you make an active perception check, so you are actually better off never looking for things, and just hoping you notice them.

In summary, when should I use passive perception and when should I use active perception?