electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Developers' Corner
Simple mixing techniques for 40106/op amp oscillators
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [14 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Werebear



Joined: Nov 23, 2009
Posts: 63
Location: UK

PostPosted: Wed Dec 12, 2012 1:19 pm    Post subject: Simple mixing techniques for 40106/op amp oscillators
Subject description: Why am I getting chaos nasties instead of chords?
Reply with quote  Mark this post and the followings unread

Not been about for a bit and haven't been up to much but have developed an inability to passive mix strings of oscillators. A long standing project has been the construction of a shruti box synth - a series of droning oscillators to create chords that can be played and dare I say sung against. The problem is that all the mixing techniques I have used for a variety of things fail when mixing simple oscillators such as 40106 and op amps I get unpleasant noise instead of nice chords.

I've tried passive mixes with 100K resistors, caps before and after, resistors to ground...

Am I just unlucky? Do I need to buffer every output and create an active mix for what a million(!) kids on YouTube achieve with a handful of resistors?

_________________
I think I like it. Does it matter if I don't?
Back to top
View user's profile Send private message
Dougster



Joined: Sep 20, 2005
Posts: 272
Location: Tucson, AZ, USA

PostPosted: Thu Dec 13, 2012 3:55 am    Post subject: Reply with quote  Mark this post and the followings unread

Would you draw a picture of what you're doing? (You could try XCircuit if you don't have any other drawing tools...)

Are you really opposed to using a few op amps?

Regards,
Doug

_________________
Once you start down the modular path, forever will it dominate your destiny!

Every DIY person should own a copy of Electronotes: http://electronotes.netfirms.com

Blue LEDs are evil.
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Thu Dec 13, 2012 9:40 am    Post subject: Reply with quote  Mark this post and the followings unread

Ditto what Dougster said about a schematic. In electronics, a picture is worth a million words, not a thousand as the saying goes.

And I agree with the comment about opamps. There are indeed problems with attempting to mix signals passively (and I assume that what you mean by passive is simply connecting the signals together with resistors but without any amplification). Google things like "audio mixer", "DC mixer", "AC mixer" and you'll see some schematics for basic mixers - these circuits are simple, noncritical and are easy to build. OpAmps help you out immensely by converting the high impedance inputs (100K is a fairly high impedance) to a nice low impedance output. That means that while the inputs that feed the mixer don't supply much current, the output of the opamp most certainly can. In an opamp based mixer you also have a virtual ground that prevents signals from one input interfering with others - possibly the source of your distorted sound - and even synching when you don't really want that.

You're description sounds like distortion, but it's hard to imagine where that distortion originates without a schematic.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima

Last edited by JovianPyx on Thu Dec 13, 2012 9:43 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
JingleJoe



Joined: Nov 10, 2011
Posts: 878
Location: Lancashire, England
Audio files: 14

PostPosted: Thu Dec 13, 2012 9:41 am    Post subject: Reply with quote  Mark this post and the followings unread

I want to know what this guy is doing too, how can you fuck up a passive mixer? Laughing
Maybe the problem exists further back in the circuit?

_________________
As a mad scientist I am ruled by the dictum of science: "I could be wrong about this but lets find out"


Green Dungeon Alchemist Laboratories
Back to top
View user's profile Send private message
Werebear



Joined: Nov 23, 2009
Posts: 63
Location: UK

PostPosted: Fri Dec 14, 2012 8:58 am    Post subject: Reply with quote  Mark this post and the followings unread

Well it would appear that passive mixers fuck up more regularly than work.

I have one 40106 making three oscillators the unused gates tied to ground as they should be. Using 100k resistors the oscillators are taken to a single mix point then to a bench amp I've been using for years but also to a hifi amp with the same results - chaos and distortion. Each oscillator sounds fine on its own but the minute I try and mix two or three together crapola. This has also happened with other simple oscillators designs such as op amp square tri ones ala SH09 LFO brought up to audio.

My power supply is a two 9V battery with voltage regs to give me + and -5V with a fairly solid ground.

However my researches has told me I need to give up on the passive mix and use virtual ground mixing.

Will get back to you when I've anything else to show. Thanks


audmix-f4.gif
 Description:
 Filesize:  3.91 KB
 Viewed:  229 Time(s)
This image has been reduced to fit the page. Click on it to enlarge.

audmix-f4.gif



_________________
I think I like it. Does it matter if I don't?
Back to top
View user's profile Send private message
JingleJoe



Joined: Nov 10, 2011
Posts: 878
Location: Lancashire, England
Audio files: 14

PostPosted: Fri Dec 14, 2012 12:02 pm    Post subject: Reply with quote  Mark this post and the followings unread

