CEM3340 Pulse Oscillation Issue

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Kent, Joe., luketeaford

User avatar
Chris Willocks
Common Wiggler
Posts: 250
Joined: Mon Dec 09, 2019 1:09 pm
Location: England
Contact:

CEM3340 Pulse Oscillation Issue

Post by Chris Willocks »

Hello everyone, I'm having an oscillation issue with a CEM3340 VCO Eurorack module that I have designed, which I thought I had originally gotten rid of. However, upon closer inspection using an oscilloscope, it is can be seen clearly.

Specifically, the falling edge of the pulse wave has a high frequency oscillation of approximately 25KHz when the frequency of the pulse wave is about 170Hz or lower. Above 170Hz, there is no oscillation. The oscillation gets progressively worse, as the frequency of the pulse wave gets lower i.e. the oscillation has more cycles. The oscillation can be seen in the image below at its worse. The oscillation lasts for approximately 0.540ms. As previously mentioned; the oscillation frequency is approximately 25KHz. The pulse wave is DC-coupled and its amplitude is 10Vpp (±5V).

Pulse Wave Oscillation.jpg

The schematic for the pulse output from pin 4 is below:

CEM3340 VCO Pulse Output.png

'VP' is from pin 4 of the CEM3340 and 'PULSE' is simply the output.

The 0.001uF pull-down capacitor C20 at the output of pin 4 helps to suppress most of the oscillation, as it obviously acts as a low-pass filter which reduces the high-end frequencies. I tried increasing the value of this capacitor to 0.01uF in order to eradicate the remaining oscillation shown above, which it does. However, there is too much reduction in the high-end frequencies for it to be acceptable. Ideally, I would like the pulse wave to be perfectly sharp, with no oscillation.

Lastly, just to add; I tried changing the value of R19 i.e. the pull-down resistor and also adding hysteresis by putting a 10MΩ resistor across pins 4 and 5, however both made no difference.

I found this thread on another website about removing ringing from a pulse wave, but not sure how it can be applied to this IC: https://electronics.stackexchange.com/q ... on-a-pulse.

Has anyone ever had any success with completely removing this oscillation? Any help would be greatly appreciated.

Many thanks,
Chris
User avatar
mrand
Common Wiggler
Posts: 223
Joined: Thu May 23, 2013 11:26 pm
Location: Whitehorse, Yukon
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by mrand »

I've never seen this on my 3340 builds. Is this happening right at the pin4 pulse output, or after your opamp, or both?
If it's helpful, feel free to check my schematic here, though it is for the as3340: viewtopic.php?f=17&t=225670
--ssdp--
User avatar
Chris Willocks
Common Wiggler
Posts: 250
Joined: Mon Dec 09, 2019 1:09 pm
Location: England
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by Chris Willocks »

Thanks for the reply. The oscillation is happening right at pin 4 and after the op amp as well. I've had a look at your schematic, but the only thing that looks different is the hysteresis resistor and a cap to ground on pin 5 for PWM.

Do you think the power supply could cause this? I'm using a Tiptop Audio uZeus with the boost adapter.
User avatar
mrand
Common Wiggler
Posts: 223
Joined: Thu May 23, 2013 11:26 pm
Location: Whitehorse, Yukon
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by mrand »

I honestly don't feel like I could even venture a guess on what your problem is. Can you test it on another PS? Can you test your circuit with another 3340 variant?
--ssdp--
User avatar
Chris Willocks
Common Wiggler
Posts: 250
Joined: Mon Dec 09, 2019 1:09 pm
Location: England
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by Chris Willocks »

Unfortunately, I don't have another power supply, which is frustrating.

I have another one of these modules with the same CEM3340 Rev. G IC and have just tested it, but it has exactly the same issue.
Borogove
Common Wiggler
Posts: 71
Joined: Sun Feb 25, 2018 10:56 pm

Re: CEM3340 Pulse Oscillation Issue

Post by Borogove »

Try a very small cap in parallel with R40?
nigel
Ultra Wiggler
Posts: 850
Joined: Wed Jan 16, 2013 6:49 am
Location: Melbourne, Australia

Re: CEM3340 Pulse Oscillation Issue

Post by nigel »

It looks to me like a hysteresis problem too, the way the duty cycle of the bounce changes. Did the 10M resistor make any difference at all? Maybe try a smaller value and see if it helps?
User avatar
Chris Willocks
Common Wiggler
Posts: 250
Joined: Mon Dec 09, 2019 1:09 pm
Location: England
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by Chris Willocks »

Thanks, I tried both suggestions, but no luck unfortunately. I managed to try another power supply that I forgot I had as well, but again, no success.
User avatar
guest
Super Deluxe Wiggler
Posts: 8237
Joined: Mon Aug 19, 2013 11:49 am

