frustrated with calcs

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
programmer

nice to see a fellow programmer on the board, you just started so learning basic or your a historian studying the 1980's?;).
Sometime if you can you can get a hold of Visual Basic( .net?) I like it the best for most applications. Javas really popular but I find development takes too long and if I just need to crunch numbers its hard to beat C. I've been taking the lazy route for most stuff I usually have been doing excel sheets for passive/active crossovers and some of the box design.

If you pick up the current car audio and electronics(June 2005 Pg10) mag he mentions his program that only uses 3 speaker specs to tune a box, haven't had a chance to check it out yet.

BTW did you check the # of reads of this post? its only been u and me talking:whazzat: :bigeyes:
 
if you click on the stuff on the left it works... Its probably something that blocks 3rd party. Like how some websites dont work with a google image search(tripod). Roll off after 50Hz... I guess thats ok if you want output. Transfer function phase is above me still so meh looks ok for a badpass. output is inversly proportional to bandwidth.
 
That's Going to Sound Bad.

Sparky,

I have to commend you for your design. I can't believe you wrote your own software. That is very thorough.

I hate to say this, but it's not going to sound good. There are two problems. First, the transfer function in a car will bump up the bass around 60hz, so your box will sound REALLY boomy. Second, I've built dozes of boxes, and I've never seen one where the calculated port actually worked.

The *only* way to be sure your port will work is to actually measure the impedance curve. Generally I find that I have to reduce the port length by at least 25% to get the impedance curve correct.

