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

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

Re: How to connect a Moving coil gauge

#91 Post by Kaellis991 »

Thanks for that.

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

Re: How to connect a Moving coil gauge

#92 Post by Kaellis991 »

jph wrote: Sun May 29, 2022 1:26 pm

Monaco GP calls - main race - and it's just started to rain :mrgreen: excellent

Have fun. Hope that explains everything,
Joe.
Those drivers should be out on the course. No rain checks allowed.

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

Re: How to connect a Moving coil gauge

#93 Post by jph »

Kaellis991 wrote: Sun May 29, 2022 1:45 pm
jph wrote: Sun May 29, 2022 1:26 pm

Monaco GP calls - main race - and it's just started to rain :mrgreen: excellent

Have fun. Hope that explains everything,
Joe.
Those drivers should be out on the course. No rain checks allowed.
I know...... The FIA are a load of bloody nancy wusses sometime :lol:
I remember 1984 well, they didn't bugger about like this to get going, although it was red flagged eventually. ;) Max and Lando and 'Lucy' will want to get out as they are all 'water babies'

Anyway. :) .. back to the waiting for the restart... There is an F1 thread in the catch all forum so chime in there if you are into it. It's a terrific sport.
Joe. CISSP, MSc.

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

Re: How to connect a Moving coil gauge

#94 Post by jph »

Oh, just to note Kirk . @Kaellis991
The PWM frequency to use in AM for THIS First Order LPF is 1kHz !
It is specifically designed to work at that frequency.


Joe
Joe. CISSP, MSc.

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

Re: How to connect a Moving coil gauge

#95 Post by Kaellis991 »

jph wrote: Sun May 29, 2022 3:24 pm Oh, just to note Kirk . @Kaellis991
The PWM frequency to use in AM for THIS First Order LPF is 1kHz !
It is specifically designed to work at that frequency.


Joe
10-4

User avatar
Keith Baxter
Posts: 4684
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: How to connect a Moving coil gauge

#96 Post by Keith Baxter »

Hi,
I am interested as to why PWM is going to be used.

I would have used the LED function in AM which is a form of DAC output.

Unfortunately DAC output is only supported in "HW Port". on channel >0. Would be cool if @Corjan could add to the arduino boards.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

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

Re: How to connect a Moving coil gauge

#97 Post by Kaellis991 »

Keith Baxter wrote: Sun May 29, 2022 4:32 pm Hi,
I am interested as to why PWM is going to be used.

I would have used the LED function in AM which is a form of DAC output.

Unfortunately DAC output is only supported in "HW Port". on channel >0. Would be cool if @Corjan could add to the arduino boards.

Keith
I am only along for the ride right now and just following Joe’s lead. With the hardware designed per his direction my next hurdle will be integrating this hardware with the Arduino and AM. I’m just beginning to understand the basics of what PWM is but utilizing it with this hardware I just created is currently beyond me.
I just assumed that PWM was the only way. Throwing in another option i.e the LED function now has me turned around and trying to pin the tail on the donkey.

User avatar
Keith Baxter
Posts: 4684
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: How to connect a Moving coil gauge

#98 Post by Keith Baxter »

Kaellis991 wrote: Sun May 29, 2022 4:42 pm
Keith Baxter wrote: Sun May 29, 2022 4:32 pm Hi,
I am interested as to why PWM is going to be used.

I would have used the LED function in AM which is a form of DAC output.

Unfortunately DAC output is only supported in "HW Port". on channel >0. Would be cool if @Corjan could add to the arduino boards.

Keith
I am only along for the ride right now and just following Joe’s lead. With the hardware designed per his direction my next hurdle will be integrating this hardware with the Arduino and AM. I’m just beginning to understand the basics of what PWM is but utilizing it with this hardware I just created is currently beyond me.
I just assumed that PWM was the only way. Throwing in another option i.e the LED function now has me turned around and trying to pin the tail on the donkey.
Hi,

I might be incorrect with using the LED function. But it does supply a variable voltage. Which is what DAC does. The trick is going to be the external voltage supply. In this case I suspect around 30 -120 odd Mv.
Might be of interest to seek the instrument probe tick mark values. It is a thermocoupler instrument I understand, So the values should be in Mv... That would help in determining Mv range.
The tick mark values are not going to be linear, so the interpolate_linear(settings, value) will be needed in code.

There are many ways to do things.That is how I would have approached/hacked it.


Keith
Last edited by Keith Baxter on Sun May 29, 2022 5:17 pm, edited 1 time in total.
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

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

Re: How to connect a Moving coil gauge

#99 Post by jph »

Keith Baxter wrote: Sun May 29, 2022 4:32 pm Hi,
I am interested as to why PWM is going to be used.

I would have used the LED function in AM which is a form of DAC output.

Unfortunately DAC output is only supported in "HW Port". on channel >0. Would be cool if @Corjan could add to the arduino boards.

Keith
Hi Keith,
DAC output needs the board to be equipped with a hardware DAC. HW DAC support is extremely limited on Arduino and totally unnecessary here anyway. I have NEVER had use for a true DAC output from an Arduino as the HW PWM module - WITH appropriate LPF is as accurate for 99.9% of all use cases.
HW LED - IS - PWM, but, it is software derived PWM meaning it is a software driven bit banged routine that is a constant drain Arduino CPU. Why waste CPU cycles in the Arduino when the PWM Module that is built in takes all the work away and runs itself as it is dedicated to the task and freely available ?.
HW PWM used the Arduino's - or - insert other board here - built in Hardware PWM module which is a fire and forget as opposed to a continued software updated routine. You could uses LED - software PWM if you wanted but the same FILTER use would apply.
Hope that helps.
Joe
Joe. CISSP, MSc.

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

Re: How to connect a Moving coil gauge

#100 Post by jph »

Keith Baxter wrote: Sun May 29, 2022 5:01 pm
Kaellis991 wrote: Sun May 29, 2022 4:42 pm
Keith Baxter wrote: Sun May 29, 2022 4:32 pm Hi,
I am interested as to why PWM is going to be used.

I would have used the LED function in AM which is a form of DAC output.

Unfortunately DAC output is only supported in "HW Port". on channel >0. Would be cool if @Corjan could add to the arduino boards.

Keith
I am only along for the ride right now and just following Joe’s lead. With the hardware designed per his direction my next hurdle will be integrating this hardware with the Arduino and AM. I’m just beginning to understand the basics of what PWM is but utilizing it with this hardware I just created is currently beyond me.
I just assumed that PWM was the only way. Throwing in another option i.e the LED function now has me turned around and trying to pin the tail on the donkey.
Hi,

I might be incorrect with using the LED function. But it does supply a variable voltage. Which is what DAC does. The trick is going to be the external voltage supply. In this case I suspect around 30 -120 odd Mv.
Might be of interest to seek the instrument probe tick mark values. It is a thermocoupler instrument I understand, So the values should be in Mv... That would help in determining Mv range.

That is how I would have approached/hacked it.

Keith
Keith I would completely forget thermocouples here. ALL the meter needs is the correct current. The current can be varied directly from a varying 5V supply by means of an appropriate resistor. The varying voltage supply is 0 to 5V (or 0 to 3.3V depending on processor) and is produced from a DAC made using the HW PWM module of the Arduino or Pico and a Low Pass Filter (a resistor and capacitor) .
Joe. CISSP, MSc.

Post Reply