| Author |
Message |
mescalinum
Joined: Aug 02, 2010 Posts: 5 Location: Rome, Italy
|
Posted: Mon Aug 02, 2010 6:01 pm Post subject:
outputting CV (DC voltage) with a soundcard |
 |
|
I've been thinking to this subject since some time.
Nowadays we have access to cards with 16bit DACs for very cheap, and 20bit, 24bit also very accessible. (moreover I actually have 14 unused DACs, 24bit and 20bit, from my soundcards).
Unfortunately most of the soundcards available, even pro soundcards, are not DC coupled, so it's not possible to directly output a CV.
Tried on my Fostex VC-8, and it resulted in something like a 30Hz hi-pass filter on the DACs.
Tried on my Echoaudio Gina24, this behave a little differently: with an op-amp buffer it could keep the voltage, but a little drift (say 5%) would happen, so not properly reliable, i.e. nevermind controlling a VCO.
What are the options?
I opened my Fostex VC-8 and found two electrolytic caps for each output, but shorting them didn't work (moreover, VC-8 uses delta-sigma converters; would be ever possible to have DC come out of them?)
So I started to think to a more general solution, and "demodulators" came to mind.
Either 16bit or 24bit (read: cheap or pro), we should be able to produce a tone (0 DC) of constant frequency (say 8kHz) and variable amplitude.
Rectifying it (diode bridge, superdiode, ...) then extracting amplitude (I tried with a 2nd order butterworth filter) we should be able to get a constant DC voltage out of it (loosing one bit cause of the rectifier, still [ideally] 15bit / 19bit / 23bit would remain!).
I tried, both on LTspice and on breadboard, measured the ripple, and didn't seem big (unfortunately I didn't take note, but will do).
If anyone's interested I can post schematic.
What do you think?
Do you have ideas for improving it?
Reasons for not to do it?
Alternative solutions?
I made also some tests with a frequency to voltage converter, but the ripple seemed to be much higher at lower output voltages. (butterworth filter exhibits opposite behavior (!)).
P.S. this is my first post here, so, hello to you all! |
|
|
Back to top
|
|
 |
varice

Joined: Dec 29, 2004 Posts: 961 Location: Northeastern shore of Toledo Bend
Audio files: 29
G2 patch files: 54
|
Posted: Mon Aug 02, 2010 8:49 pm Post subject:
Re: outputting CV (DC voltage) with a soundcard |
 |
|
to electro-music, mescalinum!
Here is a topic that you may find interesting:
http://electro-music.com/forum/topic-12266.html
It addresses some of the issues of your post.
In my opinion, it would be best use a soundcard that does not have a DC blocking cap before the output, or one that can be modified to bypass the cap.
| mescalinum wrote: | So I started to think to a more general solution, and "demodulators" came to mind.
Either 16bit or 24bit (read: cheap or pro), we should be able to produce a tone (0 DC) of constant frequency (say 8kHz) and variable amplitude.
Rectifying it (diode bridge, superdiode, ...) then extracting amplitude (I tried with a 2nd order butterworth filter) we should be able to get a constant DC voltage out of it (loosing one bit cause of the rectifier, still [ideally] 15bit / 19bit / 23bit would remain!). |
That is basically the amplitude modulation/envelope follower alternative to try to decode a CV from a DC blocked output that is discussed in my topic. My own testing showed that amplitude modulating a bipolar square wave with the CV signal and then using a fast response envelope follower on the output to derive the CV was probably the best alternative method. The rectified square wave does not require as much low pass filtering which results in a better CV transient response.
| mescalinum wrote: | | I made also some tests with a frequency to voltage converter, but the ripple seemed to be much higher at lower output voltages. (butterworth filter exhibits opposite behavior (!)). |
I would think that the frequency modulation to voltage converter scheme would be less than ideal. It would be difficult to get both the steady DC levels *and* the fast transient response of the original CV signal at the same time. _________________ varice |
|
|
Back to top
|
|
 |
mescalinum
Joined: Aug 02, 2010 Posts: 5 Location: Rome, Italy
|
Posted: Tue Aug 03, 2010 8:06 am Post subject:
|
 |
