Go Back   Pro/Forums > ProCooling Geek Bits > Random Nonsense / Geek Stuff
Password
Register FAQ Members List Calendar JavaChat Mark Forums Read

Random Nonsense / Geek Stuff All those random tech ramblings you can't fit anywhere else!

Reply
Thread Tools
Unread 06-19-2003, 01:57 PM   #1
Groth
Cooling Savant
 
Join Date: Mar 2003
Location: MO
Posts: 781
Isolating the SMBus

As part of the on-going effort to precisely measure the power usage of an AthlonXP, I've made myself a new tool.

When you start connecting PC-A to PC-B, sometimes the electrons don't behave, as with pHaestus's recent loss of a thermal diode. The circuit below is designed to allow the monitoring of SMBus devices, like diode readers and analog-to-digital converters, while keeping the bus-master and slave devices electrically isolated.


When the bus is not in use, both the Clock and Data lines are high, pulled up to either 5V or 3.3V, depending on implementation. The master generates clock pulses by alternately pulling the Clock line low and releasing it.

When the master's Clock line is brought low, transistor Q1 is turned on, which in turn activates the LED in the upper opto. Light from the LED allows the photodiode to conduct, which turns on the attached transistor. Current from the opto's transistor cause Q5 to conduct, which pulls the Clock line on the slave side low. When the master completes the clock pulse by letting the Clock line go high, Q1, Q5, and the upper optoisolator all deactivate, and the slave Clock line returns high.

Data signals are passed in a similar fashion. Both the master and the slave can generate data line pulses, thus twice the transistors and opto's. Of note, only one set of Q2/center-opto/Q6 or Q3/lower-opto/Q4 can be active at a time. They are mutually inhibitory to prevent the bus from become 'stuck' low.

This has been your weekly dose of useless information...
Attached Images
File Type: gif iso-smbus.gif (10.6 KB, 83 views)
Groth is offline   Reply With Quote
Unread 06-19-2003, 02:24 PM   #2
Since87
Pro/Guru - Uber Mod
 
Join Date: Sep 2002
Location: Indiana
Posts: 834
Default

Nice work. Haven't studied it in depth, but it looks right at a glance. Have you tried it?

Another nice thing about this, is that I've been looking at the way you'd done the current measurement circuit. It seemed to me that the isolation amplifier was a big source of error and noise. Isolating on the digital side of things allows for much better accuracy.
Since87 is offline   Reply With Quote
Unread 06-19-2003, 03:23 PM   #3
Groth
Cooling Savant
 
Join Date: Mar 2003
Location: MO
Posts: 781
Default

I used it in version .2 of the CPU-ammeter. It works well, as long as you use high-speed opto's. The initial (v.19?) test with bog standard transistor-out opto's suffered from tons of glitches, likely from the master clock returning high before the slave data could be pushed across the isolation.

The old analog isolation actually performed extremely well; I couldn't detect any difference between the sides. But the isolation-amps I had were really expensive. Especially considering that they were single channel, whereas the digital isolation allows as many devices as I want, up to the bus limits.

In V.2 I replaced the 20 mOhm shunt with a 5 mOhm version, and made some minor changes in filtering and offset control. Between 30 and 40 mV shunt drop, it performed well. Below that, the scatter plot showed increasing divergence, hitting +/-3% at 15 mV. Worse yet, there was a marked rise (1.5%) in the transfer function going from 2.0 to 2.5 Vcore. Could've been uncompensated offset or insufficient common mode rejection.

I've pushed the cheap amps as far as I can; the UPS man should be here tomorrow with better bits.

In some amp pdf I was reading (which one? :shrug: ), they talked about noise propagation in cascaded amplifiers. It convinced me to try some gain in the difference stage for version .3. I'm also planning to roll back the first stage filter to it's former 1 Mhz corner - I don't want to throw out what may be signal when summed with the other channels.

Don't s'pose you could borrow that oscilloscope again, and take a peek at the switching noise?

Last edited by Groth; 06-20-2003 at 09:16 AM.
Groth is offline   Reply With Quote
Unread 06-19-2003, 11:29 PM   #4
Since87
Pro/Guru - Uber Mod
 
