Skip to main content
Topic: Computer controlled PS/function gen/multimeter (Read 229245 times) previous topic - next topic

Re: Computer controlled PS/function gen/multimeter

Reply #195
[quote author="alm"]
About the R2, I think a transistor/JFET constant current source would be better, since HP used a resistor to a constant voltage above Ve(Q1). No need for great accuracy, it just should be better than between 14V/R2 (almost zero output voltage) and 2V/R2 or so (max output voltage). Something like -50%/+100% should be fine.
[/quote]
That part definitely needs improvement... I like the JFET idea. As it turns out, all transistor models I've seen specify ludicrous beta factors, and I'm not aware of any re-adjustment in function of Ic... What I drew was definitely more along the lines of a proof of concept - I wanted to make sure it could theoretically work.

Quote
I have some doubts about your design, even though you appear to know more about this:
1. How's the stability of Q3 without emitter resistor? Isn't it very sensitive to tiny Vbe and temperature variations, making it hard to keep stable?
2. The HP design of Q1/Q6 appears be temperature compensated, since the Vb(Q6) is at about the same level as Ve(Q1). Your design isn't, which may make the job of the op-amps harder.
3. Why isn't this topology used in other lab supplies? All commercial designs I'm aware of use a negative and positive voltage relative to the output voltage. Even in a commercial design, this has to add some extra costs, why do they use it if they could easily omit it? There has to be some downside, it's not like an LM324 is a recent invention.
4. In general, the major changes compared to the original design makes me somewhat uncomfortable without doing extensive analysis and testing. Hence my preference for something closer to the HP design if we can (doesn't add much costs with the symmetrical design).
All excellent points, sorry I can't answer most of them. One thing I might say is that the E3620 was designed for potentiometer panel controls. I saw no other simple way to convert it to DC control... Last time I checked HP service manuals, I didn't find a linear lab supply that could be digitally controlled with i.e. GPIB. The digitally-controlled units I found were SMPS designs.

Quote
If you're convinced that it will work fine, I'm willing to believe that. But if I would have to build it, I would go for a more conservative design.
Oh I'm far from convinced it'll work well, and I certainly don't want to sound over-confident. I do feel it's worth actually prototyping one of these, but I really can't say if it's going to turn out to be a waste of time.
On a side note: I had built a cheezy current regulator similar to this layout, with an LM358 driving a transistor in a single-supply circuit. It was far from perfect, and initially I had some oscillation problems, but after a bit of tweaking it became quite usable. I actually charge some battery packs with it...

I would ask what you would consider to be a more conservative design ? Some problems I see to using i.e. the E3620 (or any other) circuit is : component availability, unkown design decisions and different specifications.

Quote
[...] Designing/manufacturing an AC wall wart is much harder to screw up.
(Sorry, I trimmed the part mentioning using two wallwarts to get symmetrical / floating outputs)
They do make center-tapped AC wall warts. I'm not sure how internet-available they would be however (I bought a bunch at a local electronics dollarstore)

Quote
Quote
whether to float the output needs to be decided.

I don't think extra parts will be too bad, some opto's and an extra PIC/FT232. Supply for the grounded part can be USB.

Ok, as I said I'm all for it - but the guy making the boards gets to decide, in the end.


Quote
The reason for considering an FT232 was that we don't really need more than an USB interface on the grounded side. We could isolate the UART connection and connect the PIC to lab supply ground. I've used the small MCU per output on the isolated side in the past, because an SPI/I2C ADC is not much cheaper, and the MCU can also control the DAC's and switch some other stuff (I had relays for tap switching). With multiple channels, we would need more intelligence on the grounded side, since we would need to control two outputs with one UART. Using an FTDI device with dual UART is ugly in my opinion, and probably even more expensive.
Indeed. FT232 is ok, but I'm partial for a USB PIC speaking to the output channel(s) through an opto-isolated bus.

Quote
[quote author="tayken"]
- For the initial release we might go for PWM + caps instead of a seperate ADC IC. Lets see its performance, if it is really poor, then we can go for the ADC IC in the real design.
I would offer both options in that case, so we can compare (populate one board with DAC and one with PWM, or switch with a jumper).
[/quote]
Only trouble is that we would need 2 PWM channels,  very few PICs have two independant PWM modules. Of course we can generate the PWM in software, but if we need to manage ADC conversions & communications at the same time, it might not be worth the trouble.



[quote author="arhi"]
I would like to see 3-5A more then 1-2A .. but .. maybe it would be cool to make the project out of 2 segments where one segment does the read/write and the other segment does the "power" stuff so one can easily change the power segment to get 5A or 10A if needed :) :) :)
[/quote]
I'm against this for a v1 board. Modularity isn't useful to everyone. Plus, having 2 PCBs make things more complicated for fab'ing. Also: 12V @ 5A makes a big wall wart, and a hefty linear regulator + heatsink !

