Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

sine wave to digital square

Status
Not open for further replies.

saurabheda

Junior Member level 3
Joined
Oct 16, 2011
Messages
25
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,460
given is a sine wave [ voltage range is 0-10V peak to peak ]..
i need to feed one of the input ports of a microcontroller (AT89S51) with a square wave-

1.) of same frequency as that of the sine wave given and

2.) ofcourse with voltage levels compatible with logic level specifications at the input of microcontroller.

please help me out..
 
Last edited:

You can use a sampler with obvious;y the double frequency as that of the Sine wave and then pass it through a frequency divider and voltage limiter.
This will get you a square wave of the same frequency as that of the Sine wave...
 

More specifically voltage comparator with non inverting input connected to a potential in the middle of the sine and with opel collector output. The last one is very important because it allows for outputting singnal levels different to supply voltage, which must be quite high for the comparator to be able to operate at 0-10 V. Such kind of comparator is LM319.
 
dear rakesh..
the sine wave given is of unknown frequency..and i have
to design a fixed logic..please elaborate the concept of sampler, frequency divider and voltage limiter..

---------- Post added at 06:26 ---------- Previous post was at 06:23 ----------

@ barry
are you talking of a schmitt trigger..?
and can i use a voltage regulator IC to limit the voltage of square wave within the logic level specification..?

---------- Post added at 06:28 ---------- Previous post was at 06:26 ----------

@ poorchava
please help me with a circuit diagram....
 

Yes...
Sorry to be too early to answer..
And the answers following were really good for me as well to increase my knowledge..
I would help you when i can...

---------- Post added at 17:37 ---------- Previous post was at 17:36 ----------

Yes...
Sorry to be too early to answer..
And the answers following were really good for me as well to increase my knowledge..
I would help you when i can...
 

dear rakesh..
the sine wave given is of unknown frequency..and i have
to design a fixed logic..please elaborate the concept of sampler, frequency divider and voltage limiter..

---------- Post added at 06:26 ---------- Previous post was at 06:23 ----------

@ barry
are you talking of a schmitt trigger..?
and can i use a voltage regulator IC to limit the voltage of square wave within the logic level specification..?

---------- Post added at 06:28 ---------- Previous post was at 06:26 ----------

@ poorchava
please help me with a circuit diagram....

Bro use a simple voltage comparator with required ref. voltage (ref voltage = 0, will be ok if the sine doesn't have any offset). Connect out put of this comparator to 5 or 3 v zener diode THROUGH A SERIES RESISTOR.

Hope this helps
Good Luck.
 

Yes, a schmitt trigger. If you use an open-collector comparator, you can just pick your pull-up voltage to be whatever you'd like, or if you use a totem-pole output type, pick the supply voltage to meet your requirements. You just have to consider your frequency, power requirments, etc.
 

@ poorchava
please help me with a circuit diagram....

I can't quite draw a schematic, becuase I'm on buisiness trip currently and I don't have access to any schematic drawing software. But you can just check the datasheet. I think you can find the circuit in application info.
 

ok..
but the square wave generated should have logic '1' and '0' with TTL specifications..
does the 3v or 5v zener would work well..?

---------- Post added at 11:18 ---------- Previous post was at 11:17 ----------

ok..
but the square wave generated should have logic '1' and '0' with TTL specifications..
does the 3v or 5v zener would work well..?
 

you mean zener instead of comparator? Then the answer is no. No reason to looks for cheaper solution as lm319 costs like $0.50
 

[w.r.t. anandpv2009] no..i didnt mean that actually..i agree with the voltage comparator..then a zener in conjunction with this..
i am asking Would the 3 or 5V zener would bring the output to two TTL states- logic '1' and logic '0'..?

---------- Post added at 05:37 ---------- Previous post was at 05:27 ----------

[w.r.t. anandpv2009] no..i didnt mean that actually..i agree with the voltage comparator..then a zener in conjunction with this..
i am asking Would the 3 or 5V zener would bring the output to two TTL states- logic '1' and logic '0'..?
 

Yes, i think that could work, but you have to use some resistor in series with output to limit current flowing through zener.
 

Dear Saura,

you can use the below circuit


R1_____________1M 1/4W Resistor
R2___________100K Linear Potentiometer

C1,C2________100µF 25V Electrolytic Capacitors
C3____________10nF 63V Polyester Capacitor

D1,D2_______1N4148 75V 150mA Diodes

IC1___________4069 Hex Inverter IC

regards
Sreekanth Reddy. C
 
  • Like
Reactions: bugme

    bugme

    Points: 2
    Helpful Answer Positive Rating
@ sreekanth
ok..but would it work well for input voltage range of 0-10V..?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top