Search This Blog

Saturday 25 August 2012

Getting to know simulation - Part5 - Transient Simulation

So far so good for DC, but we still need to know the characteristic for fast changing sensor output – what’s the waveform going to be. Let us replace Vsensor from DC 1V to Step 1V by double click on the source and configure the output to be 1V Step voltage with 2ms delay:

To ease subsequent examples about simulation, change some of the op amp settings by double click on it, change as below:


  
To plot the waveform, insert a probe at the output of buffer (short cut “B”)



Then choose Transient analysis:
And you would get nice waveform as shown below:

So far so good - but is it too good to be true?

Getting to know simulation - Part4 - insert basic buffer amplifier


To continue from previous post, let’s modify the circuit above as below
1.       Insert a parameterised opamp from menu Place –> Analog Functions ->  Parameterised Opamp
2.       Insert a +/-15V DC supplies from menu Place –> Voltage Sources ->  Power Supply
3.       Insert off-page connectors from menu Place -> Connection -> Terminal
4.       Wire up the opamp as x2 buffer amp using 1Meg Ohm resistors (so that 1V full scale sensor output will translate to 2V full scale ADC input). Route the circuit accordingly, re-run DCOP simulation and you get:
Now with the buffer – we get pretty good DC result – 1V sensor translated into ~2V adc input. For now, don’t concern yourself with the ~20mV error (2V – 1.97997V), we will cover this some other time.

Saturday 18 August 2012

Getting to know simulation - Part3 - using DCOP

Let’s look at the reason we need to design the buffer. If we direct connect the sensor to adc input –
We will have 1V * 1k/(100k + 1k) ~= 10mV only, clearly this is not acceptable. Note that in Mindi, instead of using R1, R2 ... you can right click on component and change its name, in this case Radc is the name chosen to represent the ADC.

To simulate – all spice required “Ground” symbol for reference, so let’s insert one as below, double click on V1 and rename it to Vsensor, and change name of R1 to Rout.
We want to know the voltage at ADC input, so place voltage marker on the interconnect node for Rout, Radc to see the voltage



Schematic after placing marker:
Then choose simulation mode to be DCOP
And click “Run”


Now you see the need for buffer circuit. DCOP is the first thing that I recommend for any simulation, since it let you see the DC biasing in the schematic itself  – especially when the circuit is much more complicated than this. You can place as many markers as required.

Getting to know simulation - Part2 - Modeling


Let’s get started by modeling the blocks in schematic – knowing how to model is critical – else it will be GIGO (Garbage-In-Garbage-Out).

1.       Modeling of the sensor to ease design process – if you look at sensors such as microphone, transducer, you would find that most of them if not all do not have “Low output impedance”, which means, you cannot use a voltage source to model it. So let’s model our sensor as below, the values of R1, R2 is not important, which will become clear at this end of the series: in this case, output of the sensor is 1V.
2.       As for the ADC,  to ease design process let’s use a 1kOhm resistor to represent it – it is the load of the buffer circuit, at the end of the series, you will know why this is good enough

Getting to know simulation - Part1 – Introduction

Getting to know simulation - Part1 – Introduction

In circuit design - simulation tools will ease your life a lot - if you know what you are doing. As such I am writing a series of posts that I hope will best help you to understand what you can do with simulation - by using a buffer amplifier design example. The goal is to introduce basic features such as
  1. DCOP
  2. TRAN
  3. AC
  4. Multi-Step
  5. Monte-Carlo
Let’s take an example as below:

1.      Supposed that we need to design something that interface a sensor to ADC, so we have
a.      sensor
b.      The ADC
c.       And something in between – a voltage buffer – and this is what we need to design
2.      To supplement the design example, let’s put some more details
a.      Sensor bandwidth is at least 10kHz
b.      Sensor can swing from 0V to 1V
c.       ADC full range voltage is 0V to 2V.
Since I am a user of Mindi from Microchip, I will use Mindi as examples, but essentially all simulation tools have the basic set of features. If you want, you can install Mindi mentioned from my earlier blog (In this case, you can quickly test out the example)http://electroniccircuitdesignsharing.blogspot.com/2012/03/tools-for-circuit-design.html.

Alternately, you can down load SIMetrix from http://www.simetrix.co.uk/site/demo.html, which is essentially the same thing as Mindi (just the name different as far as I am concerned, same GUI, same file type....)

My advice is to play around with your simulation tools, knowing the capability of what it can do will make your life a lot more fun :). So wait for Part 2 to get started.

Thursday 2 August 2012

3D Visualization Of Bad Decoupling Capacitor Placement

Placement matters: what happen when a decoupling capacitor being placed far far away from the IC that it is supposed to decouple? Compare diagram below to those in previous posts:


This time, I have removed all traces that that is not related to positive supply decouling capacitor discharge path. Obviously in this placement, the decoupling capacitor discharge path is much longer that those in posts stated above.  In this case there are much larger series inductance that discourage good decoupling performance (as it is more troublesome for capacitor to discharge).

Top view of top signals – positive supply decoupling capacitor discharge path



Top view of bottom signals – positive supply decoupling capacitor discharge path