|
so here's the schematics and output of a simulation.
I'm going to test this on breadboard and will report measured ripple.
| Description: |
| one of the designs I've been working on. first stage is an active rectifier (peak amplifier), second stace is an active butterworth filter, low pass, 2nd order. |
|
| Filesize: |
19.73 KB |
| Viewed: |
307 Time(s) |
| This image has been reduced to fit the page. Click on it to enlarge. |

|
| Description: |
| spice output. green track is virtual modulation signal, generated from a sequencer [0..1], enters the circuit as a AM signal 10 Vpp, carrier 10 kHz. red track is the output. if 0.2ms of timing constant is too much you can lower C2 and C3, but you will be |
|
| Filesize: |
34.16 KB |
| Viewed: |
257 Time(s) |
| This image has been reduced to fit the page. Click on it to enlarge. |

|
|
|
|
Back to top
|
|
 |
robotfunk
Joined: Jun 22, 2009 Posts: 20 Location: Netherlands
|
|
|
Back to top
|
|
 |
Tim Servo

Joined: Jul 16, 2006 Posts: 924 Location: Silicon Valley
Audio files: 11
|
Posted: Tue Aug 03, 2010 1:56 pm Post subject:
outputting CV (DC voltage) with a soundcard |
 |
|
There are DC capable sound cards, although they tend to be on the expensive side. There is also software meant for producing control voltages using those sound cards. Otherwise, if you're going to go with the envelope follower method, you might want to look at this design by Harry Bissell. It uses multiple stages to get fast response and low ripple:
http://www.edn.com/article/490267-Envelope_follower_combines_fast_response_low_ripple.php
worth a look, anyway.
Tim (slow response, LOTS of ripple) Servo |
|
|
Back to top
|
|
 |
Paco
Joined: Jun 16, 2010 Posts: 6 Location: Mallorca, Spain
Audio files: 2
|
|
|
Back to top
|
|
 |
forbin
Joined: Jan 29, 2009 Posts: 120 Location: Fremantle, Australia
|
Posted: Wed Aug 04, 2010 1:02 am Post subject:
|
 |
|
| I think that the biggest problem that you will have with most soundcards producing DC is the Codec or Digital-to-Analog Converter. Pretty much all the soundcards that I have seen recently use Sigma-Delta converters. The way they work is basically a one bit converter running at something like 256 times the sample frequency (so usually they are clocked well into the MHz). Because part of the design is an integrator which tends to accumulate a DC bias they nearly all (well all the ones that I have seen anyway) have a High Pass Filter that rolls off down in the sub 10Hz region to overcome accumulated DC error. This also helps with pops and other nasty DC offsets getting into the analog chain downstream. Problem will be getting a DC signal through... One option might be to use a TDA1543 (goggle it for info) which is an old-school resistive ladder design. There is a lot of discussion as to whether these really are 16 bit though and generally is thought that they are really only 12 bit internally. The capacitors on the output are probably only removing a dc bias on a single rail design? |
|
|
Back to top
|
|
 |
mescalinum
Joined: Aug 02, 2010 Posts: 5 Location: Rome, Italy
|
Posted: Wed Aug 04, 2010 7:33 am Post subject:
|
 |
|
| forbin wrote: | | I think that the biggest problem that you will have with most soundcards producing DC is the Codec or Digital-to-Analog Converter. Pretty much all the soundcards that I have seen recently use Sigma-Delta converters. The way they work is basically a one bit converter running at something like 256 times the sample frequency (so usually they are clocked well into the MHz). Because part of the design is an integrator which tends to accumulate a DC bias they nearly all (well all the ones that I have seen anyway) have a High Pass Filter that rolls off down in the sub 10Hz region to overcome accumulated DC error. This also helps with pops and other nasty DC offsets getting into the analog chain downstream. Problem will be getting a DC signal through... |
just yesterday I got the service manual of my Fostex VC-8, so I decided to mod it, bypassing the hi-pass capacitors.
After doing so, I measured DC at -1 and +1 (digital min and max values) and I got 1.27V and 4.63V.
I designed this little circuit in order to re-scale output in -15V +15V [see attachment].
I breadboarded and played with it some minutes, and I haven't seen any DC drift.
I've been reading also the AKM AK4522 datasheet, and it does not mention DC drift (except thermal drift of course), pass band says it's in the 0-20kHz range.
(btw, it's true that these chips are designed for audio output, but datasheet tells to remove DC offset on your own with a hi-pass opamp stage)
So, I'm going to make a prototype for one channel on perfboard, then if I'm happy I'll mod the other 7 channel and make an 8 channel board (it's quite cheap though!)
| Description: |
| use multi-turn trimmers for best precision. R2trim should be 50k |
|
| Filesize: |
22.33 KB |
| Viewed: |
243 Time(s) |
| This image has been reduced to fit the page. Click on it to enlarge. |