Re: CEM3340 Pulse Oscillation Issue

Post by guest »

what are you driving pin5 of the 3340 with?
openmusiclabs.com
User avatar
Chris Willocks
Common Wiggler
Posts: 250
Joined: Mon Dec 09, 2019 1:09 pm
Location: England
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by Chris Willocks »

Here is a schematic of the PWM circuit into pin 5:

CEM3340 PWM Circuit.png

PW is from a normalised potentiometer and PWM is a 0V to 5V CV input. VPWM goes straight into pin 5.

I'm just wondering if a resistor is required after VPWM in the above circuit, as pin 5 basically is the non-inverting input of the comparator?

So in other words, it would form the below generic hysteresis circuit, where the 10M hysteresis resistor from the CEM3340 datasheet would be R2 and adding one after VPWM would form R1, if this makes sense?

Comparator.png

At the moment, I don't have an R1 resistor in the PWM circuit. Not sure if this is correct?
jeandusachet
Learning to Wiggle
Posts: 2
Joined: Mon Mar 18, 2019 4:39 pm
Location: france

Re: CEM3340 Pulse Oscillation Issue

Post by jeandusachet »

hello Chris
the hysteresis resistor in the datasheet has a value of 1M not 10M.
User avatar
Chris Willocks
Common Wiggler
Posts: 250
Joined: Mon Dec 09, 2019 1:09 pm
Location: England
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by Chris Willocks »

Good news. Problem resolved. It was the hysteresis after all.

I believe it was the lack of input resistor into pin 5 that was causing it. I breadboarded the circuit again and put the 1M resistor across pins 4 and 5. I also put a 10K resistor (i.e. corresponding to R1 in the above comparator diagram) into pin 5 and no more oscillation. I'm assuming the comparator wasn't working properly without it?

Also, I reduced the value of C20 (which is there to cure the common pitch problem that occurs with PWM) to 300pF, just to give a bit more top end on the pulse. The top end rolls off slightly above 20KHz, which I think is fine, as we can't hear above that frequency anyway. Also, the capacitor is high enough in value that there is no pitch change at all with PWM, which is great.

Anyway, many thanks for all your help with this. I appreciate it.

Chris
Last edited by Chris Willocks on Sun May 24, 2020 6:44 pm, edited 1 time in total.
User avatar
devinw1
Super Deluxe Wiggler
Posts: 3203
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by devinw1 »

I just saw this exact same thing using the pulse for my clock in my thread about the counter IC VCO.

I didn't even realize the datasheet addressed this, but on my own I decided to try a 1M hysteresis resistor between the PWM input and pulse output and it completely cleared it up. I too found that it occurs at low frequencies but I turned my tuning pot all the way down to where the VCO was doing about 10Hza and the ripple was not there.



Separately, are you using -12V or -5V for supply to your 3340? If you are using -12V you can just terminate your initial pull-down resistor to -12V instead of ground and then your raw pulse output will go from -12 to +12 instead of 0 to 12. It's a open-emitter output.

edit: you are right about needing a resistor into the PWM pin too. The hysteresis value will be (R1/Rhsyt)*Vout.
User avatar
mrand
Common Wiggler
Posts: 223
Joined: Thu May 23, 2013 11:26 pm
Location: Whitehorse, Yukon
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by mrand »

Chris Willocks wrote: Mon May 04, 2020 9:33 amI reduced the value of C20 (which is there to cure the common pitch problem that occurs with PWM) to 300pF, just to give a bit more top end on the pulse.
Do you have any notes about this? I haven't heard about this solution before.
--ssdp--
User avatar
Chris Willocks
Common Wiggler
Posts: 250
Joined: Mon Dec 09, 2019 1:09 pm
Location: England
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by Chris Willocks »

devinw1 wrote: Mon May 04, 2020 10:42 am I just saw this exact same thing using the pulse for my clock in my thread about the counter IC VCO.

I didn't even realize the datasheet addressed this, but on my own I decided to try a 1M hysteresis resistor between the PWM input and pulse output and it completely cleared it up. I too found that it occurs at low frequencies but I turned my tuning pot all the way down to where the VCO was doing about 10Hza and the ripple was not there.



Separately, are you using -12V or -5V for supply to your 3340? If you are using -12V you can just terminate your initial pull-down resistor to -12V instead of ground and then your raw pulse output will go from -12 to +12 instead of 0 to 12. It's a open-emitter output.

edit: you are right about needing a resistor into the PWM pin too. The hysteresis value will be (R1/Rhsyt)*Vout.
I'm using an L79L05 for the -5V supply into pin 3 and the standard ±12V for the rails.

Would changing the value of the initial pull-down resistor from pin 4 work for a ±5V (10Vpp) pulse i.e. if I terminate it at -12V and then use a voltage divider before a voltage follower to obtain the correct levels?

