Minecraft wiki entry for TNT_cannons, associated text: Once you activate the switch, first it activates the charge wiring, then sends a minecart around the cannon that triggers a detector rail, which primes the shot. Saves redstone, but takes a lot of iron (However, if you get rails from abandoned mineshafts this design can even save you resources!).