74hc595 leds 3,3V 100mA


I want connect to Arduino Mega 36 leds with this features: 3,3V and 100mA. Every led will light-on one at a time, no two or more will be light at a time.

So, How can I light to maximum intensity (100mA) with arduino Mega?

Have you an schema or graphic of how to do it please?

thank you

You could use five TPIC6B595 shift registers (ebay), daisy-chained, for the 36 LEDs.
One chip can drive up to eight LEDs.

Works the same as a 74HC595, but it can sink up to 150mA per output.
Only three Arduino pins are needed for the five chips, so any (5volt) Arduino can be used.

A 15ohm resistor is needed in series with each LED (assuming a 5volt supply).

100mA leds are getting in the high power part. If you use resistors to limit the current (from 5V), note you will wast a big part (170mW) in the resistor. But then again, because you only turn on one at a time you can get away with a single resistor for all.

That being said, the title says hc595 but you don't mention it in the text... Weird. But both the hc595 and the Arduino can't drive 100mA directly. You need a transistor per led for that. With 36 leds that is a bit messy. You could go for an array like the ULN2803. Another option would be to go for an integrated solution like the TPIC6B595

I said 74HC595 but If I can do it with Arduino Mega with no shift registers, I think is simpler.

If I can connect only one resistor then Can I connect only one transistor for all? I light on one led at a time.

thank you

Can I connect only one transistor for all?

I clearly said you can indeed get away with a single resistor but I explicitly said you need a transistor per led...

If you don't need/want shift registers you can use only ULN2803 as transistor arrays.

Another question about this. I would like to control intensity of leds with a potentiometer. How can I do this?

many many thanks

Mm, I would say the simplest way is to add a high side driver (NPN driving a PNP) on the other end of the led. Because you only lit one led at a time and already have a common resistor you can do with a single driver. That driver you simply PWM :slight_smile:

I think is better to use TPIC6B595 with any Arduino (not Mega) for example Arduino Pro Micro.
Then, Can I connect to a PWM pin the potentiometer and control the intensity of every led?
If yes, If I put the potentiometer to 0 then the led can burn it?
many thanks

TPIC6B595 connected to a Pro Micro, Pro Mini or Nano is fine.

But with the TPIC6B595 alone you can't dim (at least not easy..)

And you would not connect the pot to a PWM but to an analog pin. You use the PWM (of which you let the duty be controlled by the value returned by the analog pin to which the pot is connected) to drive the other side of the LED. So you dim it via one side and select the one you want on via the TPIC6B595.

I can draw it if you really want.

Yes, please. I don't understadn what you say.
many thanks

Here you go:
High side PWM.jpg

You put three resistors and two transistor PNP and NPN
can you tell me which transistor and value for resistor please?
many thanks

what is vlcd, VCC = 5V?

vlcd is me trying to write VLED :smiley:

Values are not critical. Like 1k for the left two. And like 470Ω to the base of the PNP. And RLED is whatever resistor you need to run your LED on the current you want.

For the transistors any general purpose BJT will do. In Europe BC547 (NPN) and BC557 (PNP) would be pretty common.

I'm completely unaware of what your application for this is, but is this something that could be accomplished with addressable LEDs?

But with the TPIC6B595 alone you can't dim (at least not easy..)

Yes you can, in this case (single LED on).

Just PWM the OE (output enable) pin of the TPIC6B595 chips.
No extra transistor circuit needed.

Yes, addresable LEDs but one at a time with 3 Volts and 100mA.

Yes, addresable LEDs...

Do you even know what addressable LEDs are?

In the subject you can see it 74hc595 shift registers

595 is not an addressable LED.

@Wawa, damn! Did not think about that! That saves the high side.