Go Down

Topic: Square wave from crystal oscillator (Read 1 time) previous topic - next topic


I have Googled and was not able to find a proper circuit for generating square wave from crystal oscillator. I am planning to use a Schmitt trigger to convert the sine to square. But how do I get sine from the crystal. Do i just need to apply a 5V dc across the terminals??


Try... Googling Crystal Oscillator and read until you understand what you are reading.

--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard


But how do I get sine from the crystal

By putting it AS PART of a crystal oscillator circuit. There are lots and lots to chose from, but without knowing what frequency the oscillator is it is hard to give any advice.


What I need is a perfect 1hz square wave and don't want to use timers or op-amps. I am planning to use a 12Mhz crystal and do freq division.


12MHz isn't the ideal crystal.  32.768Mhz is better
See the attached for all you need


A crystal by itself does not oscillate.   It's a resonant device something like a bell or a guitar string, and something needs to activate or "excite" it, to get it started and keep it going.

You can buy a crystal oscillator like this for 3 or 4 times the price of a crystal alone.   (That example is the wrong frequency).   You'll probably still need a frequency divider.   These have 3 connections:  +5V, ground, and output.   (There is usually a 4th unused pin.)

Most circuits you'll run-across will either use one of those oscillators, or in the case of a microprocessor/microcontroller (like the Arduino) the oscillator circuit is built-into the chip, and an external crystal is used.    You'll almost never see a crystal oscillator made "from scratch". 


Jun 17, 2013, 11:52 pm Last Edit: Jun 17, 2013, 11:53 pm by dc42 Reason: 1
I'd use an ATtiny25 with a 32768Hz crystal attached. I can't think of any other solution that uses only 3 components (including the decoupling capacitor). However, if you don't have the means to program an ATtiny then you will need a different solution, such as an MC14521B oscillator/frequency divider with a 4194304Hz crystal, 2 load capacitors and 2 resistors for the crystal, and a decoupling capacitor.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.


Perhaps the simplest method would be to use a DS1307 and program it for a 1 second output pulse, The chip is quite capable of that and there are instructions in great plenty here in the Forum and the Playground too...
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131