ugly face blues - GL386 clocking a 4013

Started by duck_arse, September 11, 2014, 01:39:05 PM

Previous topic - Next topic

duck_arse

I have this, mostly, on the breadboard. I'm using "GL386" because I have them. at the moment, I have a 4013 as divide-by-2 connected to the 386 output. don't ask me why, because I don't yet know.



but there's a problem. the 386 ouputs "a" squarewave, but it has some glitches at about the Vcc/2 crossover point, leading and trailing edges. there is enough something here to produce what looks like divide-by-one output, and tiny, TINY narrow pulses at that.

so, the question is, is there some method of slowing the 386 itself, via "bypass" or gain-sets, such that it doesn't do the wretched up-and-back, or just wobbly noise, on the transitions? I do have a low-pass and diode working, but if there is a way to stop the problem starting, I can get on with my dividing. anyone?
You hold the small basket while I strain the gnat.

anotherjim

Could be a side effect of using a wire for x200 instead of a cap (cap preserves DC bias conditions in the 386?).
You could try a trimmer for something <200 gain AND add the bass boost mod = more fundamental?

~arph

I've used a schmitt trigger  (4093 or 40106 or an opamp)  at the 386 output to clean the signal. But this introduces another IC. I wonder if anotherjims suggestion helps. As I've used a wire for the 200x too.

duck_arse

ahh, see, this is where I shoulda drawn the circuit first. I have an electro between pin 1 and 8, am planning (oh, ha-ha, very funny) to use a 2k2 in series for some gain difference. I've also switched from non-invert in to invert in, and back again. and I have a zobel network.

messing with it again today, I was seeing some junk on the transients that changed when I off switched the cfl desklamp. and then I realised I wasn't dividing by two at all, it was all by 1. so I'm back at square nought, and bluer than ever.
You hold the small basket while I strain the gnat.

anotherjim

I don't think there is a simple answer for this job.

1: Guitar often has strong harmonics - strong enough to make extra peaks and zero crossings.
2: Guitar doesn't always have strong enough harmonics to always make extra peaks and/or zero crossings. If it did, we could divide by 4 for a sub octave.
3: The above 2 cases often switch during the duration of a note.
4: Sufficient low pass filtering to remove harmonics makes the signal too weak at the top of the neck.

We just have to compromise if we want something simple. My current breadboard project needs the fundamental only (not for division, but for wave shaping).
So, I've got 2 op-amps in an LM358. One for gain, the second a schmitt trigger. It works, BUT, I still have to play using neck p/u, tone off AND finger pick for it to work glitch free. I think it's ready for boxing up now.

nocentelli

If you want more octave down from the 4013, you probably want a heavy squarewave fuzz stage followed by a severe LPF. The dwarfcraft robot devil uses three 4049 inverters in series with lots of gain (3M3 feedback resistors), followed by a 47n to ground which probably removes pretty much all of the harmonics and treble in front of the 4013.

I think it's going to be a mess going into the 7555 part of the uglyface, since the uglyface generates sub-octaves itself: Sub-octaves of sub-octaves! I have played my Pearl sub-octaver through my uglyface, and it sounds not unlike a series of heavily de-tuned pianos falling down some stairs, and not in a good way. You might like it.
Quote from: kayceesqueeze on the back and never open it up again

~arph

#6
What do you mean by glitch free? No octave jumping? Fundamental extraction is nigh impossible, but I really had good results with a 386 driving a 4093. It will not give you 50/50 duty cycle but for division that is fine. If you search this forum for "two step octave arpeggiator" you'll find the schematic. I can't say its flawless on the low end but it's pretty good

Linkeylink:

http://www.diystompboxes.com/smfforum/index.php?topic=96658.0

anotherjim

Glitch free -  I get a consistent single cycle fundamental waveform - right down to bottom E (haven't tried it with a Bass yet). Have to play with fingertips bass-guitar style. A plectrum introduces tons of harmonics just on the attack that destroys the smoothness I'm after..



Here is an extract of the current state of play. Follow through to output of IC1D. The pre-amp is also supplying an envelope detector.

duck_arse

thanks fellas, but there is one other thing I didn't mention. I'm still only testing with a sig generator, and can't get the bloody divider to divide by two. I'm not even bothered about fundamentals and picking styles yet.

here is the something, I think correct at the moment.



I had some R/C/diode between 386 out and clk, but it seems to not be doing what I thort. I had tried a dual op-amp for about ten minutes, pulled it all down about 2 minutes before I thought to use LM358 instead of LF353. oh, well.

arph, the 4093 was in play tonight, but I was trying to make a d-flip flop. 0 success. off the board. and did you blokes ever get the reverse sweep for the ugly face to work in any form?
You hold the small basket while I strain the gnat.

anotherjim

Maybe the trigger threshold of the 4013 is too close to the zero crossover of the 386. Try some R between 386 output and top of R3. Or, 100k pull down on 4013 clock and a coupling capacitor going into that.

Hmmm.. In fact, have you tried a simple potentiometer to 0v on the 386 output to trim the signal so it's just tripping the clock (with a C to 0v to lessen any glitches)? The pot will act as a pulldown making sure the clock sees low before high (it only sees low to high transition).

Watch out for input voltages above or below the supplies on the CMOS -  it can latchup (even though it has internal diodes to stop it).




~arph


anotherjim

Not sure if the zobel things can help much - they are across the output which has a low Z so won't really be damped very much (zobel is really to compensate for reactive/inductive load of a speaker or motor, which there isn't).

You can use the other half of the 4013 as a logic level buffer.
IIRC (I did this myself a few months ago) Tie D & Clk low. Tie R high. Q output will follow S input. Not got truth tables to hand to confirm the how, but it is possible.
Hmmm, may be possible to make that a schmitt trigger if it's non-inverting.

