Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

measure pulse width with a counter...other ways??

Status
Not open for further replies.

xmat

New Member
Hello, there.

I have a "pulse generator" generating randomly one pulse at a time, which may have a different time duration (the pulse is not repeated like in pulse width modulation).

I want to insert this "information" to a digital volume potentiometer...

Which means that so far the only way I found is through a microcontroller acting as a counter..

Is there another (newer/more efficient/quicker) way??

Bear in mind that the pulse (variable) duration is from 250us to 3ms..

I hope someone could help, it seems like a challenging question..

Any hints would be greatly appreciated,

xmat.
 
xmat said:
Hello, there.

I have a "pulse generator" generating randomly one pulse at a time, which may have a different time duration (the pulse is not repeated like in pulse width modulation).

I want to insert this "information" to a digital volume potentiometer...

Which means that so far the only way I found is through a microcontroller acting as a counter..

Is there another (newer/more efficient/quicker) way??

Bear in mind that the pulse (variable) duration is from 250us to 3ms..

I hope someone could help, it seems like a challenging question..

Any hints would be greatly appreciated,

xmat.

I don't see how you could have anything "(newer/more efficient/quicker)" than using a micro-controller? - it's current technology, it's a single chip solution, it's cheap, and faster than it needs to be - how could it be improved?.

As you've got to feed digital information to a digital pot, you need a device to do that - a micro-controller is the obvious solution, so you may as well do it all in the micro-controller.
 
thanks

Ok, I see your point.

Thank you very much for your response, really appreciated.

The only reason I asked this question is because there is a slight possibly for even quicker pulse durations in my application..like from 10us to 300us..

The problem then would be that it takes the microcontroller i.e 50us to "count"..So I am missing certain pulse duration..What then??

I know microcontroller benefits, I just though it did not hurt to ask if any of you is aware of any familiar to the subject "cutting edge" evolutions for even "smarter" pulse duration estimation methods..

That's about it.

Thanks in advance,

xmat.
 
when you do project you have to set some limits. in your case you need
to decide how w short pulses are too short so they can be ignored.
if you only need to measure pulse length of 10us..3ms (10..3000us) just use counter. say you have 1MHz oscillator, that would give you pulse every single us. if you use AND gate, you could count 10..3000 pulses
for input pulse duration of 10..3000us. neat huh? if you use 10MHz signal you would count 10x more. this is an easy way to increase resolution when required. if you don't need it, just lower the clock rate to get something that suits the application.
 
You could program a counter into a CPLD. Xilinx has CPLDs capable of up to 200MHz though about 50MHz is probably a lot more realistic. A fair sized CPLD is about $5 on digikey.com. The design software is fairly easy to use and is free.
 
application explanation

Ok, thank u very much for your advices..

Here is an explanation of what I am trying to do:

I am feeding many audio signals (randomly in time and of varying in amplitude)

into a special designed circuit that has at its end a comparator (LM321) which

produces pulses of varying duration in relation to the audio signal's amplitude.

Then I feed those pulses into a digital volume potentiometer than controls the audio volume of a tone generator.

I want the whole procedure to be as fast as possible,

while the conversion of a pulse (digital info) into a tone of varying amplitude (analog info) could be as "dynamic/expressive" as possible.

I hope I made myself clear on that.

Thanks in advance,

xmat.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top