How can I generate a redstone signal when players are near?

You can use mob spanners to create sensors that only activate within 16 blocks of them. An example construction is shown here:


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.


IF you're using Bukkit, there's a wonderful plugin called PailStone that has sign proximity sensors. You define a volume, and when a player enters that volume, the sign provides power. I used it along with a few other mods to make an enormous airbase with huge doors that automatically opened when a player approached them.