Werebear wrote:


However my researches has told me I need to give up on the passive mix and use virtual ground mixing.

Only if you are using single supply, your setup there should be fine and your circuit looks fine!

All I can think is that there must be some grounding issue or something like a colder solder joint or maybe one of the resistors went bad?

p.s. that amplifier will have a gain of 3, which is perhaps too much?

_________________
As a mad scientist I am ruled by the dictum of science: "I could be wrong about this but lets find out"


Green Dungeon Alchemist Laboratories
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Fri Dec 14, 2012 12:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

Joe, the virtual ground he refers to isn't the bullsh!t thing so many people misuse - he's referring to the mixing node, that is, where all of the input resistors meet with the feedback resistor. In his drawing it is labeled "mix point". Notice that it is marked zero volts - for good reason, because it is, in fact, a virtual ground. Go back to your opamp theory and you'll see that the reason that point is zero volts is because the noninverting input is at ground potential. In an inverting amplifier like the schematic shows, the output will do what it has to in order to force the difference between the + and - inputs to zero.

The bullsh!t thing to which I refer is the use of a voltage divider (usually for 1/2 the single supply voltage) with single supply systems and the misuse is trying to have it sink or source too much current. Truly, this kind of virtual ground does work - under the right conditions - that being don't try to dump current into or out of it - rather, use it as a voltage reference only. Note that this kind of virtual ground can be bolstered by feeding it into a voltage follower opamp circuit - in this case, it can source or sink a few milliamps, but again, don't push it. This kind of virtual ground can be used effectively in small low current circuits. If too much current is required, then you will see the virtual ground flop around and change value - which is a source of noise (and not the good kind).

In the end, I would always recommend a real ground with a dual supply. It is far more stable than virtual grounds I described in the second paragraph above. I know a lot of people like to use single supply with a virtual ground, especially for battery circuits, but they are often more trouble than they are worth and will turn your project into crap unless you are very kind to it.

Also, the gain of the mixer circuit is unity for each input, not 3. Yes, if all the inputs are driven to the same voltage, the output will be 3x one input. However, what happens if only one input is say, 1 volt and the rest are zero? In that case, you can see that the gain is unity.

EDIT ADD:
I should also have written that each input defines it's own gain. If you have 2 inputs, one with a 10K resistor and the other with 100K and a feedback resistor of 10K, the 10K input will have unity voltage gain and the 100K input will have 10x voltage gain. So a mixer doesn't have a gain, it has several, even if they are all unity. The 3 comes from the fact that (in the schematic), there are 3 unity gain inputs that are summed. It's important to understand that the 3 doesn't come from multiplication, it is a sum and as such, it is not considered gain.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Werebear



Joined: Nov 23, 2009
Posts: 63
Location: UK

PostPosted: Sat Dec 15, 2012 4:52 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi

the image that I put up is what I'm going to use to mix in future - haven't had chance to actually try it yet but now I'm aware of the topology I suddenly see it every where! My understanding of the virtual earth mixer is that it mixes current as opposed to voltage as the mix point is effectively at ground.

Everything going at the moment is on breadboard but I do have a fantastic history of boarding fabby little things that then turn to crap when soldered up.

Thanks fror the input.
Watch this space.

_________________
I think I like it. Does it matter if I don't?
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24083
Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320

PostPosted: Sat Dec 15, 2012 5:23 am    Post subject: Reply with quote  Mark this post and the followings unread

Werebear wrote:
My understanding of the virtual earth mixer is that it mixes current as opposed to voltage as the mix point is effectively at ground.


Exactly!

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
Werebear



Joined: Nov 23, 2009
Posts: 63
Location: UK

PostPosted: Sun Dec 16, 2012 7:28 am    Post subject: Reply with quote  Mark this post and the followings unread

I think the other problem I'm up against is the output from a 40106. I'm using 10V (+5V and -5V), so that means my signal output is going to be pretty close to 10V minus whatever the hysteresis loss is (have I got that right?). My op amps are also on the +/-5V PSU so there's no headroom. I need to drop my output level as well I think using a voltage divider to give the op amps a bit of head room. Or strap my op amps to the +/-9V straight from the batteries with appropriate caps etc.

At some point I will get the time to do this instead of just talking about it...

_________________
I think I like it. Does it matter if I don't?
Back to top
View user's profile Send private message
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Sun Dec 16, 2012 8:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Oh yes, headroom could be an issue.

I believe that you can do this by simply increasing the input resistor values by a factor of at least 3. This will reduce the current into the summing node by a factor of at least 3. Just for grins, try 47K or 33K instead of 10K since these are probably something you have laying around. 33K will probably work nicely and give you about the best amplitude you can expect for standard value resistors.

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Tony Deff



