Low output from comparator

Started by Ksander, June 14, 2023, 10:47:49 AM

Previous topic - Next topic

Ksander

While looking for a new project, I stumbled upon the 4046 Synth Demonstrator https://www.diystompboxes.com/smfforum/index.php?topic=113380.0. The thread has links to some awesome sound clips. However, the schematic is quite intimidating, and the thread has been "necro'ed" (don't know what that means, but it sounds bad). When I searched for a simpler implementation of a synth using this IC, I found this: https://www.diystompboxes.com/smfforum/index.php?topic=101138.0. This schematic there is simple enough, but the comments are not particularly positive: "Poor amplifier feeding a less than ideal PLL-setup. It's meant to produce a square wave output... I wouldn't bother with that schematic".

So, I thought it might work better with an input buffer followed by a comparator to produce a square wave. To try this, I did the following:
1. Breadboarded a TL072 in non-inverting configuration with a variable feedback resistor to vary gain between 1-11 ('sustain'). This part works fine, tested with an audio probe.
2. Feed the op-amp output to an LM311, arranged nearly the same as the LM311 fuzz from parasit studios https://www.parasitstudio.se/uploads/2/4/4/9/2449159/lm311_fuzz_pcb.pdf - I substituted the 47nF input capacitor for a 56nF and the 47pF capacitor between pins 7,8 for a 100pF since those were the values I had.
3. Well, what I would like to do is to feed the LM311 output to the 4046. But I didn't get that far: the output of the LM311 is very low. It is audible, but much more faint than when I just plug the guitar into the amp directly.

I tried various things: ripping all components out of the breadboard and building it again; bypassing the input buffer, using a different LM311, trying out various different values for the components, but it didn't make a difference. Is the low output normal?

I also realized I may not really understand what the comparator is doing, so I was hoping someone could help me understand. This is my take on it: there is a 220k/220k voltage divider at pin 3 (3.75V) and a 10k resistor from pin 3 to pin 2 (3.60V). The guitar input connects to pin 2. What I would expect is that normally the output is 'low' (pin 7 reads 0.53V), and whenever the guitar signal exceeds 0.15V, the output should jump to a 'high' value (cannot take a DMM reading while strumming..., but somewhere close to Vcc @ 8.33V?). Then, after a decoupling cap, the output should swing between the +/- (1/2) the 'high' value. Insofar as I understand the datasheet, the output should indeed be in the order of volts.

Any insights would be much appreciated!

duck_arse

draw your circuit. show us the drawing. do you have a pull-up resistor on the output, as seen in many of the datasheet examples, and as seen in freppo's fuzz?
" I will say no more "

antonis

"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

strungout

Necro'ed means the thread hasn't had any replies for a long time before someone brings it back, like a necromancer brings back the dead!

I built the first circuit you referred to, it's very cool. It can do synthy sounds that sound like a synth, instead of a synthed guitar... If that makes sense. We could help you get it going if you want...

Do read what Antonis has linked.

To do a DMM reading while you're strumming, use alligator clips!
"Displaying my ignorance for the whole world to teach".

"Taste can be acquired, like knowledge. What you find bitter, or can't understand, now, you might appreciate later. If you keep trying".

Ksander

I did google before asking the question. The links Antonis provided were unfortunately not helpful either (have you actually tried to read the first page!); the first two pages are too high-level, and the datasheet has details that are beyond me.

Unless I made a mistake in laying out the components, The circuit now on the breadboard is exactly as the one from parasit (except for the 56nF input cap instead of 47nF and 100pF instead of 47pF across Vcc and the output). There is some output, but it is barely audible.







Kevin Mitchell

#5
Quote from: Ksander on June 14, 2023, 04:16:51 PM
I did google before asking the question. The links Antonis provided were unfortunately not helpful either (have you actually tried to read the first page!); the first two pages are too high-level, and the datasheet has details that are beyond me.
Did you see a math formula and just run the other way?
Those examples are very rudimentary. I'm sure his intent is for you to learn to walk before you run. Don't take it for granted!

I suggest you run your ideas through a simulation like falstad to get a better visual of what's going on with your circuit. Then find the application formula (when possible!) for reasoning. Typically the applications and formulas to go with em' are in the datasheets.
  • SUPPORTER

Ksander

Quote from: Kevin Mitchell on June 14, 2023, 04:52:29 PM
Quote from: Ksander on June 14, 2023, 04:16:51 PM
I did google before asking the question. The links Antonis provided were unfortunately not helpful either (have you actually tried to read the first page!); the first two pages are too high-level, and the datasheet has details that are beyond me.
Did you see a math formula and just run the other way?
Those examples are very rudimentary. I'm sure his intent is for you to learn to walk before you run. Don't take it for granted!

I suggest you run your ideas through a simulation like falstad to get a better visual of what's going on with your circuit. Then find the application formula (when possible!) for reasoning. Typically the applications and formulas to go with em' are in the datasheets.

I'm certainly not afraid of math; i develop statistcal models for a living. The issue with those websites was that the first two provide very high level information, which I do believe I understand. The last page was the datasheet. This simply has too many terms that I am unfamiliar with to know what to do with them exactly.

The simulation is helpful, thanks, I'll try that!

antonis

I'd try with a 10k pull-up resistor and continue with wiring pin 1 on Vcc/2 (instead of ground)..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

duck_arse



that red link - where does it go? I can't see anything else connected to that strip. please take voltage measure all pins of the IC and post here. thank you.
" I will say no more "

antonis

What eagle eye down under fellow said above..!! :icon_wink:

There is no visible connection of +9V (actully around 8.4V) on either side of breadboard..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Ksander

#10
Quote from: duck_arse on June 15, 2023, 04:42:11 AM


that red link - where does it go? I can't see anything else connected to that strip. please take voltage measure all pins of the IC and post here. thank you.

Eagle-eyed indeed! It is just an ugly jumper, which goes into the +9V rail (EDIT: in the pictures, there were no connectors between the rails of the opposite sides; i removed them to get a better picture). These are the measurements at the pins:

1. 0V
2. 3.67V (not strumming the guitar)
3. 3.80V (not strumming the guitar)
4. 0V

5. ~0.04V
6. ~0.04V
7. ~0.54V, which goes down to ~0.46V when strumming the guitar
8. 8.42V

I also tried the suggestions by Antonis to bias pin1 to Vcc/2 and to replace the 100kOhm pull-up resistor with a 10kOhm one, both separately and simultaneously. I did not take readings of the voltages with these changes, but there was still hardly any output.

Could the IC be bad or of the wrong type? The IC is an LM311P; I saw there is also an LM311N which has a slightly slower response time.

Ksander

I just built the circuit with an LM393 instead  Now it works fine, so I guess the ICs were bad!