Author Topic: How to model an analogue meter in LTSpice  (Read 2405 times)

0 Members and 1 Guest are viewing this topic.

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: gb
How to model an analogue meter in LTSpice
« on: September 06, 2022, 08:07:52 am »
I am making my first foray into LTSpice and have modelled a circuit which contains an analogue meter.

The 'real' meter is 50µA FSD and about 800Ω resistance - quite low but common to the brand and vintage of equipment I'm modelling. I don't think it contains a shunt.

So far I have simply included an 800Ω resistor and 'measured' the current through it in LTSpice. Ctrl-clicking gives me the RMS current dialog.

As context, the real circuit has the meter across the +/- outputs of a bridge rectifier each input being connected to each of two collector outputs of a PNP differential pair - the meter providing the RMS averaging required.

Question: is this an adequate way to model the meter?
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4760
  • Country: nr
  • It's important to try new things..
Re: How to model an analogue meter in LTSpice
« Reply #1 on: September 06, 2022, 08:11:34 am »
Show your schematics and .asc file..
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: gb
Re: How to model an analogue meter in LTSpice
« Reply #2 on: September 06, 2022, 08:13:54 am »
Schematic and output, .asc to follow.
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: gb
Re: How to model an analogue meter in LTSpice
« Reply #3 on: September 06, 2022, 08:23:50 am »
.asc

It's a Marconi TF1375 microvoltmeter.

I'm modelling the OC44 as follows:

----
.MODEL OC44 PNP(IS=1.423u
+   BF=100 BR=20.27
+   Vjc=0.28 Vje=0.28
+   NF=1.022 NR=1.025 VT=25.5m VAF=8.167 VAR=14.84
+   IKF=43.82m IKR=611.7m ISE=30.54n ISC=213.5n NE=1.316 NC=1.258 R
+   B=32.83 RE=968.7m RC=989.9u CEB=410p CCB=10p mfg=Mullard
+   Vceo=12 Icrating=10m)
----

This is my first ever use of LTSpice to sorry if there are any obvious FUs.
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4760
  • Country: nr
  • It's important to try new things..
Re: How to model an analogue meter in LTSpice
« Reply #4 on: September 06, 2022, 08:55:27 am »
An analog meter is similar to the speaker.
I've found in my models a speaker model, here it is - but I have no idea where it comes from I have to investigate.
Basically it should simulate the electro-mechanical behavior of the system.
I bet the meter will have similar model..
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4760
  • Country: nr
  • It's important to try new things..
Re: How to model an analogue meter in LTSpice
« Reply #5 on: September 06, 2022, 09:20:34 am »
The above speaker model comes from here (there is a text file with detailed description of the model):

https://ltwiki.org/files/LTspiceIV/examples/LtSpicePlus/Audio/Parlantes/
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: gb
Re: How to model an analogue meter in LTSpice
« Reply #6 on: September 06, 2022, 05:31:28 pm »
Thanks. That looks extremely complicated so perhaps I should reword my question to:

Will simulating an analogue meter with simply a resistor be a good enough approximation?

What matters is that as I vary other parameters in the circuit, plus of course the input voltage to the circuit, I get a reasonably good reflection of what a real meter would read.
« Last Edit: September 06, 2022, 05:34:31 pm by 6SN7WGTB »
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: gb
Re: How to model an analogue meter in LTSpice
« Reply #7 on: September 06, 2022, 05:44:13 pm »
Yes, good point re the obvious inductance - I just don't know how to go about estimating that.

The circuit is an AC microvoltmeter so whatever frequency goes in (and the bandwidth is I think up to 200kHz) ends up at the meter.

It's not a transient measurement however - it's steady state, although I can see various RC elements that provide damping. You can see from my output traces that the thing settles out at a steady state however.
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: How to model an analogue meter in LTSpice
« Reply #8 on: September 07, 2022, 01:44:03 am »
I am making my first foray into LTSpice and have modelled a circuit which contains an analogue meter.

The 'real' meter is 50µA FSD and about 800Ω resistance - quite low but common to the brand and vintage of equipment I'm modelling. I don't think it contains a shunt.

So far I have simply included an 800Ω resistor and 'measured' the current through it in LTSpice. Ctrl-clicking gives me the RMS current dialog.

As context, the real circuit has the meter across the +/- outputs of a bridge rectifier each input being connected to each of two collector outputs of a PNP differential pair - the meter providing the RMS averaging required.

Question: is this an adequate way to model the meter?

The meter deflection will be proportional to the average current flowing through the coil, not the RMS current.

In this thread I show how an example that uses the .step and .meas commands to measure meter deflection.

https://www.eevblog.com/forum/projects/5-transistor-esr-meter-design/

Jay_Diddy_B
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: How to model an analogue meter in LTSpice
« Reply #9 on: September 07, 2022, 02:12:10 am »
Hi,
Using the .step and the .meas directives:



