Connect with us

4047/4066 audio slicer help

Discussion in 'Audio' started by ragingben, Nov 19, 2012.

Scroll to continue with content
  1. ragingben

    ragingben

    15
    0
    Oct 6, 2011
    Hey, I'm having a bit of trouble with a part of a circuit I have been working on for a while and wondering if anyone can point me in the right direction.

    Basically I am using a 4047 to drive a 4066, which in turn grounds my signal (from a guitar) acting as a slicer style circuit. This is only a small part of a bigger project I'm working on. I was using a 555, but found it to be very noisy, which upon researching I have a few 7555's on the way under the impression they create less noise on the power supply rail. However in the meantime I have moved to a 4047 because it has a near 50/50 duty cycle, which for what I want is perfect, and a definate advantage over the 555. It also have an inverted output which is really helpful.

    The circuit works, however, I get this 'popping' when the state of the 4047's Q output changes, which is getting into the audio signal and making it unusable. I found that running it at 5v by using a 7805 I can reduce the popping while the cmos chips are still happy, but the problem is still there. It gets worse as I play louder. My guess is that there is dc leaking into the signal path causing the popping as it gets released? I have tried adding a pull down resister to ground on the gate pin I'm uisng of the 4066 and this hasn't helped. I have added a 100nF decoupling cap beween the V+ and 0v pins of the 4066 and 4047 and this also doesn't help with the popping.

    Can anyone spot anything obvious with this circuit that would cause the problem. I'm still a bit of a newbie to electronics, but love tinkering, although getting a bit frustrated with this now!

    [​IMG]
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    10,023
    2,138
    Nov 17, 2011
    Each time you short circuit the input by the 4066, the coupling capacitor is discharged to GND, too. This discharging could be the source of the pop noise (similar to the plop noise you can sometimes hear from the speakers when an amplifier is turned on).
    Why do you need this capacitor? Can you replace it by a short circuit?

    Harald
     
  3. ragingben

    ragingben

    15
    0
    Oct 6, 2011
    Hi Harald, thanks for your reply!

    Do you mean the 10uF cap betwewn the input and output (C5)? I'm uisng this cap to prevent any dc getting into the amp, is that not needed? To be honest I left it in because originaly I was using a buffer before the 4066 as I wasn't grounding the signal with the 4066, but using it to act like a switch in series with the signal, and I figured it would be a good thing to leave in incase any dc escaped form the 4066. Is this something you would recommend removing?

    I'll give that a try when I get home from work. Any ideas of why the popping becomes audible when I play harder, I guess the voltage of the signal raises as it gets louder, but I don't understandwhy this makes the popping audible, or what I can do to prevent this.

    Thanks again for your help, much appreciated!

    Ben
     
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    10,023
    2,138
    Nov 17, 2011
    A decent amp should have its own capacitor. When you connect the guitar directly to the amp there is no additional capacitor either.

    Harald
     
  5. ragingben

    ragingben

    15
    0
    Oct 6, 2011
    Yeah I guess it should!

    I read this article which was pretty interesting about biasing the 4066. I've updated my circuit to reflect the changes. Am I barking up the wrong tree, or should biasing the in and out pins of the 4066, and adding in a coupling cap between the signal and the in on the 4066 help reduce popping?

    In this schematic R5 and R6 should be 1M

    [​IMG]
     
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    10,023
    2,138
    Nov 17, 2011
    Your schematic doesn't reflect what the article says. In the article the CMOS switch is used as a pass switch. In your arrangement you still have C6 which will be discharged through U3A. And pin 2 of U3A is connected to GND - there goes your bias.

    I'm not sure why you want to short circuit the input at all instead of putting the switch as a pass gate between input and output. I suggest the following circuit:
    - remove the connection U3A pin 2 to GND
    - connect input pin 3 through a series capacitor (1µF ?) to U3A pin 1 (that is essentially what you alreaady have: C6)
    - U3A pin 2 through a series capacitor (1µF ?) to output pin 3
    - connect R5 to 4066 pin 1 and R6 to 4066 pin 2 (already there, but you'll have to remove the connection between pins 2 and 7, see previous step)
    - Vss and VDD connections of the 4066 are o.k. (7 and 14)


    Harald
     
  7. ragingben

    ragingben

    15
    0
    Oct 6, 2011
    Thanks for your help Harald.

    The reason I had the 4066 configured that way was because I figured it would be smarter to ground the input signal rather than just detaching it.

    Here is a revised circuit based on what you have said.

    [​IMG]

    I'll give it a try later.

    I have also been reading this article which details using the 4053 for fx switching, which I could easily adapt. I guess then my olny problem would be if the 4047 is causing noise on the supply or 0v rails.
     
  8. Harald Kapp

    Harald Kapp Moderator Moderator

    10,023
    2,138
    Nov 17, 2011
    Yes, your drawing reflects my intention perfectly.

    If noise on the supply is a concern, try decoupling the 4066 power supply (or better: the supplies of both ICs) by an RC low pass filter (e.g. 10 Ohm, 10µF, one for each IC) such that the capacitor is directly at the IC's pins, the resistor pointing from the IC to the main power rail.

    By the way: if you do not use the other 3 switches in the 4066, do not leave the pins open. You can
    - either connect all unused pins to GND
    - or connect all 4 switches in parallel (which as a neat aside reduces the pass resistance by a factor of 4)

    Harald
     
  9. ragingben

    ragingben

    15
    0
    Oct 6, 2011
    Thanks again, some really neat points there. I'm moving to a 4053 instead of the 4066 as it looks a neater way of doing things, and I'll try the decoupling. Thanks for your help, I'll report back when I have made the changes.
     
  10. ragingben

    ragingben

    15
    0
    Oct 6, 2011
    So, I have revised the circuit to a use a 4053 instead of the 4066. This seems good, I based it on this interesting article. The audio connection is both broken and the signal sent to ground which seems to work really well.

    However, when I add in the 1M resistors with the 4.5v~ reference voltage I get a worse pop than when the pins of the 4053 have no + voltage on them - I guess because now there is 4.5v grounding! Removing these makes the popping less, but still present. Is R9 and that connection for the reference voltage to the output buffer needed as pin 15 on the 4053 already has a reference voltae connection? If I remove C8 I don't get any audio, so it appears that needs to be there even if this could be charging and discharging causing the pops. I have removed the LED to take it out of the equation, although when I add it back in I plan to do it like this article suggests.

    Here's my updated schematic, including input and output buffers.

    [​IMG]

    Any further help is much appreciated. CMOS switching seems to be troublesome for this kind of device wehere there is a hard on and off. Would it help If I somehow had a trapezoidal switching with sharp edges rather than a full square wave? Would this reduce the popping by having a less abrupt change in voltage? I read about square wave trmolos and the basic idea seemed to be that those that appear to be square wave are actually trapezoidal.
     
  11. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,268
    Nov 28, 2011
    Hi Ben.

    You need to connect pins 1 and 13 of the 4053 to the virtual ground rail (top of C4), not the circuit's 0V rail. The way you have it, when the 4053's X switch switches to X1 and the Y switch switches to Y1, the switching network's input and output will both be connected to 0V, which is a -4.5V swing relative to their normal bias voltage (which is the virtual ground voltage). This guarantees a loud pop on each change of the switch.

    Also you don't need C8 and R9. 4053 pin 15 is already biased at the virtual ground voltage.

    Somehow I don't think that is the problem though. There will be a click or pop when the switch turns off and the instantaneous signal voltage is not zero. This explains why the pops are louder when you play louder.

    The only way to avoid this is to cut the signal off gradually, instead of suddenly. You could try adding an R-C circuit in the control signal from pin 10 of the 4047 to pins 10 and 11 of the 4053, to see whether the switches in the 4053 can be taken through their linear region where they conduct partly.

    After you've fixed the other problem, first try adding a resistor between the 4047 and the 4053. Try 10K, 100K and 1M, and see if this helps. This will also reduce the noise coupled into the circuit due to the 4053's input capacitance. I don't think it will fix the problem but it's worth a try.

    Next, you need to add a small capacitor from 4053 pins 10 and 11 to ground, and keep the resistor I suggested before. Use 100K for the resistor, and try capacitor values of 0.1 uF and upwards. If this fixes the problem, use the lowest value capacitor you can get away with. This change slows down the switch's response to the control signal, so it reduces the maximum rate that you can switch at.

    Good luck!
     
  12. ragingben

    ragingben

    15
    0
    Oct 6, 2011
    Hi Kris,

    Thanks for your detailed answer, I really appreciate you taking the time to go into detail that you have.

    I have switched back to the 4066 for switching, I get on better with it than the 4053 to be honest, and I can achieve the same result. Here is my updated circuit.

    [​IMG]

    I have added in R6 and C7, R7 and C8 as suggested, although I haven't had a chance to test if this helps the popping yet. It has also been suggested to me to add a RC filter by adding a resister (say 200r) in series with the supply to the 4047 and a large value cap to ground from it's supply pin. I haven't reflected this in the diagram, or testest it yet, but this should sop any noise coming from the 4047 affecting the rest of the circuit.

    So to clarify what you are saying - when there is no signal the line is sat at +4.5v with the switch sat either open or closed. As the signal is disconnected the output is then connected to +4.5v also there should be no popping because theere is no change in voltage. When I start playing the voltage should increase a little, relative to how hard I'm playing. I'm unsure how much, but for the purpose of this say the pickups on the guitar are outputitng 0.5v. So the signal level is +4.5v + 0.5v = 5v, and the virtual ground is biased to +4.5v, so when the switches are toggled the level changes between +5v and +4.5v, which will pop because there is a voltage change of +/-0.5v. This is quieter than when the signal was being shunted to ground because that would have been a 5v change. If I have understood correctly this makes a lot of sense!

    So if I also understand your answer about slowing down the change, the caps C7 and C8 are charging when the signal is high, and discharging when the signal goes low. The rate at which they discharge affects the speed at which the switch changes, as the voltage change is more gradual. By using a bigger cap it would take longer to discharge, increasing the time the switches take to open and close. At an extreme I may have to lower the maximum frequency as there is a cross over point where the switches would both be always on as the caps would take so long to discharge to a point the on/off signal changes the logic level that it would be reset by the time it's state had changed again. Basically I need to have a trapeziodal waveform rather than a hard square wave.

    I have also included a circuit (haven't added in those new changes) which shows how I propose to use what I'm designing here. Any comments on that are much appreciated. I think this has me punching above my weight a bit, but it is pretty interesting stuff from a learning point of view!

    [​IMG]
     
  13. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,268
    Nov 28, 2011
    Hi Ben.

    Re your new design (the first one in your post), it looks OK.

    I'd suggest adding a bias resistor from the common of the two switches (i.e. pin 5 of U2) to the virtual ground rail. 100k should be fine. This is just to stop that node from floating during the time (if there is any) when both switches are OFF during a changeover.

    Also I would add a 10k resistor straight across the output connector. Without this, if you power up the circuit before you plug the amplifier into the output, you'll get a thump when you plug it in, because C9 will have 0V across it, so the voltage at the output connector will initially be 4.5V. Once you plug in the amp, it will charge up C9 to 4.5V and bring the DC voltage at the output down to zero, but while C9 is charging, the amp will see a big spike. Adding that resistor makes sure that C9 is charged up, and there is 0V DC on the output, before you plug in the amp.

    Yes, that might help.

    Right so far.
    Not exactly. When you're not playing, the signal at all points in the signal path is steady at the virtual ground voltage. So switching the switched node (the "output" of the switch circuit) between the audio signal and virtual ground causes no change in the voltage, and therefore no pops.

    When you play, the signal at the output of the first op-amp consists of the AC waveform from your guitar, superimposed onto the virtual ground voltage. Assuming that your guitar is putting out 200 mV peak-to-peak of AC voltage, that means that signal is varying between 4.4V and 4.6V in accordance with the signal.

    You've probably seen an oscilloscope trace of the signal from an electric guitar. The instantaneous voltage goes up and down in a complex way according to the frequencies present in the signal from the pickup. It has a maximum positive voltage and a maximum negative voltage, and it crosses through the centre voltage at various times.

    At any moment in time, the signal at the first op-amp output is somewhere between 4.4V and 4.6V. At the time your switches change over, if that voltage happens to be far away from 4.5V (for example, around 4.6V), then the switching action will cause the voltage at the switched node to jump suddenly from 4.6V to 4.5V. This sudden jump causes a click or pop. It contains a lot of high frequencies and is quite noticeable to the ear.

    Actually, it doesn't matter what the instantaneous voltage is when the switch changeover occurs. Even if the switch changeover happens to occur exactly when the signal crosses zero, and the first op-amp output is exactly 4.5V, the sudden cessation of the signal causes an audible pop.

    Imagine your eardrum moving in response to the signal. When the signal is present, your eardrum moves in and out rhythmically, following the instantaneous voltage of the signal waveform. If that signal suddenly stops, the (relatively) smooth movement of your eardrum stops suddenly. Whether this change also involves a sharp drop or increase in the instantaneous voltage (as in the first case where the switches change over when the signal is at a peak), or whether the change occurs when the instantaneous voltage was crossing zero and the signal simply suddenly stops changing, the smooth cyclic movement of the eardrum is interrupted with a bang, and that's what you hear.

    The only way to eliminate the audible pop is to reduce the signal amplitude more gradually. The more gradually you reduce it, the less offensive the sound will be. Of course if you reduce it too gradually, it won't sound like a sudden stop and start any more. So you have to compromise.

    I'm not sure what you mean. Definitely, a sudden 4.5V change (as in your previous design) will make a much louder pop than a smaller change.

    That's a pretty good description.
    Actually I'm not sure whether the 4066 will respond to intermediate voltages by "partly" opening and closing its switches. It IS a logic IC and it's not supposed to have a (relatively) slowly changing voltage on its control inputs.

    I don't think you need to worry about overlap between the switches. It does no harm if they are both partly (or even fully) on simultaneously for a short time on each changeover.

    A trapezoidal control waveform is probably not ideal. I can't actually tell you what is the best envelope shape to minimise the audible pop, because I don't have that level of mathematics. Other people on the forum may be able to say.

    I think the best way to do what you want is to use a variable gain amplifier instead of a CD4066. This is an amplifier whose gain is controlled by a control signal. You can do your resistor-capacitor smoothing on the control signal and the gain will vary smoothly in response, unlike the 4066, which is supposed to be controlled by a digital signal.

    There are various ways of implementing a variable gain amplifier - do some googling. The LM13700 operational transconductance amplifier is a good option.

    I see the general idea, but I'm not sure you need all those options. Specifically, I think that using A OR B with Invert will be equivalent to using A AND B without Invert (assuming both oscillators have 50% duty cycle), and there's no point inverting a single control signal, so the Invert switch isn't needed. Also I would use a 3-way switch to choose between A AND B, A, and A OR B, instead of two 2-way switches.

    But I think you should concentrate on getting the signal control working properly first. With a variable gain amplifier, you only need to switch one control signal, so that simplifies your switches.
     
  14. ragingben

    ragingben

    15
    0
    Oct 6, 2011
    Hi Kris, wow where to start!

    Your descriptions have help make a lot of sense of what is going on with the circuit. I'll take a look at the LM13700 and try and implement it in place of where the CD4066 is. It would be awesome to get this working after all the tinkering!

    I've just done some truth tables and you are defiently right about the inverted OR. Perhaps XOR would be a better choice for me there. The invert was basically an added feature that I hadn't really thought through. I think I'll remove it to make room for that Depth pot I added on at the last minute. The 4047's do have a 50% duty cycle, I could use 555's instead and have a variable duty cycle, but I liked having the Q and Q- outputs on the 4047 as it allowed me to not use a inverter when I was switching the guitar signal by controlling the 4066 to break the signal and connect the output to the virtual ground. Maybe I'll revise this once I get the circuit going with the LM13700 or similar. I have some 7555's which are supposed to create a lot less noise and require less current, so maybe they would be a good alternative.

    I have seen this on lots of circuits, but was unsure of what its purpose was, so thanks for clarifying!

    Thank you very much for your help, it is much appreciated!
     
  15. ragingben

    ragingben

    15
    0
    Oct 6, 2011
    When you say straight across the output connector, you mean in series from the kathode of C9 to the tip connector on the output I presume?
     
  16. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,268
    Nov 28, 2011
    Cool. I think you'll find it's a much better way to control the signal.
    Yeah you could try it. It will give you a different effect from the A AND B, A OR B, and A ONLY controls, but I don't know whether any of them will be very useful to you in a musical sense. You could use a four-way switch to choose between A AND B, A OR B, A XOR B, and A ONLY.
    Right. But in any case, it's tidier to have just one signal to switch and gate. Once you added the gates and switches, the advantage of having true and complement signals was defeated by the need to gate and switch two signals instead of one. Even with the 4066, it would be better to use a single control signal, and generate true and inverted versions of it later, after the gating and switching.
    Right. Yes the 7555 is more suitable than the 555, which would be like using a small sledgehammer, but you could also stick with the 4047.
    No, I mean ACROSS the output connector. That is, from the negative side of C9 to ground. (Capacitors don't have anodes and cathodes; diodes do.)
    You're welcome :)
     
  17. ragingben

    ragingben

    15
    0
    Oct 6, 2011
    Neat idea, I have a 4 way rotarty switch sat at home that I could try and get involved, that would be neat...
    OK, that would defiently be a neater way of doing things, I hadn't looked at it like that.

    Your right though, if I can get the switching sorted I can worry about gating and even the method of generating my pulses later.

    Shows how much I know about electronics! I'll amend my circuit.

    I've checked out the data sheet for the lm13700, does this look like the kind of thing?
    [​IMG]
    I presume that I could forget the darlington pair after the op amp as it is just acting as a buffer, and I already have a TL072 buffering the output?
     
    Last edited: Nov 26, 2012
  18. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,268
    Nov 28, 2011
    Re the LM13700, yes that's the basic VCA circuit. That circuit uses +/- 15V power supply rails; I assume you want to use a single 9V battery for your power source? The LM13700 won't work quite so well at such a low voltage, but you could try it.

    Also I'd suggest using an active splitter to generate your virtual ground. I like the Texas Instruments TLE2426 for this purpose. It produces a nice stable clean virtual ground. If your circuit is battery powered, you could make your input and output connectors return to the virtual ground rail, and avoid several capacitors.

    So from the point of view of the analogue circuitry, there is a 0V rail, a +4.5V rail, and a -4.5V rail, and from the point of view of the digital circuitry, there is a 0V rail and a +9V rail.

    The Darlington pair is part of the LM13700 so you're not saving any money or space by omitting it, but driving the output buffer directly is probably better.

    I'll draw something up and post it later today (local time).
     
    Last edited: Nov 26, 2012
  19. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,268
    Nov 28, 2011
    OK Ben, here's my suggestion for an LM13700-based circuit. There are a number of new ideas that I've introduced to simplify the design.

    [​IMG]

    I've kept the 9VDC power supply. The circuit would work better at a higher voltage; even 12V would help, I think. But you can't exceed 15V unless you add a regulator for the digital circuitry (both the 4000-series CMOS and the 555 have a maximum supply voltage of 15V).

    The incoming voltage must be fully floating, i.e. not connected to anything else. A battery is the best option.

    The supply voltage is split in half by U1. Its output becomes the analogue ground rail GND and connects to the ground side of the input and output connectors. Signals are referenced to this rail, and when there is no signal present, signal lines will be at this voltage. This is the same as the virtual ground rail in your previous circuits but there is no need for coupling capacitors at the input and output.

    The digital and analogue circuitry are powered by separate supplies that are isolated from each other by RD1~4 and smoothed by CDD, CD1 and CD2. These decoupling capacitors are marked "100N +10U" which means you should use a 100 nF capacitor (also known as 0.1 uF) in parallel with a 10 uF electrolytic for each of them.

    The analogue circuitry runs from split rails (positive and negative rails relative to GND) which are called AV+ and AV-. These will be about +4.5V and -4.5V with a 9V battery, of course.

    The input signal is amplified by U1A. I'm not sure what's the ideal amount of gain. The gain of the stage is (RF1 / RF2) + 1. Probably RF1 should be 100K, not 33K as I've shown. That will give a gain of 11 which should bring the guitar signal up to a few volts peak-to-peak. If you hear distortion, reduce the gain of this stage.

    This signal is coupled through CIC (input coupling capacitor) into the LM13700 as shown in the data sheet. I've used lower resistor values here because the power supply is so much lower (+/- 4.5V as opposed to +/- 15V as suggested in the data sheet).

    RAN (asymmetry null resistor) is a 1 kilohm single-turn trimpot which you adjust so that the DC output voltage (at the output connector) does not change as the gain is varied. Set the control circuitry to a slow rate e.g. 1/4 Hz (2 seconds at full gain, 2 seconds at zero gain) and watch the output with a DC voltmeter, and adjust RAN so it doesn't change as the control signal changes.

    The output of the LM13700 feeds into an inverting amplifier. This arrangement is simpler than feeding a load resistor then buffering the signal, as shown in the data sheet. The gain of this stage is ROF / ROL and I don't know the best value for ROF. (I haven't used the LM13700 before so I'm not very familiar with it.) You can try 33K for ROF and see how much signal you get out of the output connector.

    The control signal for the LM13700's gain comes from the digital circuitry as before. This signal is smoothed by RS and CS (initially, try around 33K for RS) and buffered by the Darlington in the LM13700, whose output drives the IABC input, which determines the LM13700's gain. This is not the intended use for the Darlington, but it's convenient that it isn't needed as an output signal buffer.

    The simple R-C circuit will produce a logarithm-shaped control signal, which is definitely not the ideal signal to control the gain with, but it may be good enough to avoid any "pop" sounds. Also, now you have a variable-gain amplifier, you can use it as a tremolo, as well as a simple on/off control. For this, you should use a sinewave or triangle-wave oscillator.

    I hope you're willing to have a play around with this design. I may build it myself sometime, but not in the immediate future. If you have problems, I can try to help via Skype. Do you have an oscilloscope, or can you borrow one? If not, you may be able to measure waveforms with the audio line input on your computer.

    Does anyone else on the forums have experience with the LM13700 or variable-gain amplifiers in general?
     

    Attached Files:

  20. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,268
    Nov 28, 2011
    I've been looking through some application notes for the LM13700. (I should have done that BEFORE I designed the circuit, huh!)

    I've updated the schematic with some resistor value changes (and one removal - ROL).

    [​IMG]

    You might find this article interesting; it has suggestions for other types of effects units that can be built using the 13700: http://www.geofex.com/Article_Folders/VCA Applications.pdf

    The other comments from my previous post apply, except places where I said that I didn't know what values would be needed.
     

    Attached Files:

    Last edited: Nov 27, 2012
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
Loading...
Electronics Point Logo
Continue to site
Quote of the day

-