This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

PWM hardware used to blink/fan 16 leds with driver

Hello

i have made a program to smoothly blink/fan/vary the intensity of 16 LEDs together using 4 PWM with 4 output pins, the program seems to work well with around 4 leds, but when i attach more LEDs like 8, the other leds start to blink in a abnormal manner. Just wanted to know why it is happening like this? is it somewhat related to optimal output power of the nrf52, or maybe some mistake in code. Also the leds have led drivers attached and external power source. i just have to give 16 pwm signals to them.

i have used the pwm hardware as is recommended for smoother variation.

link to zip-

drive.google.com/.../view

Parents
  • Hi

    If the problem happens when you physically attach more LED's, and not when you add more PWM channels in the software, I would have to assume it is related to the amount of current sourced to each pin.

    Have you measured how much current is sourced to each LED?

    The nominal source/sink current for each GPIO is only 0.5mA, and if you exceed this then the behavior might be unpredictable.

    You can set up to three pins in high drive mode, where you can source/sink up to 5mA, but this doesn't really help if you are trying to use more than 3 pins.

    Do you have a schematic or diagram showing how each LED is connected?

    Best regards
    Torbjørn

  • Hi

    In terms of schematics, I was looking for one showing what type of LED driver you are using, and how it is connected to the nRF52832 GPIO pin.

    It doesn't have to show all 16 pins, assuming they are all connected in a similar fashion.

Reply Children
No Data
Related