Minecraft wiki entry for Traps, associated text: A target riding the minecart triggers the TNT and gets blown up. It might help to disguise the detector as doing something else, like switching tracks, opening a door, etc.