Author |
Message |
cslammy
Joined: Apr 27, 2018 Posts: 206 Location: USA
Audio files: 1
|
Posted: Fri Dec 14, 2018 8:04 am Post subject:
Arduino to control linear VCA (2164 for instance) |
 |
|
I hope this makes sense to someone.
To do this, I assume I can use a linear signal from the Arduino.
for (a = 1024; a--; a > 0)
{
//send a to a PWM and filter the PWM into CV.
}
This will sound OK right?
Volume goes from -100db to 0db. So it attenuates. And doesn't sound like it gets loud too fast or too slow--so , it doesn't sound like you have a lin/expo mismatch if you hooked RC right up to CV in of the 2164.
My Thinking:
The input of the 2164 is linear.
The output of a counter above is linear.
So there is no expo/linear issues, the type you'd need to solve with an Irwin circuit.
True? False? Does this make any sense?
My goal is to easily control a 2164 from a Nano and not have it sound completely crappy.
(NB: I know yiou have to get to -CV to get the thing to amplify. Attenuate only is good for now.) _________________ Visit my AUDIODIWHY blog and website |
|
Back to top
|
|
 |
ixtern
Joined: Jun 25, 2018 Posts: 145 Location: Poland
|
Posted: Thu Dec 20, 2018 6:55 am Post subject:
Re: Arduino to control linear VCA (2164 for instance) |
 |
|
cslammy wrote: | I hope this makes sense to someone.
To do this, I assume I can use a linear signal from the Arduino.
for (a = 1024; a--; a > 0)
{
//send a to a PWM and filter the PWM into CV.
}
This will sound OK right?
Volume goes from -100db to 0db. So it attenuates. And doesn't sound like it gets loud too fast or too slow--so , it doesn't sound like you have a lin/expo mismatch if you hooked RC right up to CV in of the 2164.
My Thinking:
The input of the 2164 is linear.
The output of a counter above is linear.
So there is no expo/linear issues, the type you'd need to solve with an Irwin circuit.
True? False? Does this make any sense?
My goal is to easily control a 2164 from a Nano and not have it sound completely crappy.
(NB: I know yiou have to get to -CV to get the thing to amplify. Attenuate only is good for now.) |
The problem with PWM is that: if you want ho have good filtered voltage after it you must filter it heavily - then it it slow. If you filter it for a fast transitions - PWM signal will bleed through VCA.
I would stay with a cheap I2C/SPI/paralell DAC for this. |
|
Back to top
|
|
 |
cslammy
Joined: Apr 27, 2018 Posts: 206 Location: USA
Audio files: 1
|
Posted: Thu Dec 20, 2018 9:52 am Post subject:
Re: Arduino to control linear VCA (2164 for instance) |
 |
|
ixtern wrote: | The problem with PWM is that: if you want ho have good filtered voltage after it you must filter it heavily - then it it slow. If you filter it for a fast transitions - PWM signal will bleed through VCA.
I would stay with a cheap I2C/SPI/paralell DAC for this. |
Hi IX: I agree and I figure I will do that. Getting 4 DACS going w 4725's is a bit of a pain but certainly doable.
Q: Do you know if the code to ramp up/down the 2164 VCA, THAT 340, etc., and have it "sound normal" is linear? So, no RC type expo curve?
I figure it is linear. It must be right? Since you have to Irwin-ize the 2164 if you use RC.
I have a lot to do on the bench and I'll run some test sketches and find out, but I figure someone out there will just know. _________________ Visit my AUDIODIWHY blog and website |
|
Back to top
|
|
 |
ixtern
Joined: Jun 25, 2018 Posts: 145 Location: Poland
|
Posted: Thu Dec 20, 2018 1:32 pm Post subject:
Re: Arduino to control linear VCA (2164 for instance) |
 |
