Removing DC Offset

Adjuster

Joined Dec 26, 2010
2,148
Here you go. Now probe the base current. Admittedly the generic NPN model is unrealistic, but I bet you find its, erm, a lot bigGA than you expect.

Edit: As you will see in the second graph, the apparent base current is ridiculously big. Of course, in practice the current would be less, but the transistor would surely fail. The collector voltage is more interesting with this triangular waveform. For base voltages above about 1.5V normal saturated behaviour breaks down, or at least the model behaviour suggests that it does.

The remedy for this is simple, fit a base series resistor. The final graph shows a result with this done.
 

Attachments

Last edited:

Thread Starter

chrisw1990

Joined Oct 22, 2011
551
oh =[ doesnt work at all now with that base resistor in
right, now it works..
think its sorted, take a look, any discrepancies, im sure you will point out :D
 

Attachments

Last edited:

Adjuster

Joined Dec 26, 2010
2,148
Well, there is no way that a small transistor would survive having its base connected to a true voltage source of several volts with the emitter grounded and no series resistance.

You probably will find your transistor utterly saturated when you add a series resistor of 1k or so, simply because your signal is too be fed straight into a common-emitter amplifier. Perhaps you need to rethink your circuit configuration.
 

SgtWookie

Joined Jul 17, 2007
22,230
Another thing for you to look at...

After the sim runs, click on the plot pane, then hit Ctrl+A to add a trace.
If you're running your sim, click on v(input); mine v(sigin)
Then edit it to say (v(sigin)-1.61)*1.9, and click OK.
You can now get an idea of how distorted the output signal is by comparing it to the input signal. You can adjust the formula to best fit the output.
 

SgtWookie

Joined Jul 17, 2007
22,230
how do you run the temp up and down on the simulator?
Did you look at my schematic and simulation?
The ".step temp <start temp> <end temp> <increment>" SPICE statement is shown at the bottom, after the .tran statement.

and why that equation for vin?
The input is a perfect sinewave. You can perform mathematical operations on any of the available signals and plot them. If you use an equation on vin like I did, you'll see a perfect sine wave about the amplitude of your output on the plot.

You could even subtract one plot from the other, to just show the difference.

[eta]
On your simulation, if you want to leave Q1 as the default transistor, try plotting V(output) and (V(input)-1.68)*1.983, you'll see the distortion near 0v.

Then try changing the transistor Q1 to a 2N3904, change R4 to 43, and plot V(output) and (V(input)-1.614)*1.9.

As I mentioned above, you could also just plot (V(input)-1.68)*1.983-V(output) to see a plot of the amount of error your circuit is introducing.

[eta]
Have a look at the attached. The upper plot shows the amount of error over temperature.
 

Attachments

Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
I added another screen print image to my prior reply.

On the plot, I'd right-clicked and selcted "Add plot pane", then right-clicked again and selected "Add trace". Then I selected my "v(sigin)", and edited in the rest of the equation.

You can right-click the expression of any plot and edit it.
 

Thread Starter

chrisw1990

Joined Oct 22, 2011
551
thats a pretty nifty trick! i had managed to do the equation part, i mean, how did you do the temperature bit? how did you put that .step temp 0 50 25 into the spice model?
 
Top