A detonator is a small explosive device used to initiate the explosion of a main explosive charge in quarrying, mining, or tunneling operations and in ammunition. Safer, i.e., less sensitive, explosives need stronger detonators. The typical detonator comprises a thin-walled metal or plastic tube containing a charge of mercury fulminate (Hg(ONC)2) or, now more common, lead azide (PbN6), often mixed with other chemicals. The detonator is set off by a flame from a safety fuze or electrically, by passing a current through an attached resistance wire.