Author Topic: Tempo indicator for PT2399 based delays  (Read 24807 times)

Andre

Tempo indicator for PT2399 based delays
« on: October 06, 2006, 03:58:46 PM »
While looking at the PT2399 datasheet and doin' a little math,
I found out there is a usable relation between the delay clock and the delay time.

The datasheet says that when  Fclock is 2 MHz, the delay time is 342 mS.
A delay time of 0.342 mS means a delay frequency of 1/0.342 which is 2.923976608187 Hz.

Now, when i do Fclock/Fdelay ~  2000000/2.923976608187 the result is 684000.
That's a nice round figure.
When I do the same for other Fclock's and Delay times, the results do vary a little from the first one,
but overall I think these small differences can be neglected.

So I created a 684000 divider using 2 * 74HCT4040.
The first one divides by 1000 and the second one divides by 684.

The output of the second one connects to a pulseshaper which drives a transistor to switch the LED.
Just breadboarded it and connected it to my Rebote 2.5 and what do you think ?

It works!

Here's the schematic:



I already did a PCB layout with Bancika's software, but that needs to be verified first.

blanik

Re: Tempo indicator for PT2399 based delays
« Reply #1 on: October 06, 2006, 04:25:31 PM »
you should work on the tap delay now!!!!  :icon_twisted:
(joking aside, could the work you did apply to a tap delay function?)

R.

Andre

Re: Tempo indicator for PT2399 based delays
« Reply #2 on: October 06, 2006, 05:04:41 PM »
Blanik,

Yes, I think it can be a step towards tap tempo.
I do have some ideas about that.
Maybe I should do a block diagram of the circuit I have in mind and hope some people jump in.

Andre

$uperpuma

Re: Tempo indicator for PT2399 based delays
« Reply #3 on: October 06, 2006, 05:26:43 PM »
This is VERY cool... let us know when the layout is verified, I am in the middle of building the rebote and would love to add this!
Breadboards are as invaluable as underwear - and also need changed... -R.G.

Andre

Re: Tempo indicator for PT2399 based delays
« Reply #4 on: October 07, 2006, 06:51:34 AM »
So here's a layout for the Tempo Indicator

Although not verified yet, I think it's correct.





Peter Snowberg

Re: Tempo indicator for PT2399 based delays
« Reply #5 on: October 08, 2006, 11:42:06 AM »
Very, VERY cool! 8) 8) 8)
Eschew paradigm obfuscation

markm

Re: Tempo indicator for PT2399 based delays
« Reply #6 on: October 08, 2006, 11:59:54 AM »
Interesting indeed.
No more "smallbox" delay though  :icon_neutral:

$uperpuma

Re: Tempo indicator for PT2399 based delays
« Reply #7 on: October 08, 2006, 03:56:57 PM »
:) theres a lot of unused space on there...and brilliant layout maker coudl definately condense it a bit :)
Breadboards are as invaluable as underwear - and also need changed... -R.G.

Andre

Re: Tempo indicator for PT2399 based delays
« Reply #8 on: October 08, 2006, 05:58:18 PM »
You are absolutely right about the unused space. It could be optimised quite a bit, but on the other hand,
although the the layout looks sort of big it's actually only little over 2 by 1 inches.

$uperpuma

Re: Tempo indicator for PT2399 based delays
« Reply #9 on: October 08, 2006, 06:20:40 PM »
thats true... it just looks big.. but that file would be reduced considerably when used...
Breadboards are as invaluable as underwear - and also need changed... -R.G.

RaceDriver205

Re: Tempo indicator for PT2399 based delays
« Reply #10 on: October 08, 2006, 07:04:35 PM »
What is the purpose of the diodes?

Andre

Re: Tempo indicator for PT2399 based delays
« Reply #11 on: October 09, 2006, 03:56:07 AM »
The diodes together with the 10k resistor form a discrete logical AND gate.

For those not familiar with logical gates:

The output of an AND gate only goes high when all inputs are high.

So, in this circuit if we take left counter, only when the counter has reached a count of 1000, all the connected outputs become high level.
Now the output of the AND gate (the junction of all the diodes and the 10k resistor) goes to high and resets the counter to 0 through the CLR input.
And then it starts counting to 1000 again and again and again.

The diodes prevent the counters outputs from shorting each other.

I hope this answers your question.


RaceDriver205

