Page 1 of 1

Port Ratio -> Sound Frequency

Posted: Sat Nov 06, 2021 8:17 am
by HX56
Hi all,

Thought I'd make this post for anyone looking for frequencies for making custom electronic sirens, like myself.
If anyone knows the frequency of a certain port, please post it below.

Thanks!

Re: Port Ratio -> Sound Frequency

Posted: Sat Nov 06, 2021 2:57 pm
by Some_3t22s
The frequency of specific ports, other than the port count, is based on the RPM of the motor spinning. Electrical frequency (50 vs. 60 Hz) is also a factor since a siren's motor spinning at 3600 RPM on 60 Hz produces a different tone than that of the same siren's motor at 3000 RPM on 50 Hz. I will say, however, multiplying the port number by the electrical frequency is usually a good rule of thumb.

Re: Port Ratio -> Sound Frequency

Posted: Sat Nov 06, 2021 4:07 pm
by carolinasignalco
how about a 4/6 port spinning 8000 rpm

Re: Port Ratio -> Sound Frequency

Posted: Sun Nov 07, 2021 5:43 pm
by DJ2226
To put Some_3t22s' in a mathematical equation it would be RPM * port / 60. Most 2T22s do 3450 RPM so 3450*10/60 = 575 Hz and 3450*12/60 = 690 Hz.

For those that want to create a tone generator and take the digital route, I'd recommend an Arduino. I've implemented a full-fledge tone generator on an Arduino Mega and does pretty much every tone from most manufacturers' products along with a voice board. I ended up programming it in such a way that I could technically drop the board into a HyperSpike or Genasys (LRAD) system and turn them into actual sirens if I wanted. I've actually thought about proposing the idea to Sentry, but they dropped the VR series before I could actually make any kind of proposal to them. The language these boards use is similar to C, C++, Java, etc. To replicate dual tones in the code you can use the low side frequency as the base frequency (that is how Federal does it on their controls) and multiply it by the ratio. Swap the numbers to make an improper fraction and turn the number into a decimal. Multiply the base times the decimal and it creates the offset.

This is an example from my code. On the more technical side of things, I use the ToneAC library to generate the tones since it produces pretty smooth frequency sweeps as opposed to the built-in tone() function. I modified the library to take advantage of the larger chip on the Mega and create a second output since ToneAC only has one. When I do frequency sweeps I use a loop to control it. The code will increase the pitch by 1 and wait a certain amount of milliseconds before looping back around and doing it again. After each incrementation of the pitch, I invoke the toneAC() function along with my own toneAC4() function to update the frequency of the outputs. With my version of that library, the sound comes out of pins 6 and 7 (ToneAC4) and 11 and 12 (regular ToneAC on the Mega).

Let's say we've peaked in alert tone and we are mimicking a 500-SHTT. The pitch has been set to 575 Hz. For a 10/12 ratio I turn it into 12/10 and divide the fraction out to get 1.2. I have a float (decimal) variable declared in the header of the code called "offset" that holds this value, so if I want to change it to something else I can just change this and it changes everything in the code. This is the code that updates the frequency on each output:

toneAC(pitch);
toneAC4(pitch * offset);

Re: Port Ratio -> Sound Frequency

Posted: Mon Nov 08, 2021 7:18 am
by Synther
Here is a valuable tool I use every time I synth a siren.
https://www.airraidsirens.net/beta/sirenfreqgen/