Programs and Spreadsheets
Home
Note: Don't hold me responsible if anything goes wrong with
your speaker design or your computer!!! The program shouldn't
do
anything to your computer as it is just a "plug and chug" mathematical
program. It's not doing anything to any computer settings
(like
changing resolutions, or taking control of other processes) that could
interfere with other programs. I would think that if it
crashed
(say by dividing by zero or something similar), it would just quit with
a warning and leave the rest of the system intact. Of course,
we are
talking about microsoft
operating systems ;-)
Also, I am very virus conscious and spyware conscious and have kept my
computers and network
virus-free and trojan-free. I keep my virus scanner up to
date,
but that's not to say the web server may get one, or that my scanner
may
miss one. ALWAYS
check downloads for viruses, even from friends - ESPECIALLY
from
friends! And if my web
page
and programs help you design a subwoofer that shakes your house off
its foundation - well, sorry, I'm not responsible for that
either, though it might
be nice to mention this site as providing the necessary tools for
destroying your foundation ;-)
Note 2: Spreadsheets are in Excel 97 format.
My program:
Leo's Simple Speaker v. 1.0.6
(LeoSimpl.zip ~1.6
MB zipped)
- Now
version 1.0.6!!!
New Install Program:
On some WinXP
machines, the program wasn't working standalone because some needed
files weren't properly registering in the registry. I've now
written
an install program
(written? Yeah, right - it's an
installation wizard program included with VB) that properly registers
the OCX file.
Enjoy it! If you find
any major
bugs,
email me at the
address on my HomePage. (Hopefully, I
won't get 10 MB of bug reports!!!) Please don't send requests
for
program changes, I may not even finish this one - including the
crossover sections. Notice:
the program
is now in a zip file called LeoSimpl.zip. Sorry, the tiny
original few 100 kb program grew to over 1.6 MB because of all the
extra installation
files required beyond my simple program. If I figure out how
to
write an install routine rather than letting Visual Basic do it, maybe
I can make it smaller.
You will notice tabs for
crossover data and crossover graphics - NO they don't work.
That's still on
the agenda if I ever get back to it. Hey, it's taken too long
just to get the main part into VB, much less the crossover
stuff!
And it's hard enough keeping up with my updates.
Another important note:
If the
graph axes labels don't line up with the lines, check your font dpi
settings on your display settings ("Control Panel/Settings" or "Right
Click" your desktop and select "Properties," then select
"Advanced"). Most computers are set to small fonts, or normal
96
dpi. I designed the graphs using 96 dpi. Actually
the graph
is irrelevant, it's the text labels that rely on dpi
settings. If
your font settings are set to large, 120 dpi, the axis
labels for frequency won't line up with their respective
lines.
Again, I may
have to change the way I draw graphs. Basically, I draw the
graph, and just label the graph with Print (and Tab)
statements.
This technique relies on the font dpi setting. My machine
(and
probably 80% of machines out there) uses 96 dpi. Basically,
the
dpi setting determines how widely spaced the characters are.
If
you vary this setting from 96 dpi, the graph size stays constant, but
the axes labels stretch or compress across the screen and won't line up
with their respective lines. If you don't want to change your
font dpi settings, the
graph is still accurately drawn, it's just that the labels
don't
line up with their respective lines. Just keep in mind that
the
graph starts at 20 Hz, and goes up by 10 Hz at each line until you
reach 100 Hz. Then the lines are 100 Hz apart.
Installation
and Removal:
As mentioned, just download it, unzip it, and run setup.exe.
The
program shortcut
installs in your start menu (by itself, not in a separate
folder). To
remove the program, just go into "Control Panel/Add Remove Programs"
and select it for removal like any other program.
Basic
Instructions and
Tips:
Try to hit enter after every input. Previously, the
TAB key did not pick
up all
values entered, but I think I fixed it. If you change any
volumes (or
tuning) on the Box Model
tab,
you have to click
the <Calculate> button again. Oh, the
<Print>
buttons for the graphs print the form rather than the picture box -
Sorry, I
know it wastes precious ink. However, I did change the
Box and Vent
Tab print routine
so that it prints the data out on paper rather than printing the form,
so it wastes less ink than it used to waste. When you click
<Save Image>, if you named
the
driver, it will save that image as "driver name"Frequency.bmp or
"driver name"Limits.bmp. If you don't enter a driver name, it
will
substitute "FrequencyResponse" as the driver name.
If you're wondering why I didn't start with the cursor in the "Driver
Name"
textbox , it's because I often find myself just wanting to see how a
group of drivers model, and it's real quick to enter Fs, Vas (and
units) and Qts
immediately, then hit <Enter> (if
<Calculate> is
highlighted) or click <Calculate>.
You should be able to immediately hit <Enter> again,
since
<Frequency Response>
should be highlighted, and you will see your graphs.
Basically,
five "Enters" and you have a graph - Pretty quick, huh?!
Since I
often want to change box size or tuning, I put the
<Calculate>
button on the
Box Model
tab, too.
For
Newbies, to calculate and model boxes for a driver, you need three
parameters at a minimum: Fs, Vas, and
Qts. Then you
can
click <Calculate> and get recommended box sizes and
tunings. If you want to see Maximum SPL graphs, you
need:
Power Handling of the Speaker (for thermal limits), and Vd.
If
you don't know Vd, you need Sd and Xmax. If you don't know
Sd,
you can input the driver's diameter and Xmax.
Sealed boxes should model fine for any Qts. Remember, you
can't
input a Qtc
that's less than Qts. The program adds 0.1 to Qts to get Qtc
if
the Qts is above
0.707 (The program's normal Qtc default) which will give you a big
box. Don't fret if it's a huge box, just change the volume to
something you can
tolerate, or shoot for a higher Qtc and re-calculate. Vented
boxes model best when Qts is between about 0.2 and 0.8 (and
using Qloss = 7). I used some curve fitting programs to get
very
accurate formulas for this range of Qts (and Qloss = 7) using The
Loudspeaker Design
Cookbook and Bullock on
Boxes.
Beyond that, the routine kicks out
to a traditional power function vented box formula which may not be the
best
or flattest model.
At least it doesn't give a negative volume which is what my new formula
would calculate if Qts gets very low. But, again, don't fret,
just input various box volumes and tunings and click
<Calculate>
and then click <Frequency Response> to see the
graph. Keep
changing
values until you find a response that suits you. Note - don't
just click the graph tab, you have to click the <Frequency
Response> or the <Displacement Limited Output>
button to
initially graph the response. After that, if you don't change
any
inputs, you can click the tab to see the
graphs. Actually, there is another way to make a
graph. If
you've already clicked the <Calculate> button and then a
tab for
a graph, just hit the save button, and it will draw the
graph.
That's just a side affect of how I save the image. Of course
this
does save an image, but it will be blank if the page started out
blank. ;-)
On the Box and Vent page you can input extra volume for bracing, etc...
as well as add a predetermined percentage if desired. For
sealed
boxes, you may want to take into account stuffing by making this
percentage, say 20% or 30% less (in other words, make this box 80% or
70%). With vented boxes, you may want to
overdesign by 10% or 20% so input 110% or 120%. I thought
about
making a separate percentage volume change box for each box type
(sealed and vented), but figure you're already interested in one or the
other at this point, so I didn't. I may later. You
can
also input various port diameters. Hit return after inputting
each of these values, and the values change instantly. One
other
thing I ought to explain, the Displacement Limit Graph isn't based on
overall excursion limit formulas per say. What I used was the maximum
displacement limited output formula in the LDC which is truly only
valid above F3. This formula uses a K constant that for sealed boxes,
depends on Qtc, so that it basically changes for different box volumes
as you would expect (bigger box, lower Qtc, less power handling). Try
different volumes and the sealed box curve changes. However, for vented
boxes, it just uses a constant value of 3 for K. Therefore, the vented
graph calculations don't change as you would expect due to different
box volumes and tunings. (I still haven't found a reasonable formula as
of version 1.04.) Granted, these formulas in the LDC are only
truly valid at F3 and above. What I have done is to use the formulas,
but varied the "F3" across the graph from 20 Hz to 500 Hz - a somewhat
bastardized process, and then I flatline it at maximum power. The
upshot of all this? Comparing the sealed box displacement curves is
probably pretty reasonable to get a relative idea of power handling,
but the vented curves should be taken with a grain of salt.
:-) I
would think that the "true" vented box power curve would follow the
sealed box for most of the way as you go down in frequency, but would
drop like a rock below
Fb. Don't be mislead and think that the vented box always has
more power handling. It doesn't. As a rule, vented
boxes
have similar power handling down to the sealed box F3. Vented
box
power handling is probably better than (or equal to) the sealed box
from that point down to the vented box F3 at which point the vented box
will have much better power handling. Finally, below the
vented
box F3 (or more accurately, the tuning - Fb), the sealed box will have
better power handling since the woofer is unloaded below this point in
the vented box.
Besides that, the LDC says you can use Xmax + 15% to calculate Vd, but
I just used Xmax (no extra 15%), so my values should already be
somewhat conservative. Basically, I would just use the curves to
compare driver outputs, but not read into them that they're at the
absolute maximum output. You still have a little headroom.
Don't
go around saying, "Leo says this is the maximum, blah, blah,
blah...," or that, "Vented boxes handle the most power." You
just
might be wrong. ;-)
This program doesn't cost anything, it's not even shareware.
Well, on second thought, let's call it "Lunch-ware." If
you're
ever in town (say, seeing McJerry from Eminence or something) stop by
and buy me lunch. McJerry knows where I live. Or
perhaps we
may meet at a speaker building meet, say in Dayton or Lima or where
ever. Besides that, we can chat about speaker
building. :-)
Have fun, and I hope you find it useful!!!
Bug
Fixes for version 1.06:
- First major fix was to make an install routine to properly
register the TAB ocx file as well as the install data. When
trying to use the standalone version of the program and the OCX file,
machines that didn't have Visual Basic or the OCX file installed may or
may not run the program properly. (It always worked on my
machine
because I had Visual Basic of course.) Corrected.
- I realized there is a possibility that axis labels might
not line
up with their respective axes on graphs. See "Another Important Note"
above. Corrected
Oops, not corrected, I should say that now you're aware of it.
- Printouts from the "Box and Vent" tab showed the last ratio
label
as "2.60 : 1.60 : 1" instead of "1.59 : 1.26 : 1". The actual
dimensions under height, width, and Depth were correct, just the label
showing the ratio was wrong. Corrected.
- On the Frequency Response Graph, "Cu m" units printed a
closed
parenthesis ")" after the "m". Corrected.
Bug
Fixes for version 1.05:
- I use a "while" routine when doing some calculations, and
certain
combinations of low Fs and Qts=0.37, would cause it to "resonate" or
bounce between two values instead of closing in on a difference
approaching "0." That programming routine was in all program
versions including my old DOS GWBasic version. Apparently it
didn't affect the old DOS version, though. It probably has
something to do with roundoff of double data types in the two different
programming languages. I've inserted a catch for when the
routine bounces indefinitely like this, and rerun the routine with
different start points. Corrected.
- I added a "GotFocus" routine that now highlights the text
as you
tab through textboxes. Previously, it just placed the cursor
in
the box but didn't highlight any text already there in order to
overwrite it. It was annoying having to double click the box
to
highlight the previously entered text instead of tabbing or hitting
enter, and being ready to overwrite the existing data.
Corrected.
- I also updated the Compliance (VAS) units options so that
when
you change the units, You have to hit calculate again. It
also
clears the text boxes on the "Box Model" tab "reminding" you to hit
<Calculate> again. Previously, a bug would
change some
calculations. Corrected.
Bug
Fixes for version 1.04:
- Some boxes, most notably Fs, Qms, Fb and the "Overvolume
percentage" boxes, would tell you to input a number >0, then say
"Are you sure about this number?" if you hit enter with the box left
blank. Corrected.
- I finally wrote a print routine for the "Box and Vent" tab
instead of printing the form. As an added
bonus, if you choose metric units on the "Box Model" tab,
it now
prints out in metric units. Note that the screen tab still
shows
english units, but the printout will show metric. I didn't
feel
like writing much more on the tab to force it to show metric
units. Sorry non-USA people, I'm just lazy. Be
thankful I'm
at least printing it out. Corrected.
- I noticed that on the "Box Model" tab that if you changed
units,
the vented box routine wasn't changing appropriately. I now
fixed
this, and have made switching units on the fly much easier by
incorporating that unit option buttons in a "Change" routine.
Just pick different units on the "Box Model" tab (between sealed box
volume and Qtc) to see your speaker modeled in either english or metric
units.
- I also changed the graph "notes" at the bottom of the
graphs. If you change units on the "Box Model" tab, then hit
<Frequency Response> You will see the pertinent data in
those
units. I just noticed that the "Cu m" units prints a closed
parenthesis ")" at the end. Oh well, I'll fix that later.
- On the "Input" tab, I added a "keyboard tab" routine to
include
the units on Vas. Now you will start out inputting Fs, then
the
program will tab to Vas, then it will tab to the Vas "units" where you
can input "l", "f", or "m" for liters, cubic feet, and cubic meters
respectively. Of course it starts out on "liters."
Sorry Parts
Express, I
love you , but get with the program and use liters like 99.9% of other
speaker companies instead of cubic feet. :-)
- I know there were a few other changes, but silly me, I
didn't
keep too good of notes on what I fixed. Oh well, it's
better. That's all I can say. :-)
Eventually I will
finish those crossover routines.
Bug
Fixes for version 1.03:
- An error could occur if the <Save Image>
button was clicked
before calculating data. I had various "catches" to keep you
from
going here, but there were still a few ways around it, so I made the
<Print> button and the <Save Image> buttons
unavailable
until <Calculate> is clicked. Corrected.
- If the <Save Image> button was pressed on the
Displacement Limits
Tab, then the
<Save Image> button was pressed on the Frequency Response
Tab, a bug
changed the Qtc to 1.1 without the users knowledge and it would output
a graph based on that. If <Calculate> was
pressed, the
Frequency Response would return to normal when the <Frequency
Response> button was clicked. Corrected.
Bug
Fixes for version 1.02:
- I Changed the color of the vented box to the appropriate
blue on
the displacement graph. Corrected.
- Also, when the graph is less than -30 on the displacement
graph,
it now
plots a red line. (The curve continues to draw along the
bottom
edge of the chart, it just should have drawn in red so it didn't
overwrite the chart outline which is drawn in red.) Corrected.
- If you made Qtc =0 or "" on the Box
Model tab, even if box volume was
chosen, it would say, "input a number > 0" and switch you to the
front tab. Corrected - mostly :-) (If you make
Qtc=0 or "
", it adds 0.1 to the Qts, then calculates box volume.)
- On the Boxmodel
tab, if
you totally deleted the Vented Box
Volume, and clicked <Calculate>, it would recalculate
normally. But if you changed the volume to 0, it calculated
to a
different volume. It was jumping to the "old formula
routine." Corrected.
- Also, It didn't format the Box Volume text box when jumping
routines to the old formula. Corrected.
- I forced the X/Y coordinate readouts (dB, Hz) to
only
reflect mouse position within the graph limits. Corrected.
- Previously, if you hit <Save> or
<Print> on the
graphs, it kicked you back to the second tab and cleared the
graphs. Now it leaves you in the graph and clears it and
redraws
it. Corrected.
- If you changed original inputs, the box sizes and tuning
didn't
reset on the next tab. Now they do if Qts, Vas or Fs
change.
Corrected.
- I put a copy of the Calculate button on the front page, and
now
have let it switch to the second tab. I'm just trying to keep
button pushes to a minimum. Now you can enter Fs, Vas, Qts,
and
hit <Enter> and it moves you to the second tab, and it
automatically highlights the <Frequency Response> button,
so you
just have to hit <Enter> to see the graph.
Corrected.
- It now prints the Peak Frequency and the Peak dB at the
bottom of
the Frequency graph. Corrected.
- I turned off the ability to click into the mousemove X-Y
boxes.
Corrected.
- I limit Fs to less than 500 Hz, so the program only
calculates
values where Fs is < 500 Hz since that is the limit of my
graphs Plus, it took longer to calculate as I have every
frequency go through a "while" statement when calculating F3 for vented
boxes. Corrected.
- I added a question about input if it is way outside a
"normal"
range (say if Q>2). It says, "Are you sure about this
number,
it is outside the normal range for this value". Corrected.
- Oh, when the mousemove events are inside the Text boxes
which
show cursor location, I leave the pointer as a cross.
Corrected.
- I turned off the ability to change the cursor location
boxes on
the graphs. It didn't hurt anything, but it implied you could
type in your own values. Corrected.
Bug
Fixes for version 1.01:
- On the Box
and Vent
tab, the sealed box original volume and
ratio volumes doesn't appear to change when changing to metric on the Box Model tab. If
you expected your
answer in cu ft, you were fine
;-)
Vented box is fine. Corrected.
- Also, on the same tab, the Additional Volume percentage box
implied (in the tool tip) that it accounts for stuffing which should
allow it to decrease box volume. Well, it didn't. That's what I get
for trying to combine a box for additional stuffing based on extra
percent and stuffing correction to allow a volume reduction due to
stuffing. Re-written such that you can put in a
value using 100% as meaning the same original volume and numbers like
80% mean 20% less volume due to stuffing. Corrected.
- Frequency Graph - If you had designs which caused the graph
value around 500 Hz (normally fairly flat) to move up or down from the
0 dB line, the text below the graph will float up and down, and
sometimes
overlapped the graph. The program used that last point graphed to
determine where to start printing text. Corrected.
- Changed a routine which added 0.01 to Qts to get Qtc so
that
it now adds 0.1 to Qts. When using 0.01, it was giving huge
box
volumes, heck, that's just about an infinite baffle design!
Corrected.
- Added an icon to the "About" box. Okay, extremely
trivial, but it looks better. ;-)
Well, all in all, not too bad so far. I would just hate to see a really
major error pop up.
My
Old
MS-DOS Speaker Building Program (~64 kB zipped)
- Recently updated -
not as bad as "MacroSucks
Gatesware" Corporation :-) Written in
QBasic. Runs full
screen now - to print graph, hit
<cntrl>-<PrntScrn>, then
open Paint and hit paste - may not print this way in WinXP or Win2000,
or at least it won't in my WinXP). Yes, it's old and I know
there
are still some bugs, but I don't even want to hear about
them. I
don't intend to do any more to this little program, but it gives quick
and fairly accurate designs. Just
pretend I work for Microsoft and that
there will be a major patch out soon. Yeah, right!!!!!
:-).
The
vented box routine starts going crazy if the Qts is not between about
0.15
and 0.6, and may give negative numbers for box volume (especially for a
low Qts), but even in this case, you can still do a custom design using
any
volume you want and the curves and numbers should change to then be
okay.
There is still a loop in the vent subroutine (or maybe it's the box
volume?) that says value must be greater than zero even if it is
greater than zero, but usually it works. The box
simulation
using design tables is for use with the charts in the Loudspeaker
Design
Cookbook.
Miscellaneous Crossover Formulas
(49 kB) -
This spreadsheet contains a parallel trap routine (notch filter),
sloped attenuation routine and tweeter attenuation routine.
Input
data into the blue boxes to find the proper filter values from the
Loudspeaker Design CookBook. Note that
the formula for
the
parallel trap routine is incorrect in older LDC's. I informed their (a?) web site of
this and they
said the error still went out as late as the 6th edition. I
don't
know if it's been corrected in the 7th edition. At the bottom
of page 121, 5th edition (p. 119, 4th ed.), the formula for Z should be:
Z=1/SQRT[1/R2+(
6.2832*f*C - 1/(6.2832*f*L))2
]
(if I did my math correctly). In the LDC, in the highlighted
section, the fractions were "inverted" or 'flipped" to what is shown
here.
Frequency Response plot (74 kB)
- Finally,
here
I have a spreadsheet that plots the frequency response of
your
meter readings so you don't have to plot them by hand. It's
already setup for 1/3 octave warbled sine waves (1/3 octave pink noise
should work also, though the overlap between frequencies may make it
not as accurate). If you want 1/6 octave tones, just change
the
1/3 to 1/6, but then you will have to lengthen the table (just copy the
last lines on down), and readjust the limits of the graphs and move the
correction factors up or down or add accordingly. Not
difficult,
just tedious. However, most people use 1/3 octave tones -
pink
noise or warbled sine waves. Don't use steady sine waves
(except
perhaps at the lower frequency extremes say below 80 Hz), or your
response curve will look like the Rocky Mountains. There are
two
worksheets you can click through at the bottom. Just input
into
the first table on the first page, all other tables will fill in
accordingly. Aren't spreadsheets great?!!! The
difference
between the two pages (worksheets) is that the first page utilizes MY
correction factors for the RatShack SPL meter, and the second page
utilizes HTF's
factors.
I hope they are clear enough. Have fun. I hope you
enjoy
these simple little things.
TOP OF PAGE
Last updated 6/23/07