
General Electronics Chat Discussion forum for general chat about anything electronics related, including asking questions about material in the All About Circuits Ebook, Worksheets, and Videos. 

Thread Tools  Display Modes 
#1




Sine wave generation  logarithmic shaping
Greetings!
Could anyone possibly explain, from National Semiconductor's AN263 "Sine Wave Generation Techniques" page 11  Logarithmic Shaping, how the "logarithmic relationship between Vbe and collector current in transistors" shapes a triangle wave to an approximation of a sine wave? Maybe my math isn't up to the task, but I don't see how a logarithmic response becomes a sine wave. http://www.national.com/an/AN/AN263.pdf I wasn't able to get this shaper working, although admittedly I changed it based on what I have at hand. Still, I always understand circuits better when I know the why as well as the how. Thanks! 
#2




It's math, essentially.
integrate square wave = triangle wave integrate triangle wave = sine wave differentiate sine wave = triangle wave differentiate triangle wave = square wave When you integrate or differentiate some waveforms, you will often find a natural logarithm or exponent show up.
__________________
Nifty? Click Here to see how to make your formulas Look GOOD! Bypass Caps! Read Me AlsoImpedance Graph paper. 
#3




The circuit you're looking at generates a sine wave from a triangle wave by using the properties of the differential pair of transistors contained in the LM394. The transconductance of a differential pair of transistors is defined to be:
Where I_o is the tail current, Vid is the differential input voltage, and VT is the thermal voltage  26 mV at room temeperature. In the case of this circuit, the output voltage will be approximately: Where RL is the 100 ohm load resistor on the output. The division by 2 happens because you're only taking a single ended output, not a differential output. So the output voltage will be a function of the input voltage and the hyperbolic tangent. The first few terms of the Taylor series of the sine and hyperbolic tangent functions are: Sine: Hyperbolic Tangent: If you compare the two Taylor series you will see that they are both linear to first order. What this means is that if you apply a triangle wave to a differential pair with a hyperbolic tangent transfer function, and keep the amplitude _low_, what you get out should be indistinguishable from a sine wave! That's the purpose of the two 5k resistors and the 200 ohm resistor in the circuit going into the differential pair  it's to divide down the triangle wave signal from the oscillator in an attempt to keep the circuit operating in the amplitude range where the output is a low distortion sine wave. You can take a look at this paper for some more of the math involving analysis of a similar circuit, including THD calculations: http://electrooptical.net/www/sed/TanhSineShaper.pdf The original National paper certainly doesn't explain the method very well, but the hyperbolic tangent approximation to a sine is what the circuit you refer to is using. Last edited by bitrex; 01042011 at 05:26 AM. 
#4




Visualize the difference in a linear graph and a Log graph.
The lines in a log graph get closer together as you go from 1 to 10. A sine wave shape on a linear graph will produce an almost straight line on a log graph. Therefore a linear voltage ramp (triangle wave) can generate a sine wave if the resistance (base/emitter) has a logarithmic response to current flow in the collector. When graphed linearly of course!
__________________
I'm too old. 
#5




Aha! Thank you bitrex!

#6




bitrex's explanation made sense but your simpler one doesn't. There's no capacitor in the circuit after the triangleproducing integrator. The notes specifically say "The LM394 dual transistor is used to generate the actual shaping..."

#7




It was a 40 years old way to make a pretty poor sinewave.
About 10 years ago I made a stepped sinewave from a CD4018 digital IC. It had 10 steps. It made an "oversampled" sinewave. Then I used a switchedcapacitor 8thorder Butterworth lowpass filter IC to remove the remaining harmonics so the distortion was only 0.005% or less. 
#8




As AudioGuru says, it can get you in the ball park without being perfect. I've used back to back diodes, and just looking at it it is hard to tell the difference. However, overlay it with a good sine wave and it jumps out at you.
555 Function Generator
__________________
.. "Good enough is enemy of the best." An old engineering saying, Author unknown. General info: If you have a question, please start a thread/topic. I do not provide gratis assistance via PM nor Email, as that would violate the intent of this Board, which is sharing knowledge ... and deprives you of other knowledgeable input. Thanks for the verbage Wookie. 
#9




Quote:
All in my poorman's quest to try getting a sine wave for testing purposes without having to buy a proper function generator. 
#10




Mine too, which is why I worked on that circuit (and will again). They sell a lot of function generator chips out there, which IMO is the best way to go around it. I don't like digital shaping circuits because the oscillator has to run at least 10X the output waveforms speed (probably more). If you are willing to truly shape the waveform you can use multiple diodes (8 or more) that slowly hand off the shaping duty when it enters the next circuits domain. Problem is, there are frequency response considerations, just because it works at one frequency doesn't mean it will work on another.
The dual diode method I explored is close enough for me. If I need a precision sine wave I'll build something that does it from scratch, and not worry about the other waveforms. Bill's Index Sine Wave Oscillators A PDF abstract by TI
__________________
.. "Good enough is enemy of the best." An old engineering saying, Author unknown. General info: If you have a question, please start a thread/topic. I do not provide gratis assistance via PM nor Email, as that would violate the intent of this Board, which is sharing knowledge ... and deprives you of other knowledgeable input. Thanks for the verbage Wookie. 
Tags 
generation, logarithmic, shaping, sine, wave 
Related Site Pages  
Section  Title  
Worksheet  Logarithms for analog circuits  
Worksheet  Design Project: audio mediabased signal generator  
Worksheet  Design Project: Simple component curvetracer circuit  
Worksheet  Passive integrator and differentiator circuits  
Worksheet  Mixedfrequency signals  
Textbook  AC voltmeters and ammeters : Ac Metering Circuits  
Textbook  More on spectrum analysis : Mixedfrequency Ac Signals  
Textbook  Other waveshapes : Mixedfrequency Ac Signals  
Textbook  Square wave signals : Mixedfrequency Ac Signals  
Video Lecture  Generation of Alternating Voltage  Alternating Current 
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Modifed Sine Wave Inverter  aliman1  The Projects Forum  23  12102010 11:09 PM 
sine wave generation  electronics1  General Electronics Chat  3  01182010 02:48 AM 
Sine wave generation  ecslabsiuc  The Projects Forum  2  09232009 06:35 PM 
triangular to sine wave  kahafeez  The Projects Forum  13  12162008 07:27 PM 
Sine Wave Generation  kaleanae  Programmer's Corner  6  11132007 08:22 AM 
Thread Tools  
Display Modes  