Regarding the value of the resistor into the PWM pin, would you happen to know the optimum value in combination with the 1M resistor? I presume Vout is the pulse level out of the comparator?
mrand wrote: Mon May 04, 2020 10:58 am
Chris Willocks wrote: Mon May 04, 2020 9:33 amI reduced the value of C20 (which is there to cure the common pitch problem that occurs with PWM) to 300pF, just to give a bit more top end on the pulse.
Do you have any notes about this? I haven't heard about this solution before.
I stumbled upon this solution a while ago just by trying different value caps to ground from pin 4, as I noticed some overshoot on the rising edge of the pulse without it. This high frequency ringing must be contributing to the pitch change when PWM is used.

However, just by simply adding the pull-down cap to common reference i.e. ground from pin 4, it completely disappears. I tried adding a resistor before the 300pF cap i.e. in a conventional low-pass filter arrangement, but the resistance was too high, even with a low value resistor e.g. 1K and this caused too much rolloff of the high end frequencies. However with just the 300pF cap on its own; the pitch issue is not there, plus the high frequency roll-off is only very mild i.e. nothing below 20KHz. Even then; any roll-off is hardly noticeable above this frequency. Strangely, using a lower capacitance, such as 100pF with a series resistor, doesn't yield the same results with eliminating the pitch change. It doesn't seem to like capacitors lower than 300pF or so.

I initially tried using the L79L05 for the -5V supply to pin 3 and changing the pull-down resistor value, as I've read a few threads about the AS3340, saying that these things would help prevent the pitch issue, however they didn't work for me. The pull-down cap completely eradicates it though.

I'm not sure if the pull-down capacitor would work on the AS3340 as I'm using the Rev. G, but it's worth a try if you're having the pitch issue.
Last edited by Chris Willocks on Mon May 04, 2020 12:24 pm, edited 4 times in total.
User avatar
robotsounds
Common Wiggler
Posts: 70
Joined: Wed Nov 16, 2016 12:24 am

Re: CEM3340 Pulse Oscillation Issue

Post by robotsounds »

Coincidentally I just had exactly the same problem and came searching for some ideas only to find this post from yesterday.. :eek:

This was what I was seeing.
pic_49_2.png
I did as recommended above.

Added a 10k resistor on pin 5 input and added a 1M resistor between pin 4 and 5.

I also added the 1nF capacitor between pin 4 and ground - that helped quite a bit clean up the pulse output.

however I am still seeing voltage spikes(?) on the rise and fall part of the wave. As seen here:
pic_50_3.png
Are others seeing this issue? Wanting to know if this is normal or I have done something in my changes to cause this.
User avatar
guest
Super Deluxe Wiggler
Posts: 8237
Joined: Mon Aug 19, 2013 11:49 am

Re: CEM3340 Pulse Oscillation Issue

Post by guest »

have you calibrated your scope probes?
openmusiclabs.com
User avatar
robotsounds
Common Wiggler
Posts: 70
Joined: Wed Nov 16, 2016 12:24 am

Re: CEM3340 Pulse Oscillation Issue

Post by robotsounds »

guest wrote: Mon May 04, 2020 11:54 am have you calibrated your scope probes?
:doh: Thanks, that helped a lot!

So after calibrating the scope probes I got this with the 1nF capacitor on pin 4:
pic_50_6.png
Without the cap in place I get the following:
pic_51_4.png
There is now a slight slope on the rise with the cap, I will try reducing it to 330pF as suggested. But the cap generally helped a lot! So thanks Chris.

I still have a tuning issue when turning the PWM pot though, but I have seen this come and go with different changes so will keep trying to figure out what makes that better. I have pin 3 currently with a 1k resistor to ground with -12V supply which is giving around -5.2V - on an earlier iteration I had the voltage on pin 3 at -4.9V and that seemed to stabilise the tuning issue somewhat. Waiting for some -5V regulators to arrive so I can try that also.

But getting closer overall!
User avatar
Chris Willocks
Common Wiggler
Posts: 250
Joined: Mon Dec 09, 2019 1:09 pm
Location: England
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by Chris Willocks »

No worries! Glad it is helpful to someone.

Regarding the pitch change issue; I think it might be a combination of the -5V regulator and the 300pF pull-down cap that solve it.

Specifically; I found that the pull-down capacitor removes the small pitch change that occurs when the PWM pot is at 50% duty. I think the -5V regulator will help iron out any remaining pitch issues.

Also, are you using a AS3340? If so, perhaps try using the original CEM IC. I'm not sure if it gives better results or not?
User avatar
devinw1
Super Deluxe Wiggler
Posts: 3203
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by devinw1 »

