Generate a signal with 8 fixed-width pulses with a varying interval

Go To Last Post
58 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Be careful you don't over reverse-engineer something that doesn't belong.

 

For example you see a square wave clicking away and every 256 counts there is also a 100ps pulse as well.  Geepers you say, I've got a 33 KHZ square wave with a 100ps pulse every 7.758 ms.  I'll form an osc using a 555 timer, and rig up some very fast FETs and ECL logic to create the 100ps portion of the wave and use a 1 GHz bandwidth summer configuration to combine the signals. 

In reality, this is just the LSB of some 8 bit circuit, that has a 100ps rollover glitch.   Better to fix the glitch!  The point being, this is just a dumb counter chip, not some sophisticated scheme you are trying to deduce or unravel.

You see it a lot with analog...I look at some circuit responses & say gee, if I was trying to create this it would be nearly impossible.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

eugene the jeep wrote:

The other weird thing is that the pulses start and stop abruptly with the pulse. Looking at the photo from post #31 (old image from when the system worked correctly.) Comparing the input to the output, I can see that the output started at the rising edge of the pulse (but not at the very beginning of the pulse.) But then it ends abruptly some 200ns after the falling edge of the pulse. Makes me wonder.... Is there a MOSFET across the piezo that keeps it shorted when the pulse is high, but 'releases' it when the pulse is low? Is that little jaggie at the start of the pulse there because the pulse is connected to the gate of the MOSFET? Does the pulse not get damped immediately because it takes 200ns for the MOSFET to turn off? (Seems a long time.)

 

Yes, it has a distinct clamped behaviour, which is not quite a common-ground with flyback operation.

Almost as tho the LOW time is the drive and the HI time is load floating ? 

Notice the last blue pulse does decay-ring 'as expected', when drive stays high. Suggests Hi is 'off', and LOW may ramp current into an inductor. (hence the clamped appearance)

 

Maybe that's a P-FET gate drive, or even a PNP transistor drive ?

 

Maybe the OP can give some part numbers and a simple circuit of the exact load wiring ?

 

As I mentioned above, it does also look like the drive impedance is significant, and the original MCU pulse may be different widths from the hi-peaks. That means the circuit should include gate drive? parts too.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

Be careful you don't over reverse-engineer something that doesn't belong.

 

Solid advice. There's more than one thing about this that doesn't add up to simple, but I can think without moving my lips when I need to.

 

Now take back that crack about the 555.

Brian Fairchild wrote:

It's at this point that we really do need the OP to come back and engage with us. So many questions..........

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:

eugene the jeep wrote:

The other weird thing is that the pulses start and stop abruptly with the pulse. Looking at the photo from post #31 (old image from when the system worked correctly.) Comparing the input to the output, I can see that the output started at the rising edge of the pulse (but not at the very beginning of the pulse.) But then it ends abruptly some 200ns after the falling edge of the pulse. Makes me wonder.... Is there a MOSFET across the piezo that keeps it shorted when the pulse is high, but 'releases' it when the pulse is low? Is that little jaggie at the start of the pulse there because the pulse is connected to the gate of the MOSFET? Does the pulse not get damped immediately because it takes 200ns for the MOSFET to turn off? (Seems a long time.)

 

Yes, it has a distinct clamped behaviour, which is not quite a common-ground with flyback operation.

Almost as tho the LOW time is the drive and the HI time is load floating ? 

Notice the last blue pulse does decay-ring 'as expected', when drive stays high. Suggests Hi is 'off', and LOW may ramp current into an inductor. (hence the clamped appearance)

 

Maybe that's a P-FET gate drive, or even a PNP transistor drive ?

 

Maybe the OP can give some part numbers and a simple circuit of the exact load wiring ?

 

As I mentioned above, it does also look like the drive impedance is significant, and the original MCU pulse may be different widths from the hi-peaks. That means the circuit should include gate drive? parts too.

 

 

Would be nice to see the circuit and where the probes are placed. Probably pretty simple once you understand it, but there's definitely something unconventional. Well, it might be conventional in this specific application, but it's not familiar to me.

 

