Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Square Wave Generator

  1. Nov 16, 2007 #1
    im working on my senior design project and was looking for some help in designing a square wave generator that outputs a 32khz, 5Vpp square wave. i found a site that shows a circuit

    http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/square.html

    but when i connect the circuit for some reason it doesnt work.

    im using a lm339 quad comparator
    R=14kohm
    C=0.001uf
    r1=r2=100kohm
    5V supply

    please help
     
  2. jcsd
  3. Nov 16, 2007 #2
    i tried this before and it works. did mine with +-5V. i think you were using +vcc and gnd. the square isnt really square, a bit like trapezoidal, so i'd recommend putting some sort of trigger or inverter to get a nice square wave
    also make sure your lm339 has the bandwidth to do what you want to do
     
  4. Nov 16, 2007 #3

    berkeman

    User Avatar

    Staff: Mentor

  5. Nov 16, 2007 #4

    dlgoff

    User Avatar
    Science Advisor
    Gold Member

    Could you explain the reason for the variable 39pF cap on the xtal? I'm thinking it's for tweeking the freq. but not sure.

    Thanks
     
  6. Nov 16, 2007 #5

    berkeman

    User Avatar

    Staff: Mentor

    Interesting, I didn't even notice that variable cap in the datasheet. It would allow you to bend/tweak the oscillation frequency as a fine-tune, like in a watch or clock. That 32.768kHz crystal (note the binary number, so it divides down to exactly 1 second with a ripple counter) is used in many time-keeping devices. Maybe the cheaper ones need a little fine tuning, or maybe the 200ppm typical spec for many crystals is not accurate enough for clocks.

    Let's see, +200ppm is 1.000200, so at the end of 60 minutes, your watch would read 0.7 seconds fast. At the end of a day, you would show 17 seconds fast, which is probably why they add the variable cap for watch/clock applications. Interesting.
     
  7. Nov 16, 2007 #6
    Most crystal oscillators need a loading cap.
     
  8. Nov 18, 2007 #7

    dlgoff

    User Avatar
    Science Advisor
    Gold Member

    When I was a youngster, an old ham showed me how to take a crystal (the ones that have a small removable plate) and use a lead pencil on the crystals surface (an erase as needed) to tweek the frequency. Ever heard of that?
     
  9. Nov 18, 2007 #8
    try a 555 IC in astable mode....
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Square Wave Generator
  1. Square Wave Generator (Replies: 7)

Loading...