DIYstompboxes.com

DIY Stompboxes => Building your own stompbox => Topic started by: Andre on October 06, 2006, 03:58:46 PM

Title: Tempo indicator for PT2399 based delays
Post by: Andre 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:

(http://andre.timbolino.nl/PT2399TempoLED.jpg)

I already did a PCB layout with Bancika's software, but that needs to be verified first.
Title: Re: Tempo indicator for PT2399 based delays
Post by: blanik 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.
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre 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
Title: Re: Tempo indicator for PT2399 based delays
Post by: $uperpuma 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!
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre 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.

(http://andre.timbolino.nl/pt2399ti_layout.gif)
(http://andre.timbolino.nl/pt2399ti_pcb.gif)

Title: Re: Tempo indicator for PT2399 based delays
Post by: Peter Snowberg on October 08, 2006, 11:42:06 AM
Very, VERY cool! 8) 8) 8)
Title: Re: Tempo indicator for PT2399 based delays
Post by: markm on October 08, 2006, 11:59:54 AM
Interesting indeed.
No more "smallbox" delay though  :icon_neutral:
Title: Re: Tempo indicator for PT2399 based delays
Post by: $uperpuma 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 :)
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre 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.
Title: Re: Tempo indicator for PT2399 based delays
Post by: $uperpuma on October 08, 2006, 06:20:40 PM
thats true... it just looks big.. but that file would be reduced considerably when used...
Title: Re: Tempo indicator for PT2399 based delays
Post by: RaceDriver205 on October 08, 2006, 07:04:35 PM
What is the purpose of the diodes?
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre 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.

Title: Re: Tempo indicator for PT2399 based delays
Post by: 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.
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre 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.

