Model for current output DAC in Spice

Hi all

I am just starting to use Spice to model analogue circuits for the audio out from DACs. Several DACs provide their output as a current swing. As an example, the classic TDA1541 sits at a -2mA current sink with no signal and then swings ±2ma for full level.

I know that a current source with both AC and DC characteristics is available in Spice but the actual behaviour of a 1541 o/p is going to be more complex than that e.g. a finite output impedance. I thought about modelling this as a resistor in parallel with the current source?

Also, what is connected to the other end of the current source? My two current thoughts are either ground or the -6V supply.

TIA

Michael
 
According the principle of superposition, an ideal voltage source (i.e. a -6v supply) referenced to ground has a source impedance of zero ohms. Thus it can be considered equivalent to ground for some purposes.

Since you don't know what the output stage inside 1541 actually looks like, and since the chip probably has a ground pin as well as a -6v supply pin, is there any test you could do to show that a model using a -6v DC bias is a better model for your purposes than using a model referenced directly to ground?

If there is no practical test you can do to observe the behavior of a black box from the properties of its terminals, then there must be no practical difference between the two models for your purposes.
 
I have created and attached a simple Spice simulation from this part of the actual circuit in a Marantz CD94 with a TDA1541 to try and develop a little insight. I'm just learning Spice but I think this has captured at least some of the necessary behaviour.

R2 and R3 come down from the +14V rail into the current source at I_out to provide the 2mA current that the DAC requires and to keep I_out at around 0V. With the op amp in circuit it's sitting at about -0.4mV.

I am modelling the DAC O/P as current source I1 in parallel with R6. 22k was arrived at by comparing measurements with the simulation. I removed the op amp and attached 3 different resistors to ground then measured the voltage across them:

  • 15 ohms -> -5.6mV
  • 7 ohms -> -2.9 mV
  • 4.7 ohms -> -2.1 mV

This simulation is not far from that but there is still room for improvement. For example, open circuit produced -400mV whereas this sim gives -2.1V. Of course, the + voltage rail may not be at exactly +14V (didn't measure it, this value is from the schematic) and the DAC might be pulling a little more or less than 2mA.

In the end, trying to get a better model than I1, R6 & V4 is what I am aiming for.

Anyway, it's a start. Interested in your thoughts.
 

Attachments

Hi all

I am just starting to use Spice to model analogue circuits for the audio out from DACs. Several DACs provide their output as a current swing. As an example, the classic TDA1541 sits at a -2mA current sink with no signal and then swings ±2ma for full level.

I know that a current source with both AC and DC characteristics is available in Spice but the actual behaviour of a 1541 o/p is going to be more complex than that e.g. a finite output impedance. I thought about modelling this as a resistor in parallel with the current source?

Also, what is connected to the other end of the current source? My two current thoughts are either ground or the -6V supply.

TIA

Michael

A resistor in parallel with current source will work fine. Don't forget the 2mA bias current of 1541.

As to the actual OP impedance of the DAC, I have not seen a figure for this but it should be fairly high, at a guess not as high as something like a
PCM1792 etc which has OPZ of around 1M.

If you are spicing up a discrete I-V that uses low / no feedback then the DAC OPZ will have major impact on distortion. So use a lowish value of say 2k and
then in practice your I-V should perform at least as good given the DAC likely has higher.

As far as what is connected to other end of spice CCS, spice just wants it terminated which IMV is a bit counter intuitive. For example you could have a
-10V circuit node (say emitter of NPN transistor) that you wish to source 10mA from, you might think that the CCS has to be connected to a more
negative point in circuit but it doesn't, the CCS can be connected to gnd and will work fine.

TCD
 
Thanks @MarcelvdG for that interesting link.

@Terry Demol, yes I have included -2mA in the DC condition of the current source. If I terminate it at ground then I get very different DC offsets than with -6V DC - nothing like the real measurements. I'm not sure if the attachment contains all the parameters etc but if so please run it yourself and see what Spice does with it.
 
Thanks @MarcelvdG for that interesting link.

@Terry Demol, yes I have included -2mA in the DC condition of the current source. If I terminate it at ground then I get very different DC offsets than with -6V DC - nothing like the real measurements. I'm not sure if the attachment contains all the parameters etc but if so please run it yourself and see what Spice does with it.

I would say just stick with -6V as would be correct in real life. My comment WRT spice CCS termination was an observation and it may have changed in newer versions or may not work in all instances.

My LTspice won't open the asc file.

TCD
 
@Terry Demol I'm a very new user of LTSpice on the Mac so I'm not sure what files are required. I have zipped everything with that name and attached it. I hope this works for you.

@MarcelvdG if you can get the Spice file working have a look and see what happens when you change the termination of the CCS. Not sure if this is what should happen in a real case or is a vagary of Spice.
 

Attachments

I'm sure it hasn't changed, an ideal current source is an ideal current source and conducts the specified current no matter what.

We are talking about CCS termination voltages. Ref pic below
 

Attachments

  • DIYA CCS Spice.jpg
    DIYA CCS Spice.jpg
    210.4 KB · Views: 192
I haven't tried and I have no intention to try it, but if you plot .png pictures of both versions I'll have a look if I can explain the difference.

Did you only reconnect I1 or also R6? Changing the connection of R6 will definitely affect the result.
 
Last edited:
Yes R6 is my attempt to model a non-ideal CCS as I believe most current output DACs have an output impedance well below the theoretical infinite value.

I have attached 2x PNGs with everything the same except where the CCS is connected at the other end. Note the difference in DC offset across the I/V resistor. Please ignore the previous DC offset - I don't believe I re-ran the sim after I changed the value of R6 to 8.2 ohms.
 

Attachments

  • CD94 I out with passive I:V - gnd conn.png
    CD94 I out with passive I:V - gnd conn.png
    41.1 KB · Views: 121
  • CD94 I out with passive I:V.png
    CD94 I out with passive I:V.png
    44 KB · Views: 127
The difference in the way R6 is connected changes the short-circuit current by -6 V/22 kohm = -272.72727272... uA. Multiplying that by the parallel connection of 8.2 ohm, 22 kohm and 2700 ohm + 4700 ohm is the difference in voltage that you see: -2.233056847 mV. When you reconnect I1 without changing R6, you won't see any difference.

As to which is more realistic: if I understand things correctly, that 2 mA is the current a TDA1541 draws when its output is grounded. In the left circuit, I1 and R6 indeed draw 2 mA when shorted to ground, in the right circuit they draw 2.27272727... mA. Hence, the left circuit is more realistic.
 
Maybe it's a good time to check the +14 V and the 4.7 kohm + 2.7 kohm then, although the +14 V would have to be as low as +12 V to explain the offset you see.

You removed the op-amp, but is there still any unintended DC path anywhere, via the feedback resistor or so?
 
@MarcelvdG you are correct. I just checked the circuit diagram and there is an error on it! On one channel the feedback resistor is shown returning to the +ve op amp terminal but of course this makes no sense as this is connected to earth in a virtual earth I/V setup. So yes, there is a 1k78 feedback resistor still in circuit. It's not easy to describe how this gets to DC gnd as all its connections through resistors end up at caps except for the +ve input of the following op amp which is at 0.6V DC when everything is in circuit - I haven't measured this point with op amp out of circuit. Looks like I need to get my voltmeter out, and I will try to find a diagram to illustrate.