|
|
Random Nonsense / Geek Stuff All those random tech ramblings you can't fit anywhere else! |
Thread Tools |
06-19-2003, 01:57 PM | #1 |
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... |
06-19-2003, 02:24 PM | #2 |
Pro/Guru - Uber Mod
Join Date: Sep 2002
Location: Indiana
Posts: 834
|
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. |
06-19-2003, 03:23 PM | #3 |
Cooling Savant
Join Date: Mar 2003
Location: MO
Posts: 781
|
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. |
06-19-2003, 11:29 PM | #4 | |||
Pro/Guru - Uber Mod
Join Date: Sep 2002
Location: Indiana
Posts: 834
|
Quote:
Quote:
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:
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.) |
|||
06-20-2003, 09:15 AM | #5 | |||
Cooling Savant
Join Date: Mar 2003
Location: MO
Posts: 781
|
Quote:
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:
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:
|
|||
06-20-2003, 08:53 PM | #6 | ||
Pro/Guru - Uber Mod
Join Date: Sep 2002
Location: Indiana
Posts: 834
|
Quote:
Quote:
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. |
||
06-21-2003, 02:24 AM | #7 | |
Cooling Savant
Join Date: Mar 2003
Location: MO
Posts: 781
|
Quote:
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. |
|
06-21-2003, 10:46 AM | #8 | |
Pro/Guru - Uber Mod
Join Date: Sep 2002
Location: Indiana
Posts: 834
|
Quote:
Interested in a job in Indiana? |
|
06-21-2003, 04:28 PM | #9 | |
Cooling Savant
Join Date: Mar 2003
Location: MO
Posts: 781
|
Quote:
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|