How to generate sound with different frequency in a buzzer using Arduino Simulink?
15 views (last 30 days)
I am working on a project, where I am supposed generate sounds of different frequency. I am using Arduino and Simulink support package. But I dont find anything related to generating different frequency sounds in simulink support package. I am aware of Playtone function in Matlab. Can we use this as a Matlab function in Simulink?
Or are there any other methods to generate sounds of different frequency in Simulink Arduino?
Kshitij Chhabra on 18 Jun 2020
From my understanding of your question you want to generate sounds of different frequencies and want to send them as signals for the Arduino Support Packages in Simulink. As you mentioned you may use the playtone function available in MATLAB as a Function block in Simulink. Alternatively, I would recommend you using Audio Oscillator component from the Audio Toolbox available in Simulink.
Once added in the workspace, after double clicking on it you can specify the type of signal, frequency and the amplitude along with the Samples per frame and the Sample Rate in Hz which you’d require to produce.