Re: Computer controlled PS/function gen/multimeter

Reply #196
[quote author="asdf"]
Did you check the power supply components
[/quote]

I did the quick check and gave up (psu is ok, the problem is somewhere around high voltage ccfl transformer) ... not really relevant to this discussion but thanks anyway :)

[quote author="fenugrec"]
Only trouble is that we would need 2 PWM channels,  very few PICs have two independant PWM modules.
[/quote]

I'm not sure I understand this, sorry for slowing discussion down but you would need 2 PWM channels that have different duty cycle, they can have same frequency right? any pic with few pwm channels can do this, they can't have different frequency but they can have different dc ..

Re: Computer controlled PS/function gen/multimeter

Reply #197
[quote author="arhi"]
[quote author="fenugrec"]
Only trouble is that we would need 2 PWM channels,  very few PICs have two independant PWM modules.
[/quote]

I'm not sure I understand this, sorry for slowing discussion down but you would need 2 PWM channels that have different duty cycle, they can have same frequency right? any pic with few pwm channels can do this, they can't have different frequency but they can have different dc ..
[/quote]

I take that back, I see microchip has some new devices that have two CCP modules and more. I was thinking of older/smaller devices like 16F628, 16F88, 12F683, etc. We're fine, then p-)

Re: Computer controlled PS/function gen/multimeter

