News:

Let's find out together what makes a PIC Tick!

Main Menu

HV digital pot

Started by RGV250, Feb 24, 2023, 03:19 PM

Previous topic - Next topic

RGV250

Hi,
I have a temperature gauge on an old motorcycle that I plan to replace with a digital display sometime. The sensor has failed and I would like to use a DS18(B/S)20 with the existing gauge temporarily.
What I am looking for is a high voltage digital pot to go inline with the existing gauge. I have found MCP41HV31 & 51 which from what I can make out can handle 36v on the resistor side. Unfortunately the 31 is discontinued and the 51 is out of stock with very long lead times so does anyone know of another device that will do. It only needs around 17v max, SPI would be the preferred interface.

Bob

tumbleweed

According to mchip direct both the MCP41HV31 and 51 are still in production (but getting them in anything other than a QFN is a different story).

If you only need one or two have you tried to sample them from Microchip Direct? You can usually get up to qty 3 of a part in a week or 2

Otherwise, there's the AD7376 SPI part in stock, but that's expensive. AnalogDevices might have others...

RGV250

Hi Tumbleweed,
I thought Microchip had stopped samples for individuals?
The AD7376 is expensive if it does not work out, I have just had a bit of a brainstorm. As i can hack the wiring I am wondering if I can ground the terminal that went to the sensor and feed what was the positive with a PWM signal via a transistor. I have found a gauge on Amazon for £4, I think i might get that and give it a try.

Bob

tumbleweed

QuoteI thought Microchip had stopped samples for individuals?
I don't know about that... I just got some two or three weeks ago, but I've been registered there for a while.


ken_k

#5
Quote from: RGV250 on Feb 24, 2023, 04:27 PMHi Tumbleweed,
I thought Microchip had stopped samples for individuals?
The AD7376 is expensive if it does not work out, I have just had a bit of a brainstorm. As i can hack the wiring I am wondering if I can ground the terminal that went to the sensor and feed what was the positive with a PWM signal via a transistor. I have found a gauge on Amazon for £4, I think I might get that and give it a try.
Bob
Hi Bob
I don't know any specs for the meter but I don't see why PWM won't work, if you cannot hack the wiring maybe you could use a photovoltaic-output optocoupler to directly drive a small FET, the FET could then be placed anywhere in series with the meter as the FET would have no ground reference. A small FET would be required to keep the gate capacitance down and the PWM frequency would have to be low.
https://au.rs-online.com/web/p/optocouplers/0185962
https://docs.rs-online.com/c22d/0900766b80af4d0c.pdf
I'm certain there are cheaper and better opto's out there, this was a quick selection from RS.
Most DC electronic relays use these devices, you may even find a small electronic DC input/output relay that will PWM ok.
The slower rise fall time can be a blessing when it comes to RFI.
Ken
Footnote:
I just found a chap using a photovoltaic optocoupler in a buck converter running at  2kHz, I was thinking more like 400Hz for the meter drive.
https://www.edn.com/variable-hv-power-supply-employs-photovoltaic-optocoupler/


RGV250

Hi Ken,
After digging out the manual I am not sure if PWM would work, also the AD7376 is no good as that is 10k and 128 positions so the minimum would be 78ohms.
The one that Ricardourio links to is 5k so at least that would be 19.5ohms min but could be an issue as only 20 steps for maximum so will probably be an issue with calibration.
Temp gauge.jpg

Bob

ken_k

Hi Bob
From the schematic it looks like B/G to ground via 10.3 ohms is FSD (Hot) and 389.3 ohms is cold.
It might pay to do some tests on the meter to see what is actually required, a programmable current sink may work fine. I would be tempted to use a 500 ohm wire wound pot as a substitute for the temperature gauge and log the voltage across the pot versus the needle deflection, maybe a programmable zener type circuit will work.

You will need the needle deflection versus the drive requirements to write a suitable PIC program.

It looks a bit like a FET to ground is series with 10 ohms resistor may work with PWM, worth a try, maybe drive the FET gate from a suitable signal generator to test.

As the bikes battery voltage changes you don't want the temperature reading to change I'm guessing a current sink. 

Ken


RGV250

Hi Ken,
A lot of good suggestions to get me going.

Bob