You will know if you have the wrong resistors if your gauge won't go all the way up with 100% PWM, or vice versa with 0%.
Re: Controlling an analog dash
Posted: Mon Aug 16, 2021 6:50 pm
by Bigpie
I can make the dial go to empty and full with my resistor pair manually with 1 and then both in series, so should be the right ones.
Re: Controlling an analog dash
Posted: Tue Aug 17, 2021 8:48 am
by muehlpower
Bigpie wrote: ↑Mon Aug 16, 2021 6:50 pm
I can make the dial go to empty and full with my resistor pair manually with 1 and then both in series, so should be the right ones.
In my previous cars there was always a voltage regulator for the temperature and fuel gauge to compensate for fluctuations in the on-board voltage. Maybe it works with your car via pwm and your pwm messes up this regulation.
Re: Controlling an analog dash
Posted: Tue Aug 17, 2021 10:44 am
by Bigpie
How did you control them in your case?
*EDIT* the IR520 did the same, maybe a need much higher frequency PWM? Digipot might be the answer.
**EDIT** Given up and ordered a couple of digipots to play with.
Re: Controlling an analog dash
Posted: Thu Aug 19, 2021 3:01 pm
by Bigpie
Well the digipots work to control the dash. 10k seem to be the easiest to get hold of quickly, but they only give 3 positions on the fuel gauge without paralleling them up. I'll have to get a 1k from China.
That's a very cheap kind of DAC (see also https://en.wikipedia.org/wiki/Resistor_ladder). Funnily enough I was just thinking about using a simple DAC yesterday after testing one of my gauges with PWM (will post a video later). The above method is fine if you have plenty of I/O available but I want to control at least 2 gauges and not sure I will have enough I/O on a Teensy 3.2.
Re: Controlling an analog dash
Posted: Sun Aug 22, 2021 9:35 am
by arber333
DaveH wrote: ↑Sun Aug 22, 2021 9:16 am
That's a very cheap kind of DAC (see also https://en.wikipedia.org/wiki/Resistor_ladder). Funnily enough I was just thinking about using a simple DAC yesterday after testing one of my gauges with PWM (will post a video later). The above method is fine if you have plenty of I/O available but I want to control at least 2 gauges and not sure I will have enough I/O on a Teensy 3.2.
Here's what I did yesterday. This is using a darlington transistor as that's what I had to hand. It works, but the PWM is audible with this kind of gauge. It's quiet, and it was also raining on the steel roof, so you can't hear it very well in the video.
I don't think LED drivers would give enough current for most applications, also the max voltage of that particular one is only up to Vcc+0.3. Analog switches also don't allow much current and have a relatively high on-resistance.
Re: Controlling an analog dash
Posted: Sun Aug 29, 2021 4:36 pm
by DaveH
I've come up with a simple low cost solution that should work and still uses PWM.
I made a simplified model of one of my gauges, represented by Rp, Rs and Rn. The maximum current for this is about 70mA.
V2, V4 and A1 are modelling the PWM logic output with a 3.3V supply. This is low pass filtered by R4, R5 and C2 to give about 3mA peak-to-peak ripple in R1.
I'll breadboard this when I get a chance, just need to buy some bits.
Re: Controlling an analog dash
Posted: Sun Aug 29, 2021 6:01 pm
by muehlpower
I removed all of the original mechanics from my analog dash and replaced them with stepper motors. Needs a little more mechanical skill, but now I have full control and low power consumption. I found the necessary information on this page: https://realsimcontrol.com/io_step.html
There is also a special watch stepper that I used to replace my watch.
Re: Controlling an analog dash
Posted: Mon Aug 30, 2021 9:15 am
by clanger9
Excellent, thanks for that pointer. I'm looking at a stepper motor solution for my (mechanical) rev counter. This seems like the way to go...
Re: Controlling an analog dash
Posted: Sat Sep 18, 2021 2:55 pm
by DaveH
I breadboarded the circuit described earlier. It works great, but the gauge behaves strangely in that when you reduce the current, the pointer doesn't come down to the same place as when it's going up. I can drop it below where I want it to be then bring it back up again, but this isn't ideal.