Remote Control of a Stepper Motor

Have a UNO, IR Receiver and Motomamo Driver in a box which is connected to a 5 volt 2 amp stepper motor located 12 feet from the box. During develpment of the software I monitored the IR decoding function on my laptop. IR remote codes are detected properly and generate the desired control signals to the motor driver. When I connect the stepper motor and attempt to control the motor, control is very erratic. I assume it's due to rf interferrence to the interrupt driven IR receiver software. I use the IRremote.h library. If I use physical switches to control the stepper, it works ok. Possible fixes are decoupling capacitor the 5V power source, or capicitors on the stepper motor or ? If so, what size caps?

Bob Weber

You won't have a lot of joy if powering the motors from the same supply as the IR receiver and Uno - motors put bucketloads of noise
onto their supply. Lots and lots of decoupling and an RFC would be one way to try and share the supply, but I'd definitely add more decoupling at the motor driver, then add more filtering (RC ? LC?) on the supply to the IR receiver (since its the most sensitive component).