Square Wave Generator: Design Help for Senior Project

In summary, the conversation revolved around designing a square wave generator that outputs a 32kHz, 5Vpp square wave. The circuit suggested on a website did not work and the person was using a lm339 quad comparator with specific values for R, C, and resistors. Another person suggested using a 4060 CMOS oscillator/counter with a 32kHz watch crystal and explained the purpose of the variable cap on the crystal. Another suggestion was to use a 555 IC in astable mode.
  • #1
Rawsome
1
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
  • #2
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
 
  • #3
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:
  • #4
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:
  • #5
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.
 
  • #6
Most crystal oscillators need a loading cap.
 
  • #7
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?
 
  • #8
try a 555 IC in astable mode...
 

Related to Square Wave Generator: Design Help for Senior Project

1. What is a square wave generator?

A square wave generator is an electronic circuit that produces a square-shaped waveform with a constant amplitude and alternating between two voltage levels, typically 0V and a positive voltage level. It is commonly used in electronic devices to generate clock signals, trigger signals, or as a test signal for other circuits.

2. How does a square wave generator work?

The basic principle of a square wave generator is to charge and discharge a capacitor through a series of switches or transistors. When the capacitor is charged, the output voltage is at a high level, and when it discharges, the output voltage drops to a low level. This process repeats, creating a square-shaped waveform.

3. What are the main components of a square wave generator?

The main components of a square wave generator include a power supply, a capacitor, resistors, and switches or transistors. The power supply provides the necessary voltage, the capacitor stores the charge, and the resistors control the charging and discharging of the capacitor. The switches or transistors are used to switch the circuit between charging and discharging modes.

4. What factors should be considered when designing a square wave generator?

When designing a square wave generator, several factors need to be considered. These include the desired frequency and amplitude of the output waveform, the stability of the circuit, and the accuracy of the timing components. Additionally, the type and quality of the components used can also affect the performance of the circuit.

5. Are there any common issues or challenges when designing a square wave generator?

Yes, some common issues when designing a square wave generator include achieving precise timing, minimizing distortion in the output waveform, and reducing noise and interference. Additionally, the circuit may also be affected by temperature changes and component tolerances, which can lead to variations in the output waveform. Proper testing and troubleshooting techniques can help address these challenges.

Similar threads

Replies
6
Views
4K
  • Electrical Engineering
Replies
9
Views
3K
Replies
5
Views
1K
Replies
3
Views
945
Replies
2
Views
6K
  • Electrical Engineering
Replies
4
Views
1K
Replies
4
Views
3K
  • Electrical Engineering
Replies
9
Views
16K
  • Electrical Engineering
Replies
18
Views
2K
  • Electrical Engineering
Replies
4
Views
2K
Back
Top