(http://andre.timbolino.nl/pt2399ti_layout2.gif)
(http://andre.timbolino.nl/pt2399ti_pcb2.gif)
Title: Re: Tempo indicator for PT2399 based delays
Post by: Paul Perry (Frostwave) on October 09, 2006, 09:01:47 PM
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.....
Title: Re: Tempo indicator for PT2399 based delays
Post by: 12afael 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!
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre 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.

(http://andre.timbolino.nl/pt2399taptempoblock.jpg)

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

Please let me know what you think
Title: Re: Tempo indicator for PT2399 based delays
Post by: R.G. 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.
Title: Re: Tempo indicator for PT2399 based delays
Post by: gez on October 10, 2006, 12:03:17 PM
Bit late to this thread, but well done Andre, clever stuff!
Title: Re: Tempo indicator for PT2399 based delays
Post by: R.G. 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.
Title: Re: Tempo indicator for PT2399 based delays
Post by: puretube on October 10, 2006, 12:35:34 PM
there are tap-tempo pedals out there, that let you choose what to tap in there: every quarter note, or half, whole, bar...

and then hope, that the drummer stays tight.

btw: can`t see an image in reply #16...
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre on October 10, 2006, 03:34:06 PM
QuoteBit late to this thread, but well done Andre, clever stuff!

Thanks Gez

QuoteHowever, 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.

You sure got a point there R.G.
Still I think I'll give it a try just for the purpose of learning and maybe later use.
I have a bunch of MN3005's. A delay with 4 of those would give a more usable delay range and the
tap tempo circuit could be easily adapted for other clock frequency's.

I have little programming skills, so here's a good time to learn some C.
The suggestions you did in your first replies will come in handy.
But for now the idea of making a software PLL dazzle me.

Maybe first thing to do is a software version of the circuit I started this thread with, and put it in an 8 pin
PIC or AVR. That would make a small 2 part tempo indicator.

Anyway, thanks very much R.G..

Quotethere are tap-tempo pedals out there, that let you choose what to tap in there: every quarter note, or half, whole, bar...

Am I correct in thinking that in that case you tap the whole to set the tempo and then choose the interval ?

Quotebtw: can`t see an image in reply #16...

Here is the url of the picture : http://andre.timbolino.nl/pt2399taptempoblock.jpg
Can you check if if works ?







Title: Re: Tempo indicator for PT2399 based delays
Post by: puretube on October 10, 2006, 03:37:29 PM
I think: first you choose the interval,
then tap.
(gotta read s.th. by "Cusack" (g**gle or HC) . )

still can`t see pic, here.
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre on October 10, 2006, 05:06:33 PM
You should be able to see it now

(http://www.xs4all.nl/~jvcn0028/pt2399taptempoblock.jpg)

I found some ZVEX stuff with tap tempo mod by Cusack.
Need to look for more details.
Title: Re: Tempo indicator for PT2399 based delays
Post by: puretube on October 10, 2006, 05:20:45 PM
the "properties" of the image says: "size: 28x30 pixels";
it still gives me a "red cross";
"show image" doesn`t help;
copy&paste into new window doesn`t work, too...
Title: Re: Tempo indicator for PT2399 based delays
Post by: gez on October 10, 2006, 05:42:01 PM
Ton, it works for me using Opera but not Internet Explorer.  Might be your browser.
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre on October 10, 2006, 05:51:59 PM
Refresh this page please
Title: Re: Tempo indicator for PT2399 based delays
Post by: puretube on October 10, 2006, 06:19:19 PM
hey: now it shows!
(yes, I`ve done a couple of refreshs since 11:00 a.m.)

(and it shows both pics now - with both URLs)

:icon_eek:

BTW: don`t forget to de-bounce your tap-switch!
Title: Re: Tempo indicator for PT2399 based delays
Post by: dream_noir on October 10, 2006, 07:01:22 PM
Going all the way back to the original design for the tempo indicator, I have a few quick questions. Can I use any old NPN transistor for it? Also, R5 is the current limiting resistor for the LED, right? Is it such a low value to get a good blink? And should I use something slightly higher for a blue LED? And uhh, how common is the 74HCT4040 and are they any substitutes? Thanks.
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre on October 11, 2006, 05:46:21 AM
I think any low power NPN will do.
I used a blue led and had to go as low as 100 ohm to get a usable brightness.
Tonight I will do some experimenting with the pulse shaper to get a nice bright short flashing LED
and let you know the results.

The 74HCT4040 is available from several brands and is a rather common IC.
Although I have not tried I think you can also use 74HC4040.
CD4040 or HEF4040 won't work since they can not handle the highest Fclock from the PT2399. (22MHz)
Title: Re: Tempo indicator for PT2399 based delays
Post by: StephenGiles on October 11, 2006, 08:11:53 AM
Whilst I admire the technical expertise being offered here, and I mean that most sincerely, what's wrong with just hitting the strings and hearing the amount of delay. or am I missing the point completely??
Misso el pointerio completamente??
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre on October 11, 2006, 08:41:01 AM
Although I don't even use a delay on gigs, I can image some people wish to set the delay time while muted.
For me,since I read in several threads it was hard to do Tempo Indication or even harder to do  Tap Tempo, it's a challenge to
get it to work.

Besides that I think it just looks nice.
If you add tempo LED's to all your LFO driven FX too, your pedalboard looks very sophisticated.
Title: Re: Tempo indicator for PT2399 based delays
Post by: ExpAnonColin on November 19, 2006, 03:33:26 PM
Quote from: Paul Perry (Frostwave) on October 09, 2006, 09:01:47 PM
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.....

In my analog/digital circuit design class, we learned Diode logic first, then TTL, then gate-based logic :)  It's still being taught.

An LED is MUCH easier with a PT2395.  You can just buffer/filter one of the addressing signals. 

For the clock, using a vactrol just seems a little crazy to me.  The 2395 has an external clock in... Development for complex delay applications should be with the 2395 IMO.  That said, I would be hesistant to develop with the 2395 because of the RAM limitations.

-Colin
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre on November 19, 2006, 04:29:02 PM
QuoteFor the clock, using a vactrol just seems a little crazy to me.

Vactrol was the first thing that came to mind when I drew up the block diagram.
As R.G. already said, it could probably be done with a jfet too.
I already found some schematic in which a NPN transistor is used to control the clock.

QuoteDevelopment for complex delay applications should be with the 2395 IMO

I try to keep this design as universal as possible, so it can be used with several delay circuits.

BTW I have a PIC version of the tempo indicator ready and working, but I guess it's better to start a new thread in the
Digital & DSP Section about this one.

André
Title: Re: Tempo indicator for PT2399 based delays
Post by: taylorchuck15 on May 05, 2007, 05:21:10 PM
So, have we figured out the tap tempo subject. I like the fact of having an indicator to tell how much delay you have, but I would also like to tap it in too. I don't know a ton about digital effects and what not, but I can some what follow along. It kind of makes sense, but I don't know if anybody figured it out yet.
Title: Re: Tempo indicator for PT2399 based delays
Post by: runmikeyrun on May 09, 2007, 10:14:35 PM
would the diodes HAVE to be n4148?  I have 12 N4001s lying around.
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre on May 10, 2007, 03:13:55 AM
No, any Si diode wil do, so 1N4001 is OK

André
Title: Re: Tempo indicator for PT2399 based delays
Post by: Timebutt on July 13, 2007, 08:06:59 AM
Is there really no substition for the 74HCT4040 IC? Banzaieffects.com doesn't seem to have them in stock and I don't think my local electronics shop will have it available :/
Maybe there is in fact a substition that would make my life much easier? :)
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre on July 13, 2007, 08:21:37 AM
I guess 74hc4040 will work, but I think banzai won't have those neither.
Referring to our PM's: if you want me to make you PCB's for the Rebote and tempoindicator, I can also send you the 4040's.

I am leaving for holiday now, so this al has to wait for 2 weeks.

André
Title: Re: Tempo indicator for PT2399 based delays
Post by: Timebutt on July 13, 2007, 08:23:49 AM
You would do me a great favor by doing that!
When you're back, could you send me a PM concerning all the details and such?
I'll be waiting for your return, parts are coming in next week or so :)
Title: Re: Tempo indicator for PT2399 based delays
Post by: GP on February 24, 2010, 05:27:58 AM
Sorry for dragging up an old thread but i was hoping someone (Andre?) maybe still had the schematics that Andre posted.

The only thing I can find is Cathexis' layout which has confused me no end since he has commented that it only seems to work with the ground disconnected - how can it work at all if there's no ground?

???
Title: Re: Tempo indicator for PT2399 based delays
Post by: alex frias on February 24, 2010, 08:45:47 AM
1+
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre on February 24, 2010, 09:30:55 AM
I have the schematic on a network drive that's defective at the moment.
As soon as it's fixed i will re-post it.

BTW. the first version was not too accurate.
The second version that uses a 12F675 PIC processor is very accurate but has an audible tick.

However, the schematic, sourcecode and hexcode of this version are also on the defective networkdrive, so give me some time to have this drive fixed.

Title: Re: Tempo indicator for PT2399 based delays
Post by: GP on February 24, 2010, 09:39:48 AM
I'm not too worried about accuracy as such... i was really just using this as an example of dividing down a clock frequency but i don't really undertstand how i should go about doing this.

Anyway, i was trying to understand how i should AND bits together to produce a non base-2 division. I know how to implement a discrete AND gate but, when i combine two bits together, i'm not getting the result i expect. I'm not sure where i should connect the Reset pin - to ground or to the result of the AND? If i connect to ground, i don't get what i expect and, if i connect to the result, i don't get anything.

Cathexis' layout makes no sense to me since, as i see it, it simply sends the 1/1024 output to the second 4040 and the result of the AND isn't going where i would expect it to go. On top of this, i'm really confused as to how it can work if the ground is disconnected! Surely, no ground = no operating CMOS chips?
Title: Re: Tempo indicator for PT2399 based delays
Post by: Andre on February 24, 2010, 11:00:07 AM
Quote from: GP on February 24, 2010, 09:39:48 AM
I'm not too worried about accuracy as such... i was really just using this as an example of dividing down a clock frequency but i don't really undertstand how i should go about doing this.

Anyway, i was trying to understand how i should AND bits together to produce a non base-2 division. I know how to implement a discrete AND gate but, when i combine two bits together, i'm not getting the result i expect. I'm not sure where i should connect the Reset pin - to ground or to the result of the AND? If i connect to ground, i don't get what i expect and, if i connect to the result, i don't get anything.

Cathexis' layout makes no sense to me since, as i see it, it simply sends the 1/1024 output to the second 4040 and the result of the AND isn't going where i would expect it to go. On top of this, i'm really confused as to how it can work if the ground is disconnected! Surely, no ground = no operating CMOS chips?

I hope my ascii art shows normal (it does in the preview) , but this is the principle I used:

                         +
                         |
                          \
                          /   10k
                          \
   4040                /
  ______             |
  |     Q0|___|/|__|
  |         |     |\|    |
  |         |             |
  |     Q1|___|/|__|
  |         |     |\|    |
  |         |             |
  |     Q2|_           |
  |         |             |
  |         |             |
  |     Q3|_._ |/|__|   
  |         |  |   |\|   |
  |         |  |_____|_____ out
  |      R |_______|
  |_____|   

I think I first  calculated the binary equivalent of twice the dividend I wanted.
Then I connected diodes to the corresponding 4040 outputs like in the example and took the output from the most significant output.
Maybe you can experiment a bit with this circuit to get the output you want.
Title: Re: Tempo indicator for PT2399 based delays
Post by: GP on February 24, 2010, 12:51:36 PM
Thanks a lot for taking the time to reply, Andre... and the ascii makes enough sense to me to answer my issues. I think my biggest problem was getting my head around using the MSB for the output. It seems counterintuitive (like this is equal to the reduced clock that's being sent onward) but now i see that the output clock speed is always going to be influenced by how often you reset the counter.

I'd searched and searched all of last night and there aren't really many examples of combining bits to make a tailored division. I guess this is probably because there are better chips to use for a non base-2 number (i.e programmable, synchronous counters). Anyway, i have a couple of 74hct4020s and i wanted to see if i can do something interesting with the pt2399's clock but NOT tap tempo.

Title: Re: Tempo indicator for PT2399 based delays
Post by: aneeshprasobhan on June 09, 2017, 07:33:15 AM
well, there is absolutely no schematic that is live now. Really sad....Does anyone have the tempo led schematics ?  And would it work with HCF4040BE?
Title: Re: Tempo indicator for PT2399 based delays
Post by: slacker on June 10, 2017, 08:04:25 AM
There's a vero layout for it here http://www.diystompboxes.com/smfforum/index.php?topic=102660.0 (http://www.diystompboxes.com/smfforum/index.php?topic=102660.0) this is basically as good as a schematic. It should work with any 4040 chip.