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

Re: Computer controlled PS/function gen/multimeter

Reply #30
How does current measurement work in your diagram?

Re: Computer controlled PS/function gen/multimeter

Reply #31
I only included output current measurement for simplicity. Rsense can be 0.05 Ohm resistor, at 1.5 A output, the voltage on the resistor is just 0.075 Volts (75mV). To get more resolution we have to amplify it, to be on the safe side lets map 1.5A to 3V ADC input, if we calculate 3/0.075 = 40 is the gain of the Amp section which is just an op-amp.

Another thing to add will be this: We have to equalize Vref to 1.25V at the correct voltage, so the algorithm is kind of a digital potentiometer.

Re: Computer controlled PS/function gen/multimeter

Reply #32
Ah, now I think I see.  At first, I thought that Rsense would only measure the output voltage, but I guess you intended that the Vout/Output blocks are two terminal connections where the external device would see the hot side of Rsense as a kind of virtual "GND" when the actual GND is truly 0 V on the "cold" side of Rsense.

As long as the external device has isolated ground, this will work.  But if chassis ground shorts out anywhere, then the Rsense voltage might be 0 V or some ground loop voltage.

I was originally asking because I was thinking that you should move Rsense to the hot side, between the DC/DC Converter-1 Vout and Vout1.  Then the brain would simply set Vout to be 75 mV higher than the actual Vout desired, and the two ADC inputs could still measure the current in Rsense.  This allows GND to be the same for the PS and all connected equipment, and there's less worry.

Re: Computer controlled PS/function gen/multimeter

Reply #33
I draw this in Simulink quickly and I didn't had any kind of output terminals so I created a block for output terminals. We can still set output voltage 75mV higher than requested but we might not need it. Or we can just move Rsense to the hot side and measure 2 voltages, one before and one after it, and use that to calculate the current. This way we can just simply use the voltage at the terminal for output voltage measurement. This saves us some parts (Instead of 2 op-amps we need just 2 voltage dividers) but how about resolution? I think we still need those op-amps (or differential amplifiers) for current measurement with enough resolution. The new block diagram is as below then:

Re: Computer controlled PS/function gen/multimeter

Reply #34
If we only had one 16bit ADC (MSP430 anyone?) we could use a 4066 analog switch to connect to different channels and measure in turn. It could effect accuracy terribly, I'm not sure. IT has a maximum 15volts, otherwise we could mux it into the OP-AMP too and only have one of those with settings changed by the uC. There's probably a part that does something similar (op-amp in a UC, or a analog mux with >15volts).
Got a question? Please ask in the forum for the fastest answers.

Re: Computer controlled PS/function gen/multimeter

Reply #35
MSP430F471xx series microcontrollers have 16 bit ADC, you can check out my results from here. We need one with 6 or 7 channels and 4 channels directly connected to DC/DC converters, and the rest can be connected to 4066 analog switches for measurement probes. But I have no idea about the accuracy, might try and find out. For DAC, any microcontroller with PWM ability will do, we can smooth out the signal with an RC filter to get a stable DC value. Going with MSP430 might be a good idea, if it gives us good results, no need to insist on dsPIC or 24F series as DC/DC converters have their own chips.

What about any other blocks included like voltage probes? Shall we also include a current sink? We can simply use the one built by Dave with simple modifications.

Re: Computer controlled PS/function gen/multimeter

Reply #36
Is there a simple schematic for the 'Dave sink'? I have only seen the video, making a schematic for it is on my to do list.
Got a question? Please ask in the forum for the fastest answers.

Re: Computer controlled PS/function gen/multimeter

Reply #37
I checked out but no one has it on paper. So here is the DaveCAD drawing in the attachments. 1R resistor is actually ten 10 Ohm 1% resistors connected in parallel for better accuracy. Maybe we should do the same for the current sense resistor but too much space taken and also differential amplifier gain will surely set us off from 1%.

Re: Computer controlled PS/function gen/multimeter

Reply #38
[quote author="tayken"]we can just move Rsense to the hot side and measure 2 voltages, one before and one after it, and use that to calculate the current. This way we can just simply use the voltage at the terminal for output voltage measurement. This saves us some parts (Instead of 2 op-amps we need just 2 voltage dividers) but how about resolution? I think we still need those op-amps (or differential amplifiers) for current measurement with enough resolution.[/quote]I like the new diagram.  It's exactly what I was suggesting, although you've optimized it a bit.

As for resolution, the problem is exactly the same with Rsense at GND versus on the hot side.  Either way you have to measure 75 mV very accurately.  Perhaps the differential amplifiers can also apply gain to expand the 75 mV to (nearly) the full range of the ADC, within the supported voltage range of the op-amp.  Just make sure that the maximum current, and therefore maximum Rsense voltage is accounted for.  With careful op-amp selection, the gain should not add noise.

