Haraldswerk Pitch to voltage converter (hardware version)

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!
Post Reply
harpooneer
Wiggling with Experience
Posts: 372
Joined: Wed Mar 31, 2021 2:44 pm

Haraldswerk Pitch to voltage converter (hardware version)

Post by harpooneer »

As requested, a new thread for the Haraldswerk Pitch to Voltage Converter, all-hardware version (https://www.haraldswerk.de/Shak_2_Synth ... ltage.html)

I finally completed the build from the provided Gerbers and schematic. Unfortunately, I suspect that it's not working properly, as I get an increasingly negative CV out with rising pitch. This occurs whether I send it a signal from the Signal to Trigger converter, or just a thin-pulsewidth square wave, and is the same on both outputs.

I did take some liberties with parts as I wanted to see if I could get it going at all: TL07x op-amps instead of the specified LT-series; a Nexperia NPN matched pair instead of the BC550s, and a plain resistor in place of the tempco. Other than that, I've done the usual checks and don't seem to have any mistaken values or orientation, missed or bridges joints, etc.

So, not being sure what to check next, I thought I'd at least see if negative CV is indeed incorrect. Any hints or ideas welcome!
User avatar
guest
Super Deluxe Wiggler
Posts: 10100
Joined: Mon Aug 19, 2013 11:49 am

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by guest »

just from looking at the schematics, i think the outputs should be negative, but rise with increasing pitch. the counter counts the amount of pulses that happen in period T of the incoming signal (T = 1/Fs). the slower the signal, the longer the T, and the higher the count. the higher the count, the higher the ADC output, so you get V = kT, which is then inverted for the V/Hz output, so Vo = -kT = -k/Fs (although that doesnt seem right for some reason, as i dont think thats V/Hz). This should be very negative for very low frequencies, and then approach 0 as the frequency gets really high. This goes into an ln() circuit, where higher input voltages force the output to go lower, and since the input gets higher with lower frequencies, the output should go lower. and for high frequencies, when the input voltage becomes small, the output voltage should rise.
openmusiclabs.com
User avatar
Haralds:Werk
Ultra Wiggler
Posts: 899
Joined: Fri Sep 09, 2016 3:33 am
Location: Germany
Contact:

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by Haralds:Werk »

Thanks guest, can't put it better.

harpooneer to see if it is working correct the absolute (negative) Voltage is of no interest. You have to level shift the output anyway to adapt it to your system. Try a 300, 600 and 1200Hz pulstrain +5V 10uSeconds (min) to the input. The relative Voltage difference should be 1V, resp 2V. And bear in mind that this is a build for my Shakuhachi to Synth project. So the frequency range is limited.
www.haraldswerk.de
Home of Next Generation Formant
User avatar
uniqview
Wiggling with Experience
Posts: 459
Joined: Mon May 18, 2020 3:18 pm
Location: Silicon Valley, California
Contact:

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by uniqview »

A circuit design issue I would have is the stability of the clock oscillator. The CMOS Schmitt trigger makes for a great utility oscillator, but for accurate time measurement I would want a crystal oscillator. I would be worried about jitter and frequency shift with CMOS threshold change over temperature. Such effects might change the LSBs of the registered count, hence your final analog output.
Onto a DIY novel implementation of an electronic music synthesizer.
harpooneer
Wiggling with Experience
Posts: 372
Joined: Wed Mar 31, 2021 2:44 pm

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by harpooneer »

Haralds:Werk wrote: Mon Mar 27, 2023 8:25 am Thanks guest, can't put it better.

harpooneer to see if it is working correct the absolute (negative) Voltage is of no interest. You have to level shift the output anyway to adapt it to your system. Try a 300, 600 and 1200Hz pulstrain +5V 10uSeconds (min) to the input. The relative Voltage difference should be 1V, resp 2V. And bear in mind that this is a build for my Shakuhachi to Synth project. So the frequency range is limited.
guest, Harald - thanks much for the analysis & tips; it sounds like my build is working as intended, if not as I (groundlessly) expected. Shifting and/or inverting the output makes sense. I should have time to mess with it more this afternoon and will test those frequencies. Any instructions on adjusting the trimmers in the output buffers, TR1 & TR2?
harpooneer
Wiggling with Experience
Posts: 372
Joined: Wed Mar 31, 2021 2:44 pm

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by harpooneer »

uniqview wrote: Mon Mar 27, 2023 8:49 am A circuit design issue I would have is the stability of the clock oscillator. The CMOS Schmitt trigger makes for a great utility oscillator, but for accurate time measurement I would want a crystal oscillator. I would be worried about jitter and frequency shift with CMOS threshold change over temperature. Such effects might change the LSBs of the registered count, hence your final analog output.
My LSBs are probably even more effected by the limit to which I can match resistors for a 12 bit R2R, but I'm exploring this circuit "for fun" just because I like seeing analog ways of doing things. As Harald points out, his microcontroller version is a better solution for serious use.
User avatar
Haralds:Werk
Ultra Wiggler
Posts: 899
Joined: Fri Sep 09, 2016 3:33 am
Location: Germany
Contact:

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by Haralds:Werk »

harpooneer wrote: Mon Mar 27, 2023 8:57 am
Haralds:Werk wrote: Mon Mar 27, 2023 8:25 am Thanks guest, can't put it better.

harpooneer to see if it is working correct the absolute (negative) Voltage is of no interest. You have to level shift the output anyway to adapt it to your system. Try a 300, 600 and 1200Hz pulstrain +5V 10uSeconds (min) to the input. The relative Voltage difference should be 1V, resp 2V. And bear in mind that this is a build for my Shakuhachi to Synth project. So the frequency range is limited.
guest, Harald - thanks much for the analysis & tips; it sounds like my build is working as intended, if not as I (groundlessly) expected. Shifting and/or inverting the output makes sense. I should have time to mess with it more this afternoon and will test those frequencies. Any instructions on adjusting the trimmers in the output buffers, TR1 & TR2?
Those are for scaling the output amplification. Say your relative output voltage difference is not 1V, 2V,... but 1.010V, 2,020V, ...which means the expo is working correctly but the scaling is off, you can adjust TR2.
www.haraldswerk.de
Home of Next Generation Formant
User avatar
Haralds:Werk
Ultra Wiggler
Posts: 899
Joined: Fri Sep 09, 2016 3:33 am
Location: Germany
Contact:

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by Haralds:Werk »

uniqview wrote: Mon Mar 27, 2023 8:49 am A circuit design issue I would have is the stability of the clock oscillator. The CMOS Schmitt trigger makes for a great utility oscillator, but for accurate time measurement I would want a crystal oscillator. I would be worried about jitter and frequency shift with CMOS threshold change over temperature. Such effects might change the LSBs of the registered count, hence your final analog output.
I see your point. But I have used this circuitry with success in my setup and have had no issues during sessions of about one hour length. May be I was lucky. I moved on to a micro build anyway.
www.haraldswerk.de
Home of Next Generation Formant
harpooneer
Wiggling with Experience
Posts: 372
Joined: Wed Mar 31, 2021 2:44 pm

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by harpooneer »

Now that I know more of what to expect, it looks like this is working quite well; the calibration was even pretty close out of the box. Mechanically it may have become a bit of a contraption, but I think this little "outside world" module is going to be fun to play with, probably in a dedicated standalone box with a fine-tune CV mover, lowpass filter, basic mic pre, etc.
hw1.jpg
hw2.jpg
hw3.jpg
User avatar
KSS
Super Deluxe Wiggler
Posts: 13462
Joined: Mon Jan 25, 2016 7:28 am

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by KSS »

:tu: Nice work!
harpooneer
Wiggling with Experience
Posts: 372
Joined: Wed Mar 31, 2021 2:44 pm

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by harpooneer »

KSS wrote: Mon Mar 27, 2023 10:46 am:tu: Nice work!
Thanks! Of course, I didn't do the hard part.
User avatar
Haralds:Werk
Ultra Wiggler
Posts: 899
Joined: Fri Sep 09, 2016 3:33 am
Location: Germany
Contact:

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by Haralds:Werk »

Nice build. If you want to go the way mic-preamp, filter and such have a look at my basic Shakuhachi patch.
www.haraldswerk.de
Home of Next Generation Formant
User avatar
uniqview
Wiggling with Experience
Posts: 459
Joined: Mon May 18, 2020 3:18 pm
Location: Silicon Valley, California
Contact:

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by uniqview »

Haralds:Werk wrote: Mon Mar 27, 2023 9:12 am
uniqview wrote: Mon Mar 27, 2023 8:49 am A circuit design issue I would have is the stability of the clock oscillator. The CMOS Schmitt trigger makes for a great utility oscillator, but for accurate time measurement I would want a crystal oscillator. I would be worried about jitter and frequency shift with CMOS threshold change over temperature. Such effects might change the LSBs of the registered count, hence your final analog output.
I see your point. But I have used this circuitry with success in my setup and have had no issues during sessions of about one hour length. May be I was lucky. I moved on to a micro build anyway.
For sure, I meant no ill will. You've developed numerous technically excellent module and circuit designs. Also I did not know (or see) that you now have a MCU implementation, which likely has a crystal oscillator. I was reacting to the schematic first presented, which used a RC oscillator based on a CMOS Schmitt trigger. And glad to hear you got good use out of the design for roughly an hour session.
Onto a DIY novel implementation of an electronic music synthesizer.
User avatar
Haralds:Werk
Ultra Wiggler
Posts: 899
Joined: Fri Sep 09, 2016 3:33 am
Location: Germany
Contact:

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by Haralds:Werk »

uniqview wrote: Mon Mar 27, 2023 11:17 pm
Haralds:Werk wrote: Mon Mar 27, 2023 9:12 am
uniqview wrote: Mon Mar 27, 2023 8:49 am A circuit design issue I would have is the stability of the clock oscillator. The CMOS Schmitt trigger makes for a great utility oscillator, but for accurate time measurement I would want a crystal oscillator. I would be worried about jitter and frequency shift with CMOS threshold change over temperature. Such effects might change the LSBs of the registered count, hence your final analog output.
I see your point. But I have used this circuitry with success in my setup and have had no issues during sessions of about one hour length. May be I was lucky. I moved on to a micro build anyway.
For sure, I meant no ill will. You've developed numerous technically excellent module and circuit designs. Also I did not know (or see) that you now have a MCU implementation, which likely has a crystal oscillator. I was reacting to the schematic first presented, which used a RC oscillator based on a CMOS Schmitt trigger. And glad to hear you got good use out of the design for roughly an hour session.
Your point is perfectly valid. The others to have a look at is the R2R ladder and the exponentiator. I mainly moved to the micro for easier building. Getting rid of the temperature dependencies is a welcome side effect. You can find ithere.

A patch tip for the user. You can sync the VCO perfectly to your input frequency. First adjust the VCO to your input frequency as good as possible. The beat frequency should be as low as possible. Then connect the incoming pulse train to the sync input of the VCO. This gives you 100% perfect tracking. From a musicians standpoint this is quite boring. As a wind player it is much more pleasant to have the synth slightly detuned. Tune it one or two octaves below and your flute will thunder!
www.haraldswerk.de
Home of Next Generation Formant
User avatar
KSS
Super Deluxe Wiggler
Posts: 13462
Joined: Mon Jan 25, 2016 7:28 am

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by KSS »

Haralds:Werk wrote: Mon Apr 03, 2023 4:55 am A patch tip for the user. You can sync the VCO perfectly to your input frequency. First adjust the VCO to your input frequency as good as possible. The beat frequency should be as low as possible. Then connect the incoming pulse train to the sync input of the VCO. This gives you 100% perfect tracking. From a musicians standpoint this is quite boring. As a wind player it is much more pleasant to have the synth slightly detuned. Tune it one or two octaves below and your flute will thunder!
:tu:
This^ can be used intentionally to make some types of WFs more interesting as well. In a general sense, not necessarily applying to this particular P2V module.

When you sync an osc this way the frequency is locked, but the amplitude varies for any but rectangular WFs. This is likely why Harald says to get it close first as this will minimze this effect-result. But by intentionally *not* getting it close you trade perfect pitch for variable amplitude. <--Which -depending upon the rest of the patch- can be quite useful -and usable*- in the whole.

*Since the amplitude is varying, you can use comparators and VC SW and VC SEQs to act upon this variation.
Treat utility modules as stars instead of backup singers.
Treat power supplies like Rockstars instead of roadies!
Chase magic sound, not magic parts.
harpooneer
Wiggling with Experience
Posts: 372
Joined: Wed Mar 31, 2021 2:44 pm

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by harpooneer »

Both of these techniques would utilize the Signal to Trigger, pulse-stream generation part of my module, yes? Not the Pitch to Voltage proper?
User avatar
Haralds:Werk
Ultra Wiggler
Posts: 899
Joined: Fri Sep 09, 2016 3:33 am
Location: Germany
Contact:

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by Haralds:Werk »

harpooneer wrote: Mon Apr 03, 2023 4:52 pm Both of these techniques would utilize the Signal to Trigger, pulse-stream generation part of my module, yes? Not the Pitch to Voltage proper?
Yes. You need the Pitch to Voltage convertor to follow pitch and then the Sig 2 Trig pulse train for locking the VCO via sync to this same pitch. Musically this is a bit boring but it might have its use. I prefer not to sync most of the time.

But as stated above you can use this technique independently for interesting effects.
www.haraldswerk.de
Home of Next Generation Formant
User avatar
Haralds:Werk
Ultra Wiggler
Posts: 899
Joined: Fri Sep 09, 2016 3:33 am
Location: Germany
Contact:

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by Haralds:Werk »

KSS wrote: Mon Apr 03, 2023 2:18 pm When you sync an osc this way the frequency is locked, but the amplitude varies for any but rectangular WFs. This is likely why Harald says to get it close first as this will minimze this effect-result.
Exactly
www.haraldswerk.de
Home of Next Generation Formant
User avatar
Haralds:Werk
Ultra Wiggler
Posts: 899
Joined: Fri Sep 09, 2016 3:33 am
Location: Germany
Contact:

Re: Haraldswerk Pitch to voltage converter (hardware version)

Post by Haralds:Werk »

Here is the basic patch for my Shakuhachi to synth project. The sync connection is the short dash line in the right upper corner. For better readability you can download the pdf here.

Shakuhachi_basic_patch_110.png
www.haraldswerk.de
Home of Next Generation Formant
Post Reply

Return to “Music Tech DIY”