elec math helper

Started by Joe Davisson, January 16, 2005, 03:51:20 PM

Previous topic - Next topic

Joe Davisson

http://www.diystompboxes.com/analogalchemy/emh/emh.html

It's a bit quirky but should be at least somewhat useable. I thought the custom tapered pots would come in handy, since reverse-log pots etc are harder to find. Also planned is a transistor biasing "toy" that lets you adjust the values and see the results.

bwanasonic

Won't work with Firefox, works fine with IE. I have js enabled in both.

Kerry M

Peter Snowberg

Shucks. :( Thanks for the report.

I wonder if Firefox has the same show/hide division feature? I'll bet it does but the grammer for handling these features will need some browser specific tweaking. I'll check into it.

What are the ones that need supporting these days? IE, Firefox, Opera, Safari, VT52?????
Eschew paradigm obfuscation

sir_modulus

That's good....really! I like it, but I have a little problem with it.

For the linear pot one, what are the 3 lugs of the new "fake" pot? I see 4 lugs....(sorry, I'm not all that knowledgable... :D )

For the tapered pot, I also don't see where the new 3 lugs will be...and I don't understand what to enter for the taper parameter (what percent is what....like what would a reverse log be?

For both of these....the actual/desired pot values...can I enter like 100k? or like 100 000 etc?

Thanks,

Nish

Edit...one more thing...when I try the tapered pot thing, I entered 100K, 100K, and 99%, and it gives me "NaN" for both resistor values.... :?:

Peter Snowberg

I'll chime in on the edit: It doesn't understand "K" so you can just enter 100 and know that your results will also be in "K". You could also feed it 100000 if you want the answer in ohms.
Eschew paradigm obfuscation

sir_modulus

aight thats cool....I still don't get the tapering and lugs though... :?

Nish

GOOD JOB BTW! I think it's awsome!

ElectricSheep

it doesn't work on netscape either... It's a great tool though, thanks a bunch!!

Joe Davisson

The pictures are wrong, sorry. There are three leads on the pot. The resistors go between the lugs: one between lugs 1 & 2, and another from 2 & 3. The tapering feature attempts to approximate the action of an audio-taper or reverse-log pot, depending on which resistor you put where. This idea only works on making smaller pots from larger ones, and only from linear taper pots.

There's a silicon transistor biasing simulator up there now. It seems fairly accurate, when comparing to a real circuit consider the variance from resistor tolerance and temperature. You have to know the transistor gain (hfe) which you can measure from a multimeter or hope the datasheet is close to the target. I still need to add the emitter voltage.

I realize the problem with typing letters after the numbers, I'll try to make it auto-convert these things. I also realize the color code thing doesn't show the gold stripes, just pretend they are there and all is well. :)

B Tremblay

Quote from: Peter SnowbergWhat are the ones that need supporting these days? IE, Firefox, Opera, Safari, VT52?????

Works fine in Safari, Camino, and Firefox on my Mac.
B Tremblay
runoffgroove.com

Sic

works fine on my firefox and im using windows xp

sir_modulus

works on this firefox too :?

Now I still have a query though...what do the %'s for the taper mean? what is a 99% taper, and what is 1%. What would be like a rev. Log taper (ex. Phase 90 rate control)?

Thanks...and good job again!

Nish

Joe Davisson

A 50% taper is a linear pot, where turning produces a smooth change in resistance. Other tapers produce non-linear action, to match better for volume controls, or oscillators.

Let's say you're stuck with a 250k linear pot, and need a 100k volume control. You'd plug in 250k, 100k, and 90%. Rounding to the nearest resistor, you get about 330k and 10k to piggyback onto the lugs. It wil now act more like a 100k volume control, not perfectly, but better than nothing. Things change depending on how drastic the conversion is, a 1M->10k might be a stretch.

Another word on the transistor simulator. One thing it seems to be handy for is checking for variance between transistor gains. You can nail down the biasing so that entering different hfe values has minimal effect on the output. This means that when people go to build your circuit, it is more likely to "just work" without rebiasing.

For example:
r1 = 1500k
r2 = 3300k
r3 = 2.7k
r4 = 10k
hfe = 400-800

The output variance here is just over 1 volt across a 400hfe span.

vanhansen

Doesn't seem to work in Mozilla Suite 1.7.3.  Nothing is coming up when clicking on the links.  JS is enabled.
Erik

bwanasonic

If other people are getting it to work with Firefox and Windows XP, maybe it's an OS thing. I'm still using Windows ME. Opera 6.01 and Netscape 7.1 fare no better. IE 6 works fine.

Kerry M

vanhansen

Could be.  Looks more like a browser specific issue to me though.  I use Win2k.  IE6 is fine, and probably is on all the OS's.  Javascript is pretty dependent on the browser rather than the OS.
Erik

Joe Davisson

It seems to be happy with Netscape 7 now (should with 6 too?), older browsers probably won't work (yet).

B Tremblay

A helpful bit of information that could be added to the Tapered Potentiometer calculator would be the percentages for audio and reverse-audio tapers.
B Tremblay
runoffgroove.com

EdJ

Works great here!
Thank you very much!
Greetings,Ed

Arno van der Heijden

QuoteResistor values are in KiloBytes!

Hmm... can anybody explain to me how to convert ohms to bytes? :mrgreen:

bigjonny

A common problem with Javascript web applications is that users can have it completely or partially disabled.  Add in different browsers, OS, etc.  The bottom line: there are just too many variables for a webmaster to satisfy all of them, all the time.

I am of the opinion its better to do these lightweight activties on the server side, since you can then pretty much know all clients will see the same thing.  With Javascript, you often get into the guessing-game I am seeing, here.

Not to create extra work, but considering all this, as well as the problems reported thus far, perhaps it'd be wise to consider a port of the code to say, PHP (since I know Aron's server supports it), and use Javascript to "enhance" the page, rather than relying on Javascript to make-it-or-break-it.

With PHP, all the calculations would then be done on the server-side, rather than client-side, as is done currently.  Javascript could be used to reduce the amount of clicking HTML forms need, by automagically submitting the queries.  The new page's behavior would be about the same as now, for users who had Javascript running, but would also function for those who don't.  "Graceful Degredation" is what this is called, and is a common strategy in web programming.

If you have any interest in using this approach, I'm happy to help.  PM me.