Pulse Width Modulation Signal Stretching Thingy?

bob83

May 11, 2013
7
Joined
May 11, 2013
Messages
7
I'm a noob to this site - and about to embark on a journey of discovery as an under-educated electronics hobbyist - was wondering if I might ask for some advice.

To cut a long story short, I'm designing a project that will involve a pulse width modulation circuit to drive a servo. Unfortunately it will entail working with some very narrow signal pulse widths (as narrow as 0.000033 milliseconds), which I've worked out I'll need to stretch proportionately and accurately, by a factor of about x180, or minimum 0.00594 milliseconds, to do anything useful with.

Is there a way of doing this? I'm thinking of a capacitor/diode type setup - or failing that, something involving a 555 IC, but as I said, I'm hopelessly undereducated and can't quite work out how, or even if possible with such narrow pulse widths. Would be extremely grateful for any guidance.

Many thanks in advance :D
 

bob83

May 11, 2013
7
Joined
May 11, 2013
Messages
7
Thanks Chris, for your warm welcome and reply.

Possibly not, since I've never actually held one in my hands.

But from what I've read up (which is along the lines of the info on your link), the angle the servo turns to (and holds itself at) is determined by the pulse width of a signal, i.e. 1ms pulses = 0 degrees, 1.5ms pulses = 90 degrees, etc.

So, by creating a pulse along those lines I could drive a servo?

If that is correct, then a pulse of 0.000033 ms would do little to drive a servo - which is why I'm assuming I would need to stretch it. A 0.000033 ms pulse stretched x 180, or 0.00594 ms would also be too short (0 degrees requiring 1ms) - but I'm not as far as that yet, for the purpose of this question I'm just interested in stretching it x 180.

Am I correct in my understanding of things?
 

Laplace

Apr 4, 2010
1,252
Joined
Apr 4, 2010
Messages
1,252
The application described requires a 50 Hz pulse stream where the pulse width must vary over a range of 1 millisec to 2 millisec. However there is a mystery source of a 33 nanosec pulse. Furthermore, this pulse must be stretched x180 to a width of almost 6 microsec to do anything useful with.

Question: What is useful about a 6 microsec pulse if it is not able to drive a servo control interface? Is the 33 nanosec pulse part of a PWM pulse stream? What are the full characteristics of the 33 nanosec pulse?
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
The application described requires a 50 Hz pulse stream where the pulse width must vary over a range of 1 millisec to 2 millisec.

I guess this begs another question too. What's the frequency of this pulse train?

Chris
 

bob83

May 11, 2013
7
Joined
May 11, 2013
Messages
7
Thanks for the reply, guys. Firstly, may I thank you in advance for your patience, if any of my ideas are based on a misconstrued understanding if things.

I suppose I ought to give you a proper understanding of what I'm trying to achieve - I'm trying to design a laser range finder, which would operate on the following principle:

1. An infrared laser diode is driven by a PWM circuit, of the type used to test rc airplane servos, at a pulse width of 1 millisecond, at a frequency of 50 hertz.

2. The resulting beam is reflected off a surface, of yet undetermined distance away.