duck_arse

#12
well, now. the zobel was a convenient straw for clutching. I've tried every combo of R/C I can think of, I'll give the series C a go tomorrow. but for now ..... success! and it is getting VERY ugly.

so, now I have NPN loaded with R and C switching furiously to the V+, and the 4013 on a 5V6 zener supply (w/ clock clamp), and it works, divded output (down to about "2" input). the other half of the 4013 is intended to run from the 7555 Q, so not available for sig shaping (also tried today). again, I don't know why any of this.

and even tho there's a thousand extra parts, the 5V6 is useful, with a rectifier, for reverse sweep. perhaps. in principle. I'm still baffled as to why I get nothing BUT glitch-width Q output when the 386 is going to the rails and straight to clk.

[edit :] and back on the inverting input again. non-invert was doing some silly 68kHz stuff.
You hold the small basket while I strain the gnat.

anotherjim

Just read something elsewhere I never realized before. Some 4013 have Schmitt clock input and some don't. HEF4013 (Phillips) do.
I've been playing with HEF4xxx CMOS mostly.

duck_arse

schmitt may well have done the trick, but my only example is motorola from 1997. I tried a hef4027 j/k today, couldn't get any but glitch output.
You hold the small basket while I strain the gnat.

duck_arse

a progress update: now using a PNP shape/cleaner, which could do with a bit more gain. and I've been playing with divisions. I find that by dividing the 386 output by 4, and feeding that to the 7555, you can get noise like throat-singing around the 12th fret. very distorted, wild, up-and-down throat singing, which STOPS when it thinks, but there it is. haven't sorted the ldr-ing yet, or the right options for the blizzard of switching to come, but a bit closer.
You hold the small basket while I strain the gnat.

anotherjim

Some time on the breadboard to check out 4013 divider. Found the same issue WITH an 358 opamp Schmitt clocking the 4013. Thinking it's not clearing the upper and lower threshold of the schmitt in the 4013 clock input reliably, I tried using the other flip-flop as a buffer and it made no difference! Only happened with a fairly strong input from sig gen -  I could turn it down to get reliable dividing.

I can't see anything on the scope that could  bugger the clocking -  but it bloody well happens! Only glitch I see is just a couple 100mV step on the bottom of the waveform that gets wider as the input is increased. The 358 doesn't go to +9v of course (7.5v) and the square wave edges aren't particularly fast due to the slow slew rate of this chip, but even CMOS buffering didn't help!

Next, I tried to make a Schmitt with the other half of the 4013. This does work. I tied Reset high, positive feedback 100k from Q to Set. Input via 10k to Set, output is from Q. This solved the problem. Reliable division with sig gen or guitar. Now, there are 2 Schmitt triggers in the circuit, so I'll have a go at deleting the opamp one next which will free up an amp (whoopy do).

Duck_arse, I know this doesn't help your particular project, but I though I'd post what I found anyway.

duck_arse

thanks jim. w/ 386 (and others, more later), it seems there is an up-and-back jiggering something in the transients. all my 4013-ing ended up with tiny-tiny pulses I couldn't even see at less than max bright. I only knew they were there at all because the trace was triggering. funny, I thort .... I could only sort out the 386 with intermediate transistor stage with filterings. I could add some useful gain there, but everyone says "it's too many parts" etc.

so, and as I wanted some lower gain to drive a rectifier properly, as in some envelope followations, I went to the lm358 as 2 gain stages. and the same thing happpened. and then I realised what is above said - use a comparator. and I did, and it still did the dirty. by now I'm clocking a 4520 instead, and testing half into clk, half into en. one side worked, apparently ....

anyway, I ended messing 2 days on that, then threw a cmos rail-to-rail in, and it nearly worked exactly. just wants a single r/c between comparator and clk in. and then I tried all the other op-amps I have, and that was the cure. even with the less than 9V output, the cmos clocked flawlessly (on 9V) with the LM1458 only, it even tracks. well, as far as it wants to track. so it stays, with the r/c between (for those who may want to TL0 it).

rectifier seems working now, I found an ldr that goes way lower R than I thought, and a gooderer way to drive the led via a pot, and I've tested the method of reverse sweep, so it is progressing, just needs some stringing together. anyone interested in bb help during prelims, please give a hoy.

I saw that bottom step as well in some configs, it seemed to be an ac coupling thing. and it does help, I was going to ask if someone would try it, see if it was just too old junk parts on me end.
You hold the small basket while I strain the gnat.

anotherjim

Just to add I tried the 4013 schmitt instead of an op-amp one and it works great. Nice & square.

1458? I was using one (with a bit less gain) the last time I was playing with a 4013. Ought to keep notes - so many variables :icon_eek:

duck_arse

#19
ergh, mother nature. I did the stitching together, and plugged in a guitar, and it was a dead loss. no sustain of any sort with the lm1458. bugger, so I went back to the 358, and it was vastly better, but still not quite. that cmos is for tomorrow, but in the meantime, I fiddled.

it seems that the 7555 trigger/bias is too much load on the comparator output to allow cmos to clock on the same sig, so I bunged in an emitter follower for the trigger (still needs r/c to clean clock). much better. and reverse sweep works, but not like I mighta thort. and then I started fiddle. sent the comp to the divider, then to the trigger, and with f/4 we get swept throat singing come back to do the vowell sounds. and other weirdness.

but then I connected the ldr/led to the divider outputs. ohhh, the humanity! wet farts, bird whistles, dr who, and others, they were all there, complete madness. so now the switching options have become even worse, and still no sign of the lfo mod. if yr on the breadboard, give it a try.

[edit :] should change the thread title now that I've derailed the circuit so completely.
You hold the small basket while I strain the gnat.