Flicker LED and Anolog meter guidance.

First off let me say that i am a total noob. This is my first arduino project. I have never done anything like this, kind of out of my realm here. I will need a lot of hand holding. Sorry.

I am in the process of making a steampunk nixie tube clock. I have the nixie clock made and it works. I am wanting to do some styling with pulsing/surging/flickering leds. Now i dont think the leds will be the problem. I also have an old analog volt meter face. I am wanting the needle to pulse and surge with the leds. Now the range on the meter face says -5 to 5v. But when i tried 5v it pegged the needle. So i moved it all the way down to 1v and it finally started to move down. It seems the voltage range of the meter is very small. I figured out it was between .4 and .8v. Wierd right? Anyway, think there is anyway way to make it work? I will be working with a uno r3.

Info on the meter- from 1947, 150 ohms between terminals.

Thanks for your time, i will really need some help with this one.

You probably just have the meter movement, and there were originally some other components for +/-5V.

You can add a resistor in series to make a [u]voltage divider[/u]. If 1V is full-scale on the meter, then 600 Ohms in series would make a 1/5 voltage divider (150 Ohm meter out of 750 Ohms total) and 5V would read full-scale.

-5 to 5v.

Does the meter rest in the center? If so, it's a little tricky to negative voltages out of the Arudino, but there are ways to make the meter go negative.

You can use random PWM values to flicker the LED and to flicker the meter. But, you'll have to play-around with the timing... Maybe 1/10th of a second (100mS) between PWM changes, and probably a little longer on the meter.

You just need to learn how to analogWrite() works (PWM) and how random() works. and this will be easy!

I do not have the uno yet. I am just trying to get a geel if this is something even possible. So will i need two programs running then? One pwm digital out for the led and a anolog out for the meter? Or is that not how it works?

DVDdoug:
You probably just have the meter movement, and there were originally some other components for +/-5V.

You can add a resistor in series to make a [u]voltage divider[/u]. If 1V is full-scale on the meter, then 600 Ohms in series would make a 1/5 voltage divider (150 Ohm meter out of 750 Ohms total) and 5V would read full-scale.
Does the meter rest in the center? If so, it's a little tricky to negative voltages out of the Arudino, but there are ways to make the meter go negative.

You can use random PWM values to flicker the LED and to flicker the meter. But, you'll have to play-around with the timing... Maybe 1/10th of a second (100mS) between PWM changes, and probably a little longer on the meter.

You just need to learn how to analogWrite() works (PWM) and how random() works. and this will be easy!

The meter does also not rest on zero. It starts at -5

So will i need two programs running then?

No, the Arduino doesn't have an operating system so it can't multitask, but your program can do more than one thing.

One pwm digital out for the led and a anolog out for the meter? Or is that not how it works?

The Arduino doesn't have a DAC, so it doesn't have a true analog output.

PWM approximates analog by switching quickly between zero and 5V. If you write zero to an "analog" pin the pin is always zero. If you write 255 the pin is always 5V. If you write 126 it will be high (5v) half the time and low (0V) half the time for an average of 2.5V (50%).

At 50% PWM (126) an LED will be at half-brightness* and a 5V analog meter will read 2.5V. (A digital voltmeter will usually jump-around a lot an be give unstable readings.)

The meter does also not rest on zero. It starts at -5

That's good. Electrically, you can treat as a 0-5V meter (once you get the correct resistor for 5V full scale) although that's not what's printed on the meter face.

  • Our eyes (and ears) are not linear so it will appear brighter than half-bright at 50% PWM.