3. An infrared photo diode, mounted near the laser diode, detects the reflected laser beam and the signal it is sending - which will now be out of phase (if that's the correct term) by half the speed of light from the original signal.

4. This returning signal will be added to the original signal (probably a whole new question in itself, but I'm assuming possible, with the use of a transistor amp, or whatnot) - the result will be a signal pulse which is wider than the original signal, proportionate to the distance the return signal travelled.

5. This combined signal will then drive a servo, which will be at -90 degrees, plus the range detected, which will then serve as a meter, to indicate distance.

6. However, due to the high speed of light - the phase shift will be miniscule for any short and useful distances, which is why I will need to stretch the return signal first. I've calculated that by stretching it by about x 180, each degree of turn on the servo will represent about 5 metres of distance, which will be good enough.

I'm assuming that existing laser range finders operate on a similar principle (perhaps without a servo, and different type of signal). So I do feel a little like a caveman trying to reinvent the wheel from scratch, but I want to create a circuit in terms that I can understand, without the use of overly complex ICs/microprocessors, if possible.
 

bob83

May 11, 2013
7
Joined
May 11, 2013
Messages
7
Actually, it would be the difference in phase between the signals that would need stretching - not the signal itself? Or shorten the original pulse width. Will need to think over when in logical frame of mind.

Hopefully you get the general idea behind what im trying to do.
 

bob83

May 11, 2013
7
Joined
May 11, 2013
Messages
7
Okay, so scrapping the idea of stretching the entire return signal (which would produce a minimum pulse width of 180 milliseconds, even less useful), between steps 3 and 4, would be the following:

3.1 The return signal (B) will be stripped of the original signal (A), through use of one or other logic gates (so that output is only on when A is off but B is on), leaving a signal which comprises only of the difference in phase between the sent and received signals.

So, will this fly? And how do I stretch the signal (been reading up on r/c filter followed by Schmitt trigger...not sure if I'm getting warm)?
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Others may have a different opinion but I find using a servo as an analog meter to be impractical.

Chris
 

bob83

May 11, 2013
7
Joined
May 11, 2013
Messages
7
I understand what you're saying Chris, in at least that it complicates matters. I suppose the alternative would be to use some sort of micro controller to display the pulse width (range) digitally. However, even if I were able to do that in practice - it is still somewhat beyond my theoretical knowledge - and I wish to build something that I know WHY and HOW it works.

Also, if I use a servo, I will have an immediate method of adapting my gadget for a purpose where a mechanical output is required (i.e. using it as some sort of range control system - which might possibly be calibrated by adjusting the original pulse width).

I'm now definitely thinking using an r/c filter followed by a Schmitt trigger is (based on my limited theoretical knowledge) the best way of stretching the pulse, getting it to work to the proper ratio in practice will be a different matter...

Please don't hesitate to debunk any of my ideas if they are crackpot - if they don't have a chance of working, I'd rather not run with them.

Bob
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
I wouldn't be worrying about the indication yet. Measuring time intervals that short requires special techniques and knowledge. I don't have that knowledge; all I can do here is point out a few numbers and warnings.

Light travels at 3x10^8 m/s. That's 300 metres per microsecond. That's one metre in 3.33 ns (nanoseconds). The time for the round trip is double that; 6.67 ns per metre. So if you want your measurement to resolve to, say, 15 cm (about 6 inches), your timing circuit needs to resolve to 1 ns. This time interval corresponds to a frequency of 1 GHz, way up into the high RF range. Therefore you will need to use techniques used in high-speed digital and RF design such as careful impedance matching and transmission line techniques.

You will also need a laser driver that can deliver a pulse with a rise time less than 1 ns and a light detector with a similarly fast response.

These are just a few of the problems you'll have to solve. There are other problems that I haven't even heard of. You'll need serious guidance from someone with experience with this type of technology.

I would go for a sound-based system. The figures are about six orders of magnitude easier to deal with :)
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I wouldn't be worrying about the indication yet. Measuring time intervals that short requires special techniques and knowledge. <snip>your timing circuit needs to resolve to 1 ns. This time interval corresponds to a frequency of 1 GHz, You will also need a laser driver that can deliver a pulse with a rise time less than 1 ns and a light detector with a similarly fast response.<snip>

Ha, the Servo end of this project totally obscured much bigger issues. This really is the proverbial "Forest through the trees" at my end! ;)

Chris
 

bob83

May 11, 2013
7
Joined
May 11, 2013
Messages
7
Thanks, Kris and Chris

That's been most helpful.

I'm going to give it a bit more thought - and get back here (if the missus will let me - I think she's getting a bit suspicious of me sneaking onto the laptop at strange times of day and night, probably thinks I'm secretly visiting a different type of website alltogether :D )

Bob
 
Top