How to connect a Moving coil gauge

Are you building a cockpit, planning to build one or just dreaming, this is your cockpit builder meeting point

Moderators: russ, Ralph

Post Reply
Message
Author
Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

How to connect a Moving coil gauge

#1 Post by Kaellis991 »

I have an EGT gauge from a Piper aircraft that I want to use in my home built cockpit using Xplane.
So far I’ve been able to connect it to a multimeter with a 100k ohm pot and determine the gauge sensitivity.
I learned that from Mike Powell’s book “Building Recreational Flight Simulators”.

I have connected plenty of the switches in my cockpit build using digital pins so far and air manager instruments.
From what I understand a PWM output will drive this gauge but PWM is completely foreign to me.

Where do I go from here to get this instrument to work via Air Manager?

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: How to connect a Moving coil gauge

#2 Post by Ralph »


Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Re: How to connect a Moving coil gauge

#3 Post by Kaellis991 »

Most of that discussion is beyond my pay grade.
I understand the concept of PWM but can’t yet make the connection to the EGT moving coil gauge I have.
There are so many unanswered questions.

Is it kosher to post a link to a YouTube video I found?
After looking at a dozen videos about PWM it’s the closest to showing what I am trying to do.
However, there are things in that video on which I need some clarification.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: How to connect a Moving coil gauge

#4 Post by jph »

Hi,
There is no real mystery about PWM used in this way. PWM is simply a means to produce a square wave output with a varying 'on' to 'off' time.
The 'on' is the time that the signal is at - say - 5V, the 'off' is the time the signal is 'low' (0V) .

If you output from a 5V i/o pin a PWM signal of 50% - meaning 50% of the time the output is 5V and 50% of the time the output is 0V, then the AVERAGE of the output is 5V*(PWM ratio as a percentage) so here it is 5V*50% = 2.5V. By controlling the PWM percentage 'on' time you can output an average voltage of any value you like between 0 and 5V hence use that to control anything that uses a varying DC input - such as a moving coil meter.
The PWM needs to be filtered but that is all covered in the post Ralph linked to. You can use the same exact values for the resistor and capacitor.
It really is straight forward. You are probably WAY overthinking it.
Joe. CISSP, MSc.

Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Re: How to connect a Moving coil gauge

#5 Post by Kaellis991 »

Joe,
The concept of PWM is easily understandable to me.
The details of implementing it with my EGT gauge are the blanks I am trying to fill in.
For instance:
1. There are a couple of components, I assume they are perhaps resistors / capacitors. This is 1960s tech and those components are confusing to me. There is a weird looking metallic circular disk. Is that a capacitor or resistor or something else? Do I remove all of the components and then use the exact resistor and capacitor shown in the diagram in the post I was directed to?
2. Since that flap project required an actual variable resistor for changing the flap settings and my project doesn’t then I assume the variable resistance for an EGT gauge is handled by the Lua scripting. I am still trying to figure out how such a code is structured for Xplane.
3. I have seen a couple of videos and read Mike Powell’s book about determining sensitivity. Each process is different in some way and I am still not sure how to actually find the full deflection value and what that will tell me and how I use that information. Those videos help me to a point but there are explanations in them that are not clear. Mikes book stated to use a 100k pot and a multimeter to determine the voltage and current and divide the two to get the resistance. I come up with around 30 ohms.
The pot I am using is a single turn and not very sensitive so the needle moves the full range with just a slight turn of the pot. A video I saw showed the use of a single turn pot with a couple of multi turn 10k pots. But I didn’t fully understand the wiring connections he was making with the Arduino. Then he exported data to excel to do some math to determine the max deflection resistance. Another video showed using a large expensive bench top multimeter directly connected to a VU meter to determine the sensitivity.

So I am still working on determining the actual full deflection sensitivity and then trying to understand how that information is to be used.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: How to connect a Moving coil gauge

#6 Post by jph »

Hi,
Post an image of the item you have please.
Also, what do you have in the way of resistors at hand ?
Joe
Joe. CISSP, MSc.

Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Re: How to connect a Moving coil gauge

#7 Post by Kaellis991 »

438571F5-6F03-40DC-A9A3-888459261C95.jpeg
E296FC0D-B319-4865-B383-88F28EAB3451.jpeg
61E9DDEB-DB69-42D5-AD12-AD2582600352.jpeg
Joe,

This is what I want to install in my panel to use with my Piper cockpit build running on Xplane.
American made by Alcor out of San Antonio.
For resistor supplies I think I have just about everything…

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: How to connect a Moving coil gauge

#8 Post by jph »

Ok, thanks. Nice unit :)
It appears the components on the board are for trimming for a new sender gauge and temperature compensation so that the instrument remains accurate in whatever ambient temp it is located and can be calibrated ob the aircraft. The round disc appears to be an NTC (negative temperature co-efficient) resistor and the round 'can' is I believe the calibration pot. Basically you should be able to ignore all that completely - don't touch it - just ignore it ;)

Ok, The current of these is normally very low. Often in the order of uA. It could need a LOT more, but this is a safe way to approach it. We can revisit it if no result.
Do the following carefully and you wont hurt the meter.

Using an arduino you have access to the 5V and ground pins from the sockets on the board.
See if you have a 470K ohm resistor - (470,000 Ohms) - check it with your multi meter to be sure.

Wire the 5V from the arduino VIA the 470K resistor to the + terminal on the back of the meter. (there is usually a plus and minus marking). If it is not marked, or just numbered, then with the instrument the right way up, presume the right hand terminal is +

Under no circumstances connect the 5V supply from the arduino to the meter without a suitable series resistor - you will damage it irreparably.

What we are going to do is find the current for FSD - full scale deflection - of the meter.

