Hardware optimization challenge

alband

Senior Member
Here's the challenge.
To get a 20 seg bar graph to display different segments according to an input voltage (like those retro volume level and equalizer indicators) using as smaller chip as possible. Also considering price and number of components.
There is the obvious solution of a whopping great chip but that has the downside of a whopping great chip.
There are lots of ways to do this with hardware and code. I was thinking of something like each segment having a resistor value and a zener diode, then using some kind of analogue level ouput from on pin to all the segments but I'm not sure how I'd do it.
See who can get it the smallest and cheapest.
Good luck... :D
 

LizzieB

Senior Member
Just use two LM3914's for about $6 each, unless your time isn't worth anything and you enjoy wiring.
 

alband

Senior Member
Hu
Hadn't come across that before, this may have saved a lot of time in the past, certainly will now, thanks.:)
 

alband

Senior Member
Two tens for different colours to split hairs (or bar graphs), but that site and that section, so credit where credit's due.
 

moxhamj

New Member
08M and 3 HC595s? Am presuming response time isn't greatly important.

08M $4 and HC595s are 50c each (futurlec) = $5.50 total.
 

westaust55

Moderator
Dr A suggests 08M (8pin) + 3 x 595’s (16pin ea) = 56 pins

To reduce size (area required) :

1. 14M + 2 x 595 = 46 pins – believe can change 1 input to an output to achieve this and use 4 pins on PICAXE as well (18% reduction in IC space)

2. 18X and 1x 23017 = 46 pins uses I2c and 4 pins on PICAXE plus some spare IO pins as well (18% reduction in IC space)

i2c is ~50% faster than SPI. See my table in post 8 for SPI vs i2c speeds at http://www.picaxeforum.co.uk/showthread.php?t=10836

23017 = $1.56 on Futurlec. Cannot find prices for 14M and 18X there but Dr-A has better price
 

moxhamj

New Member
I think LizzieB might be winning here. Futurlec have the LM3914 for $1.75ea, so that is $3.50 and less pins too (36).
 

alband

Senior Member
Thanks, and yes, indeed shocking.

Don't worry though, I'm going to have a PICAXE driving it with PWM. Any ideas on an ideal circuit sttings to stabalize the PWM?
 

BeanieBots

Moderator
For twenty segments, you don't need much PWM resolution which is good because that will let you run fast. Suggest PWMout pin,20,var.
That would give you a range of 0 to 80 for var. ie inc by 4 for each segment.
Not sure about input impedance on the LM3914 so I'll let you look it up and work out the RC value. Start around 10k/100nF and see if that gives any flicker.
 

LizzieB

Senior Member
I think LizzieB might be winning here. Futurlec have the LM3914 for $1.75ea, so that is $3.50 and less pins too (36).
Yeah, I was using a shipping included price I found on ebay. I do like your HC595 idea though, I can use that somewhere.

I'm surprised no one came up with a low pin count multiplexed solution, or are we burned out on that one after the filaments challenge?
 

moxhamj

New Member
If the challenge was a moving dot on a bargraph, I reckon there are definitely some low pin count multiplexed solutions, charilieplexed etc. If it is a moving bar, I think that gets more complex because there will be visible flicker especially when most/all of the leds are lit.

Re the original idea of a cascade of leds - there are solutions to that one using a resistor chain in parallel with a chain of leds. I've seen a solution using 4 leds and 4 resistors but the resistor values have to be calculated, and the leds don't change very cleanly from one to the next. Plus, at 20 leds you will need at least 35V if they are red, and more for other colours.

The LM3914 was specifically designed for this purpose.
 
Top