A cannon is a piece of artillery typically used as a weapon, although they are also commonly used for ceremonial purposes.
In 1991, while the Dursley family and Harry Potter were hiding out at the Hut-on-the-Rock following Vernon Dursley's taking the family on the run from wizards, Dudley Dursley stupidly commented "Where's the cannon?" when Rubeus Hagrid knocked loudly on the door. Later that year, Harry pulled a Wizard Cracker with Fred Weasley and it "went off with a blast like a cannon."
A cannon was used at the start of each of the three tasks during the 1994 - 1995 Triwizard Tournament. Hogwarts Caretaker Argus Filch fired it, signalling the contestants to proceed to the task. On the first occasion, he accidentally fired the cannon before it was time for the champions to proceed to the task as well as nearly bringing down the tent around him. The second time went without incident, but the third time was another early misfire; Dumbledore gestured with his wand towards the cannon, accidentally causing it to discharge.
- Harry Potter and the Philosopher's Stone (First mentioned)
- Harry Potter and the Goblet of Fire (film) (First appearance)