Using the 470,000 (470K ohm) resistor wire as follows -

Arduino 5V -------------------------> 470,000 Ohms (470K) ----------------------> Meter rear Terminal plus as above

Arduino GND -- > ----------------------------------------------------------------------> Meter other rear Terminal

See if the meter deflects. If it does but goes the wrong way, then reverse the terminal connection on the rear of the meter and mark the terminal with the gnd as GND or - (for future reference)

If the meter deflects hard right to the stop then replace the resistor with double the value and try again.
If it deflects partially, then half the value until you have a resistor that gives you just over half way, or between a 1/2 and 3/4 of full scale deflection. No more.

It shouldnt take long to find a value that offers this. If not deflecting enough then come down in values similar to - 470K, 220K, 100K, 47K, 22K, 10K. Use different values in series if needed.

Don't go lower than 10K for this test.

When you have a value that puts you in the right area - somewhere from half to three quarters scale, then disconnect everything and make notes exactly what you used. Also measure the value with the multi-meter to confirm, belts and braces.

When you have the value of resistor that offers this (in-between 1/2 and 3/4 of FSD) then you want to find a fixed resistor of half this value. (So if above was 100K, then you want a value of 50K)
Call this (rF). You also need a variable resistor (rV) which will be equal to (rF)

connect the two (rF and rV) in series and replace the resistor you used for testing with this new pair.
By adjusting the variable resistor (rV) you should now be able to set full scale deflection at 5V. You don't have to be exact with these values, just in the ball park. For example, for half of 100K you could use 47K, 56K, probably even 33K or 68K. So long as you are in the same range band of the resistor values.

NEVER use a variable resistor on it's own !!! - always with a suitable fixed value in series.
Let me know if any of that doesn't make sense.

Once that part is sorted the next bit is easy for the PWM and you only need one more resistor and capacitor for the filter as per the previous post. The new resistor you have built consisting of rF and rV will always remain in series with the meter. What you have made there is now effectively a 5V voltmeter. The PWM output will operate in a linear manner where a PWM value of 0 in AM will be no reading and 1 will be full scale reading as in AM is 0 is zero percent PWM and 1 is 100% PWM. By varying the PWM output of the arduino you are varying the DC voltage from 0 to 5V in a linear manner.

Joe
Joe. CISSP, MSc.

Kaellis991
Posts: 581
Joined: Mon Sep 07, 2020 8:49 am

Re: How to connect a Moving coil gauge

#9 Post by Kaellis991 »

Joe,

Your directions are exactly what I need to get this started.
When you say to not touch the existing components you are saying to leave them in there as they won’t affect the current / voltage and will not affect the operation of the gauge when I add new resistors and the capacitor.
I assume the capacitor size will be determined once I get the resistors sorted out. I have a somewhat large supply of capacitors with 24 values. Something in there should work.

Just to be sure, the variable resistor you refer to is also a potentiometer, correct?

I don’t have many of those. I only purchased the 100k ohm that Mike Powell’s book suggested and I have a couple of 10k ohm pots.
Also I have on order some multi turn pots that range from 500 ohm to 1M ohms of 10 different values.

Should I also order this kit of potentiometers / variable resistors?

Kirk
1450AE7F-B9F5-4CA2-B914-DF8AF4B79DC7.jpeg

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: How to connect a Moving coil gauge

#10 Post by jph »

Hi Kirk

Yes, do not touch anything in the gauge at all. Every thing that is fitted will remain and completely untouched.
Oh, a picture of the rear of the instrument would be good if you have one ?

As for values of the R and C portion as per post linked to by Ralph.
this is the diagram in the PREVIOUS post - for the @djw4250@gmail.com type of gauge.

Arduino pin-----470-----------------------22kVAR-------
...................................I ....................... I
............................... 100uF .............. Flap gauge
...................................I ....................... I
GND--------------------------------------------------------

YOUR unit will use the same first order filter values -( the resistor and capacitor Low Pass filter ) as that is gauge independent.
Your final solution would therefore look something like this

Arduino pin-----470-------------------(vF)+(vR)--------
...................................I ....................... I
............................... 100uF .............. EGT gauge
...................................I ....................... I
GND--------------------------------------------------------

As you can see, the 470 ohm and 100uF electrolytic capacitor in our PWM filter remain identical in both circuits.

Potentiometers and variable resistors often confuse folk. Whilst both actually offer varying resistances they differ in their usage even though they would tend to use the same 'potentiometer' as the starting point.
A 'potentiometer' normally refers to the three terminal thingies you have where the two outer terminals are a fixed resistance value and the middle terminal is the 'wiper' which is an adjustable 'tap' onto the main fixed resistance. AS a potentiometer it is normally used where a voltage is applied across the fixed resistance and the voltage output is variable as the wiper is moved.
In a 'variable resistor' configuration - which we will be using, then only two pins are used and they are either of the outer pins and the wiper to give us a variable resistor. That is the difference, It is how it is used. For all practical purposes the physical device is the same though.

Don't buy any more variables Kirk, I am confident that the 100K or 10K that you have can be used with no issue. We just need to find our gauge characteristics first.

I suggest the best thing is to find the fixed resistor value for half to three quarter gauge deflection using the guidelines I mentioned. The rest will fall into place with what you have.
Later, we can if necessary easily make the 100K variable you have into a 50K variable, or even a 25K etc. ;) Most likely will end up using one of the 10Ks but find the appropriate fixed value first. As mentioned before, you can always add resistors in series to find the value that works. It doesn't have to look pretty at this stage, it just needs to give us the info. :)
Let me know your results and we can take it from there.
Have fun.
Joe
Joe. CISSP, MSc.

Post Reply