This brings up an interesting nearby issue: What does a character automatically perceive? What do the automatically fail to perceive, and when do they need to make a roll?
Some assume that anything on the battle mat which is not hidden is automatically perceived. But not everyone.
I think this more basic question needs to be answered before answering the invisibility question.
I rule that when PCs are expecting trouble (which is most of the time, hence the default situation, when adventuring) they can use passive Perception to detect threats. If they're distracted (eg navigating, mapping, tracking, foraging, deep in conversation, or hustling a captive) then their passive Perception has disadvantage.
NPCs who are expecting or looking for trouble (raiding parties, guards on duty, border patrols, beasts of prey on the hunt) likewise use passive Perception. When they are in places they deem safe (at home, at the market in their home town, in their own territory) their passive Perception has disadvantage.
I contest passive Perception with the Stealth checks of hiding creatures. If a creature isn't hiding, and the perceiver is not distracted, then it is automatically detected; if the perceiver is distracted, I use a special form of passive Stealth check which is the creature's bare Stealth modifier with no additions (so normally in the range from -2 (zombie) to +11 (assassin)).
For objects, any object in plain view is automatically detected. Objects that are concealed or disguised can be detected by a PC if his or her passive Perception matches or beats the DC to notice the object. Every point by which you beat the DC increases the distance from which you notice the object by 5 feet. For example, if Muhrek's passive Perception matches the DC to notice the secret door, he spots it when he is in the space adjacent to it. If he beats the DC by 1, then he spots it from the next furthest space.
I'm at great pains to set consistent DCs throughout a campaign. As characters improve, so should their chances of spotting things. So if a lock is Very good, its DC remains 25, whether the PCs are at level 1 or level 15. Having exploding d20s still means there's always a chance of success or failure, whatever the level, and I also enable players to roll dice while obscuring the certainty of outcomes, which helps with immersion.