MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

Comparator Help
MUFF WIGGLER Forum Index -> Music Tech DIY  
Author Comparator Help
Jazzmarazz
Hey all,
I have some questions about a comparator used in a specific schematic found here.

1.
The LM319 (U1) has pin 3, GND1, connected to -12V and not Ground.
In the datasheet, this is stated several times: ""∗Do not operate the LM119 with more than 16V between GND and V+"
If I understand correctly, this will operate the device at 24V between the ground in and V+.
Is this ok? Can I connect the pin to Ground instead and have it work the same?

2.
Since it is a dual comarator, how can I terminate the unused circuit?
I currently have it connected to the same pins as the first comparator with the output hanging.

I have reached out to Ian Fritz and if I get a response from him first, I'll update here.
joem
I'm no expert but regarding GND1 being tied to -12V, that does indeed seem wrong to me based on the datasheet.

Regarding the unused comparator, it's a little annoying the datasheet doesn't tell you what to do like they do for some TI chips (at least not that I saw in a brief look). I did find a few forum posts elsewhere that say not to tie both the inputs to ground because that could make the unused comparator oscillate in the lm319 (which could affect the one that's in use), so one should be tied low and one high. But mind the fact that the inputs shouldn't be more than 5V apart, so if you ground one input, you're want the other one to be within 5V of that, and a simple voltage divider should do the trick.
Jazzmarazz
joem wrote:
I'm no expert but regarding GND1 being tied to -12V, that does indeed seem wrong to me based on the datasheet.

Regarding the unused comparator, it's a little annoying the datasheet doesn't tell you what to do like they do for some TI chips (at least not that I saw in a brief look). I did find a few forum posts elsewhere that say not to tie both the inputs to ground because that could make the unused comparator oscillate in the lm319 (which could affect the one that's in use), so one should be tied low and one high. But mind the fact that the inputs shouldn't be more than 5V apart, so if you ground one input, you're want the other one to be within 5V of that, and a simple voltage divider should do the trick.


Thanks joem.
I missed the fact that the inputs should not exceed a 5v difference. So I think I shall terminate the unused circuit like so:
Synthiq
I also agree it seems like the maximum spec is violated here, but the circuit will not work if GND is connected to 0V. The output is pulled to 0V via resistors R23 and R24 when the comparator output is high and GND when the output is low so they would be the same if GND is also connected to 0V. To be able to turn off Q3, the gate must be pulled down to -12V so the only option is to connect GND to -12V.

The only explanation I can can come up with is that they really meant that there can't be more than 16V between the output and GND and they assumed that the output would be pulled to VDD when the output is high. In this case there will never be more than 12V between the output and GND. To know for sure if there is a problem, you need more technical information about the process used to manufacture this comparator to be able to determine which component that limits the maximum voltage but this information is not public.
Synthiq
To save a few resistors, the inputs of the unused comparator can also be connected to 0V and the output of OA4, which is 4V.
Jazzmarazz
Synthiq wrote:
I also agree it seems like the maximum spec is violated here, but the circuit will not work if GND is connected to 0V. The output is pulled to 0V via resistors R23 and R24 when the comparator output is high and GND when the output is low so they would be the same if GND is also connected to 0V. To be able to turn off Q3, the gate must be pulled down to -12V so the only option is to connect GND to -12V.

Right right! Curious... What if:
(1.) instead of a 2N4391, we used a 2N4393 which if I understand correctly has an Id(off) state when Vgs=-5V.
(2.) I powered the LM319 with +/-6.9V and connected GND1 to -6.9V

What info am I overlooking?

Synthiq wrote:
To save a few resistors, the inputs of the unused comparator can also be connected to 0V and the output of OA4, which is 4V.


Thanks, thats what Iv'e done now.
Jazzmarazz
y email got through to Ian Fritz and he'll chime in with his reasoning once he gets back into town.
Synthiq
Jazzmarazz wrote:
Synthiq wrote:
I also agree it seems like the maximum spec is violated here, but the circuit will not work if GND is connected to 0V. The output is pulled to 0V via resistors R23 and R24 when the comparator output is high and GND when the output is low so they would be the same if GND is also connected to 0V. To be able to turn off Q3, the gate must be pulled down to -12V so the only option is to connect GND to -12V.

Right right! Curious... What if:
(1.) instead of a 2N4391, we used a 2N4393 which if I understand correctly has an Id(off) state when Vgs=-5V.
(2.) I powered the LM319 with +/-6.9V and connected GND1 to -6.9V

What info am I overlooking?

That could work, but note that the comparator will use more current than the 2.2kohm resistors biasing the 6.9V zeners can supply so it has to be lowered to maybe 360ohm worst case for the positive side and maybe twice that for the negative side to make sure there is still at least 1mA left for the zener diode itself.

The +/-6.9V supplies drives the frequency potentiometer so you want these voltages to be quiet so I would also add decoupling capacitors since the comparator may generate current spikes on these supplies when switching.

Finally, the Idss current of the 2N4393 is 5-10 lower than for the 2N4391 so the on-resistance will be correspondingly higher so the discharge time will be longer and possibly increase the frequency errors at higher frequencies by stretching the cycle time but I don't know if this is significant or not.
Jazzmarazz
Synthiq wrote:
Jazzmarazz wrote:
Synthiq wrote:
I also agree it seems like the maximum spec is violated here, but the circuit will not work if GND is connected to 0V. The output is pulled to 0V via resistors R23 and R24 when the comparator output is high and GND when the output is low so they would be the same if GND is also connected to 0V. To be able to turn off Q3, the gate must be pulled down to -12V so the only option is to connect GND to -12V.

Right right! Curious... What if:
(1.) instead of a 2N4391, we used a 2N4393 which if I understand correctly has an Id(off) state when Vgs=-5V.
(2.) I powered the LM319 with +/-6.9V and connected GND1 to -6.9V

What info am I overlooking?

That could work, but note that the comparator will use more current than the 2.2kohm resistors biasing the 6.9V zeners can supply so it has to be lowered to maybe 360ohm worst case for the positive side and maybe twice that for the negative side to make sure there is still at least 1mA left for the zener diode itself.

The +/-6.9V supplies drives the frequency potentiometer so you want these voltages to be quiet so I would also add decoupling capacitors since the comparator may generate current spikes on these supplies when switching.

Finally, the Idss current of the 2N4393 is 5-10 lower than for the 2N4391 so the on-resistance will be correspondingly higher so the discharge time will be longer and possibly increase the frequency errors at higher frequencies by stretching the cycle time but I don't know if this is significant or not.


Oh! Thanks for pointing out the Idss. I do not want to reduce the frequency accuracy.
Im not worried about noise on the supplies because I have added a 10uF cap per IC as well as a 100nF cap per voltage pin on each of the +/-12V rails as well as the +/-6.9V rails and even a cap before and after the op amp that buffers the 4V reference. I also have ferrite beads on the 10-pin power connector.

---

Side note, if you have alternative suggestions for either the comparator or discharge-FET go ahead and let me know. Ian chose the LM319 because of the speed even though one comarator is wasted and the FET is apperetnly a direct replacement for the old KE4859 which was used in the old schematic that inspired him.
Synthiq
Jazzmarazz wrote:
Side note, if you have alternative suggestions for either the comparator or discharge-FET go ahead and let me know. Ian chose the LM319 because of the speed even though one comarator is wasted and the FET is apperetnly a direct replacement for the old KE4859 which was used in the old schematic that inspired him.

One option is the single LM311 that doesn't seem to have the limitations on the GND voltage, but the propagation delay is more than 100ns longer so it would add maybe a 0.1% error at 10kHz.

The Vishay spec for 2N4391 and 2N4393 lists the maximum on-resistance as 30ohm and 100ohm, respectively. If we want to discharge the 2.2nF integration capacitor to 0.1% of the start value, it will take 6.9 time constants. This gives 436ns and 1452ns for the two cases.

So clearly it is a better choice to use a LM311 and a 2N4391 than a LM319 and a 2N4393 driven at a lower supply voltage if the goal is to minimize the total error. The discharge time is also controlled by a positive feedback loop around the comparator with a time constant set mainly by capacitor C4 and resistor R20. If the discharge time would be increased by switching to a 2N4393, the time constant set by R20 and C4 has to be increased as well.

The oscillator does have a trim for high frequency errors, so it is quite possible it can handle either of these changes successfully.
frijitz
Jazzmarazz wrote:
Hey all,
I have some questions about a comparator used in a specific schematic found here.

1.
The LM319 (U1) has pin 3, GND1, connected to -12V and not Ground.
In the datasheet, this is stated several times: ""∗Do not operate the LM119 with more than 16V between GND and V+"
If I understand correctly, this will operate the device at 24V between the ground in and V+.
Is this ok? Can I connect the pin to Ground instead and have it work the same?

2.
Since it is a dual comarator, how can I terminate the unused circuit?
I currently have it connected to the same pins as the first comparator with the output hanging.

I have reached out to Ian Fritz and if I get a response from him first, I'll update here.

Yo Folks, just back from Mexico --

Yoiks, that ole thang? It's been superceeded by this:
http://www.electro-music.com/forum/topic-28713.html&postorder=asc
I keep the old page up mostly for tutorial purposes.

I looked through my system and it appears I never actually incorporated this one, at least not long term. So this afternoon I whiteboarded a quickie version of just the core, to look at the issues raised here. It's been humming along at 15 kHz for several hours, with no noticable problems, particularly with no noticable heating of any component. It just has a jellybean (TL072) for the integrator. Switching is in half a ms or so, with a bit of trash at the transition. There is a slight bit of bowing after the switching, indicating some settling, but who knows from what.

After 20+ years, I really can't remember the reason for breaking the design rule on the ground pin. Maybe I just overlooked it. Or maybe I copied it from somewhere else. Or maybe I rationalized it was OK because of the topology -- pull-down at the output, as someone suggested. I'll let it run overnight and report back if it blows up or anything.

I eventually figured out that the speed advantage of the 319 over the 311 doesn't buy you much of anything. The slewing in the rest of the circuit is the limiting factor, and switching too fast can introduce unnecessary ringing at the transition.

As far as the other half of the chip, I did nothing at all. I just now put in large resistors to ground at the inputs. The input offsets should hold the device in a fixed state, I think. There was no chattering in either case.

I appreciate all the interest. Thanks!

Ian
MUFF WIGGLER Forum Index -> Music Tech DIY  
Page 1 of 1
Powered by phpBB © phpBB Group