Re: Tempo indicator for PT2399 based delays
« Reply #12 on: October 09, 2006, 07:42:22 AM »
Quote
The diodes together with the 10k resistor form a discrete logical AND gate.

Now that is some tricky sh#t! Gee, you think you've seen everything but theres always something.
Ive never seen that technique used anywhere ever, and ive had to study a lot of digital electronics.

Andre

Re: Tempo indicator for PT2399 based delays
« Reply #13 on: October 09, 2006, 05:20:55 PM »
I've been playing' around with the layout a little and managed to get it some 7.5 mm smaller.
I'm afraid that's the best I can do without software like Eagle or Ultiboard and my limited PCB design skills.



Paul Perry (Frostwave)

Re: Tempo indicator for PT2399 based delays
« Reply #14 on: October 09, 2006, 09:01:47 PM »
Quote
The diodes together with the 10k resistor form a discrete logical AND gate.

Now that is some tricky sh#t! Gee, you think you've seen everything but theres always something.
Ive never seen that technique used anywhere ever, and ive had to study a lot of digital electronics.

http://en.wikipedia.org/wiki/Diode-transistor_logic is pretty useful, if you just need a fragment of logic for a FX box. Naturally, a current course isn't going to teach you how one did it back in the 1950s & 60s.....

12afael

Re: Tempo indicator for PT2399 based delays
« Reply #15 on: October 09, 2006, 10:44:17 PM »
great idea Andre!!!

put your idea about the tempo tap.

mmm a ramp and a hold, maybe a jfet or a ldr for the time resistor.
first tap start the ramp and second set the R for the time. a very raw idea. R and time must be matched maybe is hard to do.

come on! a brainstorm here!

Andre

Re: Tempo indicator for PT2399 based delays
« Reply #16 on: October 10, 2006, 04:59:33 AM »
Well here's what I think that will do the trick.

IC's used 74HCT4040, CD4046, PIC1..... (or AVR)

Fclock from PT2399 is divided by 684 by a 74HCT4040

Tap tempo is measured by PIC or AVR
PIC/AVR outputs tap frequency multiplied by 1000

Outputs of 684 divider and  PIC/AVR connect to Phase Comperator Inputs on 4046 PLL.
Phase comperator output is fed to buffer Led/LDR combination to drive
PT2399 Oscillator.



A bit complicated perheps, but very accurate if it works.

Please let me know what you think

R.G.

Re: Tempo indicator for PT2399 based delays
« Reply #17 on: October 10, 2006, 08:53:12 AM »
Near as I can tell from t he PT2399 schemo, it will work.

If I was doing a uC for this, I would see how much of the divider I could put inside the uC. It's possible that the whole divider and possibly the PLL will go inside the uC in software.

Anothe possibility that I'm sure will work is to use a baby uC, either a six or eight pin PIC, under  $1, to do all of the dividing, then do the rest in a bigger PIC. It might be possible to do the tap tempo sensor in a second baby PIC and have the two PICs output the signals for the PLL directly for the PLL chip.

The tricky parts will be getting the damping on the loop right so the time delay in the LED/LDR does not make it unstable. It may be that you can use an NPN transistor to ground or JFET to ground as a current sink, as it looks like that is what the timing resistor does in the PT2399.
R.G.

Quick IQ Test: If anyone in a governmental position suspected that YOU had top-secret information on YOUR computer, how many minutes would you remain outside a jail cell?

gez

Re: Tempo indicator for PT2399 based delays
« Reply #18 on: October 10, 2006, 12:03:17 PM »
Bit late to this thread, but well done Andre, clever stuff!
"They always say there's nothing new under the sun.  I think that that's a big copout..."  Wayne Shorter

R.G.

Re: Tempo indicator for PT2399 based delays
« Reply #19 on: October 10, 2006, 12:20:37 PM »
Upon further thought, belay my enthusiasm.

All the speculation is correct, in that you can divide the clock and see the blinking LED in time with the echo.

However, the chip does not delay long enough to make this work with single repeats. The longest delay is some 300+ milliseconds, around three times per second. That's about the FASTEST I can tap my foot. I'm pretty sure I can't tap it at 34mS per tap.

A sufficiently well programmed controller could choose to put in the fewest possible iterations per tap, so that as delays got shorter, they would all align to an integral number of repeats, but that's of less value as the delay gets shorter.
R.G.

Quick IQ Test: If anyone in a governmental position suspected that YOU had top-secret information on YOUR computer, how many minutes would you remain outside a jail cell?