Voltage quantizer music from outer space

Does anybody else browse the internet looking at the modular synthesiser stuff and see stuff and immediately decide that you have to have it?  Like a voltage quantizer, come on admit it I’m surly not the only on.

As some of you who read of any of my recent stuff may know I’m currently building a modular synthesiser and I admit I’m getting obsessed by it. Most of my previous life has gone out of the window.

While looking for filters, envelope generators and VCA's I discovered the voltage quantizer. I’ve never seen or heard of these before but after a quick read about them I knew I needed one.

Having already built an analog sequencer and played around with it, interfacing it with some other built modules I can’t believe I’ve never stumbled across one before. It’s exactly what I’ve been wanting without actually knowing what it was or even if it existed. I should have realised there have been many analog synthesisers fans before and obviously someone else had seen the need for one.

What does a voltage quantizer do?

So what actually is a voltage quantizer and what does it do. Well in theory it’s quite simple. As you probably know the output from an analog sequencer is variable depending on where you happen to settle on turning a control knob, if you connect it to control a VCO’s pitch you could tune it anywhere. That’s the problem, turn the knob and you could be producing a note between A and A sharp. Not particularly musical and if your trying to put in something musical it can take an age believe me I’ve tried it.

A voltage quantizer takes a continuously variable input voltage and sticks it nearest to a note. That’s the best way I can describe it. If you route the variable sequencer output through a voltage quantizer and the into the pitch of a VCO the note will stick as you turn the sequencer control.

The note will stay for instance as a “C” while you turn the knob until the voltage gets closer to a “C#” then it will immediately jump to be a “C#” keep turning and it will eventually jump to become a “D”. Where ever you turn the knob it will always be a musical note and not somewhere between. I want one, or more precisely I want to build one.

So back on to the internet to see what’s out there, there are a few kits and some pre-made ones but not wanting to do things simply and wanting to save money I’m going to find a design and use that. I figure I may need four of them so I don’t want to spend too much. The best idea I come up with is to use an existing design but make my own PCB's. When I say make my own I mean use a PCB design program and get them made in China. I’ve got an article on that here. With something small you can get ten PCB's for not much over a £1 each.

The one I’ve decided to build is the Music from outer space (MFOS) voltage quantizer. The reasons being.

  • The parts are readily available, even though it’s a few years old there's nothing obsolete.
  • There’s a circuit diagram and a double sided PCB layout. Even though I’m not going to use the layout I can check that they are the same. This always gives me confidence that it will actually work and there are no mistakes if the circuit and PCB's match up.
  •  It looks simple to calibrate and use. There are some quite complex designs that you can set for different scales, but for now I want something cheap and easy to use. We’ll see what happens after.

After a bit of a look I reckon I can squeeze it on to a board that will only cost about £10 for ten pcbs so off to work I go on PCB design to input the circuit diagram and then plan the board layout. If that’s something that interests you there’s an article about that here. All that went without any problems and I then went about my usual checking routine of deleting each PCB track and then highlighting it on the circuit diagram. Hopefully when you finish you end up with a blank PCB and a circuit diagram with every part highlighted. I'd previously done this with the printed PCB layout from the website to make sure there were no discrepancies. You don’t want to end up with ten manufactured PCB's with faults.

the voltage quantiser circuit

I then just had to wait for delivery from China and get the other components I didn’t already have.

Once the PCB's arrived I gave then I quick look. These are the first double sided plated through hole boards that I've had made. Platted through double is the same price as single sided. They looked good, I’m always blown away at how professional the manufactured boards look and how cheap they are. Double sided, plated through connections, solder resist mask and screen printed component overlay. Amazing, I could only dream of boards like this years ago.

voltage quantiser pcb

The MFOS design uses resistor ladders instead of analog to digital and digital to analog converters. The resistors have to be very accurately though and the MFOS design calls for these to be .1%. I order a hundred each of the 100K and 200K values and set about measuring them and placing them on a sheet of paper. With the aid of a spreadsheet I ended up with what I needed and using the best selections got to .05%.

They got soldered into the ladder on the PCB and the rest of the components got quickly soldered on along with the sockets and then finally the IC’s got plugged-in. I wired it up to my power supply and powered it up. I connected a variable voltage to the input and my voltmeter to the output. Tuning the input voltage up resulted in a voltage coming out of the quantizer and even better it appeared to be stepped. Wow first time surly it couldn't be. It wasn’t as I soon found out when I came to calibrate it.

A zero to two volt input should have meant a zero to two volt output but despite twiddling with the pre-set resistor I couldn’t get it anywhere near one volt per octave. The voltage did increase as I turned it up and indeed there was a voltage so most of the circuit must be working. It must be a wrong component I thought. Ill sort it tomorrow.

The next day even though checking scrupulously I couldn't fault my construction. All the parts where in the correct places and the correct values, no bad joints or shorts either.

Another read through the original article and I thought I knew how the circuit operated inside out.

The clock was running at about 52 KHZ so I changed R1 to 220K to slow it down to 46 KHZ. Still no improvement. Using my oscilloscope I verified the ramp wave was being produced and reset as the input voltage was altered, the timing was operating but I was puzzled as to why no 1 volt per octave. After banging my head against a wall for a bit this didn’t work either.

voltage quantiser on test

The voltage quantizer on test using switched voltage inputs.

