Low pass filter on PWM analog gauge control

Thread Starter

Carbibbles

Joined Nov 14, 2011
7
Hey guys, im fairly new to electronics but im working on a project that involves controlling a 12v DC analog gauge. Normally the gauge would use a thermistor for the signal and as resistance increases the gauge decreases (ground state will max out the gauge). Ive set up a controller to PWM the gauge signal to ground instead of using a thermistor (100% duty cycle is full ground) running about 150hz. It actually works great with no extra circuits and I get gauge min at about 10% duty and gauge max at about 98% duty. The only issue is that I can hear it buzzing/humming very quietly and im a bit worried about any long term damage to the gauge internals. I did some research and found guys using a low pass filter so I tried a few cap/resistor combos and found that a 47ohm resistor tied into the PWM wire with a 1.0uF electrolytic cap (+ on resistor, - to ground) seems to cut down the humming the most (gauge output seems mostly unaffected). I just wanted to know if there is anything wrong with setting it up this way?


Thanks

Jason
 

Thread Starter

Carbibbles

Joined Nov 14, 2011
7
The gauge has 3 pins: 12v power, ground, and signal. 12v pin to ground pin is 195-ohms, 12v pin to signal pin is 150-ohms, and ground pin to signal pin is 218-ohms.
 

alfacliff

Joined Dec 13, 2013
2,458
sounds like an automotive guage. that low of a cap shouldnt hole enough charge to cause problems if the guage were a fuel guage. you have to be carefull with fuel guages, too much capacitance might cause a spark in the gastank.
 

Thread Starter

Carbibbles

Joined Nov 14, 2011
7
This is a temperature gauge so no worries about fuel or anything like that. It seems like most schematics show a non-polar cap being used for this job but I didn't have any that were higher than .1uF and those didn't seem to make a difference in the humming at all. Is there anything wrong with using an electrolytic?


Also, id like to get a better understanding of what this circuit is doing. I understand that its a buffer of sorts but what is the electricity actually doing relative to the floating and ground pulses of the PWM?
 

Thread Starter

Carbibbles

Joined Nov 14, 2011
7
Actually, im not even sure this qualifies as a low pass filter? Most circuits ive looked at have the current flowing through the resistor and out with the capacitor teed into the line after the resistor. The way I have it, the resistor and capacitor are in series and teed into the pwm line which has no resistor in it.
 

MikeML

Joined Oct 2, 2009
5,444
Isn't the +12V to ground circuit powered constantly, and used to heat one end of a bimetal, while the +12V to signal-in circuit is a varying current?

What is the amplitude of the pwm signal? Is it driven both high and low, or is it an open-collector type of drive that can only sink current?
 

MikeML

Joined Oct 2, 2009
5,444
Actually, im not even sure this qualifies as a low pass filter? Most circuits ive looked at have the current flowing through the resistor and out with the capacitor teed into the line after the resistor. The way I have it, the resistor and capacitor are in series and teed into the pwm line which has no resistor in it.
Could you post your schematic?
 

Thread Starter

Carbibbles

Joined Nov 14, 2011
7
Im not sure how the gauge works internally but here are some examples of its behavior. Nothing connected = needle rests at lowest position; 12v and ground, signal not connected = needle comes slightly up from rest position to lowest gauge reading; 12v and ground, touch signal to ground = needle swings up to max; 12v with ground disconnected, touch signal to ground = needle swings up to max but with a little more force than with ground connected.

The pwm is open-collector and only pulls the signal low, there is no pull-up.


Here is a schematic drawing
 

Thread Starter

Carbibbles

Joined Nov 14, 2011
7
Any input on this? Id like to understand how things are working in this electrical layout.

I tried to set it up in LTSpice but it didn't show it affecting the square wave that much. It has to be though because there is a distinct reduction in the slight humming/buzzing.


Thanks
 
Top