# Generating a 38kHz Sine Wave

#### brightnight1

Joined Jan 13, 2018
91
I'm trying to simulate and then build a circuit I found in a Vishay application note. In the schematic there is a 38 kHz sine wave going into a NAND gate. What options are there for generating a sine wave? Are there chip solutions? I think I want an actual sine wave and not a square wave from a 555 timer or something like that.

#### dl324

Joined Mar 30, 2015
16,943
National Semiconductor AN-31:

If you integrate a square wave you get a triangle wave. If you integrate a triangle wave, you get a sine wave.

#### crutschow

Joined Mar 14, 2008
34,464
Why do you think you need a sinewave going to a digital gate?

#### brightnight1

Joined Jan 13, 2018
91
I assumed it was a sin wave because of the drawing but looks like a sine wave into a gate is a bad bad idea...

#### Papabravo

Joined Feb 24, 2006
21,227
I assumed it was a sin wave because of the drawing but looks like a sine wave into a gate is a bad bad idea...
A couple of points:
1. Looks more like a square wave with rounded edges.
2. 74xx parts usually have a power supply of +5 Volts and GROUND.
3. Sinewaves tend to have positive and negative peaks with an average value of 0 Volts aka GROUND.
4. The gate does not explicitly show the power (+5V) and GROUND (0 V) connections, but they damn skippy need to be there.

#### MrChips

Joined Oct 2, 2009
30,823
For driving an IR LED you do not need a sinewave. A square wave from a 555-timer circuit will work.

#### Papabravo

Joined Feb 24, 2006
21,227
For driving an IR LED you do not need a sinewave. A square wave from a 555-timer circuit will work.
The CMOS 555 will make a much better gate driver than a 7400 NAND gate.

#### DickCappels

Joined Aug 21, 2008
10,187
Don’t worry…if you drive an LED with a square wave it is pretty easy to turn it into a sine wave in the receiver/detector if it doesn’t happen automatically.

#### crutschow

Joined Mar 14, 2008
34,464
Note that the 38kHz for a remote control may require tweaking of a 555 astable to get it within the required frequency range.