The 4794 LED Driver example

Hey, does anyone know how I can add more led drivers to this example?

It mentions hooking up more drivers to be able to connect an "almost endless" amount of LEDs with only 4 pins. Of course, this would be very nice to know more about :slight_smile: If anyone can help out, I'd be grateful.
Reading the datasheet didn't make me much smarter unfortunately...

Hi,
In the figure 6 page 8 from 4794's datasheet, you will find an example of cascading driver (up to 16 LED with 2 drivers).
Of course you can repeat the cascade (extend the daisy chain) by adding more 4794 circuits in the same manner.

You must modify the program to control new leds. You need more PulseClock(). You can extend the for loop (up 16 with 2 x 4794) and change : if (count == 7){ to if (count == 15){ .

auguste.

Thanks for the help! Will try this out. Btw, is there any limit to how many 4794's one can daisy chain?

Conceptually none.
Electricaly, problem can occur if you have an ouput which drive lot input (here EO, STR and CP), this is the fanout limit (one ouput can drive only a limited number of inputs, current (from output) is subdivided beetween inputs).
Up to 10 ten circuits will be OK, for more it's better to regenerate signals.

hi, i am trying to connect the circuit with philips 4794 led driver http://www.arduino.cc/en/Tutorial/LEDDriver

for some reason only the first led is lit. i checked all the wiring ten times --
data (arduino pin #9 / LED driver pin #2)
strob (arduino 8 / LED driver 1)
clock (arduino 10 / LEd driver 3)
oe (arduino 11 / LED driver 15)

I use pins 4-7 and 11-14 as output / led pins on the LED driver; LEDs are connected with anodes to 5V, cathodes to driver pins via resistors. ground and 5V are wired correctly, chip orientation is correct... am i missing anything?

thanks a lot for all help in advance!
lira

Hello all,

I drew a quick visual to help everyone out who is new. I am new myself as in I just found this project today. So I am not 100 percent sure if it's correct but it looks right from what I can tell. If you look at the source code for the LED driver board

//*****
int data = 9;
int strob = 8;
int clock = 10;
int oe = 11;
int count = 0;
int dato = 0;
//******

the INT = X correlates with the number on the Arduino board. Once you see this, everything else seems to fall into place. Take a look at the images below. I hope this helps. Also inorder to daisy chain more 4794 LED driver boards, Pin 9 and Pin 10 look like the pins to connect to the next 4794 LED Driver as showen in the Datashate

http://webzone.k3.mah.se/projects/arduino-workshop/upload/default.asp?folder=28 Download: hef4794b.pdf

**Also note, I turned the Arduino Diagram upside down in the diagram to better suit the way the picture was taken. **

take care
-ff

Thank you!
L

liranik,

pay close attention to what your dato value is.

to reiterate from the original example:
"if dato is 255 all the LEDs will light up."

Has anyone attempted to use the 4794 and an acceleromoter (specifically the memsic 2125)?

I have each working on their own.
Not sure how to consolidate the hardware/code.

Thanx

Hi there,

I am new to Arduino, and I am also trying to complete this example.

I have the circuit breadboarded, but the circuit simply will not work.

The circuit is complete, except for what I am assuming are diodes (?) between the current and the LEDs.

Are these crucial to the circuits operation?

The TX light also blinks, and I'm not sure what that means exactly.

I have posted photos here:

http://xelentdesign.com/LEDDRIVER.html

Any help would be greatly appreciated,

Thanks

The resisters are not 100% necessary.

If there is to much power going into your LEDs you will learn the hard way.

I have had trouble with the EO pin. The circuit seems to work better without it.

Thoughts?

The resisters are not 100% necessary.

Yes they are, unless you want to burn things out that is.

I have had trouble with the EO pin. The circuit seems to work better without it.

If without it you mean completely disconnected then you are not driving it correctly in the software.

The resisters are not 100% necessary.

Yes they are, unless you want to burn things out that is.

Some people like the smell of magic blue smoke :wink:

Amen.

4794 LED Driver example

Hello,

Is it possible to use the above example with an MM5450BN chip?

http://www.datasheetcatalog.org/datasheet2/9/0o13pk69a9pykerrd82w018d42py.pdf

I wired it all together based on fatfinger's diagrams and ran the code listed on arduino website, not working!

Im trying it with just 1 LED right now and from what I read about 5450, it does not need a resistor for the LEDs (I tried it both ways though).

To check the LED itself I ran it with "Blink" example through pin13 and it works - so the voltage/ground part is right at least.

With the slight datasheet differences between the chips, can someone verify the following.. ?

4794 5450
STR = Brightness control ?
CP = Clock In ?
EO = Data Enable ?

int data = 9;
int strob = 8;
int clock = 10;
int oe = 11;
int count = 0;
int dato = 0;

void setup()
{
  Serial.begin(9600);
  pinMode(data, OUTPUT);
  pinMode(clock, OUTPUT);
  pinMode(strob, OUTPUT);
  pinMode(oe, OUTPUT);
}

void PulseClock(void) {
    digitalWrite(clock, LOW);
    delayMicroseconds(20);
    digitalWrite(clock, HIGH);
    delayMicroseconds(50);
    digitalWrite(clock, LOW);
}

void loop()
{
   dato = 5;
   for (count = 0; count < 8; count++) {
    digitalWrite(data, dato & 01);
    Serial.write((dato & 01) + 48);
    dato>>=1;
    if (count == 7){
    digitalWrite(oe, LOW);
    digitalWrite(strob, HIGH);

    }
    PulseClock();
     digitalWrite(oe, HIGH);
 }

  delayMicroseconds(20);
  digitalWrite(strob, LOW);
  delay(100);


  Serial.write(10);
  Serial.write(13);
 delay(100);                  // waits for a moment
}

Any advice for the newbie?