The model becomes:



If you following the instructions on the model, you can plot this graph:



You probably need to replace the diodes D1-D4 with OA95 (Ge diodes). This change will improve the linearity at small inputs.

I have attached the modified model.

Regards,
Jay_Diddy_B
* Marconi TF1375_JDB.asc (10.28 kB - downloaded 61 times.)
« Last Edit: September 07, 2022, 02:29:40 am by Jay_Diddy_B »
 
The following users thanked this post: 6SN7WGTB

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: gb
Re: How to model an analogue meter in LTSpice
« Reply #10 on: September 07, 2022, 06:01:34 am »

The meter deflection will be proportional to the average current flowing through the coil, not the RMS current.


Jay_Diddy_B

Sorry, yes of course, the analogue meter is an averaging device. Was fixated on RMS, having just explained to someone precisely why a meter measures 0.636 of a sine wave and is usually calibrated for 1.1 of that for the most likely use on 'electrical' circuits to show RMS.
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: gb
Re: How to model an analogue meter in LTSpice
« Reply #11 on: September 07, 2022, 06:05:56 am »
This is excellent help, thank you so much for taking the time to look at and improve this.

I will get back to it today.

I see you've highlighted the OC44 model - did you see errors in that? This was the best I could find - from a paper online

http://benholmes.co.uk/files/Comparison%20of%20Germanium%20BJTs_Holmes%20et%20al.pdf

But that has an Hfe of 300 or so, which as you see i've reduced to 100 which felt more likely, although who am I to argue with the paper...?!

I'm probably trying to be a bit too ambitions to jump into this as my first attempt at using LTSpice...
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: gb
Re: How to model an analogue meter in LTSpice
« Reply #12 on: September 07, 2022, 06:27:22 am »
OK, tried running this using your .asc file.

It appears indeed to run multiple times, with a time-based plot window appearing at some point during that process.

Once complete,  right-clicking the command in the View>Spice Error Log window produces an additional window but with no line although it now has a µV x-axis (10-250µV).

