Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Class D Switching Power Amplifiers and Power D/A conversion

Debugging UCD-style discreet comparator
Debugging UCD-style discreet comparator
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 30th June 2020, 10:47 PM   #1
fers is offline fers  Canada
diyAudio Member
 
Join Date: Apr 2019
Location: Montreal
Default Debugging UCD-style discrete comparator

First, some context regarding what I'm doing now. I have been playing around with a discrete circuit for a UCD amplifier. Not surprisingly, while I could hear sound after a first crappy build on a protoboard, it was extremely distorted. There were many shortcomings in my build, but scoping the gates of the mosfets seemed to indicate they were not driven fully on. So, I'm not even sure what I could hear was "produced" in a class d mode, as opposed to some unintended class a mode. Thus, I decided to study the subcircuits individually.

The gate drivers, assembled on small pcbs with dremeled "islands", seemed to work mostly fine when driving them directly with a switch and resistor.

The comparator seemed to be my main problem. The general schematic is as attached. The crude current source at the top gives out about 1.25mA. Upon varying the input differential voltage, for instance using the potentiometer R10, I do get a transition. However, scoping the outputs (voltmeters M1 and M2 in the schematic), I can see the comparing action is rather less than ideal.

Starting with both outputs near one rail, slowly varying the input voltage, I can see that a first output alone begins transitioning proportionately to the input. When this first output has slewed, say, 2/3 of the way to the opposite rail, there is a discrete jump in both outputs, upon which the first output that was slewing becomes close to the rail and the other output becomes a value in between the rails. Continuing to vary the input voltage, the second output slews proportionately to the expected rail. The whole transition, from both output near the rails to both output near the opposite rails, happens within about a 25 mV range in the input voltage.

I expected a DC offset, but not such a big linear range on both sides of the transition voltage. A priori, this could be fine, but coupling an mp3 player in series with a 22uF NP capacitor accros the inputs yields rectangular only for the bass notes. The remaining music material yields squiggly lines between the discreet near-the-rail states of the output. Obviously, this won't work as a class d modulator.

I tried emitter resistors (47 ohms) in the long-tail pair and the current mirror, various combinations of the transistor pairs using 2N5401/5551 or 2N3904/3906, handmatching the hfe (about 100 for the 5401 and 220 for the 3906) for the input pair and the current mirror transistors, increasing/decreasing output current through R14, providing positive feedback for hysteresis using small caps or resistors from the outputs to the inputs, putting a small ceramic cap accross the inputs to suppress HF oscillation and increasing/decreasing the voltage, but to no avail. While all these changes have an impact on the exact behavior it stays the same overall.

Here are some questions I'm asking myself.
- Is this behaviour to be expected in such a comparator?
-At the beginning, the voltage divider on each inputs did not have the same impedance (two 1k and two 10k). This made the problem worse. So, does such a comparator requires a rather low impedance source?
- Is the problem coming from my use of a comparatively high impedance source (mp3 player)?
- Does this comparator requires a preamp to operate properly as a class d modulator?
- I expect the rather non-ideal layout to cause problems of speed and high-frequency oscillations, but can the breadboard assembly be causing this behaviour?
- Are the squiggly lines in between the two near-the-rail states of the outputs a bandwidth issue with my oscilloscope (I doubt it) or, related to the previous question, an issue of the maximal bandwith attainable on a breadboard?
- Any tips to elucidate the issue?

I have an old 60 Mhz tektronix oscilloscope but can have access to an Siglent SDS1202X-E 200 mhz scope if that can help.

Thank you for any help!
comparator.png

Last edited by fers; 1st July 2020 at 06:09 AM.
  Reply With Quote
Old 1st July 2020, 08:35 PM   #2
fers is offline fers  Canada
diyAudio Member
 
Join Date: Apr 2019
Location: Montreal
Some update: by continuing messing around with is mentioned in the first post, I managed to obtain a better result. Increasing the voltage seems to increase mostly the region where it transitions quickly. As such, the linear response part, where the input is near one of the rails, becomes proportionately smaller.


Is it possible I am simply seeing the saturation of the inputs on a comparator designed to work on much larger rail voltages?


There are still some RF oscillations that appear from time to time. The waveform really looks like an RC charge and discharge cycle at around 5MHz. At this frequency, I suspect the parasitics of the breadboard to be fully responsible.


So, it seems I have cleared up my problem... Funny enough, it seems that simply writing about it brought me to think about it differently. Onward to the gate drivers!
  Reply With Quote
Old 3rd July 2020, 06:00 PM   #3
kartino is offline kartino  Indonesia
diyAudio Member
 
kartino's Avatar
 
Join Date: Feb 2005
Location: Gunungkidul Indonesia
How can you hear the sound from a comparator?
  Reply With Quote
Old 3rd July 2020, 06:20 PM   #4
Reactance is offline Reactance  South Africa
diyAudio Member
 
Reactance's Avatar
 
Join Date: Jun 2005
Location: Cape Town
Quote:
Originally Posted by fers View Post
Some update: by continuing messing around with is mentioned in the first post, I managed to obtain a better result. Increasing the voltage seems to increase mostly the region where it transitions quickly. As such, the linear response part, where the input is near one of the rails, becomes proportionately smaller.


Is it possible I am simply seeing the saturation of the inputs on a comparator designed to work on much larger rail voltages?


There are still some RF oscillations that appear from time to time. The waveform really looks like an RC charge and discharge cycle at around 5MHz. At this frequency, I suspect the parasitics of the breadboard to be fully responsible.


So, it seems I have cleared up my problem... Funny enough, it seems that simply writing about it brought me to think about it differently. Onward to the gate drivers!
Without behaviour of waveforms for given signal condition with analysis, I'm not really sure what your conclusion is.
__________________
There’s nothing worse than the smell of burned output transistors!!
  Reply With Quote
Old 3rd July 2020, 06:36 PM   #5
fers is offline fers  Canada
diyAudio Member
 
Join Date: Apr 2019
Location: Montreal
Quote:
Originally Posted by kartino View Post
How can you hear the sound from a comparator?
Hello Kartino,

I had set up the entire ucd circuit, similar to the Philips application note, with the gate drivers and some extra IRF630 I has lying around. Those are not the best mosfet, I know, but should at least work at low power. However, they where not being turned on and remained in the linear mode.

As the sound was that bad, I decided to study the circuit piece by piece, starting with the comparator. I'm not hearing anything at this point, only looking at the scope.

Btw: Thanks for all the schematic you published here. It's always interesting to have a look at them!
  Reply With Quote
Old 3rd July 2020, 06:39 PM   #6
fers is offline fers  Canada
diyAudio Member
 
Join Date: Apr 2019
Location: Montreal
Quote:
Originally Posted by Reactance View Post
Without behaviour of waveforms for given signal condition with analysis, I'm not really sure what your conclusion is.
Well, I haven't done a formal analysis or taken capture screen, but I was looking at waveforms while imposing a signal.
  Reply to this post

Reply


Debugging UCD-style discreet comparatorHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
LME49600 vs discreet hellokitty123 Solid State 0 17th September 2018 11:26 AM
Discreet OPamp M Gregg Pass Labs 4 12th May 2013 06:21 PM
Discreet DAC vmps miniDSP 3 3rd May 2012 08:06 AM
DIY home etched boards, old style, simple, fast and SMD style destroyer X Solid State 51 11th April 2011 09:07 PM
FS: Discreet opamps McCrackers Swap Meet 3 15th February 2010 03:22 PM


New To Site? Need Help?

All times are GMT. The time now is 05:55 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 14.29%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright ©1999-2020 diyAudio
Wiki