Using 2 or more Arduino to double pwm

Hi all,

Can anyone here tell me if it's easy and possibly to use two or three Arduino Uno's and connect them in such a way that I can assign lighting LED via PWM and giving me a total of 18pwm (6pwm x 3 boards) outputs?

I would like to write a program that I can sequence the LEDs in a way to make a lighting show.. 6 LEDs don't cut it hahaha..

If I had the same idea for Arduino Mega I would be able to have 45 PWM outputs!

That's if it's possible in the first place..

Main example would be to make a 18 LED fading line Or a 45 LED fading line...

Hi,

While it would be possible to use several Arduinos to provide PWM channels and have them’talk’ to each other,
it would be a lot easier to either:

a. Use some serially-addressable LEDs NeoPixel LED
b. User some LED tape that has serial LEDs already on it LED tape
c. use a PWM driver like the TLC5940 https://playground.arduino.cc/Learning/TLC5940

Yours,
TonyWilk

TonyWilk: it would be possible to use several Arduinos to provide PWM channels and have them'talk' to each other,

That would actually be an interesting project. Perhaps #2 could digitalRead an input from #1, which #1 makes low when #1 is done and it's #2's turn. Ditto from #2 to #3 and from #3 back to #1.

Not particularly difficult. Pain in the arse to maintain though, having to make sure all 3 systems have the current sketch loaded.

wilfredmedlin: Pain in the arse to maintain though, having to make sure all 3 systems have the current sketch loaded.

Maybe use 4 Arduinos. Three with identical and very basic programs to produce the PWM based on simple instructions received and the fourth with the complex program that produces the instructions.

I am doing something like that to control servos on a model railway, although a large part of the reason for several "slaves" is because they are physically separate from the master.

...R

forgive my ignorance, and thanks for replies too,

but i was thinking that arduino has TX and RX (transmit and recieve) pins?

i thought this is what it was suppose to be used for..

...

honestly, i have no choice to use standard led strings... no magical ones haha i am building a second wall pc and this time its a media server one with 7 HDDs and I want to have a thermal probe and Led to represent thermals between red and blue... i have already ddone this with my first wall pc, that uses arduino mega and using only 12 pins of pwm.. (6 sets of red/blue) strings of Leds

so this new pc needs 7x HDDs, VGA CPU Water temp, Power Supply thats 11 sets meaning id need 22 PWM pins...

heres the thing, I am running a cute LED DEMO at startup to indicate all leds work by cycling through red/blue for each string like a chaser and actually looks cool haha

i would need to communicate to all strings on 1 program to acomplish this, otherwise It's possible to edit the code for the 2nd arduino to delay to try and time the lighting correctly!!

i think i just answered my question.. adding a delay might work so long as boot time is the same everytime hahaha...

truly if I can run off 1 program it be much better :)

let me know guys... cheers shaun

toxsickcity: truly if I can run off 1 program it be much better :)

let me know guys...

a. Use some serially-addressable LEDs Separate NeoPixel 5mm LED b. User some LED tape that has serial LEDs already on it LED tape c. use a PWM driver like the TLC5940 https://playground.arduino.cc/Learning/TLC5940

Yours, TonyWilk

toxsickcity: otherwise It's possible to edit the code for the 2nd arduino to delay to try and time the lighting correctly!!

i think i just answered my question.. adding a delay might work so long as boot time is the same everytime hahaha...

My suggestion would work for that: rather than think rx/tx which means you actually have to send a message (eg "D" for "I'm Done, your turn"), or delay after startup in downstream Arduinos which would mean ensuring they all powered together, just have a wire from 1 to 2. It's really just like someone waving a flag. #1's wire starts HIGH, and #2 keeps a (metaphorical) eye on it. When #1 is done, it LOWs the pin, #2 sees that, does its thing, and LOWs it's outbound wire which #3 will have been watching.

You don't need PWM to fade/blink 18 leds and a single Uno, yes just one can do the lot.

An Uno is fully capable of turning pins ON and OFF fast enough just through code --buuuut-- then there's a 200mA current limit that may have you either limiting the current to each led to 10mA or using transistors or driver chips to supply external power that the Uno controls (switches ON and OFF).

You have options. I'd go with the less than blazing bright leds as it's by far easier and cheaper and looks nice.

toxsickcity: so this new pc needs 7x HDDs, VGA CPU Water temp, Power Supply thats 11 sets meaning id need 22 PWM pins...

So;

  • You have 11 temperature sensors/channels.
  • You have 11 pairs of RED BLUE outputs.
  • You measure the temperature and convert that into a combination of RED and BLUE intensity for each channel.
  • So very hot would be RED,very COLD would be BLUE and temperatures in between would be various mixtures of RED and BLUE.

[u]What are your temperature sensors?[/u] What sort of load is the LED strips?

As suggested a TLC5940 will give you the required PWM outputs and depending on your temperature sensor type a UNO can do the job.

Thanks.. Tom.. :)