10 led bar graph

Denzel

Senior Member
I need to use a 10 LED bar graph to gisplay a LPG gas reading. but using a picaxe to control all 10 LEDs is a disguisting waste of outputs...
Are there any solutions to this.

One thing I did consider is to use 10 inputs and make the inputs low and connect the LEDs to the 3v + and the input pin. with a 220 ohm resistor and a signal diode.

are there any ideas that involve using less than 10 of any type of pin??
One wire bus?

Thanks
d-d-denz
 

moxhamj

New Member
A few options but all require other chips.
HC595 serial to parallel chips. Can put two in series to get 16 outputs or live with just 8 outputs. Takes 3 pins on a picaxe to drive a HC595.
You could use a LM3914 10 led display and drive it off a voltage created with PWM and a RC filter.
You could go for 2 7segment displays and display as numbers.
You could use an LCD display 16x2 characters and display as solid blocks in a bargraph (least power consumption option).
Plus other options I'm sure.
 

Denzel

Senior Member
hmmmm

I thought this much.
using multiple ICs provides lots of opportunities that are more bennificial than an led bar graph so I would probably go for a seven segment display or LCD etc

however..

perhaps I could go up in twos.
That is have two leds for one output thats 5 outputs which is a lot better.

thanks
 

BCJKiwi

Senior Member
Have used the LM3914 that the Dr suggests. simple to hook up and provides the current control for the LEDs eliminating the resisitors - just hook it up to a 10 Led Bargraph module.
 

BeanieBots

Moderator
Using PWM to drive an analogue input is as described by Dr_Acula.
The PWM DUTY (the amount of time high vs the amount of time low) charges/discharges a capacitor which results in an analogue voltage which is the same percentage of the supply voltage as the percentage of the duty.

Having said that, Manuka's suggestion of using a 20M is worth considering. Slightly harder to build (you would need current limit resistors on EACH LED) but much more versatile (you could customise the trip points and illumination patterns).
 
Top