caramoan tour package

caramoan tour package

Author Topic: Arduino and led bar graph questions  (Read 1369 times)

Offline slide

  • CR2032 Battery
  • **
  • Posts: 13
  • Pogi/Ganda Points: 0
Arduino and led bar graph questions
« on: April 28, 2010, 11:10:23 AM »
I have a hobby project that needs to drive a 16-led bar graph using an arduino duemilanove clone.  I can spare as much as pins 4 output pins (I need the other pins for an LCD and a 4-digit 7-segment LED display).  Space is also limited and the display needs to be as tiny as possible.

I'll be protoyping this myself so, as a mere hobbyist (all the formal electronics education I got was in high school),  I can't use smd parts (no smd gear and bad eyes) and my etching skills are limited to single sided boards.

The question:  What is cheaper and more simple to build?

1)  Using a 16-bit led driver like the Texas Instruments TLC5940.  No way I can afford using the neat specialized Maxim chips.

2)  Using two 8-bit shift register chips like the 74HC595 and lose space due to the transistors and resistors involved.

3)  Using one 8-bit shift register chip and multiplex the LEDS into a 4x4 array and be forced to use a double-sided board as I suffer designing the traces.

Thanks!

EDIT:  Corrected the shift register chip part number

Philippine Electronics Forum

Arduino and led bar graph questions
« on: April 28, 2010, 11:10:23 AM »

Offline rdpzycho

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 10728
  • Pogi/Ganda Points: 632
  • Gender: Male
  • Respect Begets Respect
    • rdpzycho
Re: Arduino and led bar graph questions
« Reply #1 on: April 28, 2010, 11:15:49 AM »
^ are you referring to 74HC595? 595's can directly drive LED's. or use an IC driver like ULN2803 if you need more current.
‎"Divide each difficulty into as many parts as is feasible and necessary to resolve it."
- Rene Descartes

"For every difficult problem there is always a simple answer and most of them are wrong."
- Clayton Paul

Philippine Electronics Forum

Re: Arduino and led bar graph questions
« Reply #1 on: April 28, 2010, 11:15:49 AM »

Offline slide

  • CR2032 Battery
  • **
  • Posts: 13
  • Pogi/Ganda Points: 0
Re: Arduino and led bar graph questions
« Reply #2 on: April 28, 2010, 11:19:25 AM »
sorry, i meant 595.  i'm getting dimming when i'm driving all the leds without transistors, but it may be due to the power supply.   thanks for the ULN2803 tip;  I'll try that.

Philippine Electronics Forum

Re: Arduino and led bar graph questions
« Reply #2 on: April 28, 2010, 11:19:25 AM »

Offline rdpzycho

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 10728
  • Pogi/Ganda Points: 632
  • Gender: Male
  • Respect Begets Respect
    • rdpzycho
Re: Arduino and led bar graph questions
« Reply #3 on: April 28, 2010, 11:27:47 AM »
are you sourcing current from the 595 or are you sinking them?
‎"Divide each difficulty into as many parts as is feasible and necessary to resolve it."
- Rene Descartes

"For every difficult problem there is always a simple answer and most of them are wrong."
- Clayton Paul

Philippine Electronics Forum

Re: Arduino and led bar graph questions
« Reply #3 on: April 28, 2010, 11:27:47 AM »

Offline slide

  • CR2032 Battery
  • **
  • Posts: 13
  • Pogi/Ganda Points: 0
Re: Arduino and led bar graph questions
« Reply #4 on: April 28, 2010, 11:31:11 AM »
"sourcing" is providing a voltage source, right?  if so, that's what i'm doing.  here's the tutorial i followed:

http://www.arduino.cc/en/Tutorial/ShiftOut

Philippine Electronics Forum

Re: Arduino and led bar graph questions
« Reply #4 on: April 28, 2010, 11:31:11 AM »

Offline rdpzycho

  • Technical People
  • Solar Power Satellite
  • *****
  • Posts: 10728
  • Pogi/Ganda Points: 632
  • Gender: Male
  • Respect Begets Respect
    • rdpzycho
Re: Arduino and led bar graph questions
« Reply #5 on: April 28, 2010, 11:39:12 AM »
what are the resistor values?

the 595 can source and sink 35mA but sometimes sourcing can cause voltage drops, hence, the need to recompute the resistor values. I prefer sinking current when driving LED's.
‎"Divide each difficulty into as many parts as is feasible and necessary to resolve it."
- Rene Descartes

"For every difficult problem there is always a simple answer and most of them are wrong."
- Clayton Paul

Offline slide

  • CR2032 Battery
  • **
  • Posts: 13
  • Pogi/Ganda Points: 0
Re: Arduino and led bar graph questions
« Reply #6 on: April 28, 2010, 11:51:47 AM »
re:  resistor values,  220ohms as per the tutorial.

I prefer sinking current when driving LED's.

ah, i need to this in the software to tell the 595 to sink, right?  thanks, will read up some more.  

you've been very helpful,  the 595's are a very cheap option.  I got a lot of 10 for ~P 132 from ebay.  can i find them cheaper in local stores?

EDIT:  looks like i have to use ULN2803 or some other transistor array to make sinking happen.  kala ko pwede sa software.

Offline insomartin

  • Technical People
  • Nuclear Reactor
  • *****
  • Posts: 4827
  • Pogi/Ganda Points: 320
  • Gender: Male
  • Nalulunod lang...
Re: Arduino and led bar graph questions
« Reply #7 on: April 28, 2010, 12:50:59 PM »
i really think i seen this a few days ago... ikaw nga ata... ^_^

Offline slide

  • CR2032 Battery
  • **
  • Posts: 13
  • Pogi/Ganda Points: 0
Re: Arduino and led bar graph questions
« Reply #8 on: April 28, 2010, 01:46:49 PM »
if sa pinoypc mo nakita, +1!

Offline Kaizer03

  • Nuclear Reactor
  • ****
  • Posts: 4847
  • Pogi/Ganda Points: 225
  • C#<-->Android<-->Java
    • PhilRobotics
Re: Arduino and led bar graph questions
« Reply #9 on: April 28, 2010, 01:55:24 PM »
re:  resistor values,  220ohms as per the tutorial.

ah, i need to this in the software to tell the 595 to sink, right?  thanks, will read up some more. 

you've been very helpful,  the 595's are a very cheap option.  I got a lot of 10 for ~P 132 from ebay.  can i find them cheaper in local stores?

EDIT:  looks like i have to use ULN2803 or some other transistor array to make sinking happen.  kala ko pwede sa software.

yep, instead output 1 to turn ON the LED, this time, you will Send 0 to turn on the LED(from Shift Register connected to its Cathode.. from the LED Anode Connected to a Resistor then followed by the supply...

you can find 74HC595 at e-gizmo but im no so sure about the price.. i bought 15pcs of it last 2008 for 27 per piece=)
Lend a hand for those who are in need!=)

Stop Hijacking!=) More Technical Posts!=)
 ;)

Kaizer Killer EX Pre-Alpha

Philippine Electronics Forum

Re: Arduino and led bar graph questions
« Reply #9 on: April 28, 2010, 01:55:24 PM »

 

Privacy Policy

Contact Us: elabph@yahoo.com