Go Down

### Topic: Analog meter, positive and negative input. (Read 1 time)previous topic - next topic

#### evenh

##### May 04, 2011, 03:35 pm
Hi,

I'm planning to bring some old analog boat instruments to life and feed them digital data.
I have connected most of the instruments to the PWM outputs and a 2,2k ohm resistor in series, this works fine.

One of the instrument has a positive and negative scale. When I feed it the PWM it only goes in the positive part of the scale.
The meter reaches the end of the scale when I apply approximately 1 mA.

What's the best solution to achieve a negative voltage to the analog meter, any ideas?

Thanks!

#### JesperKonge

#1
##### May 04, 2011, 04:28 pm
How about connectÃ­ng it to 2 pwm's... then you kan have one high when going positive and switch when going negative...

#### retrolefty

#2
##### May 04, 2011, 04:53 pm

How about connectÃ­ng it to 2 pwm's... then you kan have one high when going positive and switch when going negative...

Excellent idea.
Lefty

#### floresta

#3
##### May 04, 2011, 05:01 pm
Quote
What's the best solution to achieve a negative voltage to the analog meter, any ideas?
You could try biasing the meter (possibly a small battery between it's negative lead and ground) so that with no PWM output the meter reads -45, with 50% duty cycle it reads 0, and with 100% duty cycle it reads +45.

Don

#### jackrae

#4
##### May 04, 2011, 11:28 pm
Rather than using a separate battery to set an offset there are "neater" ways.

Set up an artificial ground reference at +2.5 volts by using a pair of resistors across the 5 volt arduino supply.  With equal value resistors the mid-point connection will read +2.5 volts relative to system ground.  Now when the PWM output pin is at 0% this output will be effectively at true ground and hence -2.5 volts relative to the artificial ground.   Similarly when the PWM is at 100%, the output pin will be at +5 volts and hence at +2.5 volts relative to the artificial ground.

Now, you say that the meter needs 1mA to read full scale, so this need to be taken into account when determining a suitable value for the resistor pair.   If you simply use resistors, to minimise linearity errors, the resistor chain should pass at least 50 times the 1mA demand.  So you need 50mA down through the chain, which means a total resistror chain value of R1 + R2 = 5 x 1000 / 50     ie 100ohms.   So each resistor should be around 47 ohms.

If you cannot tolerate this "waste" of current, you could use a pair of higher value resistors, say 1kohms, and feed this high impedance artificial reference ground into a unity gain op-amp, the output of which will hold at +2.5 volts irrespective of meter current.

#### evenh

#5
##### May 05, 2011, 11:58 am

I'll try setting up a artificial ground. I don't think 50 mA extra is goring to be noticed on my boat, but I have a 741 op-amp, so I'll try the unity gain approach.

#### Grumpy_Mike

#6
##### May 06, 2011, 08:20 am
Quote
but I have a 741 op-amp, so I'll try the unity gain approach.

A 741 will not work off just 5v, it needs a split supply with at least 4v on each side. Also it is not a rail to rail device.
As mentioned before feed one side of the meter with the PWM signal filters with a small RC and the other side to an output you can switch either high or low for positive or negative meter movement.

Go Up