If you wanted to be absolutely sure that your deceased body stayed inside your grave and didn't end up on an anatomy student's carving table, you could simply ask your heirs to arm your coffin. During the 19th Century, coffin guns and "grave torpedos" appeared on the market, ready to thwart potential body snatchers and ensuring that the corpse's final rest would go undisturbed.
After the American Civil War and before legislation made it legal for medical institutions to acquire donated and unclaimed bodies, human corpses were in high demand. Some grave robbers made a killing, so to speak, digging up cemeteries and selling their grave-gotten gains to physicians and medical schools. To deter these cadaver-nappers, several inventors developed devices design to maim or kill anyone who dug up a coffin. In 1878, Phil Clover of Columbus introduced his coffin torpedo, a shotgun-like device that would atop a buried coffin lid and fire several balls at anyone who uncovered it. In 1881, Thomas Howell, a former probate judge, began selling his "grave torpedo," a shell packed with gunpowder that would explode when disturbed.
And, these devices did, indeed prove fatal. At least three men ended their nocturnal escapade through a Knox County, Ohio, graveyard in 1881 when one coffin gun ignited, killing them. Although legislation and improved cadaver storage eventually rendered the installation of these devices moot, some still lurk beneath the surface. So don't go poking your shovel through any old American graves lest you discover something a bit more shocking than a decaying corpse.
Cemetery Guns and Grave Torpedoes [Guns.com via Neatorama]