Frequency doubler for arbitrary input

Hello,

I want to implement a simple circuit, to double the frequency of a digital input signal. However, the design goals are somewhat odd.

Input signal is: a pulse train of 2-4 pulses, frequency ranges from 0.5Hz to 10.67Hz, and duty cycle is around 15-16%.
So, I would like to double this input's frequency, while roughly retaining the duty cycle.

Is this possible for example using flip flops only, or is a small microcontroller the smallest solution? I have seen designs that utilize a delay line and an XOR gate, but I figure that since my frequency varies so much, I will not be able to set an acceptable delay line for all input frequencies.
 
If you can tolerate delay of around 2 seconds I think possible. The problem is you don't know when the next pulse is coming, I'm thinking a microcontroller that waits for the next pulse, then generates a pulse with length old pulse width/2, waits the delay period from the previous pulse/2 and generates a second pulse also of width old pulse width/2. And of course the controller has to be watching for the next pulse because it may occur while the generation of the last pulse pair is happening and prepares to generate the next pair after the delay of the prior pulse expires. Non-trivial.
 
What you are intend to do is not a simple task. It can be done by a micro processor or system (like the Arduino etc). A simple logic gate etc is possible but reaches its boundaries very quickly. Esp on time sensitive measuements the trigger voltage of simple logical circuits will not get you the precise results you need.

If you want to double the input frequency, that's not a problem at all but you won't get better data results by that.
 
Take 2^16 = 65536 samples at a sampling interval of 50 microseconds per sample. Sampling rate is 20 kilohertz. That's 3.28 seconds of real time data. Store the samples in 65536 bytes of RAM. Then play back the stored data at 2X rate (i.e. one output sample per 25 microseconds). Voila, input frequency is exactly doubled. But there is a latency (a delay) of 3.28 seconds.

Notice that 4 pulses at 0.5 Hz are contained within 2.00 seconds, so the 3.28 seconds of stored data are more than sufficient.
 
Take 2^16 = 65536 samples at a sampling interval of 50 microseconds per sample. Sampling rate is 20 kilohertz. That's 3.28 seconds of real time data. Store the samples in 65536 bytes of RAM. Then play back the stored data at 2X rate (i.e. one output sample per 25 microseconds). Voila, input frequency is exactly doubled. But there is a latency (a delay) of 3.28 seconds.

That's not in any way realistic because it doesn't accout for any read errors. It also doesn't account for the input data stream (laser pit read) and none of the error correction, which takes ~95% of the buffer (RAM). That means, your calculation is 99,7% incorrect.

Notice that 4 pulses at 0.5 Hz are contained within 2.00 seconds, so the 3.28 seconds of stored data are more than sufficient.

Notice that any data on a CD below 20 Hz is cut off by the data format in the CD format definition.
 
If you want to double the input frequency, that's not a problem at all but you won't get better data results by that.
Do you mean that in my application doubling the frequency is easy but for example maintaining the duty cycle is not?

In general, I tend to assume that all common frequency doubling techniques rely on a 50% duty cycle or even a sinusoidal input, based on a limited research I have done. My first tentative thought for doubling was a full wave rectifier, but maybe this also needs a 50% duty cycle conversion first. I read about ICs like AD633, but again being a multiplier, it only gets easy with sinusoidal inputs and 50% cycles. Of course maybe I am wrong.

So, the microcontroller seems the logical option. I assume that I cannot escape the 2-second delay, since it is the minimum time to record two pulses at the lowest input frequency and then produce the doubled one.
 
  • Like
Reactions: BSST
I agree that a microcontroller is by far the simplest solution, but I think you might be over complicating the approach.

Note that duration of an arriving pulse is key. You merely measure the duration of the pulse with a uP timer facility, and the processor does the rest.

I suggest the control have the single input from the pulse train, and two outputs. The first output pin is the desired double pulse and the second pin is a "busy" flag that can indicate over-run error, i.e. another arriving pulse before the replica pulse has completed.

So the process is a simple loop:

1. An arriving pulse starts a timer, sets the busy flag, and sets the pulse output pin high.

2. uP watches/waits for cessation of input.

3. Set output pin low, save timer input pulse duration, start timer for ~5x duration.

4. Wait for timer end.

5. Set output high again, and start timer for length of original pulse duration.

6. Wait for timer end.

7. Clear outpin back to low, clear busy flag.

8. End. Return to 1.

Good luck.
 
It is possible to do the following ....

1) Split the input pulse train into two streams of 50% duty using two flip-flops.
2) Use two PLL frequency doublers to lock onto both these streams.
3) Combine (XOR) the VCOs of the two PLLs to get the double frequency pulse train.

Now, if I understand correctly, the mathematical consequence is that T becomes T/2 with 2x multiplication and therefore the duty cycle (tp/ T) would be doubled as well. Nevertheless, if a pulse train delayed by tp/2 (much less than 2 seconds) is also obtained, then it's possible to halve the duty using an XOR operation.

EASY WAY:
In a counting application, counting both edges instead of one results in an apparent doubling of frequency.
 
Last edited:
That's not in any way realistic because it doesn't accout for any read errors. It also doesn't account for the input data stream (laser pit read) and none of the error correction, which takes ~95% of the buffer (RAM). That means, your calculation is 99,7% incorrect.



Notice that any data on a CD below 20 Hz is cut off by the data format in the CD format definition.

Is this a thread split or did you by any chance reply to the wrong thread? There is nothing related to CDs in this one.
 
One more came to mind:

1) Split the input pulse train into two streams of 50% duty using two flip-flops.
2) Integrate (using first-order function, not accumulate) the two 50% square waveforms to triangular ones (difficult at low frequencies).
3) Take absolute values of the triangular waveforms to double the frequency.
4) Differentiate to square-wave back again.
5) XOR the square waves to get the pulse train.

Apply tp/2 delay and XOR to correct the duty.
 
Please note that the following is approximate, as the integration does not yield a triangular waveform (linear ramp), only close (slow exponential).

1725468533445.png

1725468561714.png