Will software pwm be reliable in this project?

Hello everyone, I am quite new to arduino and new to the forum. I lately have been messing with these smd5050 (dumb/non-adressable) rgb strips. I decided to take on this project of making something like an animation thing using them for my balcony fence. I will be needing pwm outputs from the arduino to control each fo the led strips. But I will be needing 42 of these pwm outputs. I am using an arduino mega but the number of pwm pins it has is not enough. I was thinking of using software pwm to convert all the digital pins into pwm pins in the mega. But the problem is, will the system work reliably and will the cpu power be enough? All of your help will be appreciated by me.

Should be possible with the MobaTools Library - or ask @MicroBahner

You might consider using three of these:

1 Like

Hi, Mr.noiasca But will be able to control all the 42 pins reliably. I will also need to write alot of code for the animations

Mr.jim-p, I have looked into this. But it would be much easier if I could use software pwm.

Are these commonly available?

If you say so

But I will certianly consider this idea aswell, but I wanted to know if using software pwm will be reliable aswell? Will the cpu have enough power?

If you search for PCA9685 module or board you will see them on Amazon, Ebay, AliExpress

I can't answer those questions as I have never tried to create 42 software PWM outputs.
There are two ways to find, write the code and try it, or wait for someone to come along who actually has working code for 42 PWM

Unfortunately not. The soft PWM's of MobaTools are special for servos, or only for fading up/down of leds - and not 42 pwm.

1 Like

I have software PWM running on a 32 bit PIC clocked at 48Mhz. I was very careful to write the PWM code to be quick. There are 7 channels, I can't remember exactly but I think it runs at around 700Hz. 42 software PWM channels on a Mega? Forget it.

Use the PCA9685 as others have suggested.

Mr.PerryBebbington, yeah I think I will I have to give up and use a pca9685 module then. Thanks very much for insight though.

Ok Mr.MicroBahner I will use a hardware timer for this project then and thankyou for your time.

If you have decided on the PCA9685, you will still need a driver circuit for the LED strips. The PCA9685 can only drive one LED.

For any discussion about the PCA9685, please use the dedicated topic @vinuthgamage created for that subject:

All further discussion in this topic will be focused exclusively on the subject of software PWM.


@vinuthgamage it is OK to make separate forum topics for well defined discrete aspects of a project.

However, there are some requirements for this to be done in a manner compliant with the rules of the forum and respectful of the people offering free help:

Avoid convergence

Even when the topics start out on discrete subjects, they have a tendency to converge to parallel discussion over time. Parallel discussions are harmful because they waste the time of the helpers who unknowingly duplicate the previous efforts from the other topic. For this reason, you must manage the scope of the discussion to prevent this from happening. If discussion starts to stray into the territory of the other topic, then redirect the participants over to the other to continue that discussion.

Cross-reference

The readers of one topic won't necessarily be aware of the content in the other. If information in one topic is relevant to the discussion in another, help your helpers by mentioning it there with a link.

1 Like

Extremely sorry Mr pert if I made this mistake of not linking this forum to the previous discussion. Next time I will make sure this will not happen and I will link the conversation to the previous one. However I thank you very much Mr pert for letting me know about this. Again, my apologies.

1 Like