(I'm using LTSpice for MacOS).
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4760
  • Country: nr
  • It's important to try new things..
Re: How to model an analogue meter in LTSpice
« Reply #13 on: September 07, 2022, 07:29:30 am »
I had to replace the OC44 with the AC151 in order to get the results..
 

Offline srb1954

  • Super Contributor
  • ***
  • Posts: 1091
  • Country: nz
  • Retired Electronics Design Engineer
Re: How to model an analogue meter in LTSpice
« Reply #14 on: September 07, 2022, 08:16:37 am »
Yes, good point re the obvious inductance - I just don't know how to go about estimating that.

The circuit is an AC microvoltmeter so whatever frequency goes in (and the bandwidth is I think up to 200kHz) ends up at the meter.

It's not a transient measurement however - it's steady state, although I can see various RC elements that provide damping. You can see from my output traces that the thing settles out at a steady state however.
There is a smoothing capacitor C12 across the output of the bridge rectifier so not much AC will be applied to the meter. I would ignore any inductance in the meter coil; at most it would have a very minor effect of slowing the meter current rise time to a step in the input amplitude. This slowing of the rise time will likely be insignificant compared the mechanical time constants of the meter movement.

One thing you might want to model is the temperature coefficient of the meter coil if you are modelling the accuracy of the circuit over temperature. A copper coil will have a 0.39%/K increase in resistance and will affect the meter reading slightly e.g. a 10 deg rise in ambient will reduce the meter reading about 2% unless there is a temperature compensating resistor somewhere else in the circuit.

Is the short across R29/C11 intentional? If you are not using these components I would remove them altogether as wiring like this sometimes confuses SPICE and causes convergence problems. However, if you want to have an easy option for switching these components in and out of circuit use a very low resistance, say 1u \$\Omega\$, to effectively short them out as this is less likely to cause convergence problems.
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: gb
Re: How to model an analogue meter in LTSpice
« Reply #15 on: September 07, 2022, 09:14:56 am »
The short you refer to is across a "LF cut" on the actual device - so the short simply indicates it is not in circuit as modelled right now. I only added this recently and it appears not to upset the logic.

However I like you option of adding an almost zero ohm bypass - will do that for good measure.
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: gb
Re: How to model an analogue meter in LTSpice
« Reply #16 on: September 07, 2022, 09:23:53 am »
Given the significant effort people are putting in, let me add a bit more background:

The original TF1375 circuit has a range selector network upstream of the Vin on my schematic.

HOWEVER, in its lowest range position of 50µV it is 'straight through' from input to the Vin point.

Just adding this on the basis that the circuit is probably designed not to have more than this 50µV at the input - as the range selector part will skinny down larger inputs (it will go up to 5V and there is also a "-10bB" position which switches  a different RC network in to the emitter of VT2).

At this stage I'm trying to keep it simple and get the behaviour of a 0-50µV input working before I worry about the attenuators.

What I am seeing is a very non-linear performance of µV in vs. µA at the meter - way beyond the actual non-linearity of the meter for which I have calibrated scale vs. µA.

FWIW the real meter calibrates as attached. I will try to add a plot of µA across simulated meter vs. µV input to Vin shortly.
« Last Edit: September 07, 2022, 09:27:05 am by 6SN7WGTB »
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: How to model an analogue meter in LTSpice
« Reply #17 on: September 08, 2022, 02:35:39 am »
Hi,

Can you post a picture of the meter scale? I am interested to see how non-linear the scale is at the bottom 20% of the range.

In looking at the circuit, most of the circuit is linear except the diodes in the meter rectifier.

Jay_Diddy_B
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: gb
Re: How to model an analogue meter in LTSpice
« Reply #18 on: September 08, 2022, 06:39:33 am »
Here's the entire front view of the µV meter, plus graph of % linear swing vs. scale reading.

By inspection, the scale calibration would seem to mirror the reading vs. actual current input graph.

So, to Jay's point - if the circuit operates pretty much linearly, then the meter scale has been calibrated to match the movement non-linearity at low deflection?

The 'but' is that I do not seem to get linear behaviour from the simulated circuit.
« Last Edit: September 08, 2022, 06:57:32 am by 6SN7WGTB »
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14172
  • Country: de
Re: How to model an analogue meter in LTSpice
« Reply #19 on: September 08, 2022, 08:15:15 am »
The scale is nonlinear for the low end. This was a common way to compensate for the nonlinear response of the relatively simple rectifier circuit. The exact shape depends on the diodes used - so replacing parts in the rectifier part can be tricky. For an old Russian analog multimeter they even included replacement diodes with the meter to get the same type.

The circuit overall does look really old school and not very stable: in most stages there is not feedback to stabilize the gain. With the limited accuracy details like the temperature dependence of the meter resistance should not really matter.

There is a capacitor at the meter movement. So the exact details (e.g. inductance) of the meter movement should not matter.
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 19468
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: How to model an analogue meter in LTSpice
« Reply #20 on: September 08, 2022, 09:58:54 am »
Question: is this an adequate way to model the meter?

A standard truism is "all models are inaccurate, but some are useful".

Hence you have to define:
  • acceptable inaccuracies, e.g. visual time it takes needle to settle, what happens when 10A is put through it
  • what useful information you wish to extract
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: gb
Re: How to model an analogue meter in LTSpice
« Reply #21 on: September 08, 2022, 09:59:28 am »
The scale is nonlinear for the low end. This was a common way to compensate for the nonlinear response of the relatively simple rectifier circuit.

Agree, and have seen tis looking at Ge and Si diodes on a curve tracer.

However, it seems here that the nonlinearity is consistent between scale and movement response (which to be clear was measured without external diodes present) so not sure external diodes are a material effect?

I also note a reasonably similar Sangamo movement in a Marconi valve millivoltmeter I have just restored has almost exactly the same scale calibration, although I can't comment on meter reading vs. input current as I did not test it.
 

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: gb
Re: How to model an analogue meter in LTSpice
« Reply #22 on: September 08, 2022, 10:04:04 am »
Yes, of course.

It's an old instrument, old technology (not that this makes it bad), and a relatively simple circuit being asked to do something reasonably difficult.

I just like to make the very best of what is available, and in this instance I have two of these TF1375s - one unrestored with completely original parts (which I will aim to restore to as close original as feasible), and a second devoid of any circuitry aside meter (which works) and range switches.

Not for here, but the latter one I would like to 'recreate' with some modern internals but keeping the original looks. Yes, I know that we wouldn't start from here, but it's an educational and fun project for me. If I really want to measure µV I'll use my Agilent bench DMM...
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2733
  • Country: ca
Re: How to model an analogue meter in LTSpice
« Reply #23 on: September 08, 2022, 11:50:05 am »
Hi 6SN7WGTB and the group,

I have updated the model to include the OA95 Ge diodes. I have also added labels M1 and M2 and a .meas that allows the output of the circuit to be measured before the rectifier.



Updated instructions to obtain the graph:


This will be displayed:



And if you select the amplifier_op trace, you will get this:



(I added the annotations to the axis).

This shows the meter is linear. The non-linearity comes from the diodes in the meter circuit.

I have attached the model.

Regards,

Jay_Diddy_B
« Last Edit: September 08, 2022, 11:54:23 am by Jay_Diddy_B »
 
The following users thanked this post: 6SN7WGTB

Offline 6SN7WGTBTopic starter

  • Regular Contributor
  • *
  • Posts: 104
  • Country: gb
Re: How to model an analogue meter in LTSpice
« Reply #24 on: September 08, 2022, 07:51:19 pm »
Thanks @jay - much appreciate the support.

I will get into this and review your modifications tomorrow.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf