Im building a project that needs to operate an alarm at two different volume levels.
I have it configured to simply set an individual digital pin to high to activate 2 buzzers via an FOD852 optocoupler, one is a louder buzzer than the other and with both going at the same time kinda gives it a unique alarm sound.
Is there any other way that this could be done with a single buzzer? These buzzers im using have their own oscillator inside them already so dont need to have any extra components to drive them.
I was looking at whether or not PWM via code would be an option to modulate a more simple (and less expensive piezo buzzer)without a built in oscillator.
How would this work through an optocoupler?
Any ideas, is there any code examples out there to experiment with? Ive seen examples of PWM changing pitch of a buzzer, but not too sure about volume.
Or am i still best just to stick with 2 individually controlled buzzers?