|
cslammy wrote: | ixtern wrote: | The problem with PWM is that: if you want ho have good filtered voltage after it you must filter it heavily - then it it slow. If you filter it for a fast transitions - PWM signal will bleed through VCA.
I would stay with a cheap I2C/SPI/paralell DAC for this. |
Hi IX: I agree and I figure I will do that. Getting 4 DACS going w 4725's is a bit of a pain but certainly doable.
Q: Do you know if the code to ramp up/down the 2164 VCA, THAT 340, etc., and have it "sound normal" is linear? So, no RC type expo curve?
I figure it is linear. It must be right? Since you have to Irwin-ize the 2164 if you use RC.
I have a lot to do on the bench and I'll run some test sketches and find out, but I figure someone out there will just know. |
As usual volume control is in dB and 2164 control is also in dB (Gain Constant = –33 mV/dB from datasheet) means control input is linear but output volume is logarithmic rather), there should be no problem. |
|
Back to top
|
|
 |
cslammy
Joined: Apr 27, 2018 Posts: 206 Location: USA
Audio files: 1
|
Posted: Thu Dec 20, 2018 1:39 pm Post subject:
Re: Arduino to control linear VCA (2164 for instance) |
 |
|
ixtern wrote: |
As usual volume control is in dB and 2164 control is also in dB (Gain Constant = –33 mV/dB from datasheet) means control input is linear but output volume is logarithmic rather), there should be no problem. |
That's how I am reading it as well
One thing about the 2164: more volts = more attenuation, with 0V equals unity gain. So I'd need the Arduino to supply negative CV at -.33mV per DB, otherwise each VCA in the 2164 will only attenuate. the D to A can't easily produce neg CV relative to ground. I must use an op amp w DC offset to get that.
THAT VCA's ameliorate by allowing negative CV = more gain as well as positive CV = more gain. So in spite of having a whole tube of NOS 2164's I am probably going that route instead. _________________ Visit my AUDIODIWHY blog and website |
|
Back to top
|
|
 |
ixtern
Joined: Jun 25, 2018 Posts: 145 Location: Poland
|
Posted: Thu Dec 20, 2018 1:53 pm Post subject:
Re: Arduino to control linear VCA (2164 for instance) |
 |
|
cslammy wrote: | ixtern wrote: |
As usual volume control is in dB and 2164 control is also in dB (Gain Constant = –33 mV/dB from datasheet) means control input is linear but output volume is logarithmic rather), there should be no problem. |
That's how I am reading it as well
One thing about the 2164: more volts = more attenuation, with 0V equals unity gain. So I'd need the Arduino to supply negative CV at -.33mV per DB, otherwise each VCA in the 2164 will only attenuate. the D to A can't easily produce neg CV relative to ground. I must use an op amp w DC offset to get that.
THAT VCA's ameliorate by allowing negative CV = more gain as well as positive CV = more gain. So in spite of having a whole tube of NOS 2164's I am probably going that route instead. |
You must use op amp at the output so adding another at input should be no problem. If you don't like negatives there is a single-supply example in datasheet also but op amp for voltage level shifting is needed also. |
|
Back to top
|
|
 |
cslammy
Joined: Apr 27, 2018 Posts: 206 Location: USA
Audio files: 1
|
Posted: Thu Dec 20, 2018 2:01 pm Post subject:
Re: Arduino to control linear VCA (2164 for instance) |
 |
|
ixtern wrote: |
You must use op amp at the output so adding another at input should be no problem. |
Sorry not sure what you mean by "at the output" At the audio output of the 2164 right? _________________ Visit my AUDIODIWHY blog and website |
|
Back to top
|
|
 |
ixtern
Joined: Jun 25, 2018 Posts: 145 Location: Poland
|
Posted: Fri Dec 21, 2018 12:29 am Post subject:
Re: Arduino to control linear VCA (2164 for instance) |
 |
|
cslammy wrote: | ixtern wrote: |
You must use op amp at the output so adding another at input should be no problem. |
Sorry not sure what you mean by "at the output" At the audio output of the 2164 right? |
Yes, as 2164 has current output you must use op amp to convert it to output voltage. Of course, single resistor is also current to voltage converter but op amp for buffering is still needed. |
|
Back to top
|
|
 |
Grumble

Joined: Nov 23, 2015 Posts: 1308 Location: Netherlands
Audio files: 30
|
Posted: Sat Dec 22, 2018 4:19 pm Post subject:
|
 |