Sorry to be the bearer of bad tidings :(

If you start building the box, you can measure the impedance curve and tune it properly. All you need is a $30 multimeter and some resistors. Or a soundcard and speaker workshop. www.audua.com

John
 
John

Thank you, thank you. That was exactly what I was looking for.
Some honest and direct answers.

I'm actually thinking about using a more simple design (sealed box) to save space and make it easier on me.

The 'software' I wrote was only written in BASIC so it's not all that, but nice to use.

My program actually 'draws' the box for you.

Here's my final cut of the program (if you want it).

5 CLS:SCREEN 9:COLOR 7
10 CLEAR
20 PI=3.141592653589793#
30 LOCATE 1:pRINT "Volume of wedge speakerbox and port tube length calculator:"
40 PRINT "(All measurements are in inches)"
50 PRINT "Design is currently for single round ports."
60 PRINT
70 INPUT "Depth 1";DE1
80 INPUT "Depth 2";DE2
90 INPUT "Width ";W
100 INPUT "Height ";H
110 A1=7:B1=7:C1=7:E1=7:F1=7
120 IF DE1=0 OR DE2=0 THEN COLOR 4:GOTO 160
130 IF DE1=DE2 THEN COLOR 4:GOTO 160
140 IF DE1>DE2 THEN TEMP=DE2:DE2=DE1:DE1=TEMP
150 GOTO 950
160 INPUT "Box is NOT a wedge. Press <ENTER> to continue.";ENT
170 GOTO 5
180 INPUT "Wood thickness (0.75 default)";T
190 IF T=0 THEN T=.75
200 D1=DE1-(T*2)
210 D2=DE2-(T*2)
220 WI=W-(T*2)
230 HT=H-(T*2)
240 V=((HT*WI*((D1+D2)/2))/1728)
250 PRINT
260 LOCATE 5:pRINT "Select speaker size:
270 PRINT " "
280 PRINT "The following uses approximate
290 PRINT "Air Volume Displacement (Cu.Ft.)"
300 PRINT " "
310 PRINT "1 - 8"CHR$(34)" "
320 PRINT "2 - 10"CHR$(34)" "
330 PRINT "3 - 12"CHR$(34)" "
340 PRINT "4 - 15"CHR$(34)" "
350 PRINT "5 - 18"CHR$(34)" "
360 PRINT "6 - Known Cu. Ft. "
370 A$=INKEY$
380 IF A$="1" THEN S=.035:SP=8:GOTO 460
390 IF A$="2" THEN S=.075:SP=10:GOTO 460
400 IF A$="3" THEN S=.13:SP=12:GOTO 460
410 IF A$="4" THEN S=.27:SP=15:GOTO 460
420 IF A$="5" THEN S=.33:SP=18:GOTO 460
430 IF A$="6" THEN INPUT "Air Volume Displacement";S:GOTO 450
440 GOTO 370
450 INPUT "Enter speaker size in inches";SP
460 IF SP+2=W OR SP+2<W THEN GOTO 500
470 COLOR 4:LOCATE 20:pRINT "Your speaker is too large for your box, try again"
480 INPUT "Press <ENTER> to continue.";ENT
490 T=0:GOTO 5
500 V1=V-S
510 PRINT
520 INPUT "Desired tuning frequency(Hz)";F
530 INPUT "Desired port Diameter";D
540 CLS
550 L=(14630000#*((D/2)*(D/2)))/((F*F)*(V*1728))-(1.463*(D/2))
560 PRINT
570 PRINT "Gross volume of the box ="V"cubic feet"
580 PRINT "Net volume of the box ="V1"cubic feet"
590 IF L<0 THEN ER=2:GOTO 1110
600 IF D<=DE2-L THEN GOTO 610 ELSE FR=1:GOTO 610
610 IF D<=H-L THEN GOTO 620 ELSE VR=1:GOTO 620
620 IF D<=W-L THEN GOTO 630 ELSE SR=1:GOTO 630
630 IF D<D1 THEN GOTO 640 ESLE DR=1:GOTO 640
640 IF FR=1 AND VR=1 AND SR=1 THEN COLOR 4:pRINT "The port will NOT fit this box":ER=1:GOTO 1110
650 IF DR=1 AND FR=1 AND VR=0 AND SR=1 THEN COLOR 4:pRINT "The port will NOT fit this box":GOTO 1110
660 IF FR=0 AND VR=1 AND SR=1 THEN COLOR 14:pRINT "The port will only fit horizontally (from the front)":ER=3:GOTO 790
670 IF FR=0 AND VR=1 AND SR=1 THEN COLOR 14:pRINT "The port will only fit horizontally (from the front)":ER=3:GOTO 790
680 IF DR=1 AND FR=0 AND VR=0 AND SR=1 THEN COLOR 14:pRINT "The port will only fit horizontally (from the front)":ER=3:GOTO 790
690 IF DR=0 AND FR=0 AND VR=0 AND SR=1 THEN COLOR 14:pRINT "The port will only fit horizontally (from the front) or vertically":ER=3:GOTO 790
700 IF DR=0 AND FR=1 AND VR=0 AND SR=0 THEN COLOR 14:pRINT "The port will only fit horizontally (from the side) or vertically":GOTO 790
710 IF DR=0 AND FR=1 AND VR=0 AND SR=1 THEN COLOR 14:pRINT "The port will only fit vertically":GOTO 790
720 IF FR=0 AND VR=1 AND SR=0 THEN COLOR 14:pRINT "The port will only fit horizontally (from the front or the side)":ER=3:GOTO 790
730 IF FR=0 AND VR=1 AND SR=0 THEN COLOR 14:pRINT "The port will only fit horizontally (from the front or the side)":ER=3:GOTO 790
740 IF DR=1 AND FR=0 AND VR=0 AND SR=0 THEN COLOR 14:pRINT "The port will only fit horizontally (from the front or the side)":ER=3:GOTO 790
750 IF FR=1 AND VR=1 AND SR=0 THEN COLOR 14:pRINT "The port will only fit horizontally (from the side)":GOTO 790
760 IF FR=1 AND VR=1 AND SR=0 THEN COLOR 14:pRINT "The port will only fit horizontally (from the side)":GOTO 790
770 IF DR-1 AND FR=1 AND VR=0 AND SR=0 THEN COLOR 14:pRINT "The port will only fit horizontally (from the side)":GOTO 790
780 IF DR=0 AND FR=0 AND VR=0 AND SR=0 THEN COLOR 2:ER=3
790 IT=FIX(L)
800 TDEC=L-FIX(L)
810 NUMT=TDEC*64
820 SUM=CINT(NUMT)
830 PRINT "Port length = "IT;SUM"/ 64 inches"
840 COLOR 7:pRINT "Port diameter = "D"inches"
850 B=DE2-DE1
860 S=H
870 C=(S^2)+(B^2)
880 HYP=SQR(C)
890 PRINT
900 X=S/HYP:ON ERR GOTO 930
910 RAD=ABS(ATN(X/SQR(-X*X+1))-PI/2):ON ERR GOTO 930
920 DEG=(180/PI)*RAD
930 PRINT "Front angle of box ="90-DEG;:pRINT CHR$(248)
940 A1=4:B1=14:C1=5:E1=2:F1=1
950 DP1=DE1*1.25:DP2=DE2*1.25:WD=W*2.5
960 LINE (350,190)-((350+(DP1*5)),190),A1
970 LINE (350,190)-(350,(H*5)+190),B1
980 LINE (350,(H*5)+190)-(350+(DP2*5),(H*5)+190),C1
990 LINE (350+(DP2*5),(H*5)+190)-((350+(DP1*5)),190),F1
1000 LINE (350,190)-(350+(WD),190-(WD)),E1
1010 LINE ((350+(DP1*5)),190)-(350+(WD)+(DP1*5),190-(WD)),7
1020 LINE (350+(DP2*5),(H*5)+190)-(350+(WD)+(DP2*5),190-(WD)+(H*5)),7
1030 LINE (350+(WD),190-(WD))-(350+(WD)+(DP1*5),190-(WD)),7
1040 LINE (350+(WD)+(DP1*5),190-(WD))-(350+(WD)+(DP2*5),190-(WD)+(H*5)),7
1050 IF T=0 THEN GOTO 180
1060 LINE (200,196)-(200,209),4:LOCATE 15,27:pRINT "= "DE1"in."
1070 LINE (200,252)-(200,265),14:LOCATE 17,27:pRINT "= "DE2"in."
1080 LINE (200,224)-(200,237),5:LOCATE 19,27:pRINT "= "H"in."
1090 LINE (200,280)-(200,293),2:LOCATE 21,27:pRINT "= "W"in."
1100 LINE (200,308)-(200,321),1:LOCATE 23,27:pRINT "= "HYP"in."
1110 IF ER=1 THEN LOCATE 12:COLOR 4:pRINT "An error occured in"
1120 IF ER=1 THEN PRINT "your port length. "
1130 IF ER=1 THEN PRINT "Try raising your tuning"
1140 IF ER=1 THEN PRINT "frequency or decreasing"
1150 IF ER=1 THEN PRINT "port diameter. Port was"L"inches."
1160 IF ER=2 THEN LOCATE 12:COLOR 4:pRINT "An error occured in"
1170 IF ER=2 THEN PRINT "your port length. "
1180 IF ER=2 THEN PRINT "Try decreasing your box"
1190 IF ER=2 THEN PRINT "size or use a larger "
1200 IF ER=2 THEN PRINT "speaker. Port was "L"inches.
1210 IF ER=3 THEN LOCATE 9:pRINT "If using port in front, it will have to be cut at a "90-DEG;:pRINT CHR$(248)" angle and will"
1220 RD=PI/180
1230 ARC=DEG*RD
1240 AC=(D/2)*TAN(ARC)
1250 IN=FIX(AC+L)
1260 DEC=AC+L-(FIX(AC+L))
1270 NUMD=DEC*64
1280 NUM=CINT(NUMD)
1290 IF ER=3 THEN PRINT "need to be ";:COLOR 2:pRINT IN;NUM"/ 64";:COLOR 7:pRINT " in. long to be flush with the front of the box."
1300 LOCATE 18:COLOR 7:pRINT "Do again?":T=0
1310 A$=INKEY$
1320 IF A$="Y" OR A$="y" THEN GOTO 5
1330 IF A$="N" OR A$="n" THEN GOTO 1350
1340 GOTO 1310
1350 SCREEN 0,0,0:'SYSTEM


Sparky3489
 
it's easy

It's really not that hard to measure the impedance. Seriously. You could do it in a few minutes.

The variance in port length is due to the boundaries around it. So if you're box is very large, and the port is not close to any walls, it will be somewhat predictable. But with modern subwoofers, that use TINY boxes, port lengths are impossible to predict accurately to much accuracy.

The easy thing to do is cut the vent to the calculated length, measure the impedance, then adjust the length. Very, very easy.

John
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.