Tempo indicator for PT2399 based delays

Started by Andre, October 06, 2006, 03:58:46 PM

Previous topic - Next topic

Andre

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

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

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

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

So here's a layout for the Tempo Indicator

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





Peter Snowberg

Eschew paradigm obfuscation

markm

Interesting indeed.
No more "smallbox" delay though  :icon_neutral:

$uperpuma

:) 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

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

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


Andre

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

QuoteThe 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

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)

Quote from: RaceDriver205 on October 09, 2006, 07:42:22 AM
QuoteThe 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

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

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.

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.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

gez

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.

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.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.