Joined: May 25, 2008
Posts: 51
Location: Suffolk, UK

PostPosted: Fri Jan 11, 2013 5:39 am    Post subject: Using the 40106 with split supply Reply with quote  Mark this post and the followings unread

Werebear wrote:
I think the other problem I'm up against is the output from a 40106. I'm using 10V (+5V and -5V), so that means my signal output is going to be pretty close to 10V minus whatever the hysteresis loss is (have I got that right?)....

Let me get this crystal-clear, because my brain is well-past it's half-life and best-before date; also we have Kilowords of spiel to interpret but the circuitry shown is a future "wish-list" that does not show the oscillators anyway.

You are powering the 40106 from ±5V ? (or just intend to, with the virtual-earth mixer?) This is unusual, but commendable from the point of reducing key-click, speaker thump and other evils.

The input hysteresis will have no effect on the output swing; the supply and the resistive loading will.
Although the 40106 has ±1mA drive capability, it does not take much loading to reduce the swing, and this will affect the current through the feedback resistor, which will reduce the frequency. The hysteresis changes with supply voltage, which is why you have the regulators (which would not be required if you were using good old 555s).

So far, so good. But previously,
Werebear wrote:
...I have one 40106 making three oscillators the unused gates tied to ground as they should be.

Have you literally done this, rather than tying unused inputs to logic ground (i.e. pin 7, your negative rail)?
This would be un absolu non-non, streng verboten, the equivalent of tying a conventional logic input (operating on a single supply) to half-supply.

Even if this is a verbal slip-up, it still seems morally wrong to me to have 3 inputs buried in the ground in this age of mass unemployment.
They have nothing to do, forget their skills and resort to getting their outputs high all the time Laughing

Werebear wrote:
...Am I just unlucky? Do I need to buffer every output...?
— Yes! If you do not, the summed voltage (even though buffered by 100K) will modulate all three oscillator frequencies (unless you are summing into a virtual-earth). Simply use the three unemployed invertors as buffers (not much effort on a stripboard lash-up, output pin 2 to input pin 13 etc)

Finally, some other factors:

Although the regulators will provide low-impedance supplies, it doesn't hurt to provide an extra 0.1uF ceramic across the 40106.

All multi-module chips will have some internal cross-coupling, which may or may not be serious. In some high-frequency devices (e.g. dual VCOs), it is "recommended" not to use both halves simultaneously. Professional circuit designers will sometimes add another logic chip, leaving some gates tied un-used when one gate's use might be affecting the others. I cannot speak for the 40106 (not having used it) but note that others have not reported such problems.

Last, but not least, how your amplifiers negative rail currents affect the 40106 pin 7 and input voltages is critical. I heard one professional designer say that he'd nevr make the mistake of mixing digital and analogue on the same board again!

Sorry, I've just added a Kiloword of spiel myself! Rolling Eyes
Back to top
View user's profile Send private message
Werebear



Joined: Nov 23, 2009
Posts: 63
Location: UK

PostPosted: Sat Jan 12, 2013 4:57 am    Post subject: Reply with quote  Mark this post and the followings unread

Hi Tony

wow thanks. That's a lot of info. I haven't had chance to get back to this since posting - too much real world intrusion from my kids and grandkids - so I've no more info at the mo.

Unused gates are tied to -ve on my +/-5V, but I'm going to use them as buffers as you suggest. At some point I'm going to use 4040's as octave dividers and that will also help with the buffering.

The diagram I posted is what I intend to use as a mixer but haven't had chance to try.

Thanks for the input

Jim

_________________
I think I like it. Does it matter if I don't?
Back to top
View user's profile Send private message
Werebear



Joined: Nov 23, 2009
Posts: 63
Location: UK

PostPosted: Wed Jan 23, 2013 1:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

Finally had time today to get back to this and it works!

Took everything on board and:

Using +ve and ground to power my 40106 and three 4040's (for octave switching);

Used unused gates on the 40106 as buffers and then straight into the 4040;

Used three 100k resisters to mix and it works wonderfully.

So that's half the voltage and a bit of buffering - from the 4040 as well as I always felt the output of these beasties was quite "hot" compared to straight 40106 - and is still very "loud" as I expect CMOS to be.

Will still investigate the op amp mixer at some stage as I want some control over individual oscillators and I will keep my dual supply for that and also because I want to add a filter to this at some stage.

Thanks to everyone who commented.

Cheers

Jim

_________________
I think I like it. Does it matter if I don't?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [14 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Developers' Corner
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use