Maker Pro
Maker Pro

Square wave signal with ADC converter

Hi,
I have a 7Hz 5Vpp square wave signal, you give me an advice on an easy way, to turn that signal into the corresponding DC voltage, so I can read it through the microprocessor's ADC converter?

Thank you.
 
If the squarewave has a 50% duty ratio then simple smoothing should result in HALF the signal amplitude i.e. your 5V signal will give a 2.5V output therefore a x2 buffer will give the 'real' voltage.

If the duty cycle is variable you have a few more issue to resolve. There are some dedicated frequency-to-voltage converter ICs out there - check out the LM2907 as an example.
 
If all that you are interested in is the DC level of the signal then, a peak detector is all that you need otherwise, do as Kellys_eye suggests.
 
If you are trying to measure something, something ought to be varying. You have not told us what. It might be the frequency, the peak voltage, the duty cycle, or something else. So, what are you trying to measure?

Bob
 
the request is:
take a square wave signal with a fixed width of 0-5V and a variable frequency (3Hz to 10Hz, approximately) and convert it into a continuous signal ...
I hope I was clear...
 
I have never used a modern microprocessor to measure voltages but surely the ADC can be actuated fast enough to enable the average, however you define this, to be calculated.
 
Why can't you use the micro's ADC directly to sample the voltage and deduce the peak value (if that is what you want) from the measured samples?
 
the request is:
take a square wave signal with a fixed width of 0-5V and a variable frequency (3Hz to 10Hz, approximately) and convert it into a continuous signal ...
I hope I was clear...
You are far from clear.

I have no Idea what “a fixed width of 0 to 5V” means. Volts is not a measure of width, and 0 to 5 is not fixed.

“Variable frequency” I can understand.

“Convert it to a continuous signal” again has no clear meaning. If I output a steady 5V I would meet that requirement, but I doubt that is what you want.

So how is the output signal related to the input signal? You still have not answered that crucial question.

Bob
 

hevans1944

Hop - AC8NS
Why is it so hard for people who come here asking for help to tell us up front wtf they are trying to DO? I agree 110% with @BobK, the OP is far from clear. I think @Ian should consider a permanent ban on those who require an extended exchange of questions by EP responders and "answers" by the OP, that do not clarify, just to simply get a coherent and specific message across of what exactly the OP is trying to DO. Makes me think this sort of person is just a troll wasting our time.

We are now up to three responses from the OP and still nothing that defines the problem.

Hop
 
Top