Trying to make an LED voltage meter (Dot mode) - Page 1
Forum section: electronics / beginners

author: evglabs
author_rank: Contributor
timestamp: July 11, 2019, 05:33:06 pm
content: I'm trying to make a little project that would be an LED voltage meter, but I have a few requirements that I'm not sure how to implement:I need all components to be surface mount, through hole is a deal-breaker.Powered by 2 CR2016/CR2032's in series.Between 10-20 LEDs BUT in dot mode, so if the 5th LED is on, 1-4 would not be.And small, the circuit needs to fit on a credit card sized PCB.I'm aware of the LM3914 but the only surface mount I can find is about $3 and that blows the budget.I know I could do this with a microcontroller but the project is more for learning, so I figure there's got to be a way to do this without one.I'm thinking the voltage signal would be coming from an opamp (so I can adjust the gain and offset) then to whatever circuit to drive the corresponding LED. If I adjust the gain and offset so the range would be 4.0V to 5.0V each LED would correspond to a 0.1V step.Also the LED's do not need to be bright (in fact it would be better if they were more on the dim side for power consumption).Thanks, I hope I explained myself (I'm still very much a beginner to electronics).I should say, I don't really need the circuit designed, I just don't know WHAT to look for to design it.

author: MarkF
author_rank: Super Contributor
timestamp: July 11, 2019, 07:07:32 pm
content: Here are two options:(However, I think you will end up spending more than you would with a LM3914, LM3915 or LM3916 in the long run.)Bargraph with three LM339Bargraph with transistors

author: evglabs
author_rank: Contributor
timestamp: July 11, 2019, 07:10:37 pm
content: Thanks, but I really need it in dot mode (so only one led is lit at a time). That's the main part I'm struggling with. I can't figure out how to turn off previous LEDs.

author: MarkF
author_rank: Super Contributor
timestamp: July 11, 2019, 07:14:22 pm
content: Oh, I missed that.Just to confirm, the LM39xx series already does this? You just want to cut cost?You could setup voltage windows with the LM339. But, six LM339's and logic chips would break the bank.

author: evglabs
author_rank: Contributor
timestamp: July 11, 2019, 07:22:26 pm
content: Well, cost and size. I want it to fit in my pocket without having the through-hole pins tearing it up.Yeah, the LM391X can do either bar or dot modes.But, VOLTAGE WINDOW! Thanks, I was missing that term! I may just have to go with a microcontroller for cost, but I knew there had to be a way to do it without one!

author: mariush
author_rank: Super Contributor
timestamp: July 11, 2019, 07:34:48 pm
content: Maybe you could do something with a bunch of comparators (or resistor dividers to get voltage on input pins below minimum voltage for digital 1) and a parallel eprom ... depending on voltage you set address pins to 1 or 0, and the eeprom spits out the data at a particular address ... and you code it in such a way that you only have 1 led light up at any point.Sincerely doubt it would be cheaper than a microcontroller, especially considering you can limit the current to leds from the micro simply by pwm-ing the output so you won't need resistors... and you could also get the micro running from a single 3v coin cell batteryYou can connect two or more leds per pin just by reversing pins (set one on output and one on input for one led , then reverse for the other... or you could have a bunch of pins as output and use other pins as current sinks) if you want smaller pin count micros.

author: evglabs
author_rank: Contributor
timestamp: July 11, 2019, 07:42:03 pm
content: That is way above me (but something new to learn!) thanks. I probably will go with a micro for this project, since with PWM I'd be able to fade between steps also.But, I wanted to ask here because I knew there were some concepts I didn't know, like the voltage window and your idea. Thanks!

author: Kleinstein
author_rank: Super Contributor
timestamp: July 11, 2019, 08:13:41 pm
content: One could try a 4017 decimal counter to select 10 LEDs one at a time and voltage increasing in time until the voltage is about right. So kind of a very simple single slope ADC. There may be cases with 2 LEDs on at the same time - this could kind of compensate for low resolution.I would probably test this first on a bread board with THT parts.