Running 6 PWM motots and Ir IRremote.h - Can it be done?

I'm new using the Arduino Uno so please don't laugh too hard...

I have a project that requires running 6 feedback DC motors with PWM input. I want to use an IR remote to control the Arduino Uno.

When I purchased the Uno I specifically asked the reseller if this could be done with the Uno (as opposed to a Mega or Raspberry Pi) and the answer was to "use the Uno". After much tinkering and reading it turns out I can't use the Uno because the IRremote.h library uses a timer that's required for generating the PWM train for my quad motor shield which now runs only 2 motors correctly - the other two motors are limited to either 255 (HIGH) or 0 (LOW) when using the analogWrite function. And I still haven't connected my 2 other motor shields for the high amperage actuators....

Can I do this with the Uno or should I: 1) reconsider my input control and not use the IR at all (maybe radio?) or 2) use an Arduino Mega, or 3) reprogram the IrRemote.h library to allow me to use Timers 0,1,2 ; or 4) use a daughterboard (yeah I know I'm old) like the Tiny dedicated to processing the IR input and somehow feed the decoded result to the Uno (I haven't a clue how).

Any help would be most welcome, I'm stumped...

Can I do this with the Uno

No.

  1. reconsider my input control and not use the IR at all (maybe radio?)

Why are you asking US that?

  1. use an Arduino Mega

That would work.

  1. reprogram the IrRemote.h library to allow me to use Timers 0,1,2 ; or 4)

How many timers did your research show the Uno has? How many PWM pins can each timer drive? Which timer does the IR library use?

The bottom line is “which two pins don’t you want PWM to work on?”

Thanks for you reply, and for your patience.

The upshot is that on the Arduino Uno I can get 4 motors running properly with PWM, and the other 2 with ON-OFF, which is not a problem since they run large loads with sufficient inertia to dampen the movement, and they have limit switches to prevent self-destruction. It would be possible to run these 2 motors in PWM as well, but with an external 5-dollar DPDT relay that will redirect the PWM train from one of the working pins to the input pin of the Shield running the large motors. Essentially, I use the non-PWM pins at HIGH e.g. (analogWrite (pin 9, 255), or (analogWrite (pin 10, 255) ) to activate the DPDT relay that redirects the PWM output from one motor to the other. A little contrived, not very elegant, but it will work and it's economical.

For the record, I investigated deactivating the irrecv.enableIrIn() functionality in the Irremote.h and IrremoteInt.h utilities to free up Timer 1 momentarily to run PWM on pins 9 and 10 (my large motors) i.e.

irrecv.disableIRIn(); //disable IR receiver momentarily - THIS FUNCTION DOES NOT EXIST IN IRREMOTE.H
.
.
.
analogWrite(Pin 9, 180); //generate PWM pulse train for motors controlled by pins 9 and 10
analogWrite(Pin10, 126);
.
.
.
irrecv.enableIRIn(); //re-activate IR receiver to receive remote commands THIS FUNCTION EXISTS IN IRREMOTE.H

but since there is no recorded evidence (blogs, forums, literature) this will work without wreaking havoc on the ISR's attached to Irremote.h, I've lucidly abandoned the idea. If you think this approach could lead to a potential solution, and know of a work-around within the Irremote library please let me know.

You could use a TLC5940 shield to drive 16 PWM channels over Wire/TWI/I2C.