Join Date: Sep 2002
Location: Indiana
Posts: 834
Default

Quote:
Originally posted by Groth

In some amp pdf I was reading (which one? :shrug, they talked about noise propagation in cascaded amplifiers. It convinced me to try some gain in the difference stage for version .3.
I'd thought about adding gain at the difference amp, but then I wouldn't be able to use the resistor networks I can get 'cheaply'. Having a first stage output that is of known accuracy without any tweaking would cut down on the number of pots needed to get an accurate output. As you mention though, there are potential advantages WRT noise in putting gain in the first stage.

Quote:
Originally posted by Groth

I'm also planning to roll back the first stage filter to it's former 1 Mhz corner - I don't want to throw out what may be signal when summed with the other channels.
There's a problem here, in that your A/D is only sampling at what? Around 10 Hz maybe? Nyquist's Theorem states that your sampled result is only going to be valid for signal components whose frequency is below half the sampling rate. Signal components of higher frequency are going to be aliased and effectively result in noise in your measurement. I can't think of anything to be gained by preserving high frequency components unless, a much higher speed A/D is going to be used.

Also, with a 1 MHz corner frequency, matching the capacitance value of the filter capacitors becomes critical in preserving the high frequency components with any accuracy.

When you increase the gain of the difference amp, you lose bandwidth too, which will cause problems. You can reduce this problem by using an OPA228 instead of an OPA227. (The OPA228 is only stable with a gain of 5 or higher.)

I'm just not seeing any practical benefits to higher bandwidth, and I'm seeing a lot of difficulties to overcome.

Quote:
Originally posted by Groth

Don't s'pose you could borrow that oscilloscope again, and take a peek at the switching noise?
Sorry, I'll leave the risk of damaging a motherboard to others.

If you look at the datasheet for the regulator on pHaestus' mobo, Figure 1 shows the basic triangle wave of the current through the switching inductor. I know from experience that there will be substantial spikes that ring at high freqency at the peaks of those waveforms, but for some reason they don't show up on that scope image. (I suspect clamp on current probes were used to acquire those signals, and the current probes didn't have the bandwidth to show what was going on at high frequency.)
Since87 is offline   Reply With Quote
Unread 06-20-2003, 09:15 AM   #5
Groth
Cooling Savant
 
Join Date: Mar 2003
Location: MO
Posts: 781
Default

Quote:
I'd thought about adding gain at the difference amp, but then I wouldn't be able to use the resistor networks I can get 'cheaply'. Having a first stage output that is of known accuracy without any tweaking would cut down on the number of pots needed to get an accurate output.
Mere mortals such as I are limited to hand matching out resistors - dare I ask how 'cheaply' you get laser-trimmed resistors arrays?

There is much to said for the ease of error checking with the first stage unity gain. But with the pain I went through trying to stamp out the tiniest input bias current errors and input voltage offset errors before they got amplified, I'm ready to try some early gain. I had more consistent luck with tweaking the bits-to-amps equations than I did tweaking the pots.
Quote:
I can't think of anything to be gained by preserving high frequency components unless, a much higher speed A/D is going to be used.
I'm just not seeing any practical benefits to higher bandwidth, and I'm seeing a lot of difficulties to overcome.
I'm not planning to keep the high frequencies for long, and I don't want to challenge Nyquist to a wrestling match.

As I picture it, off each shunt we get a superposition of load current, inductor current ripple, and assorted high frequency spiking, ringing, etc. A one Mhz low-pass should peel off most of high frequency junk while leaving the triangle waves of the inductor ripple relatively intact.

At the summing stage, the combined ripple from the three channels should have a third the amplitude and thrice the frequency. And that's where I want to kill it - when it is smallest in comparison to the load current signal, and when it's higher frequency makes it easier to filter.

I'm sorta tryin' to replicate how the current get to the CPU - ceramics by the inductors bypass the high stuff, then the electrolytics filter the combined current. And I have this recurrent dream/nightmare of three phases of 33% duty cycle square waves, which are sometimes low-passed and then added, sometime added and then low-passed.
Quote:
Sorry, I'll leave the risk of damaging a motherboard to others.
No sense of adventure, what a pity.
Groth is offline   Reply With Quote
Unread 06-20-2003, 08:53 PM   #6
Since87
Pro/Guru - Uber Mod
 
Join Date: Sep 2002
Location: Indiana
Posts: 834
Default

Quote:
Originally posted by Groth
Mere mortals such as I are limited to hand matching out resistors - dare I ask how 'cheaply' you get laser-trimmed resistors arrays?
$2.95 for 0.01% ratio accuracy, and $2.43 for 0.02% ratio accuracy. The parts I can get aren't 10K+10K like I thought though, they are 20K+20K. (A bit higher error due to bias current with a worst case OPA227... +/-0.16% error due to bias current. Some hardware I've worked on lately autocals itself and measures the bias current of OPA227's. I've never seen one exceed 20% of the max bias current spec, so it's reasonable to expect less than a 0.033% contribution to error from using 20K networks instead of 10K.

Quote:
Originally posted by Groth

There is much to said for the ease of error checking with the first stage unity gain. But with the pain I went through trying to stamp out the tiniest input bias current errors and input voltage offset errors before they got amplified, I'm ready to try some early gain. I had more consistent luck with tweaking the bits-to-amps equations than I did tweaking the pots.
I'm not planning to keep the high frequencies for long, and I don't want to challenge Nyquist to a wrestling match.
My boss is a physicist. He wrestled Nyquist for a while. Very painful to watch.

Anyway, I can get a few select values of 0.1% resistors for about $0.10 each. More error than I'd want to give away at the first stage amp, but perhaps more practical. You do have a good point about summing the shunt signals together and then filtering. Less to filter that way. Might as well take advantage of one of the benefits of a multiphase switcher.

Let me know what gains you are trying to hit, and I'll see what combinations of 0.1% resistors I can come up with.
Since87 is offline   Reply With Quote
Unread 06-21-2003, 02:24 AM   #7
Groth
Cooling Savant
 
Join Date: Mar 2003
Location: MO
Posts: 781
Default

Quote:
$2.95 for 0.01% ratio accuracy, and $2.43 for 0.02% ratio accuracy.
Some hardware I've worked on lately autocals itself and measures the bias current of OPA227's. I can get a few select values of 0.1% resistors for about $0.10 each.
You've been spoiled by all your fancy equipment and big budget. Here's how the cheapo hobbiest gets precisely matched resistors:

Dump a hundred or so (1%, 805 is my usual) into a telfon fry pan (don't let the wife/girlfriend see this). With the probes of a 5 digit or better meter, herd them around into groups of .1%. Keep the biggest group, put the others away. Set the pan on a hot-plate, turn the heat to the lowest setting. Sort again, to your desired tolerance. Let resistors cool, then check again.

If you can't find a set of resistors you like, try one of the other .1% groups, or start with a higher initial number. If you're really anal, cycle hot and cold a couple times and see if your set stays matched.

No, I don't need to get a life.
Groth is offline   Reply With Quote
Unread 06-21-2003, 10:46 AM   #8
Since87
Pro/Guru - Uber Mod
 
Join Date: Sep 2002
Location: Indiana
Posts: 834
Default

Quote:
Originally posted by Groth
You've been spoiled by all your fancy equipment and big budget. Here's how the cheapo hobbiest gets precisely matched resistors:
LOL

Interested in a job in Indiana?
Since87 is offline   Reply With Quote
Unread 06-21-2003, 04:28 PM   #9
Groth
Cooling Savant
 
Join Date: Mar 2003
Location: MO
Posts: 781
Default

Quote:
Interested in a job in Indiana?
Indiana? How much does a resistor-herder earn? Better be a lot, that'd be one hell of a daily commute.
Groth is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:41 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
(C) 2005 ProCooling.com
If we in some way offend you, insult you or your people, screw your mom, beat up your dad, or poop on your porch... we're sorry... we were probably really drunk...
Oh and dont steal our content bitches! Don't give us a reason to pee in your open car window this summer...