|
You might want to use the Analog Devices AD5754 a quad 16 bit DAC where the nominal full-scale output range is software-selectable from +5 V, +10 V, +10.8 V, ±5 V, ±10 V, or ±10.8 V.
10.8 volt is very handy because it covers the full 128 midi notes being 10 octave + 8 notes at 1 volt/oct. _________________ my synth |
|
Back to top
|
|
 |
ixtern
Joined: Jun 25, 2018 Posts: 145 Location: Poland
|
Posted: Sun Dec 23, 2018 3:08 am Post subject:
|
 |
|
Grumble wrote: | You might want to use the Analog Devices AD5754 a quad 16 bit DAC where the nominal full-scale output range is software-selectable from +5 V, +10 V, +10.8 V, ±5 V, ±10 V, or ±10.8 V.
10.8 volt is very handy because it covers the full 128 midi notes being 10 octave + 8 notes at 1 volt/oct. |
Yes, it's very handy DAC but try to recomment something little cheaper like MCP4725 . |
|
Back to top
|
|
 |
Grumble

Joined: Nov 23, 2015 Posts: 1308 Location: Netherlands
Audio files: 30
|
Posted: Sun Dec 23, 2018 8:57 am Post subject:
|
 |
|
I wouldn’t know about prices because I am in the sample program of Analog Devices and get samples for free  _________________ my synth |
|
Back to top
|
|
 |
cslammy
Joined: Apr 27, 2018 Posts: 206 Location: USA
Audio files: 1
|
Posted: Wed Dec 26, 2018 4:47 pm Post subject:
|
 |
|
Grumble wrote: |
You might want to use the Analog Devices AD5754
|
Thanks grumble, great Grumblechip as always, but perhaps overkill for this one
Some day soon I am going to start bugging you about all your C programming kung fu…still have a few more projects on the bench trying to get finished but REAL soon....
And yes I get samples from AD as well. It's a good learning experience. I hope someday I will sell some of their goods (acquired wholesale of course!) in products I design.
ixtern wrote: |
Yes, it's very handy DAC but try to recomment something little cheaper like MCP4725 . |
ixtern: I know MCP4725, but breakout boards for it (adafruit, no name clones) generally only allow 1 to 2 addresses without surgery? We need 4 here.
So--Looking at MCP4728: http://microchipdeveloper.com/dac:mcp4728-quad-channel-12-bit-digital-to-analog-converter
I see some libraries online for arduino and this. I2C so pretty easy to get going i figure. Also pretty inexpensive at $1.45 a chip USD.
From the datasheet, easy to set up hardware wise....A chance for me to work with MSOP for the first time.
So maybe I'll go with that. Man, too little time, too many projects.
Thanks all. _________________ Visit my AUDIODIWHY blog and website Last edited by cslammy on Thu Dec 27, 2018 6:49 am; edited 1 time in total |
|
Back to top
|
|
 |
Grumble

Joined: Nov 23, 2015 Posts: 1308 Location: Netherlands
Audio files: 30
|
Posted: Thu Dec 27, 2018 5:39 am Post subject:
|
 |
|
Quote: | And yes I get samples from AD as well. Maybe some day I will sell some of their stuff? Wink |
Hope they don’t read this or they never send you a sample again, you placed an autogram for this telling you will never resell samples  _________________ my synth |
|
Back to top
|
|
 |
cslammy
Joined: Apr 27, 2018 Posts: 206 Location: USA
Audio files: 1
|
Posted: Thu Dec 27, 2018 6:45 am Post subject:
|
 |
|
Grumble wrote: | Quote: | And yes I get samples from AD as well. Maybe some day I will sell some of their stuff? Wink |
Hope they don’t read this or they never send you a sample again, you placed an autogram for this telling you will never resell samples  |
No not at all what I meant. I mean, someday, I will learn enough about their products and engineering that I will design something using their goods that I can sell through an engineering firm in bulk with goods acquired wholesale. Like, create a product that everyone can benefit from. But I can see how this statement can be misunderstood. I will edit my statement. Thanks. _________________ Visit my AUDIODIWHY blog and website |
|
Back to top
|
|
 |
|