I am trying to control 64 leds through a number of 8:1 analog multiplexers. The input is from pin 11 on the Arduino which is giving 40mA (maximum) and it is pulsed at 38kHz. Then I use other pins to select one of 64 leds to control. For testing, I am just trying one of those leds. The problem is that the current across the led is just 2mA, which means it is very dim. Using a multimeter, the current after the first multiplexer seems to be 4mA and after the second just 2mA. How can I get the current to increase? Thanks in advance!

  • Please add circuit. Guess you are using 4051. The internal resistor is approx. 70 ohm. Please see ti.com.cn/cn/lit/ds/symlink/cd74hc4051-ep.pdf Aug 23, 2016 at 22:21
  • 2
    Analog multiplexers are a silly choice for a digital signal. Be sensible.
    – Majenko
    Aug 23, 2016 at 23:03
  • Don't depend on a digital output to provide you 40mA. That is the maximum current it can provide before getting damaged.
    – Gerben
    Aug 24, 2016 at 8:18

1 Answer 1


Analog multiplexers are not a good design choice for switching digital signals.

You should instead choose a digital solution. Maybe the 74HC138 would be a better choice? That's a 3-to-8 decoder with 3 enable inputs.

You could use 9 of them to reduce pin usage on the Arduino, or 8 of them if you have pins to spare.

One of the enables on the first-stage can be a "mater enable" - or tie one of the enables of all 8 of the second-stage together for a "master enable". Another enable to all the 8 second-stage muxes can be the PWM signal. The third is driven by the Arduino or the first stage as a MUX selector.

Something like this arrangement:

enter image description here

Note that the outputs are active low, so you would connect the anode of your LEDs to +5V and the cathode, through a suitable resistor, to the output.

Another option would be to use a set of shift registers that have an output enable pin. Drive that pin with the PWM signal and you can have any combination of LEDs enabled at once.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.