Mobs will walk onto the solid blocks above the observers. When they step there, the observer sees them and activates the piston.
P = Sticky Piston (faces center) X = pit P P P P X P P P P lovely craft piston trap ios
The floor should look like this from above: Mobs will walk onto the solid blocks above the observers
(Note: one side will have a gap for the player entry – see step 4) lovely craft piston trap ios