Square Wave Generator: Design Help for Senior Project

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
7 replies · 9K views
Rawsome
Messages
1
Reaction score
0
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 doesn't work.

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

please help
 
Engineering news on Phys.org
i tried this before and it works. did mine with +-5V. i think you were using +vcc and gnd. the square isn't 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
 
I'd just use a 4060 CMOS oscillator/counter with a 32kHz watch crystal:

http://www.national.com/ds/CD/CD4020BC.pdf
 
Last edited by a moderator:
berkeman said:
I'd just use a 4060 CMOS oscillator/counter with a 32kHz watch crystal:

http://www.national.com/ds/CD/CD4020BC.pdf
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
 
Last edited by a moderator:
dlgoff said:
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

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.
 
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?
 
try a 555 IC in astable mode...