Chris Willocks wrote: Mon May 04, 2020 11:43 am
I'm using an L79L05 for the -5V supply into pin 3 and the standard ±12V for the rails.

Would changing the value of the initial pull-down resistor from pin 4 work for a ±5V (10Vpp) pulse i.e. if I terminate it at -12V and then use a voltage divider before a voltage follower to obtain the correct levels?

Regarding the value of the resistor into the PWM pin, would you happen to know the optimum value in combination with the 1M resistor? I presume Vout is the pulse level out of the comparator?
The open-emitter output only pulls down to about V- supplied to the 3340, even for pull-down voltages lower than V-. That's why I asked about what you were using. The only way for it to be symmetric directly out of the 3340 would be to make V- to the 3340 -12V. Other than that you are stuck adjusting the wave with your following op-amps or AC coupling it and buffering.


I am using a static voltage divider at my PWM pin of 100k/10k (8V / ground), so the input impedance is close to 10k. This in conjuction with a 1M hysteresis resistor works great, and is confimred by robotsounds using the same values as well. SO, at least empiracally this looks like a good place to be. An yeah the hysteresis them would be 12V*(10k/1M) = 120mV. :tu:
User avatar
devinw1
Super Deluxe Wiggler
Posts: 3203
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by devinw1 »

With regard to the PWM / pitch shift issue, I believe Alfa released a version of the 3340 that was supposed to make this matter better. With the regular old AS3340, it's my understanding and experience that the CEM3340revGs have much less of this problem.
User avatar
robotsounds
Common Wiggler
Posts: 70
Joined: Wed Nov 16, 2016 12:24 am

Re: CEM3340 Pulse Oscillation Issue

Post by robotsounds »

I tried with a 560pF cap but was still getting a small amount of oscillation. Strangely this time I noticed it on the leading pulse edge too. 1000pf seems to be the value where it eliminates all the oscillation albeit with a little ramping.

I will get the negative voltage regulator in a few days so will eagerly be testing that when it arrives to see what difference it makes.

I have both the AS3340 and the CEM3340 - I was interchanging them but it made testing really difficult. There are definitely some differences between the two different in my opinion. For example, I was testing with the AS3340 and had changed the negative voltage on pin 3 and when I put the CEM3340 back in there was no output at all, until I changed the voltage back to what it had originally been.

I also noticed the PWM tuning issue was noticeably worse with my current schematic with the AS3340. With the CEM3340 it is still there but much less than the AS3340. I am now just using the CEM3340 for the time being.
User avatar
KSS
Super Deluxe Wiggler
Posts: 9961
Joined: Mon Jan 25, 2016 7:28 am

Re: CEM3340 Pulse Oscillation Issue

Post by KSS »

robotsounds wrote: Mon May 04, 2020 1:13 pm I have both the AS3340 and the CEM3340 - I was interchanging them but it made testing really difficult. There are definitely some differences between the two different in my opinion.
This post -and thread- shows the importance of strictly declaring which '3340' chip is being discussed in our topics and posts.
User avatar
infinitemachinery
Wiggling with Experience
Posts: 251
Joined: Sat Jan 05, 2019 11:01 am
Location: Ashland, Oregon
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by infinitemachinery »

KSS wrote: Mon May 04, 2020 9:09 pm
robotsounds wrote: Mon May 04, 2020 1:13 pm I have both the AS3340 and the CEM3340 - I was interchanging them but it made testing really difficult. There are definitely some differences between the two different in my opinion.
This post -and thread- shows the importance of strictly declaring which '3340' chip is being discussed in our topics and posts.
^^^^^^^
Different chip, different datasheets. The AS3340 does pulse just fine, it just needs the proper circuit to match it.
User avatar
devinw1
Super Deluxe Wiggler
Posts: 3203
Joined: Tue Aug 07, 2018 11:20 am
Location: Portland, OR
Contact:

Re: CEM3340 Pulse Oscillation Issue

Post by devinw1 »

infinitemachinery wrote: Mon May 04, 2020 11:11 pm
KSS wrote: Mon May 04, 2020 9:09 pm
robotsounds wrote: Mon May 04, 2020 1:13 pm I have both the AS3340 and the CEM3340 - I was interchanging them but it made testing really difficult. There are definitely some differences between the two different in my opinion.
This post -and thread- shows the importance of strictly declaring which '3340' chip is being discussed in our topics and posts.
^^^^^^^
Different chip, different datasheets. The AS3340 does pulse just fine, it just needs the proper circuit to match it.
With regard to PWM, I"m not aware that the CEM3340 and AS3340 datasheets are different at all. They both just show an input. In fact, the table of values for the PWM current and voltage are also identical between the 2 datasheets.

But, clearely they do behave differently. I'm not disputing that. Just saying they documentation doesn't seem to capture it.
Post Reply

Return to “Music Tech DIY”