Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Indicator LED Circuit How To

Status
Not open for further replies.

jack0987

Member
I would like to add 32 indicator LEDs to my mega and control them individually using 4 common data lines and 8 latch lines.
Thinking of using a 74LS75 IC.

This is my basic block circuit.
Please suggest improvements, etc.

ArduinoLED.jpg
 
Lots of different chips you could use, here are just two more low cost options which only need two i/o lines, I2C, from the Arduino.
 

Attachments

  • 001088.jpg
    001088.jpg
    9.1 KB · Views: 201
  • 001086.jpg
    001086.jpg
    14.2 KB · Views: 206
You need to look at the data sheet.
The 74LS75 is not designed to source much current, it's much better at sinking current (out high source is rated at 3.5V, 400µa. while the out low sinking is rated at 0.2V, 16mA)
So, to use that, you should connect the LED cathodes to +5V and the resistor to the latch output.
You then turn on the LED with the output latched low.
 
You need to look at the data sheet.
The 74LS75 is not designed to source much current, it's much better at sinking current (out high source is rated at 3.5V, 400µa. while the out low sinking is rated at 0.2V, 16mA)
So, to use that, you should connect the LED cathodes to +5V and the resistor to the latch output.
You then turn on the LED with the output latched low.

I was thinking the very same thing. Thanks for the input.
 
I'd suggest you use four, cascaded, eight bit shift registers such as 74HC595 (or HCT595).

You can drive them via bit-banging the clock (SHCP) and data (DS) inputs, or using an SPI port.
Shift 32 bits / four bytes in then pulse the load (STCP) input to transfer the data to the outputs.

Leave /OE tied to 0V/VSS to permanently enable all outputs.

The outputs can source or sink 6mA, plenty for high brightness LEDs with appropriate resistors.

If you want high power outputs, you could use MIC5841 or MIC5891; they work in a similar way, but have rather higher current outputs, which can also work with higher voltages, up to 50V or so.
 
If using the Arduino could not be simpler with simple direct control using the library for the MCP23017 ; the data sheet quotes a large sink source ability of 25ma per pin with a total chip load of over 100ma.

https://www.arduino.cc/reference/en/libraries/mcp23017/

The PCA9685 also drives at 25ma per led and can handle a total load of 400ma, but it also allows you to dim each led to whatever level you want. See the Adafruit library as mentioned in this link.

https://forum.arduino.cc/t/fading-led-using-i2c-and-pca9865/396373

In both cases you can use two or more modules due to each having its own address pins.
 
Can you tell us why you want to control 32 LEDs?
A 4 by 8 matrix would require the same number of pins and no external components - except LEDs and resistors.
Modern LEDs are very bright with just 5mA so your Mega can easily do this.

Mike.
Edit, would probably need 4 npn transistors as well.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top