Dead mans guns; the cemetery gun, grave torpedo, and grave mine.
During the 1800’s there was a big problem with grave robbery and body snatching. Grave robbers would dig up a corpse and rob it of any jewelry, valuables, or gold dentalwork. Body snatchers would steal the whole corpse, selling it for scientific study at medical institutes and hospitals.
However, bereaved family members were not going to stand for such ghoulish behavior and began to arm their departed loved ones. One interesting method was the cemetery gun. A flintlock or percussionlock black powder weapon, the gun was set up hidden near a grave stone. A tripwire was set across the grave, and if a grave robber, or passerby tripped the wire he would be shot. Usually the gun was setup and armed at dusk and disarmed and removed at dawn by the cemetery keeper.
The next invention was the coffin torpedo. Patented in 1878 by Phil Clover of Columbus, Ohio it was not so much a torpedo but more like a shotgun. The gun was buried with the diseased with a tripwire set on the lid. When graverobbers opened the lid the gun would fire a load of buckshot into the faces of the thieves.
The final invention was the grave mine. Also invented in 1878 by Thomas N Howell, the grave mine was literally a landmine, technology developed during the American Civil War. The mine was buried on top of the coffin lid, and if triggered would blast the would be graverobbers straight to the afterlife.
But the turn of the century graveyard protection devices lost popularity, mostly due to new laws allowing for the legal procurement cadavers for scientific institutions, laws requiring the burying of corpses within vaults, and laws limiting the amount of valuables that can be buried with a corpse.