Reply #198
great ... there are few pic's with really independent channels where they can have different DC but those are fairly rare .. but commonly used ones with multiple pwm outputs like 16f877a, 16F887, 18f2550... they have "linked" pwm's that has to be on the same frequency but can have different DC (not sure about 887 it might even have truly separated pwm's) .. dsPIC is even more versatile in that regard

Re: Computer controlled PS/function gen/multimeter

Reply #199
[quote author="fenugrec"]
All excellent points, sorry I can't answer most of them. One thing I might say is that the E3620 was designed for potentiometer panel controls. I saw no other simple way to convert it to DC control... Last time I checked HP service manuals, I didn't find a linear lab supply that could be digitally controlled with i.e. GPIB. The digitally-controlled units I found were SMPS designs.
[/quote]
I think there are plenty, but finding one with full schematics might be a problem, since their latest designs don't tend to have schematics in the service manuals. I downloaded a few in the past for my own project, one example is the manual for the Agilent 6621A/6622A/6623A/6624A/6627A, but it looks pretty complex and uses a custom hybrid for actual regulation. The HP 6632A/6633A/6634A service manual looks simpler, but still much more complex than the current design (probably because it can both sink and source). Other similar designs would be the ELV PPS-5330 (German electronic hobbyist magazine know for high quality designs, just look at the pretty pictures) design, which uses PWM and a discrete ADC for some reason (educational value?). The ELV design without the DAC/ADC (plain old potmeter version) is pretty well known in local hobbyist circles, but I would trust Agilent over a magazine.

I don't think converting designs like this to DAC input is very risky, the pots are just voltage sources. I don't really have an issue with these modifications in your design (although I admit I haven't looked at them very much). We can dampen the heck out of the DAC outputs if we need to, it's not like we're going to convert this into an 1MS/s arbitrary waveform generator, we can consider them almost DC if that's necessary to get it stable. We can't do the same with the regulation loop, since it needs to be both stable and have good transient response, and will see a much more variable load (the load might modulate the output, the DAC just drives an op-amp).

My issue is mainly with the regulation to 0V without negative voltage, I can't quite put my finger on it, but my gut tells me there's a problem with it. Every linear lab supply I've seen uses negative potentials, and I can't imagine that all designers had shares in transformer manufacturers. I'm afraid it will misbehave close to ground (high output impedance, bad regulation, whatever). But I don't have any facts to back that up, so maybe I can be proven wrong. The only concrete example I have is the emitter resistor for the transistor sinking from the pass transistor base (Q3 from memory, but I don't have the schematic handy). Adding an emitter resistor that would drop say .5V to prevent tiny Vbe variations from making everything unstable would kill 0V operation. And the op-amps can't sink very well at <0.6V either (which is why you added Q3 in the first place).

Quote
I would ask what you would consider to be a more conservative design ? Some problems I see to using i.e. the E3620 (or any other) circuit is : component availability, unkown design decisions and different specifications.
Sure, there is risk in every design unless you use the exact same PCB and components. But the fewer changes, the lower the risk in my opinion.

What I would consider more conservative is the design I've seen many times: most of the circuit is fed from a symmetrical supply around the output voltage (like I sketched out last week, although don't mind skipping the voltage doubler if we have a better solution). A constant current source is connected to the base of the pass transistors, the op-amps sink to below Vout, even at 0V output (no issues with running into rails or saturation, and no need to invert their output). If we go with the DC input, we would need an SMPS for these voltages, not sure what this will do for noise. The main change compared to most designs would be the DAC, but if it's just scaling the 0-5V or whatever to some other range, it should be pretty safe.

Quote
They do make center-tapped AC wall warts. I'm not sure how internet-available they would be however (I bought a bunch at a local electronics dollarstore)
That would eliminate the voltage doubler that you dislike (unless we want to use it for voltage selection, double the voltage at 110V, the fact that most 110V places are 60Hz helps with ripple), but would keep the symmetrical (not two floating) outputs. I'm not a big fan of making two output circuits with inverted polarity either (mostly the extra effort and BOM), although I don't see any major issues. No idea about availability of these wall warts.

Quote
Ok, as I said I'm all for it - but the guy making the boards gets to decide, in the end.
My proposal is to keep it as a requirement for now, and drop it if it turns out to be a pain to design/source.

Quote
Indeed. FT232 is ok, but I'm partial for a USB PIC speaking to the output channel(s) through an opto-isolated bus.
Sure, as long as we have a working USB stack, that would be fine, too. Especially if we have multiple isolated outputs. But we might use a small PIC on the isolated side(s), too, since SPI requires tons of opto's (at least one multi-channel DAC and ADC per output) and I2C is a pain to isolate.

My preferences for DAC would be a real DAC, but if this turns out to make it too expensive and PWM performs good enough, we might use that. I don't see the point of using a more expensive PIC so we can skip a DAC, these things are <$1, even in single quantities at the likes of Digikey.

 

Re: Computer controlled PS/function gen/multimeter

Reply #200
For PWm generation, I was thinking of using a 24F series PIC and as far as I can remember they have multiple CCP modules (correct me if I'm wrong).
Quote
Quote from: tayken on September 26, 2010, 01:45:39 PM

    - For the initial release we might go for PWM + caps instead of a seperate ADC IC. Lets see its performance, if it is really poor, then we can go for the ADC IC in the real design.

I would offer both options in that case, so we can compare (populate one board with DAC and one with PWM, or switch with a jumper).
Actually as this is a prototype board, we put in both options and test their performances.

I think the only thing left is to finalize the linear regulator part. Both FTDI and separate PIC options have their pros and cons so I am undecided on that issue. But I kind of prefer FTDI as no programming is required (there might be bugs in firmware or other stuff) and it has been widely used in the previous designs so it is already available at Seeed.

Re: Computer controlled PS/function gen/multimeter

Reply #201
[quote author="tayken"]
For PWm generation, I was thinking of using a 24F series PIC and as far as I can remember they have multiple CCP modules (correct me if I'm wrong).
[/quote]
How much would this add in costs compared to a cheaper PIC with external DAC? Or do we need/want a PIC 24F either way? I'm not very familiar with the PIC models (more of an AVR person).

[quote author="tayken"]
Actually as this is a prototype board, we put in both options and test their performances.
[/quote]
This is what I meant. Would it be an issue if we build a prototype with a PIC with enough PWM channels, but switch to a cheaper PIC if we decide to go with the external DAC? Would the firmware require significant changes when moved from PIC 24F to for example a PIC 18 something?

[quote author="tayken"]
I think the only thing left is to finalize the linear regulator part.
[/quote]
And the ADC inputs, which have been mostly ignored. What's the current plan regarding grounding, differential inputs, ranging and negative voltages? The ideal DMM would have all inputs fully floating and protected, but that would require multiple isolated ADC's, which is probably way too expensive. There has been the idea to use the PGA, but it's not exactly clear to me how to use it. A quick glance at the datasheet suggests that the Microchip PGA's don't have differential inputs, so either one of the inputs is connected to the power supply output, or we have to isolate it (and the ADC). Some sort of protection on the inputs so it at least has a chance of surviving mains may not be a bad idea either (eg. series resistors and TVS diodes), or at least contain the damage.

I expect me and fenugrec to converge on a design soon, no major disagreements as far as I see. I would prefer to breadboard this supply (analog part, can use lab supply instead of DAC and DMM instead of ADC) in both Spice and real hardware and run some tests (eg. the National app note) before committing to PCB. I probably have most of the parts in stock, unless we decide on more exotic pass transistors or op-amps.

Re: Computer controlled PS/function gen/multimeter

Reply #202
[quote author="alm"]
How much would this add in costs compared to a cheaper PIC with external DAC? Or do we need/want a PIC 24F either way? I'm not very familiar with the PIC models (more of an AVR person).
[/quote]
I'll go for a PIC24F either way as peripheral pin select feature really helps with routing and may add "hackability" to the project in the future if we route some unused pins to a header (such as the control panel addition I have in mind). Also I'm more familiar with them and really liked them wrt 8-bit ones I used before. I don't know the price issue, but I'll say a few cents tops maybe even cheaper as PIC18F2550-I/SO used at IR Toy is $4.95 for one piece and PIC24FJ64GA002-I/SS used at BP is $4.09 for ıne piece (Mouser prices).

[quote author="alm"]
This is what I meant. Would it be an issue if we build a prototype with a PIC with enough PWM channels, but switch to a cheaper PIC if we decide to go with the external DAC? Would the firmware require significant changes when moved from PIC 24F to for example a PIC 18 something?
[/quote]
We will probably need to re-write the code for the registers in 18F. The changes can be minor or major, that depends on the code and the peripheral modules (SPI, I2C...) used.

[quote author="alm"]
And the ADC inputs, which have been mostly ignored. What's the current plan regarding grounding, differential inputs, ranging and negative voltages? The ideal DMM would have all inputs fully floating and protected, but that would require multiple isolated ADC's, which is probably way too expensive. There has been the idea to use the PGA, but it's not exactly clear to me how to use it. A quick glance at the datasheet suggests that the Microchip PGA's don't have differential inputs, so either one of the inputs is connected to the power supply output, or we have to isolate it (and the ADC). Some sort of protection on the inputs so it at least has a chance of surviving mains may not be a bad idea either (eg. series resistors and TVS diodes), or at least contain the damage.
[/quote]
Yes, ADC inputs are probably the next problem but if we dig too deep, it will be really expensive and hard to design. If we use the plan I suggested (using internal ADC of PIC, direct connection for regulator voltage and current readings, connection through an analog mux for measurement inputs) we can save the ADC module and the damage will be contained at the analog mux. We can add a protection for a certain voltage value (like 12 V DC max) so that people will not probe mains with this (Ian doesn't like people messing with mains :) seriously, there might be liability issues) if there is the need and demand, we can design an interface board which will expand the voltage range. Or this might be left as a hack. I can work on this part of the problem if no one wants otherwise.

If you can converge on a design, I think the project will make a leap forward as this was the main choke point of this design (all these arguments about linear or switch mode regulators, reference input method etc). This part really scares me as there might be oscillations or other problems.

Re: Computer controlled PS/function gen/multimeter

Reply #203
[quote author="tayken"]
Yes, ADC inputs are probably the next problem but if we dig too deep, it will be really expensive and hard to design. If we use the plan I suggested (using internal ADC of PIC, direct connection for regulator voltage and current readings, connection through an analog mux for measurement inputs) we can save the ADC module and the damage will be contained at the analog mux. We can add a protection for a certain voltage value (like 12 V DC max) so that people will not probe mains with this (Ian doesn't like people messing with mains :) seriously, there might be liability issues) if there is the need and demand, we can design an interface board which will expand the voltage range. Or this might be left as a hack. I can work on this part of the problem if no one wants otherwise.
[/quote]
I didn't imply designing it to measure mains or documenting it, but that doesn't mean it should go up in a puff of smoke and fry everything close to it if it's connected to mains. An upper limit of something like +/- 15V for measuring is fine in my opinion (allowing it to measure at least all power supply outputs in parallel would be nice, since you might want to measure something connect to it). Mistakes do happen, and it would be nice to at least limit the damage. But I agree that it should not add lots of costs and complexity. Can't imagine how designing it to be less likely to kill the user can be bad for liability, but I'm not a lawyer.

My idea would be something like differential input -15V to +15V or so -> precision fixed voltage divider (bring it within range of the amplifier, plus limit currents in case of overload) -> differential amplifier (eg. op-amp) to convert it to single-ended, also shift it to positive only between 0-5V or so for the PGA -> PGA (for ranging) -> mux/ADC. If you have a simpler idea, that would be great, because it sounds more complex than I'd like. The fixed divider might make it more sensitive to noise and offsets on low ranges, but would make the input more robust without much complexity compared to switchable resistors.

Re: Computer controlled PS/function gen/multimeter

Reply #204
Hi,

Quote
I don't think converting designs like this to DAC input is very risky, the pots are just voltage sources.
Hmm, that's not how I understood the E3620 circuit... It seemed rather like a resistive divider used for feedback? (The voltage control pot is between +5V(reg) and -Output) Short of using a digi-pot I don't see other easy conversions. Anyway.


[quote author="tayken"]
For PWm generation, I was thinking of using a 24F series PIC and as far as I can remember they have multiple CCP modules (correct me if I'm wrong).
....
I'll go for a PIC24F either way as peripheral pin select feature really helps with routing and may add "hackability" to the project in the future if we route some unused pins to a header (such as the control panel addition I have in mind). Also I'm more familiar with them and really liked them wrt 8-bit ones I used before.
[/quote]

Check out arhi's previous posts, as he pointed out there are now a nice variety of 16F and 18F PICs with two or more CCP modules. I really don't think PPS is essential (PWM outputs will be PWM outputs, ADCs will stay ADCs), and the routing shouldn't be exceptionally hard.  But since I probably won't be doing much coding on this project it's not my call... Is the USB stack programmed in asm or C ? 24F asm would certainly need more work to port down to 18F, but C should be pretty manageable. How people can program <16-bit CPUs in C is beyond me, it feels sooo clunky p-))


[quote author="tayken"]
I think the only thing left is to finalize the linear regulator part.
[/quote]
Hehe I like the optimism


[quote author="alm"]
I expect me and fenugrec to converge on a design soon, no major disagreements as far as I see. I would prefer to breadboard this supply (analog part, can use lab supply instead of DAC and DMM instead of ADC) in both Spice and real hardware and run some tests (eg. the National app note) before committing to PCB. I probably have most of the parts in stock, unless we decide on more exotic pass transistors or op-amps.
[/quote]
We'll get there yet ! To be honest I don't have any religious attachment to this or that layout... If we need bipolar supplies, so be it. I just find that a totally single-ended circuit would be really elegant, and maybe easier to float. But in any case, it's definitely not time for a PCB yet.

ADCs : We want to monitor at least output V and I, but it would be vary nice to also take a reading of the input voltage, to compute a maximum power dissipation: if the user plugs in 25VDC, the output current should be capped in relation to the max transistor dissipation... Something like Imax = Pdis / (Vin - Vset) , not counting the sense resistor. Without this, the regulator can hardly be considered "short-circuit proof" - we can count on people not paying attention and asking too much of the reg. Or just assuming it's "smart enough" to not self-destruct.

Re ADC range selection : what about a resistive divider with MOSFET-selectable legs ? Top resistor = 10k, a few 10k bottom resistors which can be switched in through software control. Add diodes between the ADC pin and VDD, VSS to clip the range to safe levels... I figure the added Rds resistance should be negligible with 1% resistors , two or three magnitudes higher in value.

Re: Computer controlled PS/function gen/multimeter

Reply #205
[quote author="fenugrec"]
Quote
I don't think converting designs like this to DAC input is very risky, the pots are just voltage sources.
Hmm, that's not how I understood the E3620 circuit... It seemed rather like a resistive divider used for feedback? (The voltage control pot is between +5V(reg) and -Output) Short of using a digi-pot I don't see other easy conversions. Anyway.[/quote]
True, I oversimplified, but that's still basically level translation, and can be easily solved with a differential op-amp powered from said rails (which I believe is what you've done), or even with a passive resistor network (if output impedance isn't an issue). I don't see any unsolvable problems there, and I'm convinced we can get it to work. Not so sure about the other issues.

[quote author="fenugrec"]
We'll get there yet ! To be honest I don't have any religious attachment to this or that layout... If we need bipolar supplies, so be it. I just find that a totally single-ended circuit would be really elegant, and maybe easier to float. But in any case, it's definitely not time for a PCB yet.
[/quote]
I don't have anything against a single-ended supply, as long as we're convinced it will be stable. I agree it would be a really neat solution, because I've never seen it done before. But that makes me more careful at the same time, since it's possible that it's never been done because it's a bad idea. And bipolar would add some cost/complexity (two switchers?) with a single DC input.

A 'large scale' production should have more margins than a one-off, minor component variations shouldn't make the board unstable. It would suck to have complaints about oscillating supplies, and have to tell people to add a cap somewhere to make it stable.

[quote author="fenugrec"]
ADCs : We want to monitor at least output V and I, but it would be vary nice to also take a reading of the input voltage, to compute a maximum power dissipation: if the user plugs in 25VDC, the output current should be capped in relation to the max transistor dissipation... Something like Imax = Pdis / (Vin - Vset) , not counting the sense resistor. Without this, the regulator can hardly be considered "short-circuit proof" - we can count on people not paying attention and asking too much of the reg. Or just assuming it's "smart enough" to not self-destruct.
[/quote]
That might be a neat idea, as long as we have ADC channels to spare. Adding a temperature sensor to the heat sink would accomplish the same in a more robust manner (ambient temp, air flow), but assembly might be expensive (I tend to glue these on with heat conducting glue, we would need something in a TO-220-like package). I was mainly talking about the external measurement channels that were in the original proposal, the other ones are easier since it could be fixed range (as long as we have enough resolution) and we won't have any unexpected voltages either.

[quote author="fenugrec"]
Re ADC range selection : what about a resistive divider with MOSFET-selectable legs ? Top resistor = 10k, a few 10k bottom resistors which can be switched in through software control. Add diodes between the ADC pin and VDD, VSS to clip the range to safe levels... I figure the added Rds resistance should be negligible with 1% resistors , two or three magnitudes higher in value.
[/quote]
I would prefer a scheme where the input impedance remains constant, especially since our input impedance is unlikely to be so high that it doesn't matter at all (>=10Mohm). A switchable resistor divider would work too, and allow us to skip the PGA, either way would be fine for me. Whatever proves the easiest/cheapest/best (accuracy of at least 1% would probably be a requirement, even a crap DMM or panel meter does <=0.5%).

Re: Computer controlled PS/function gen/multimeter

Reply #206
[quote author="alm"]
I didn't imply designing it to measure mains or documenting it, but that doesn't mean it should go up in a puff of smoke and fry everything close to it if it's connected to mains. An upper limit of something like +/- 15V for measuring is fine in my opinion (allowing it to measure at least all power supply outputs in parallel would be nice, since you might want to measure something connect to it). Mistakes do happen, and it would be nice to at least limit the damage. But I agree that it should not add lots of costs and complexity. Can't imagine how designing it to be less likely to kill the user can be bad for liability, but I'm not a lawyer.
[/quote]
OK, I'll look up for something to limit the damage (something like blowing up a fuse or burning up the MUX only) and I'll try to design a way to simplify it as much as possible. But to measure negative voltages, we need a negative voltage supply on the board for the analog mux, otherwise we have to do the signal conditioning for all 8 channels.

[quote author="fenugrec"]
[quote author="tayken"]
For PWm generation, I was thinking of using a 24F series PIC and as far as I can remember they have multiple CCP modules (correct me if I'm wrong).
....
I'll go for a PIC24F either way as peripheral pin select feature really helps with routing and may add "hackability" to the project in the future if we route some unused pins to a header (such as the control panel addition I have in mind). Also I'm more familiar with them and really liked them wrt 8-bit ones I used before.
[/quote]

Check out arhi's previous posts, as he pointed out there are now a nice variety of 16F and 18F PICs with two or more CCP modules. I really don't think PPS is essential (PWM outputs will be PWM outputs, ADCs will stay ADCs), and the routing shouldn't be exceptionally hard.  But since I probably won't be doing much coding on this project it's not my call... Is the USB stack programmed in asm or C ? 24F asm would certainly need more work to port down to 18F, but C should be pretty manageable. How people can program <16-bit CPUs in C is beyond me, it feels sooo clunky p-))
[/quote]
The USB stack is in C as far as I know but aren't we going to use an FTDI IC or something else to isolate the signals? Also I think PPS is essential for connecting different devices with different protocols to an "expansion header" such as the one in Web Platform. My idea is to route at least one ADC channel, I2C pins if they are not used for some other thing on the board (or we can route them even if they are used), some other pins of the PIC and of course supply and ground voltages.

[quote author="fenugrec"]
[quote author="tayken"]
I think the only thing left is to finalize the linear regulator part.
[/quote]
Hehe I like the optimism
[/quote]
Yep, I'm an optimist. :) But seriously besides the linear regulator part the project can get most of it's hardware and other stuff from BP and other manufactured projects IMO. Plus I'm trying to kep everyons hopes up. ;)

[quote author="fenugrec"]
ADCs : We want to monitor at least output V and I, but it would be vary nice to also take a reading of the input voltage, to compute a maximum power dissipation: if the user plugs in 25VDC, the output current should be capped in relation to the max transistor dissipation... Something like Imax = Pdis / (Vin - Vset) , not counting the sense resistor. Without this, the regulator can hardly be considered "short-circuit proof" - we can count on people not paying attention and asking too much of the reg. Or just assuming it's "smart enough" to not self-destruct.

Re ADC range selection : what about a resistive divider with MOSFET-selectable legs ? Top resistor = 10k, a few 10k bottom resistors which can be switched in through software control. Add diodes between the ADC pin and VDD, VSS to clip the range to safe levels... I figure the added Rds resistance should be negligible with 1% resistors , two or three magnitudes higher in value.
[/quote]
I was also thinking about measuring the input voltage, I will add it to my list. Range selection is for measurement inputs, right?

Re: Computer controlled PS/function gen/multimeter

Reply #207
The PIC stuff is very minor compared to the regulator part :) When the great minds converge on a design, it'll be easier to decide on a chip to use. The cost difference, and effort to port between chips is negligible. FTDI vs USB stack in terms of effort/difficulty is also negligible. Especially as large as this design is getting ;)
Got a question? Please ask in the forum for the fastest answers.

Re: Computer controlled PS/function gen/multimeter

Reply #208
[quote author="ian"]
The PIC stuff is very minor compared to the regulator part :) When the great minds converge on a design, it'll be easier to decide on a chip to use. The cost difference, and effort to port between chips is negligible. FTDI vs USB stack in terms of effort/difficulty is also negligible. Especially as large as this design is getting ;)
[/quote]

Hooray! Ian is thinking the same thing as me! :) Well, nearly :D

I have nearly no experience in the USB stack but it can be a good experience for me to work on it. After the linear regulator part is finished and requirements for the microcontroller section are finalized, we can select a chip and start working on the code. But of course for the code we need the hardware. :)

Re: Computer controlled PS/function gen/multimeter

Reply #209
Hi,

Quote
I would prefer a scheme where the input impedance remains constant, especially since our input impedance is unlikely to be so high that it doesn't matter at all (>=10Mohm). A switchable resistor divider would work too, and allow us to skip the PGA, either way would be fine for me. Whatever proves the easiest/cheapest/best (accuracy of at least 1% would probably be a requirement, even a crap DMM or panel meter does <=0.5%).
Agreed. How much impedance would be enough ? I figure 1M would be quite adequate if we can manage - this is comparable to many passive oscilloscope probes.

[quote author="tayken"]
OK, I'll look up for something to limit the damage (something like blowing up a fuse or burning up the MUX only) and I'll try to design a way to simplify it as much as possible. But to measure negative voltages, we need a negative voltage supply on the board for the analog mux, otherwise we have to do the signal conditioning for all 8 channels.
[/quote]

A negative rail may not be essential - one possibility (yes, op-amps again...) is to wire an inverting stage symmetrical around ground like the first ASCII schem here:
http://electronics.stackexchange.com/qu ... with-a-adc
Not sure about the risk of latch-up in the op-amp, however... a rail-to-rail input IC is definitely necessary.

Quote
The USB stack is in C as far as I know but aren't we going to use an FTDI IC or something else to isolate the signals? Also I think PPS is essential for connecting different devices with different protocols to an "expansion header" such as the one in Web Platform. My idea is to route at least one ADC channel, I2C pins if they are not used for some other thing on the board (or we can route them even if they are used), some other pins of the PIC and of course supply and ground voltages.

As I see it, using an FTDI vs PIC wouldn't make an isolated PSU more simple or complex, just different. Here are some possibilities :
Code: [Select]
; FTDI, single isolated output
USB <=> FTDI <=OPTO=> PIC => regulator

;FTDI, dual independant outputs
USB <=> FTDI <=OPTO=>  PIC1 (regulator)
             <=OPTO=>  PIC2 (regulator)

;same, PIC-based
USB <=> PIC <=OPTO=>  PIC1 (regulator)
            <=OPTO=>  PIC2 (regulator)

I would personally go for the last of these; having a PIC to arbitrate the opto-isolated bus is better IMO. We can also program it to send a "keepalive" signal to the slave PICs : in case of a USB comm failure, disable the outputs or take other safe actions...
As for PPS, well it depends what the project is meant to be. I didn't see this as another "swiss-army" device like a BP, but rather as a configurable power source... In any case all reasonably-sized PICs have many extra ADC channels (internally multiplexable), so PPS would just allow you to use one pin instead of its neighbour... As for I2C or other data busses, I don't quite see where you would want this - perhaps on the isolated side ? but then the datastream adds traffic on the opto-bus, and calls for a more elaborated protocol. Is it worth stepping up to a 24F then? I think specifying a 44 / 64-pin QFP device for this kind of project is overkill, and would actually make the PCB more complicated, even with PPS !

That'll be 0.02$ please.