How can I generate a redstone signal when players are near?
Solution 1:
You can use mob spanners to create sensors that only activate within 16 blocks of them. An example construction is shown here:
Solution 2:
If you are in creative, run a clock wired up to a command block that has the command /testfor @p[r=some number]
with a comparator output to the pistons.