PT2399 Delay Chip. Change delay time via Pin 5 with an Arduino?

Started by nicksorenson, April 29, 2020, 12:57:36 PM

Previous topic - Next topic

nicksorenson

It looks like according to this
https://www.electrosmash.com/pt2399-analysis


Pin 5 may be able to be externally hacked to use a square wave to control the delay time. I have a Dano Fab Echo that I did the 50k pot mod on years ago. I got it out after 5 years of non use and would like to either mod it further or build something based on it. But this time I would like to make it tap tempo. Can I just input whatever frequency square wave I'd like to pin 5 and change the delay time accordingly?

niektb


ElectricDruid

Quote from: nicksorenson on April 29, 2020, 12:57:36 PM
Can I just input whatever frequency square wave I'd like to pin 5 and change the delay time accordingly?

You're talking about over-riding the internal VCO and replacing it with an external clock. I've never heard of it being possible. It might be that there is yet another undiscovered trick lurking in the circuits of the PT2399 that would make such a thing possible. But I have to say I doubt it. That chip has been pretty thoroughly experimented upon, and many have been smoked in the process!

If it were possible, it might be by holding the VCO in some "off" state (and we know that's possible with certain pin 6 voltages - this is a chip that's famous for "locking up") and then over-riding the locked output with the input clock at pin 6. That's pure speculation, however - not even a plan. The other thing the chip is famous for is not easily coming out of a locked-up state without being at least powered down and back up, and some people say even having all the pins discharged on a piece of tinfoil!

As an alternative, the pin 5 output shows you what the internal VCO is doing (ok, roughly - those waveforms are pretty heavily rounded) so you can control the VCO frequency using the current drawn from pin 6, and then monitor the frequency you get from pin 5. That allows you to set up a loop where you can auto-calibrate so your Arduino code can learn what output it need to produce to get Clock Frequency X (and therefore delay Y). The Arduino has timers and things that can measure the frequency for you. You just need to work out some way to control a current source with an Arduino output. There are lots of possibilities; PWM-driven vactrols, transistor current sources, digipots, other types of switched resistor array, etc etc.

Go ahead and try. You might fry a few chips. If you succeed, you'll gain eternal glory, at least in the DIY pedal realm. Surely that's worth it?! ;)

merlinb

Quote from: nicksorenson on April 29, 2020, 12:57:36 PM
Can I just input whatever frequency square wave I'd like to pin 5 and change the delay time accordingly?
No you can't. But you can control pin-6 and use the signal coming out of pin-5 to monitor the delay time and so make any corrections, creating a feedback control loop.

nicksorenson

Quote from: merlinb on May 01, 2020, 02:40:49 AM
Quote from: nicksorenson on April 29, 2020, 12:57:36 PM
Can I just input whatever frequency square wave I'd like to pin 5 and change the delay time accordingly?
No you can't. But you can control pin-6 and use the signal coming out of pin-5 to monitor the delay time and so make any corrections, creating a feedback control loop.

Here's where I had gotten the idea from (the link in the first post). Quoted here:

QuoteThere are 2 potential applications for this pin:

    Use the pin 5 clock frequency information in a feedback loop to get the accurate reading of the time delay. To do this, a microcontroller needs to be used and also because of the high-speed of the clock frequency (up to 22MHz) a pre-scaler (that would reduce the accuracy of the readings) needs also to be used. It is not clear that the benefits of reading the internal clock would overcome the extra circuitry and complexity of this mod.

    Override the pin 5 signal using an external clock source. In this way, the user can control the amount of delay in a precise way, but again it is difficult to say that the benefits will pay off extra circuitry and complexity.



ElectricDruid

Quote from: nicksorenson on May 01, 2020, 09:43:33 AM
There are 2 potential applications for this pin:

    Use the pin 5 clock frequency information in a feedback loop to get the accurate reading of the time delay. To do this, a microcontroller needs to be used and also because of the high-speed of the clock frequency (up to 22MHz) a pre-scaler (that would reduce the accuracy of the readings) needs also to be used. It is not clear that the benefits of reading the internal clock would overcome the extra circuitry and complexity of this mod.

    Override the pin 5 signal using an external clock source. In this way, the user can control the amount of delay in a precise way, but again it is difficult to say that the benefits will pay off extra circuitry and complexity.


I suspect the key word there is the fourth one along: "potential", e.g. we haven't tried it.

It's a possibility. Until someone gives it a go, we won't know if it works or not. Try it. It'd certainly make tap tempo for the PT2399 simpler.