How to make a "visual voltmeter" using and LED strip

Hi,
I am new to the forum and fairly new to Arduino. I am working on a project where I would like to show a visual comparison in the differences in voltage between two sources.

In my project I am going to have two scale models of different windmill designs. What I would like to do is create a visual representation of the generated voltage from each windmill using an led strip next to each model. I would like the leds to climb the strips and change color based on how much voltage is being generated by each windmill. The idea is to create a very simple and eye catching way for non technical observers to understand and visualize the difference in voltage produced by the two windmills. I have built two voltmeter circuits and can visually show the two voltages using the terminal plotter. However, I am not really sure how to incorporate the leds though . I really like the looks of some of the led vu meter projects and thought that maybe hijacking some code from a project like that would work but I am just not sure. Any input would be much appreciated.

Thanks

. I really like the looks of some of the led vu meter projects and thought that maybe hijacking some code from a project like that would work but I am just not sure.

Yes, that would work. Except audio meters are calibrated in dB and you probably want a linear display. (But, linear doesn't mean it has to go down to zero... You might want to just cover the top half of the voltage-range, etc., to highlight the difference.)

So, it usually just a series of if-statements in a loop... If voltage > X, turn the LED on... If you built your plotter design with the Arduino, this should be super easy!

If you run out of I/O pins and you want more LEDs, you can use serial data with [u]shift registers[/u] to address an almost unlimited number of LEDs. I made a stereo VU meter effect with 24 LED on each side with an Arduino Uno and a few daisy-chained [u]serially-addressed LED drivers[/u] (Same concept, different chip.)

P.S.
Depending on the size of your models, don't be afraid of spacing-out the LEDs for a "big meter"... My VU meter effect is 8 feet tall.

P.P.S.
There is a bar/dot meter chip, the [u]LM3914[/u]. No programming required!!! The only reason I didn't use it for my "giant VU meter" effect is that I wanted an optional sequencing effect... And, then I ended-up with several different effects, and the VU meter can reverse or invert so it doesn't get boring.

Hi,
I am just getting back to this project. Thank you for your reply. I am actually using a neopixel programmable led strip but I am still a little fuzzy on how to make it work. I am using a simple voltage divider to measure the voltage from my two sources. See the code below.

/*********************************************
*

  • Arduino DC Voltmeter

*********************************************/

float vPow = 4.7;
float r1 = 100000;
float r2 = 10000;

void setup() {

Serial.begin(9600);

}

void loop() {
float v = (analogRead(0) * vPow) / 1024.0;
float v2 = v / (r2 / (r1 + r2));
float v3 = (analogRead(1) * vPow) / 1024.0;
float v4 = v3 / (r2 / (r1 + r2));

Serial.print(v2);
Serial.print(",");
Serial.println(v4);

delay(1000);
}

I am looking to incorporate the LED strip to show the difference in voltage between the two sources.

Thanks

Have a look at the FastLED libray.

Thank you, that looks promising but please keep in mind I am a complete neophite so I am not sure what to do with all the potential of that library.

I am not so much a newbie, and I agree that it looks complex. The thing is that with those strips, you will need a library because of the way data is written to them. Adafruit also has a neopixel library that may be easier to use, I don't know as I have never used it.

That is what I was intending to use originally. In the past I made a vu meter for my classroom using the neopixels and neopixel library. I followed the instructions found here:Overview | LED Ampli-Tie | Adafruit Learning System . I was hoping to modify the sketch from that project to change the input from a microphone to the voltmeter circuits. I am just not sure how to modify it correctly. In addition to modifying the input I would also need to modify it for two voltmeter circuits. I have already cut and soldered my neopixels to make two addressable strips.