Plan B was to build another board up as I'd got plenty spare. I figured the problem was the end bit with the resistor ladder and output so I just populated that bit. I then put the input to logic ones and zeros and checked the output using the six bit binary input and in turn setting the inputs from 1 to 12 I was able to set the pre-set to exactly 1 volt per octave doing the 0.08333 millivolt calculation and then connecting the 6 msb of 32 and the output went up 32 times 0.08333 millivolts it was absolutely spot on and more linear that the digital to analog converter I'd used in a midi CV converter. I guess measuring the ladder values to 0.05 was good idea. If I ever got the whole board working properly! Plan C I'll populate the rest of the board and see if that works.

The second board had exactly the same fault as the first one. This is a bit worrying now as that rules lots of things out and more importantly narrows down what it could be and what I can find!

Plan D is to modify the output stage to try to get it to 1 volt per octave. I’m not overly optimistic about this as it works perfectly when linking the inputs manually anyway after altering stuff and values I get it to track at 1 volt per octave but only for about half an octave then it's all out, in fact on checking the linearity has totally gone. Back to the drawing board.

The problem must be somewhere in the input so more looking around the circuit and hoping to spot something, double checking the parts list with the circuit didn’t reveal any problems either.

In just about to run out of ideas, the IC'S must be working correctly as well going through the circuit with an oscilloscope and checking that.

Last resort was to try to find more info on the internet. I’d already looked through some forums and implemented the circuit improvements. A huge improvement for me would be to get it to work!

Trawling deeper and following threads and forums I stumbled across an answer. Someone much cleverer than me reckoned that a resistor value on the circuit was incorrect. I was somewhat pessimistic as you used to be able to get PCB's for the project and MFOS are quite renowned.

The problem I was having seemed similar to his. I was only getting about half the voltage out that I should be. It was still incrementing but not at one volt per octave.

He tracked it down exactly, basically the input resistor ladder, he was only getting six steps instead of twelve. Changing the value of R40 from 200K to 51K meant 12 steps on the ramp wave. He also mentions putting a 150pF capacitor in parallel with R40 as without it every fourth step is a whole note and not a half. I’ve not verified this last bit yet but changing R40 definitely made me able to get a one volt per octave output. Almost that is, I had to change R13 from 75K to 68K as I couldn’t quite get one volt per octave.

Connecting a voltmeter to the output and a variable resistor to produce a variable voltage to the input I was able to verify that it was producing a stepped voltage at one volt per octave. Almost there! I say almost as checking accurately, some of the voltages were a few millivolts off but not consistently as I could get the octaves to match up. This meant that it wasn’t completely linear and some notes were slightly sharp or flat. I was quite surprised by this as I’d spent a while matching and measuring resistors.

Matching resistors

To get accurate resistors for the diode ladder I had bought a hundred 100k resistors and a hundred 200k resistors and I intended to measure them to get the nearest to the correct value. Unfortunately all the 100k were over 100k typically about 101K. this wouldn’t have been a problem as they only have to half the value of the 200k resistors so if I had spot on 101k resistors I only had to find some 200k resistors that measured 202k. Unfortunately again all the 200k resistors were under 200k at about 198k.

Because there were more 200k resistors in the design I kept the spot on 198K and found some 5 per cent carbon resistors that measured 99k. Exactly half the values and looking at the maximum and minimum values I think I got the ladder to be about 0.05% so I was a bit puzzled as to why the non-linearity of the resistor ladder.

I was even more puzzled to find out that the second board I built up to check I’d made no errors on the first was more accurate. That was the one I randomly selected 100k and 200k without measuring and it was more accurate?

When I’m totally baffled I go on the electronics forums and ask the experts questions, I’m always amazed at the helpfulness and knowledge that is there on these boards. It seems that close tolerance resistors are not only matched by their value but also their temperature profile. I wondered if the carbon film resistor were the problem. It was at this point I remember browsing the net and seeing a design for a digital to analogue circuit using a resistor ladder using 10k resistors. When the ladder called for 20K they just used to 10K’s in series.

As I needed more 200k then 100k in the design I came up with the idea to measure the 1% film resistors and get as many as close to the same value as I could and put two in parallel to make the 100k resistors, after all they didn’t need to be accurate as 100k resistors just accurate to be half the value. It was also going to be easier to wire resistors in parallel than series on the circuit board you can just solder one on top of the other.

Using a calculator I divided one by twelve to get 0.08333333 and kept adding this to the total to get the value I needed. I was pleasantly surprised that stepping up to four volts all the voltages were either spot on of 1 millivolt out and this could have been because of the multimeter as it was the last digit. After four volts I have to change range and lose the last digit so it’s not possible to measure accurately enough. To be honest this project has pushed the multimeter to the limit of its accuracy and I can now see why more expensive meters are available. It might be time to invest in a new toy.

By using 200k 1% metal film resistors and selecting the most that were the same value I ended up with more than enough for the project and simple soldered a 200k across another 200k to get the 100k values. This was by far the most linear I had got and I couldn’t measure any closer simply down to the accuracy of my multimeter.

The finder of the input ladder anomaly was called “useemu” on the electromusic.com forum and I’ve put the link here. http://electro-music.com/forum/topic-28505-50.html

This has bought the project to a successful end. I have since constructed four of the boards selecting the 200k 1% metal film resistors and with the revised resistor value in the input resistor value.