A stable, highly sensitive chemical sensor has been built that operates by switching ion channels in a lipid membrane. The ion channels are formed by two gramicidin molecules: one in the lower layer of the membrane, linked to a gold electrode; and one in the upper layer, tethered to an antibody. When a molecule of the chosen type binds to the antibody and to a second antibody tethered elsewhere, the two gramicidin molecules are pulled apart, the channel is broken, and the conductivity drops.