Generate Control Voltage for a modular synth

I have an Arduino on the way and my plan is to use it to generate programmed control voltage (CV) for my modular synthesizer.

My question is in regards to the voltage output on the PWM. I know the synth gear will take as much as 15v. The Arduino PWM outputs will do up to 5v, correct? Will that be enough to work with?

Have any of you worked with this before?



1 Like

Heyas, Im attempting something similar to this myself for the arduino while learning from building a polydac midi->cv interface (from which uses similar chip.

You may find arduino is probably capable of a gate output to control cv gate at +5V
but if your planning controllable voltage like +1V octave pitch or anything, you may need to look into a dedicated dac.
Check some of relatively simple discreet 8bit dac circuits for this, Im building and trying one of the R-2R type ones myself right now.

As far as I know and have tested (on sound output) the PWM on arduino is just a variable width pulse wave at one set voltage, I've heard rumours there are ways of converting this to rudimentary cv control, but most people seem to just implement a dac for variable voltage.

anyone else maybe able to elaborate on this ?

So, something like this should cover me?

I found that by looking at Ken Stone's wavetable module schematic. I figure that has to be a decent example of generating CV.

That looks like it should be doable, it'll use up 8 of the arduino's ports on its own mind you.

If you need to use more digital inputs/outputs from the arduino alongside the dac, you may want to look at a dac with serial input like the ad8300,2877,AD8300,00.html
or chuck a serial->parallel chip in between the arduino and the dac0800. I'm using a hc595 chip for this at the moment, but using a resistor stage for the dac.

I'm just learning a lot of this myself so someone point out if I'm wrong anywhere.

I'm using a hc595 chip for this at the moment, but using a resistor stage for the dac.

With the resistor stage dac (i assume a simple "ladder" structure), are you limited to 0-5v of scaling or can you increase it to 15v with an outside power source, as with the Ken Stone example.

Are you using 4 i/o pins for your resistor ladder?

Hopefully that makes sense. I haven't messed with this stuff a whole lot over the past decade so I have some catching up to do.

yes its based on one of the R-2R ladders, so assumedly it will pass just the 5v voltage through from the hc595.
Most of these circuits appear to have a transistor or op-amp stage to scale the signal afterwards should you need more than the chip outputs, and is probably advisable if you want to say trim the output specifically for a keyboard range.

by the looks of it the Ken Stone example is audio signal out, similar to what I'm attempting.
have a look at these for a few CV output scaling ideas

Thanks for the link. I'll need to order some parts.

It appears the 8-Bit Descreet DAC Module 1 schem covers what I'm trying to accomplish. To get a higher voltage that the 5v I'd probably just apply a hotter voltage across P1, correct?

I would assume that is the case, be sure the lf353 or whatever op-amp you use can handle the voltage your going to chuck in mind you.

I finally found some time to mess with this last night.

I made an 8-bit R2R digital-to-analog converter. (I also tested with a DAC0800 chip)

Was sending control voltage to my modular synth using a simple loop where I spit out like 16 steps of binary data. I fed that into my exponential input to control the pitch of a VCO.

You can see a photo here of the pile of wires.

I plan to do some more work with this later. I didn't even need the opamp following the R2R. The voltage the Arduino generated was plenty enough to control pitch. I haven't tested it on a gate input yet, but I assume that should work, too. I would like to get the 741 working with it, though. From what I've read, it smooths out the signal quite a bit. I'd also like to pickup some 1% resistors to get more precise control.

This project really makes me realize how much I need an oscilliscope.

Here are the sets at Flickr with anything related to this project...

Nice one, and real nice looking modular, I take it your running all outputs direct from the arduino?

I did the naughty for the oscilloscope and sent it through a pre-amp before my computer btw, the signal was very low anyways, but it enabled me to run an oscilloscope app too get some rough idea what was going on.
I'm sure some people on here will caution me on this, as I'm sure I should be using some input buffer of some sorts :slight_smile:

I'm trying to conserve ports on my arduino as to get midi input also, and possibly another serial in for some crude control input.
Running it through the hc595 causes a bit of spiking due to it not holding the signal I think, Im now experimenting with some gate- flip/flops to see if i can do sample-hold the signal before it goes through the R2R.

It would all be a lot easier for me using something like the DAC0800 like you mentioned, but it isn't half as much fun and messy as the R2R is it ? :slight_smile:

Project is up here along with a polydac build if your interested.

Theres also an arduino page on there where I have a rough arduino pdf and omnigraffle stencil I use for mocking up some ideas.

I'm probably going to build the arduino into part of my modular as shown somewhere earlier in the blog. In theory once its running the polydac should be able to through midi to the arduino rack while the arduino outputs sound to the rest of the modular stages. I'm hoping for lots of noise and character :slight_smile:

Right now I'm using 8 i/o ports out of the 13 available.

I am running the pins from the Arduino to the R2R and then direct to the modular. I was having issues getting the 741 to cooperate with the R2R, so I just bypassed it. I wasn't sure what to expect but it worked right away.

My next step is to hookup a couple pots or a CV input to the Arduino to modify the byte data i'm sending out. Speaking of which, anyone have some sample code generating an 8-bit sinewave or something to the digital outputs. I've never done anything with lookup tables before.

Not really sure what my end result will be on this. Maybe some sort of wavetable or digital LFO... I have a MIDI->CV converter in the synth rack, so that is covered.

If anyone has leads on how to generate waveforms and send them as digital data, that would rock.

You can take a look at my "Computer Interface" at the bottom of this page:

I use it to control my homegrown modular through the paralellport.
My plan is to build a new one based on the arduino, so that I can controll it through USB instead. :slight_smile:
(parallellports are outdated nowadays...)

I don't like using midi2cv interfaces due to the limitations of MIDI (resolution and speed).

Kymatica: looks like a nice simple circuit, no doubt very easy to transfer over to the arduino :slight_smile:

For simple stuff like note triggering and triggering envelopes midi should be adequate enough for me, but I too can see the shortfalls of it, especially for what I plan to do in the future with my modular.

At the moment I'm working out a way to bridge Reaktor to the arduino using OSC, this is considerably higher bandwidth than midi and hopefully should be enough to send multiple realtime envelope and controller data out to cv, without the need for triggering external adsr's on the arduino or an external analog stage.

This should hopefully open up the possibility for building a self contained hybrid synth using analog filters&fx but using a mac or pc cpu to provide control and voices, without any of the usual clunky midi boxes or analog hardware in between.
Although I have yet to find a good solution for multiple audio outs without reverting to some firewire interface, would be nice to combine something on a board with the arduino for this..

If you guys come up with some nice midi code, I'd love to get at it.

I think that would be the hard part. After you have midi note values (goes up to 128 or sommat), just spit out data to a DAC. I'd want my DAC to be more accurate than 8 bit though. The purpose of a control voltage is to allow as smooth a transition as possible. You might even want to build a glide circuit that smooths out the output...

Anyway, working backwards, you might want to get a control voltage (from a pot or something) and control your VSTi from it. Whatev.

Maybe soon VSTi will be bundled with hardware? (Ultimate copy protection is hardware)

Has anyone gotten far enough with Arduino>CV to be willing to share schematics/code?

Has anyone gotten far enough with Arduino>CV to be willing to share schematics/code?

I'd be quite interested as well. I can't seem to find examples of even MIDI-in decoding anywhere. That piece of code would be very welcome in my Arduino Synth project:

So if anyone has the time - Thanks in advance!

Has anyone gotten far enough with Arduino>CV to be willing to share schematics/code?

Does the otput voltage have to be super smooth?

The analog approach would be to take a PWM output, and run it into an op-amp filter to control the response-- the smoothing. I'm one of those people who just throws down an Op-amp and a bunch of .1Uf caps and 100K or 1M resistors, and fiddles with it until it works. If there's a real analog-thinking engineer in here, perhaps they could tell us the right components/schematic to turn a PWM output into a smooth voltage?

On the digital side of the solution, I found this DAC based on an AVR:

They're on this page...

It's a very cool idea to make a CV module with, say, a barebones-like board.


Hmm, I like the dirty opamp approach. I could use some more experience with them anyway.

I'm new to the Arduino (haven't even powered it up yet), but I'm interested in using it to generate 0-10V range voltages for use with my synth as well. There was a thread on the parallax BS2 forum about I2C/Serial DACs - has anyone considered using them with the Arduino for this purpose? The part number mentioned in that thread was MAX518 (only 8 bit though so not ideal).