Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Simple digital delay line

  1. Jul 10, 2007 #1
    Hello All,

    I'm still working on my experimental control board and up to this point have been determining the best way to do the phase shifting of the input signal onto three output channels.

    After doing some experiments, I realized that a simple 120 degree phase shift between the three signals would be fine so I found a great IC here that would take care of the phasing for me:


    But I want to be able to adjust the output signals from the chip to precisely line up the outputs (and compensate for any length differences on my board and other lines) so that the signals are lined up as precisely as I can get them.

    I thought the simplest way to accomplish this would be with a digital delay line of some sort. I only need adjustments within 1 uS but I want to have precise control over the phasing (with a potentiometer or something). Does anyone know of any simple ways to delay the signal between the output of the ring counter chip and the next stage of the circuit (which is a comparator-driven MOSFET driver chip)?

    Thank you,
    Jason O
    Last edited: Jul 10, 2007
  2. jcsd
  3. Jul 11, 2007 #2


    User Avatar

    Staff: Mentor

    Can you just use counters? What frequency will the ring counter output be running at?
  4. Jul 11, 2007 #3
    How about RC time delay?

    I dont think you can find an accurate method of doing a delay for such a short time as a 1uS quite easy. However, consider of doing a simple RC delay line which is adjusted to have delay of 1uS. You have to use signal conditioning circuit such as AND-circuit or similar before and after it to have sharp edges, but that is the simplest method i could come up with. By replacing that resistor with a pot, you may adjust the delay.
    The next method would be a microprosessor, and that is a different story.
  5. Jul 11, 2007 #4


    User Avatar

    I agree, the only way that doesn't involve either rather
    uncommon or somewhat high speed / complex digital logic
    (e.g. microcontroller or FPGA) is to use a RC delay
    followed by a schmidt triggered buffer to give a good
    digital transition from the RC circuit.

    They make fixed delay delay line products in the
    various-ns range, but that's useless for you.

    FPGAs commonly have skew correction and delay
    blocks in them and so they could be used for ps to us
    range programmable delays.

    What is the overall application that causes you need
    such precise phase control over MOSFETS? It's
    not common that I've seen ns level phasing concerns
    expressed over motor control (if I recall what you said
    you were doing with the FETs) applications.

    Also be aware that due to process variations in the
    FET drivers and FETs themselves you'll probably see
    dozens or hundreds of nanoseconds of skew between the
    switched outputs even with 'identical' devices. High
    power devices don't tend to be the most precise in timing..
  6. Jul 11, 2007 #5
    @ Berkeman,

    The ring counter I have will be designed to run at up to 1MHz. Any faster and I'll have to many problems with wire lengths and capacitance between pieces and parts.


    You said exactly what I have been thinking. I haven't thought of exactly how to accomplish it but given your description, it sounds very simple. Would you have any recommendations for a good capacitor type that would be well suited for this purpoose? I know some caps are very susceptible to outside influences which can change the delays.


    I'm glad you asked what I'm using this for. It is, in essence a type of motor controller only I'm not controlling motor statora with it. The ultimate goal is to produce a rotating magnetic field, but I need to have precise control of the phasing because I'm working with extremely fast rotating fields. on the order of millions of RPMs if you equated them with a physical armature. But in this case, I don't intend to spin a mechanical rotor with this; it's purely for experimental purposes.

    I actually have two 68HC12 microcontroller boards (which I don't know how to program yet) and I plan to utilizing them in the future for the controller, but for now, I'm playing with the anaolg components for now to get some practice working with ICs and also to make quick changes to my setup until I know exactly how I want the board to work. I'm constantly making changes to it so it's very much in the prototype stage for now.

    Also, you make a good point about the MOSFETs. In attempts to mitigate the problem, I'm using drivers to get them to come on as fast as possible but I can definitely understand the issues with them not triggering precisely. I really don't know how bad the delays will end up being by the time the input signals reach the MOSFET gates, which Is why I proposed to make the delay circuit to compensate for it.


    I attached a proposed diagram for the delay line circuit. Would this do the trick?

    Jason O

    Attached Files:

  7. Jul 12, 2007 #6


    User Avatar

    That diagram has a series C and shunt to ground R,
    whereas for a low-pass ('integrator') type delay
    you'd want the series R feeding into a C
    which is shunted to ground with the RC junction
    going out into your schmitt trigger.

    Then your R (being in series) controls the
    current flow into the cap, and the RC time constant
    slows the rise (and fall) of the pulse propagating
    from the R's input to give the output whenever
    the C is sufficiently (dis)charged.

    The rotating magnetic field sounds interesting;
    can you elaborate as to what you're trying
    to accomplish or research with such a thing?

    The microcontroller boards should help you
    generate more easily programmable timing
    when you get around to using them, though I
    expect their limit will be a resolution somewhere
    in the 100ns to 20ns range depending on the
    maximum clock speed you can run them at and
    whether their peripheral timer/counters are used
    or the software driven timing etc. That's probably
    good enough unless you're really getting into the
    several 100kHz to 1MHz cycle range and need
    better purely digital phase precision down to a
    few degrees or less.

    I've used some similar magnetics technology
    in the past for various kinds of industrial
    scientific equipment.
  8. Jul 12, 2007 #7


    User Avatar

    PS use a relatively large R value so that you don't
    over-load the output drive capability of your
    logic buffer that's driving the RC circuit. Most
    kinds of digital logic can drive 50k ohms into
    a short circuit pretty well; I'd stay above 15k
    anyway. It shouldn't be a problem since you'll
    be able to do something like use capacitors around
    18pF range with a 10k
    resistor in series with a low capacitance
    10k ohm pot and get a good range of
    sub-to-near-microsecond timings depending
    on the particulars of your parts.

    Use care with the layout and wiring (keep all
    components as close as possible together with
    insignificant amounts of interconnecting
    distance / wire), and you should have no real
    problem with the capacitance varying too much
    with environmental effects. Actually for this
    kind of thing it's common to just solder the
    components together by their own short-trimmed
    lead stubs, and put the whole thing in a metallized
    enclosure to prevent EMI and environmental
    electronic or mechanically coupled disturbance.

    If you use an 'identical' circuit on all phase leads
    you don't even have to use such small values of
    capacitance to minimize the absolute delay,
    since the only thing relevant to you is the
    relative delay between the three phases, so if
    they all had a nominal delay of even more
    than 1uS it's OK since it's the incremental
    variance of delay due to the adjustment that
    matters. Given that, you could increase the
    R and C if desired as long as you have the
    +/- delta range you want whatever the
    center delay value is.

    But working with 18pF capacitance in a well
    constructed delay circuit shouldn't be problematic,
    you just don't want to try it on a prototyping
    board or with sloppy wire wrap / sloppy large
    distance soldering.
  9. Jul 12, 2007 #8


    User Avatar

    PPS I wouldn't worry about the susceptability of
    the cap itself to environmental effects, in the
    10pF to 47pF range you're probably looking at
    some pretty compact disc ceramic or silver-mica
    caps, and they're relatively stable.
    Temperature and vibration would likely cause
    more variance than stray capacitive coupling as
    long as the delay section is tiny (e.g. < 1cm^2
    in size) and shielded with grounded metal walls.
    You can find a relatively better
    temperature compensated resistor, but by default
    the metal film one you're likely to get is probably
    OK. Use a nice small precision pot for mechanical

  10. Jul 12, 2007 #9
    RC delay

    i agree with xez, circuit should look like this.

    im not sure which capacitors are the most suitable for the circuit, as they all tend to have variations over temperature. But with a little search i found Murata ceramic capacitor type C0G which is extremely stabile over temperature.

    But if the circuit is to be within a decent temperature range, normal XR7 type ceramic will work fine.

    Attached Files:

    • RC.JPG
      File size:
      4.2 KB
    Last edited by a moderator: Apr 22, 2017
  11. Jul 13, 2007 #10
    Hello All,

    I just tested out the circuit using a 74LS14 inverting Schmitt trigger buffer, a 680pF cap, and a 1KOhm 15-turn pot. with an input clock frequency of 100kHz, I was able to shift the output wave between 0 and 1 uS with 1 nS resolution! The surprising thing was the stability of the output waveform. I was viewing this all on a 100MHz dual-channel scope that was triggered off of the input frequency.

    Works like a charm, thanks!

    -Jason O
  12. Aug 1, 2007 #11
    Thank you all, great info. Thank you Jason for sharing your experiment.

  13. Aug 2, 2007 #12

    How about adding a 100K Ohm Pot' in series with that 10K Ohm Pot'? That should increase Phase Adjust Range to 11uS while retaining the 1nS Phase Resolution you found in your experiment. Just a thought.

  14. Aug 7, 2007 #13

    I have linked your great idea to use in the ARM7024 from Futurelec here: http://en.mikrocontroller.net/topic/116189. This will do well for low frequencies this uCntrl will resolve well.

    If I keep the ARM7024's 3 Phase PWM at 50% duty-cycle, and use this excellent RC-timer circuit, and top it off with this method of delivering critically short pulses,
    http://www.overunity.com/index.php?topic=2582.10 (Reply #17, read all schematic text).
    ... then we have a fantastic combination. I had never thought of using a transmission line to deliver anything but AC this way. Now we know what is possible.

    If one could buy a DDS twenty in the US, or a better DDS based on the AD9959, I never would have learned all this. AD9959 shown here: http://www.analog.com/en/prod/0,2877,AD9959,00.html

    Thank you all for helping maximize what can be had from a simple RC-timer circuit.
    Last edited: Aug 7, 2007
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook