I am currently studying an intro course in digital logic and had a small project I needed to create. I had to use a NOT gate(74HC04) to set off a buzzer when a simulated front door of a house opens(so when a switch opens, the buzzer goes off).
It was a really simple circuit and I got full marks but my question is this, the output voltage of my NOT gate(74HC04) is +5V and is enough to make the buzzer sound but not very loud at all. Is there any way to use the NOT gate setup but somehow also have the buzzer connected to a 9V battery to make the sound louder? I read that the maximum voltage for the IC(74HC04) is +7.0V so I'm worried I will break the IC connecting it straight to the 9V battery.
So to sum up my problem, I need the logic function of the NOT gate but need the buzzer to have +9V across it when a switch opens/breaks. If you cannot do this with a logic gate is there any other simple way this circuit can be set up?