Drive 12v meter using PWM

I'm sure the answer to this (or a similar question) is on here somewhere but after some searching I'm unable to find it. If this question has been answered already, please point me in the right direction.

I'd like to drive a 12v analog meter using one of the PWM pins. What's the simplest way to do this?

Thanks!

Do you mean to exactly 12V? Or somewhere between 0V-12V? By "analog meter" I am assuming it is going to draw negligible current?

There's a simple circuit here (go to page 74) which shows how to build a "boost converter" using a microcontroller and a handful of parts. Cheaper than the "official" solution, which is to buy a boost converter :slight_smile:

You need to be careful and really understand what your analog meter has and doesn't have built in to it. Most all analog meter movements are current operated. 0-1ma is a very common meter movement, although there are even more sensitive meters avalible. A meter can measure a arbitrary maxium voltage only if it contains a series resistor such that the meter's 100% current value flows when wired to the 100% voltage value printed on the scale of the meter.

Just because a given meter movent has a printed voltage range on it's face does not mean it has the proper scaling series resistor install, many rely on the user supplying the range resistance external to the meter.

The same applys to meter movements with a current range printed on their face. They rely on having a current shunt resistor and sometimes it's built inside the meter and other times the user has to supply the shunt resistor externally.

This is more a problem when using surplus obtained analog meter movements but again be sure to test and understand what you have before you start wiring it up.

Lefty

Run the pin to a transistor whose collector is at 12V with proper pullup/pulldowns active. When you output a PWM as it increases the voltage at the collector will increase. There should be something suitable in the motor control section on the playground.