[quote author="ian"]
If we only had one 16bit ADC (MSP430 anyone?) we could use a 4066 analog switch to connect to different channels and measure in turn. It could effect accuracy terribly, I'm not sure. IT has a maximum 15volts, otherwise we could mux it into the OP-AMP too and only have one of those with settings changed by the uC. There's probably a part that does something similar (op-amp in a UC, or a analog mux with >15volts).
[/quote]One of my favorites is the $0.25 74HC4067D, which can mux 16 channels into one.  I've even ganged them up, with separate enables, to mux 64 channels into one ADC!

The NXP parts only handle 10 V or 11 V.  If you need more voltage, parts like the Intersil DG411, DG412, and DG413 can handle up to 44 V.  Multiple companies make DG508B and DG509B.

Re: Computer controlled PS/function gen/multimeter

Reply #39
For the amplifier we can use AD620 Instrumentation Amplifier, just need a resistor to set the gain, but it is a little overpriced (6.91$ per chip at Digikey). Something similar would be used so that we get good responses with current measurement.

I liked 74HC4067D, probably there is one with 8 inputs? This way we can save one analog channel for AC voltage measurement expansion board. We can put the voltage divider after the multiplexer so that board design is more simple. I'll update the block diagram tonight. And I'll also add important IC names for the blocks.

Re: Computer controlled PS/function gen/multimeter

Reply #40
[quote author="tayken"]I liked 74HC4067D, probably there is one with 8 inputs?[/quote]The DG508 has 8 inputs and handles up to 44 V.

Re: Computer controlled PS/function gen/multimeter

Reply #41
Thanks for the DG508 recommendation, I'm going to use it instead of a 4066 in a project I'm working on. Here's two sheets I looked at:
http://www.siliconix.co.uk/docs/49949/2_vmn_pt.pdf
http://www.vishay.com/docs/64821/dg508b.pdf

It looks like 44v is the maximum power, but the maximum analog is still -15/+15.
Got a question? Please ask in the forum for the fastest answers.

Re: Computer controlled PS/function gen/multimeter

Reply #42
Right: It's not fair of me to quote the absolute maximum ratings, but that 44 V would translate to -22/+22 in analog signal terms.  The rest of the ratings chart shows that V- can go as low as -25 V referenced to GND, and the rest of the pins like V+ can go as high as 44 V above V-.  Of course, it's never good to push a chip to the absolute maximum ratings, because the slightest error will be out of spec.

Page one does list a Benefit of Wide supply ranges including +/- 20 V (down to +/- 5 V).

In dealing with +/-15V signals (the typical test conditions), that's still a 30 V range from V- to V+.

It almost seems strange that the chip has both GND and V-, except that the digital inputs need a GND reference.  Thankfully, the logic swing works with anything outside 0.8 V to 2.0 V, and the analog signals can go negative.

P.S. The DG506A is the first 16-channel mux I discovered, and for the longest time they were very expensive (still are) and I was not aware of anyone else making anything like it.  I still have my original Siliconix data book from March 1985, and it happens to show the Analog Devices AD7506 as pin compatible.  I've always wanted to use one in a design, but usually opt for the really cheap alternatives with much narrower supply ranges.

Re: Computer controlled PS/function gen/multimeter

Reply #43
Here is the updated block diagram, a few notes and questions:
  • An MSP430F471xx series microcontroller will be used as it has 16bit ADC. If no DAC module is present, the set voltage will be created by PWM and a low pass filter. I saw people use just a capacitor for it.
  • DG508 will be used as the analog multiplexer chip, do we want to measure also negative voltages? I'll check out MSP430F471xx datasheet if they can measure negative voltages without any signal conditioning but I doubt that. Also with 0-12V measurement, we can supply DG508 directly from the laptop power supply unit (whether it is 12V or 24V) but if we want measure +/-12V we need a voltage converter to be used as a negative voltage generator which is capable of 12V conversion such as LTC1044A or ICL7660S. I couldn't find a part for 24V.
  • A bridge rectifier just after voltage input might be a good idea as different power supplies have different outputs (center negative vs center positive). This should be chosen at the end, after we figure out the power needed by the circuit.

Re: Computer controlled PS/function gen/multimeter

Reply #44
[quote author="tayken"]For DAC, any microcontroller with PWM ability will do, we can smooth out the signal with an RC filter to get a stable DC value.[/quote]PWM is certainly one of the cheapest ways to implement a DAC, but I think that the output is not as accurate.  My impression (and I have not confirmed this) is that there is always more ripple than with a "real" DAC chip, because a 1-pole RC filter is not very efficient with square waves (i.e. the cutoff slope is not steep enough).  But I could be wrong.