[quote author="tayken"] - I liked the idea of using precise voltage sources which was suggested by arhi. We might also use the PGA idea suggested by him. [/quote] For the ADC? Sure, as long as it's significantly better than the built-in reference in the PIC and the rest of the circuitry makes the extra accuracy worthwhile. Not much point in using a voltage reference much more accurate than the voltage divider. PGA sounds like a good idea, as long as the voltages are within the PGA's input range (although we could put a fixed divider in front of the PGA), and it's not too expensive. Isn't this PGA programmed by connecting various pins to ground/Vcc? But I'm sure we can hook PIC GPIO pins to the programming pins. It would save us (relative) precision resistive dividers, if it's indeed accurate enough.
For the power supplies, it's probably not worth the effort, but you'd probably have to replace the regulators for the op-amp power supplies by more stable versions, and replace the op-amps by something with less offset and noise.
[quote author="tayken"] - wrt negative voltage SMPS idea before: I first thought of suggesting a voltage inverter but there might be current issues related to them. But MC34063 can be used to generate negative voltages, so we can design the linear regulator stage with + and - supplies and outputs. We can also route these positive and negative supplies to Vref pins of the ADC and get signed measurements. Any objections to this idea? [/quote] I don't understand how this fits in with the current idea. Do you mean the symmetric power supply for the op-amps? Or the input for the negative regulator? The former idea would work fine, I guess, as long as PSRR of the op-amps is enough to reject the noise. But I'm not sure if it's necessary, since we already have a supply of opposite polarity for the other regulator. A boost converter for the positive supply above the output voltage (for positive regulator) might be a good idea, but I'd prefer a solution with lower parts count (something like diode, capacitor and linear regulator). These are low-current supplies (only op-amps and base currents, probably <<100mA or so), so simplicity and parts count are the most important, and efficiency is irrelevant.
I've made a rough schematic of what I meant in my previous post about symmetrical supplies for the op-amps. Q1/Q2 are the pass transistors (other transistors and op-amps omitted because I'm lazy^W^W^Wfor simplicity sake). D2/C2/D3/C3 are the voltage doubler that produce a symmetrical power supply (with a significant amount of ripple, since we want to keep our caps as small as possible for price, board real-estate and transformer loading). V+out and V-out are the outputs from the supply. V+cc/V+ee/V-cc/V-ee are symmetrical supplies around this potential for the op-amps. The input for the V+cc and V-ee regulators is about 1 diode drop below the peak input voltage, since there's very little loading, there's almost no ripple (as long as the capacitor is not too small). The 7x12 are arbitrary, they could probably be a much lower voltage (+/- 5V?), and could be LDO. As always, completely untested . But I think it should work since there's a significant voltage drop over the pass transistors (Darlington's can't saturate) and a significant ripple, so the max Ve is probably significantly below the peak output voltage from the doubler. But feel free to point out flaws and come up with alternative solutions.
The V+cc and V-ee might not be necessary, if we just use a current source for the base current, will have to spend more time with both the Agilent schematic and Fen's modifications to figure that out, didn't have time this weekend. Will also have to find a better Spice model for at least the power transistor. Don't feel obligated to wait for me, will probably take another week or so. Feel free to come up with other solutions.
If we use DC input, I see no way around a SMPS, but for AC, the voltage doubler seems like a nice solution. Can't imagine SMPS to be much cheaper than the extra capacitance, although it would be smaller. Price would be extra noise and complexity. Both are fair solutions depending on trade-offs.
Edit: just noticed that I missed the connection between C2/C3 and common. Can't edit it now, will fix it in next revision. But I wanted to mention it in case anyone gets confused.
That would probably be a better option, since 2k samples is actually fairly decent, the sample rate is much more limiting in this case. Still, it will never be close to a real scope.
According to LTspice, the beta of the MJE3055T at ~350mA collector current is 160, I find this really optimistic, it's even higher than the typical curve from the Fairchild datasheet at its highest point (200mA), let alone worst case (which you should design for).
My suggestion is to move closer to the original Agilent schematic again. It appears to me that with the symmetrical input and AC, we should be able to copy the symmetrical supply around Vout for the op-amps. - Change Q1 to a Darlington, probably from two discrete transistors since I believe these work better than monolithic Darlingtons. - Bring back the symmetric power supply. I think we can do this with just linear regulators, without using the extra transformer windings. We create the positive voltage (for the positive regulator) from the input voltage with for example a 5V LDO, we connect the ground terminal to the output voltage (just like label A2 in the Agilent schematic). This would require Vin to be at least about 5V + dropout voltage + Vbe above Vout. Will have to check if this setup is stable enough. This might increase dissipation or limit current/voltage, we might be able to use a voltage multiplier trick for this, it's only low current, so small cap. The negative voltage comes from the opposite polarity (negative) input, with a linear regulator (preferably the same model as used for the negative voltage for the negative polarity regulator, but LDO not necessary). Voltage range might be an issue with this regulator, since it will see Vout+ - Vin- at the input. We might be able to avoid the negative voltage for the positive regulator (the LM324's output voltage range includes the negative rail), but for simplicity sake, I'd like to keep both designs as close as possible. I'll draw a diagram if this explanation doesn't make sense.
We need at least a positive supply for the negative regulator (LM324 can't come close to positive rail). We need something like the negative supply for the negative regulator (and positive supply for the positive regulator) for the current source, although we could also use a transistor-based current source in its place, which would require less voltage overhead. In my opinion, it's easier to feed op-amps with supply rails that are far from any input or output voltages, no worry about running into rails. It makes our work easier and less risky by allowing us to remain closer to the (tried and true) Agilent schematic. It might increase the number of passives, but this shouldn't increase costs by too much (all can be low power SMD).
I'll try to find time to create a schematic in LTspice this weekend, will have to spend some time really understanding the Agilent schematic first. If anyone notices anything stupid or violently disagrees, feel free to point that out before I waste any time .
[quote author="ian"] Ez-Hook, the makers of the Saleae hooks, don't offer much of a bulk discount. I believe ladyada told me they only reduced $0.10 @1000. Those are some really expensive clips (usually $2-$2.30 each)! [/quote] You must not have looked into clips for smaller packages like TSSOP and TQFP .
[quote author="ian"] I also like the female probe cables that slip over pins, they can also be attached to one of the ez-hook models for a clip. Those must be cheaper than the clip cables, maybe we can have some of those made for the Bus Pirate and OLS. [/quote] I agree. There are also various other types of clips by vendors like HP(Agilent) and Tektronix that are sometimes available used for cheap that use the same .025/.030" pin connectors, and it can also connect to 0.025" male headers. I actually made up such a cable for my Bus Pirate (and development board) with an IDC flatcable connector and Molex KK connectors, although I like the connectors and flexible wire on the Saleae ones better.
[quote author="ian"] The dual LM317 with the digital pot was my starting point I take it you could do the same with a LM317 and op-amp. [/quote] I think you'd need two op-amps, and would basically be using the LM317 as a fancy power transistor, and be just as complex as the current idea. You do need some kind of OR circuit of the current and voltage regulation. Only two of the op-amps in Fen's circuit (IC1B and IC1C) are actually critical for regulation, I think. IC1D looks to be just for current measurement, and IC1A to amplify the signal from the DAC to the voltage regulator.
About the symmetrical power supply, I just remembered a commercial design of a lab supply with negative polarity: the Tektronix PS503A (and probably a few hundred others I'm not aware of). It uses both a positive and negative power supply, with opposite polarity transistors, but the two parts are not identical, some changes were probably necessary to compensate for different behaviors. It's not terribly stable, I've got it to oscillate by adding about a meter of wires (inductance) between the input filter cap and the circuit.
One issue with making Fen's design negative polarity is that the LM324 output voltage range is 0V to V+ - 1.5V. So in a negative polarity supply, it wouldn't be able to go below something like 1.5V - Vbe. But if we have symmetrical inputs, we could use the opposite polarity as 'negative' potential.
I think I found an error in Fen's schematic (he didn't present it as a finished product), Q1 was a Darlington in the Agilent design (not indicated in the schematic), and I don't see how a regular MJE3055 will have enough gain for the base current for R2 to be enough. I'm also not a fan of the 'constant current source' provided by (Vin-Vb(Q1))/R2, which will vary with output voltage. Can't imagine how Spice approved of this, unless the output voltage was low and it was optimistic about the Hfe of Q1. Either that, or I'm wrong, which is possible. Will try to study this in more detail and come up with an updated schematic.
What do the relatively low-budget commercial logic analyzers (eg. Intronix) use? I thought they also have a variable voltage comparator and a sample rate up to 200MS/s, so they should be pretty fast. The Sigrok website might have high-resolution pictures. The old HP hardware has probably pretty expensive parts (at that time), possibly even custom silicon. It probably has active probes in the pods, which do the level translation.
That SN74LVC8T245 looks pretty good to me, except for the max. input transition rise or fall rate. Not sure how to interpret the max here. A max rate would be a lower limit on rise time for me, but they may also mean the max rise time. Anyway, the limit appears to be about 25ns at 5V and 40ns at 2V. As lower limit, this would suck for fast signals. As higher limit, this could be an issue for slow signals (eg. open drain outputs like I2C with lots of capacitance).
[quote author="arhi"] - wrt input - for 0-30V AC2DC non switching regulator I usually suggest AC transformer with 6/12/24/30V output and a relay that would switch to the proper input depending on the output so you decrease power dissipation on the power transistors (or whatever you use to drive the output)... since this project looks like 0-12V under 2A it is not that important (I even thing there's too much philosophy as initial idea with digital resistor was actually going to work, maybe using 12bit dac instead of digital resistor would be even nicer but with current below 2A and voltage below 12V it's basically very simple ... why make it so complex?) [/quote] An AC transformer with multiple taps would be nice, but since we want to avoid bringing the user into contact with mains, a wall wart with AC output currently seems the best option. If you can suggest an enclosed transformer (like a wall wart) with multiple taps, that would be great.
The issue with simpler solutions is usually that you can't regulate the voltage below a certain value (eg. 1.25V) and that you don't have variable current limiting unless you make it almost as complex as this. I did propose a dual LM317 scheme (something like this), but the op-amp idea is more tried and true (at least the original version before Fen's modifications).
[quote author="tayken"] Do we really need to use a bridge rectifier? Maybe we should use four separate Shottky diodes if a Shottky rectifier does not exist. But I couldn't understand why we cannot use a regular rectifier. [/quote] There are Schottky bridge rectifiers, the issue is finding one that has enough current capacity, reverse voltage range, and is cheap. The only issue with silicon rectifiers is the voltage drop, which could be an issue if we use a relatively low voltage wall wart. I think the Schottky rectifier came along when we were planning for both DC and AC input. 2V voltage drop for a 12V DC wall wart is pretty significant. I don't think it's as much of an issue with 24VAC, which is about 33Vpp. It might be an issue if we go with the almost too low at 100V, almost too high at 250V solution.
[quote author="tayken"] But if this way cannot be realized, we can use an inverting SMPS to supply negative voltages? [/quote] In that case I would vote for both supplies to be switching, to keep the design simple. But I think switching supplies (at least the transformerless designs like buck and boost) have exactly the same issue: For a symmetrical output, you either need two supplies of opposite polarity (one inverting and one non-inverting, or one positive and one negative), or two floating inputs so you can connect the negative output terminal of the first regulator to the positive output terminal of the second. I don't think any of the common SMPS topologies can both sink and source current (which you would need if you stacked two positive supplies).
[quote author="rsdio"] Would that "voltage doubler" circuit work better with a full-wave rectifier? i.e. smoother output from the capacitor and regulator? [/quote] Yes, but the catch is that that one requires a center tap (at least the version I'm aware of), so we're back to square one . Might as well directly use that center tap, since we don't really care about doubling the voltage. A switchable voltage doubler would be a nice way to handle the 115V/230V issue, although we couldn't use it for creating a center tap at the same time. This one is actually using the full wave of the AC signal (except the part between +/- one diode drop), so it should be pretty efficient on the transformer if you load both power supplies. The positive part goes into the top capacitor, and the negative part into the lower one. But both sides are only driven from a half wave, so you need double the capacitance to keep the ripple from increasing.
I just did an LTspice simulation (circuit attached) of the Delon voltage doubler, and it behaved just as expected. Ripple is about 5Vpp each with a pulsating 1.5A load (about .75A avg) with 2200uF capacitance per side with an ESR of .05ohm (which seems a pretty typical value for non-low-ESR types). With 1.5A constant load on each side, the ripple is about 10Vpp, so we would need extra capacitance for 1.5A capacity. Increasing capacitance to 2x4700u decreases the ripple at 2x1.5A to 5Vpp again, which would give us 18V minimum at the input of the regulators with 24Vpp input. More capacitance wouldn't hurt, but would probably be expensive and bulky. I used 50Hz since this is the worst case scenario, ripple at 60Hz will be less. I used SS24 Schottkys because these were the first 2A diodes I found, I don't think Schottky is necessary here, any diode with enough current capacity (more than 2A would probably be better) should be fine.
With a symmetrical input (like the voltage doubler), we would have to design a negative version of whatever regulator we use (for example the final linear design from Fen), replacing all transistors by those of opposite polarity, reversing all diodes, move the connections to the op-amps around and turn the electrolytic caps around. Plus we would have to test it separately, since NPN transistors are not identical to PNP, and op-amps behavior different in inverting and non-inverting configurations. Having two similar but inverted layouts might also increase the risk of assembly errors (like the one LED on the Bus Pirate v3). Just doing the same regulator twice would be easier and less risky, but would require to separate secondaries. I'm not actually aware of any negative polarity lab supplies (you usually just stack two positive regulators, since they're floating anyway).
PS: Ian, any chance you can add .asc to the list of allowed file types?
[quote author="ian"] I meant the linear designs using opamps. I forgot about the TL4xx design a few pages back though. The linear design seems well worn, and I tend to go with the flow when I'm not an expert (like in analog design).[/quote] I like the opamp design, too. Would like to get some feedback from tayken, since he appears to prefer the SMPS design, preferably with a dsPIC doing all the work. I'll try to spend more time on the op-amp design later. If the schematic is correct, the schematic will do 0V to somewhat below Vinput without any extra supplies. That would be cool, since most of these circuits (including the HP/Agilent E3620A) require a floating symmetrical supply around the output voltage. But I think further evaluation of Fen's circuit is a good idea (I think he suggested this, too). This is a pretty significant modification of the design used by HP/Agilent and tons of others, which use extra supplies for bias and the op-amps.
[quote author="ian"] Yes, I also meant AC input. Can someone contribute a circuit for the AC input, and check the linear regulator design for any mods to use negative voltages? Experience and knowledge are the practical barrier to getting this into a first prototype. A sketch or napkin scan is fine, though the Eagle schematic is somewhere around here: http://dangerousprototypes.com/forum/in ... 29#msg9329 [/quote] My first idea would be to use two AC wall warts (unless something like a center tapped or double secondary will wart exists), that would be the easiest, but not very elegant. I think splitting the rectified AC voltage in two with something like an op-amp would be hard because it would need to sink and source up to 1.5A or so. Plus lots of dissipation.
Another idea might be to use a voltage doubler (fancy arrangement of diodes and large capacitors), like a singe Delon circuit. I'm not sure how happy the doubler is if you draw lots of current from the center and how stable its voltage is, but it would be a neat solution. Only downside is that you need twice the capacitance you'd normally need (probably about 2x2200uF for 1.5A), and obviously twice the current rating on the wall wart. This would definitely be harder with DC input (eg. laptop supply). I've attached a quick schematic of what I mean in gschem. The 7x12s represent the linear regulator blocks. I've not simulated or thought this through to check if it works at all, let alone works well.
With a symmetrical power supply, we would need a negative version of this regulator (just like the 78xx and 79xx pair), this is probably not worth the effort. With two separate windings, we could just use the same regulator twice (saves design effort and reduces BOM). This is what almost everyone including HP/Agilent does. But it would require a transformer with two secondary windings or two transformers, which I think would require two wall warts.
[quote author="rsdio"] A rectifier circuit is dead simple, so I was thinking that finding a way to avoid the typical 2 V rectifier drop might be of use. The NXP PMEG3010BEP might work, and the NXP PMEG3020BER handles 2 A continuous, 50 A peak, with a typical drop of only 460 mV, 520 mV max.[/quote] Schottky rectifiers would help decrease the voltage drop, although I would be worried about the reverse voltage rating of 30V, especially if we go with a wall wart that delivers just enough voltage at 100V and almost too much at 250V, although it should be enough in a full bridge topology (where it will only see half of Vpp as long as none of them fails open).
[quote author="ian"] Fen's design seems like the conclusion reached by lots of engineers who really study these things. It's cheap, well worn, and uses common parts. It seems like the path of least resistance for the regulation block. [/quote] Could you be more specific? I believe he posted a few linear designs based on HP lab power supplies, and a few ideas with various switch-mode controllers. I agree about using ideas that are widely used by smart people that have done a lot more research on this and have much more experience.
[quote author="ian"] At this time, I would propose that we suggest which features and goals we can defer, just until we get a rough prototype PCB. This gives us time to actually play with hardware, and a test platform to try different stuff. [/quote] I think the regulation block (i.e. from the power input to the power input, plus the DACs) is the most interesting part of this project which is the easiest to screw up. The MCU side (unless it's involved in regulation) should be quite straightforward. So should the ADC inputs unless you want advanced features like auto ranging. That doesn't mean they can't go wrong, obviously. Isolated USB might be slightly challenging.
[quote author="ian"] For example, I feel it is inevitable to do very low voltages. I want to use this as a testing device, and for that it will need to go the full range. [/quote] I agree.
[quote author="ian"] The additional difficulty of AC seems to be a snag though. If we leave the "INPUT" section of the diagram off the rough prototype, would it still give us the opportunity to test different input supplies? I'd be willing to accept a gap in a DC-only prototype just to get familiar with the regulator and parts. But, we might still be able to use the rough regulator/sink prototype with different breadboarded power supplies to test negative voltages (and ripple from SMPS supply, etc). [/quote] With AC you mean AC input? It's just an optional feature that might allow some more flexibility like generating extra voltages with just diodes and capacitors. I don't see how this is complicated, just pads for a bridge rectifier/diodes and a cap should be enough if we want to use it like DC, and would allow any polarity (at the cost of some voltage drop). They're easy to bridge if we want to skip it.
[quote author="rsdio"] I don't think that you'll need any coils or transformers on the PCB, at least not if you can find an AC adaptor (with AC or DC output). [/quote] Agreed. The only magnetics might be in the buck converter (if we choose a SMPS), and possibly for filtering the output or PWM signals.
[quote author="tayken"] That was one of my thoughts about using only a switching regulator. LM317 is noted, but is it possible to change its output by DAC or other means? [/quote] You have a point there, that might be an issue, since they tend to use a resistive dividers, as opposed to reference voltage that op-amps use. We'd probably need digipots (more expensive than DAC/PWM), at least for the voltage.
[quote author="tayken"] I realized that, but I was talking about including a more sophisticated wall-wart with the kit (that was the discussion) [/quote] The original idea was to use an existing one. Offering one would give us more control about voltage/current and safety, but might add extra costs and headaches (eg. safety). The advantage of AC out is that you can some need tricks like capacitor multipliers for generating higher/negative voltages, but you need a few extra parts (mainly the smoothing capacitor). We (Ian) would have to check with Seeed if offering a wall wart is even an option, and if they can source ones of reasonable quality.
[quote author="tayken"] That was a suggestion for the case of using switching regulator and implementing it without a discrete IC for it. Most of the switching regulators use that to find the Ton/Tswitching ratio quickly. Instead of slowly increasing this ratio until you reach the desired voltage, you just calculate the ratio. [/quote] Ah, that could work, as long as the extra (muxed) ADC input is available.
[quote author="tayken"] That makes me feel really bad. [/quote] I apologize, I wasn't trying to hurt you. My frustration was just that you appear to counter posts of mine and others that support a position with arguments with something like 'I think we should really do it the other way'.
[quote author="tayken"] Plus we are all posting ideas now, this is a project that depends mostly on the hardware so we have to try deciding the best option that is possible. [/quote] Agreed, the software should be fairly straightforward (unless we go for the software SMPS), except for the USB stack (I think rsdio mentioned at some point that it's still vaporware?).
[quote author="tayken"] Now here is my suggestion: Lets go step by step. We have the initial project requirements and lets decide whether to go with a switch mode regulator or a linear regulator or both of them in cascade. [/quote] I think most of the basic requirements are clear (this is the current wiki page I believe?). There are some features like isolation and (relatively) low noise (<<50mv) that would be nice if they don't cost too much in my opinion, but are not essential. As far as I'm concerned, an easy to understand schematic and robust design (should be stable whatever you throw at it) are important, in addition to low cost. Regulation all the way to 0V/0A is essential in my opinion for a lab supply, but does require a negative voltage for any design I'm aware of (may be able to use an charge pump inverter like the MAX232 uses).
Regarding linear / switchmode IC / software switcher / linear post-regulator, I think we should make a rough design for each (as long as there's someone willing to do it). No need to waste lots of time with a detailed design, but it would give us an idea about parts count, cost, complexity and footprint. The software version might be just a dsPIC with a DAC/PWM filter and some hand waving that the rest is in software, but we'll see when we get there. Based on this, we can decide to continue with one or more, and do some simulations or build some (dangerous) prototypes.
[quote author="tayken"] So dsPIC's internal DAC is out of the equation. It is good for audio applications but we don't know its performance for control cases. That leaves us with an external DAC or using the internal PWM of the dsPIC. There are advantages and disadvantages of both sides of course but I think we should go for PWM and maybe even getting rid of the DC/DC IC to save some board space and make it cheaper. We can still include the op-amp linear post-regulator stage if someone wants to work on it. [/quote] I think a switching pre-regulator and a linear post-regulator would be the worst of both worlds: the complexity and stability of a switching regulator with the extra parts count of a linear regulator. But I'm willing to be proven wrong. I believe that you'd still need some sort of constant voltage/constant current circuit on the linear side (how would that work?). The only extra part for a fully linear regulator vs. linear post-regulator would be the larger heatsink, but we already have that one for the dummy load. There is an issue with needing extra voltages, but you probably won't be able to regulate a SMPS to 0V/0A without any negative voltages below the output common either. The major advantage of a SMPS is efficiency, which IMO is a non-issue here. A double LM317 linear supply might also be an option, since that give you over temperature protection for free, and you only need one negative voltage (not sure how much current), not a symmetrical supply for an op-amp (though rail-to-rail opamps might be able to fix that).
[quote author="tayken"] One thing about AC adapters: I have some adapters which have input rating of 100-240V 50-60Hz and constant output voltage. They are also becoming cheaper day by day. All thanks to SMPS! [/quote] I think rsdio was talking about wall warts with AC output, they tend to be just mains transformers in a box, which is a nice compromise between safety (mains is safely isolated) and the simplicity and stability of a transformer (no extra noise and not much can go wrong as long as you don't exceed the maximum current). It also makes nasty leakages that produce dangerous voltages (for sensitive semiconductors) less likely, since they probably don't have EMI filters (no EMI to filter). The output voltage will be proportional to the input voltage, though.
[quote author="tayken"] Just had an idea: We would better measure the input voltage, this way the regulator can give quick responses to changes. [/quote] This would increase the output impedance a lot, and would only work if you load is constant, or do you mean in addition to monitoring the output voltage (not sure what you would do with this information). If you use a stabilized power supply which doesn't produce more noise than the output of this power supply, most of the regulation will be to counter load changes. It probably wouldn't work very well for constant current operation with a SMPS, since there's no inductor between the input and the switching MOSFET. I don't think trying to reinvent the wheel is a good idea here. Not that I'm against reconsidering established ideas, but I don't think a simple, low-budget power supply for a broad public is the place for that. It's not like it's hard to make a power supplies unstable. I recently came across reports that old HP/Harrison power supplies became unstable when you turned the voltage quickly up and down, which would be very easy in software. I'd be conservative to minimize the chance of something going wrong. IMO, this design should be bullet proof.
[quote author="tayken"] Shall we introduce some kind of deadlines, new design requirements or anything? I feel like we are running in circles. [/quote] Agreed about the running in circles. It appears to me like you read the suggestions by me/rsdio/fenugrec, ignore most of it without explanation, and pick up a few that you do like. Fenugrec has posted multiple sketches, which you appear to mostly ignore by offering completely different ideas. As long as you're the one doing the work and with the knowledge/experience that's fine, I don't claim that you should listen to everyone that comes along. The most productive would probably be for you to choose whatever you like and for us to quietly accept that, since it doesn't look like we'll agree on the regulation.
[quote author="rsdio"] MD5 and SHA are apparently both easier to break than mere brute force. I wonder if any algorithm improves upon this when the maximum input is smaller. We only have 64 bytes, so that shouldn't be so hard. [/quote] A fixed input length makes breaking much harder, I think, but this is purely academic for this application. SHA-256 and SHA-512 (SHA-2) are still unbroken, I believe, but way overkill here.
[quote author="rsdio"] Another piece of information that we need is how long the Serial Number can be and still work with Windows, Linux, and OSX. Until we know that number, the length reduction is just an interesting hypothetical question. [/quote] Length reduction is necessary anyway as far as I understand it, it's just the max. length that's the question.
[quote author="rsdio"] As for whether any of them are patent-encumbered, I get the impression that a lot of things we commonly use are encumbered, but perhaps that has become less so. [/quote] You may be right, I've just never heard about it being a problem.
Are any of those patent-encumbred? Never heard anything about that. Performance is probably not an issue (only need to calculate this once after power-on I think?), but code size is. I'd start by looking at the common algorithms, since they're likely to be bug-free and optimized. It's all integer math, so it shouldn't be too bad. Something simple like CRC would probably even work, you only make it unlikely for a single user to have duplicates (birthday problem). It's unlikely for anyone to have more than a few connected to a single computer. Security is not an issue either.
Why not use a checksum (eg. MD5, SHA-1/SHA-256/SHA-512) of the security register with the correct length? This is exactly what they were designed for. Collisions would not be impossible, but very unlikely unless you have huge numbers of OLSs connected to the same computer.
An appnote actually targeted at hobbyists and small labs that don't have all the expensive equipment, cool! Thanks for the link. Seems we might not have to totally rely on Spice for stability calculations after all .