Edit: I suppose a series combination of a piezo and a transistor across some power supply would explain it all pretty simply. Still not sure why the pulses are irregularly spaced. It's way easier to make them periodic.

Brian Fairchild wrote:

It's at this point that we really do need the OP to come back and engage with us. So many questions..........

Last Edited: Fri. May 20, 2022 - 08:08 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 Still not sure why the pulses are irregularly spaced.

Maybe DocJC mentioned some things, or it could have nothing to do with that & simply be the way the software happens to do it's processing, such as sending different messages between samples. They may be doing other things in the loop & that's just when that item was done.  

My guess is that it is likely purposeful, but somewhat arbitrary.  It could simply be zeroing in on an estimate and tightening the window it uses.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

According to DocJC (and my existing understanding) if you want to get a system vibrating at resonance with maximum amplitude, you need to hit it repeatedly at its resonant frequency. I can tell from the photos that the first resonance is about 1MHz with another (probably second) resonance around 2.5MHz. In other words, if you're using pulses in a way described by DocJC, then you want the pulses to be evenly spaced at 1/(1MHz) = 1us. Using eight pulses that are scattered in period around 1 us is not a good thing. Think about pushing a child on a swing. You give a little push exactly when the swing reaches the top and starts moving in the other direction. If you push too soon it slows the swing down. It's not a perfect analogy, but it's close enough.

 

One possibility (that I doubt) is that the device is trying to generate a period that is not an even multiple of its main clock period. The only DDS chip that I have used (from Analog Devices - don't remember the part number) produced squarish waves with a remarkable advertised frequency resolution considering its internal clock frequency. For the sake of discussion, suppose it has an internal clock of 100MHz. That's a clock period of 10 ns. So we all understand how to use a counter/timer to generate slower square waves. As long as the total period is an even multiple of 10ns (call it N with N=2, 4, 6, 8, 10, ....) then we keep the wave high for N/2 and low for N/2 clocks. A 25 MHz square is 2 cycles high and 2 cycles low. The next lowest frequency is 3 high and 3 low = 16.7 MHz. If you asked it for 20 MHz then it would intersperse equal numbers of 2 high /2 low with 3 high / 3 low. If you asked for 20.5MHz, then it produce slightly more 3H/3L than 2H/2L. Maybe it would put in some 3H/2L and 2H/3L as well, I don't know, but you get the point. If you fed that into a spectrum analyzer, the largest component would be 20.5 MHz, but there would be a lot of other nearby frequencies too.

 

I can imaging a similarly clever pulse generator that is working with a 32 MHz clock. Ask it to produce 4 us pulses @ 1 MHz and it will produce a string of 8H/24L. The total period is 32 clocks which is exactly 1MHz. But suppose you ask it for 1.01MHz. The pulses still need to be 4H, but it can't do 26.5L so it does 4H/26L and then 4H/27L. Now suppose you ask for 8 pulses @ 1.0085 MHz. I'm not going to try to figure it out, but the spaces between pulses would not be consistent. In our case the pulses seem too inconsistent for even something like that, so I doubt that's what's going on, but maybe...

 

Anyway, it's time for the OP to show us what's behind the curtain. Tell us the make and model of instrument you're working with. Tell us what you've figured out about the circuit and where you're putting the scope probes. Show us some clear photos of the PCB. Take it all off.

Brian Fairchild wrote:

It's at this point that we really do need the OP to come back and engage with us. So many questions..........

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Piezo transducers are resonant. Depending on the coupling to the surrounding medium, their Q can be pretty high. This is particularly true in air. The consequence of this is that if you hit it with a pulse train, it may take several pulses to reach full amplitude, depending on the electrical drive. And, depending on the electrical drive, it will continue to "ring like a bell" when you end the pulse train. The ringing will be at the natural resonant frequency. You can see this in msg #3.

 

Single pulses spaced at different intervals will not tell you much. 

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

Pages