|
|
|
|
Back to top
|
|
 |
forbin
Joined: Jan 29, 2009 Posts: 120 Location: Fremantle, Australia
|
Posted: Wed Aug 04, 2010 7:20 pm Post subject:
|
 |
|
Hi mescalinum
Your right about the DC output. It was the Input of the codecs that I was looking at. I was trying to use a dsPIC to make a VCO and wanted a high resolution DC accurate converter. I am yet to find one... even the AKM's! |
|
|
Back to top
|
|
 |
mescalinum
Joined: Aug 02, 2010 Posts: 5 Location: Rome, Italy
|
Posted: Thu Aug 05, 2010 2:17 am Post subject:
|
 |
|
| forbin wrote: | Hi mescalinum
Your right about the DC output. It was the Input of the codecs that I was looking at. I was trying to use a dsPIC to make a VCO and wanted a high resolution DC accurate converter. I am yet to find one... even the AKM's! |
hmm... you say the pic's ADC (or AKM) aren't good for DC measurement? what problem did you encounter?
did you buffer your source (with op-amp) or attach to ADC directly?
if timing isn't a problem, you can use successive approximation ADC |
|
|
Back to top
|
|
 |
forbin
Joined: Jan 29, 2009 Posts: 120 Location: Fremantle, Australia
|
Posted: Thu Aug 05, 2010 5:52 am Post subject:
|
 |
|
| No all the Codec's that I have looked at (not just AKM) have a HPF on the analog in. It is to remove DC offsets in the input but seems to be inherent in the design of a lot of Sigma Delta converters. I want a fast, accurate BUT also DC accurate converter to do phase/amplitude/frequency modulation in my design. You can get dc accurate sigma deltas but they are pretty slow... I will keep looking... The PIC ones are OK but you need really quite high accuracy and they are only really good to 12 bit and even that is a bit iffy really. I tend to find that really the top couple of bits on most converters are noise at the best of times... Ideally I would like 16 bit 40kHz dc accurate converters... |
|
|
Back to top
|
|
 |
skrasms
Joined: Feb 21, 2008 Posts: 121 Location: Portland, OR
|
Posted: Sat Aug 07, 2010 4:06 pm Post subject:
|
 |
|
| forbin wrote: | | No all the Codec's that I have looked at (not just AKM) have a HPF on the analog in. It is to remove DC offsets in the input but seems to be inherent in the design of a lot of Sigma Delta converters. I want a fast, accurate BUT also DC accurate converter to do phase/amplitude/frequency modulation in my design. You can get dc accurate sigma deltas but they are pretty slow... I will keep looking... The PIC ones are OK but you need really quite high accuracy and they are only really good to 12 bit and even that is a bit iffy really. I tend to find that really the top couple of bits on most converters are noise at the best of times... Ideally I would like 16 bit 40kHz dc accurate converters... |
Dedicated high-quality audio sigma delta A/D converters often have an option to disable the high pass filtering. You can use AKM and Cirrus Logic A/Ds to capture DC. The downside for DC is that you'll have to manually compensate for offset and gain errors. 5% gain error isn't a big deal for audio amplitudes, but it is for DC accuracy in controlling pitch. Fixing that requires some calibration for the data out of the converter.
If you just want DC-accurate 16-bit 40kHz sampling, SAR is great. SAR converters are faster (much less delay than sigma-delta) and easier to find with good DC performance. _________________ Software and Hardware Design |
|
|
Back to top
|
|
 |
rumpofsteelskin
Joined: Apr 22, 2009 Posts: 52 Location: brighton, uk
|
Posted: Mon Aug 09, 2010 6:21 am Post subject:
|
 |
|
| A more convenient way might be to do this might be to output the CV in binary on a serial port (you could use a midi port) and use a look-up table on a pic to convert back into CV |
|
|
Back to top
|
|
 |
|